Version Description
Download this release
Release Info
Developer | gutenbergplugin |
Plugin | Gutenberg |
Version | 9.9.2 |
Comparing to | |
See all releases |
Code changes from version 9.9.1 to 9.9.2
- build/a11y/index.asset.php +1 -1
- build/a11y/index.js +1 -1
- build/annotations/index.asset.php +1 -1
- build/annotations/index.js +1 -1
- build/api-fetch/index.asset.php +1 -1
- build/api-fetch/index.js +1 -1
- build/autop/index.asset.php +1 -1
- build/autop/index.js +1 -1
- build/blob/index.asset.php +1 -1
- build/blob/index.js +1 -1
- build/block-directory/index.asset.php +1 -1
- build/block-directory/index.js +4 -4
- build/block-editor/index.asset.php +1 -1
- build/block-editor/index.js +12 -12
- build/block-library/index.asset.php +1 -1
- build/block-library/index.js +3 -4
build/a11y/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'ccf1afc72b60900287608e652eabac95');
|
build/a11y/index.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.wp=window.wp||{},window.wp.a11y=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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=
|
1 |
+
window.wp=window.wp||{},window.wp.a11y=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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=536)}({1:function(e,t){e.exports=window.wp.i18n},332:function(e,t){e.exports=window.wp.domReady},536:function(e,t,n){"use strict";n.r(t),n.d(t,"setup",(function(){return p})),n.d(t,"speak",(function(){return u}));var r=n(332),i=n.n(r),o=n(1);function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"polite",t=document.createElement("div");t.id="a11y-speak-".concat(e),t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");var n=document,r=n.body;return r&&r.appendChild(t),t}var d="";function p(){var e=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");null===e&&function(){var e=document.createElement("p");e.id="a11y-speak-intro-text",e.className="a11y-speak-intro-text",e.textContent=Object(o.__)("Notifications"),e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("hidden","hidden");var t=document.body;t&&t.appendChild(e)}(),null===t&&a("assertive"),null===n&&a("polite")}function u(e,t){!function(){for(var e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text"),n=0;n<e.length;n++)e[n].textContent="";t&&t.setAttribute("hidden","hidden")}(),e=function(e){return e=e.replace(/<[^<>]+>/g," "),d===e&&(e+=" "),d=e,e}(e);var n=document.getElementById("a11y-speak-intro-text"),r=document.getElementById("a11y-speak-assertive"),i=document.getElementById("a11y-speak-polite");r&&"assertive"===t?r.textContent=e:i&&(i.textContent=e),n&&n.removeAttribute("hidden")}i()(p)}});
|
build/annotations/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'a63d59c7df7e64f65bc668a627eb58c2');
|
build/annotations/index.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.wp=window.wp||{},window.wp.annotations=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=527)}({1:function(t,e){t.exports=window.wp.i18n},13:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(48);function o(t,e){if(null==t)return{};var n,o,a=Object(r.a)(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}},15:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(25),o=n(39),a=n(31);function i(t){return function(t){if(Array.isArray(t))return Object(r.a)(t)}(t)||Object(o.a)(t)||Object(a.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},193:function(t,e,n){"use strict";var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),o=new Uint8Array(16);function a(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}for(var i=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,u=function(t){return"string"==typeof t&&i.test(t)},c=[],l=0;l<256;++l)c.push((l+256).toString(16).substr(1));e.a=function(t,e,n){var r=(t=t||{}).random||(t.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]).toLowerCase();if(!u(n))throw TypeError("Stringified UUID is invalid");return n}(r)}},2:function(t,e){t.exports=window.lodash},24:function(t,e){t.exports=window.wp.richText},25:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,"a",(function(){return r}))},31:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(25);function o(t,e){if(t){if("string"==typeof t)return Object(r.a)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(t,e):void 0}}},34:function(t,e){t.exports=window.wp.hooks},39:function(t,e,n){"use strict";function r(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}n.d(e,"a",(function(){return r}))},4:function(t,e){t.exports=window.wp.data},48:function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,o={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}n.d(e,"a",(function(){return r}))},5:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},50:function(t,e,n){"use strict";var r,o;function a(t){return[t]}function i(){var t={clear:function(){t.head=null}};return t}function u(t,e,n){var r;if(t.length!==e.length)return!1;for(r=n;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,e.a=function(t,e){var n,c;function l(){n=o?new WeakMap:i()}function f(){var n,r,o,a,i,l=arguments.length;for(a=new Array(l),o=0;o<l;o++)a[o]=arguments[o];for(i=e.apply(null,a),(n=c(i)).isUniqueByDependants||(n.lastDependants&&!u(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(u(r.args,a,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:t.apply(null,a)},a[0]=null,r.args=a,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return e||(e=a),c=o?function(t){var e,o,a,u,c,l=n,f=!0;for(e=0;e<t.length;e++){if(!(c=o=t[e])||"object"!=typeof c){f=!1;break}l.has(o)?l=l.get(o):(a=new WeakMap,l.set(o,a),l=a)}return l.has(r)||((u=i()).isUniqueByDependants=f,l.set(r,u)),l.get(r)}:function(){return n},f.getDependants=e,f.clear=l,l(),f}},527:function(t,e,n){"use strict";n.r(e),n.d(e,"store",(function(){return k}));var r={};n.r(r),n.d(r,"__experimentalGetAnnotationsForBlock",(function(){return _})),n.d(r,"__experimentalGetAllAnnotationsForBlock",(function(){return T})),n.d(r,"__experimentalGetAnnotationsForRichText",(function(){return N})),n.d(r,"__experimentalGetAnnotations",(function(){return P}));var o={};n.r(o),n.d(o,"__experimentalAddAnnotation",(function(){return I})),n.d(o,"__experimentalRemoveAnnotation",(function(){return R})),n.d(o,"__experimentalUpdateAnnotationRange",(function(){return S})),n.d(o,"__experimentalRemoveAnnotationsBySource",(function(){return D}));var a=n(13),i=n(24),u=n(1),c="core/annotations",l={name:"core/annotation",title:Object(u.__)("Annotation"),tagName:"mark",className:"annotation-text",attributes:{className:"class",id:"id"},edit:function(){return null},__experimentalGetPropsForEditableTreePreparation:function(t,e){var n=e.richTextIdentifier,r=e.blockClientId;return{annotations:t(c).__experimentalGetAnnotationsForRichText(r,n)}},__experimentalCreatePrepareEditableTree:function(t){var e=t.annotations;return function(t,n){if(0===e.length)return t;var r={formats:t,text:n};return(r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.forEach((function(e){var n=e.start,r=e.end;n>t.text.length&&(n=t.text.length),r>t.text.length&&(r=t.text.length);var o="annotation-text-"+e.source,a="annotation-text-"+e.id;t=Object(i.applyFormat)(t,{type:"core/annotation",attributes:{className:o,id:a}},n,r)})),t}(r,e)).formats}},__experimentalGetPropsForEditableTreeChangeHandler:function(t){return{removeAnnotation:t(c).__experimentalRemoveAnnotation,updateAnnotationRange:t(c).__experimentalUpdateAnnotationRange}},__experimentalCreateOnChangeEditableValue:function(t){return function(e){var n=function(t){var e={};return t.forEach((function(t,n){(t=(t=t||[]).filter((function(t){return"core/annotation"===t.type}))).forEach((function(t){var r=t.attributes.id;r=r.replace("annotation-text-",""),e.hasOwnProperty(r)||(e[r]={start:n}),e[r].end=n+1}))})),e}(e),r=t.removeAnnotation,o=t.updateAnnotationRange;!function(t,e,n){var r=n.removeAnnotation,o=n.updateAnnotationRange;t.forEach((function(t){var n=e[t.id];if(n){var a=t.start,i=t.end;a===n.start&&i===n.end||o(t.id,n.start,n.end)}else r(t.id)}))}(t.annotations,n,{removeAnnotation:r,updateAnnotationRange:o})}}},f=l.name,s=Object(a.a)(l,["name"]);Object(i.registerFormatType)(f,s);var d=n(34),p=n(4);Object(d.addFilter)("editor.BlockListBlock","core/annotations",(function(t){return Object(p.withSelect)((function(t,e){var n=e.clientId,r=e.className;return{className:t(c).__experimentalGetAnnotationsForBlock(n).map((function(t){return"is-annotated-by-"+t.source})).concat(r).filter(Boolean).join(" ")}}))(t)}));var b=n(15),v=n(5),O=n(2);function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach((function(e){Object(v.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function m(t,e){var n=t.filter(e);return t.length===n.length?t:n}function h(t){return Object(O.isNumber)(t.start)&&Object(O.isNumber)(t.end)&&t.start<=t.end}var j=n(50);function x(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?x(Object(n),!0).forEach((function(e){Object(v.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var w=[],_=Object(j.a)((function(t,e){var n;return(null!==(n=null==t?void 0:t[e])&&void 0!==n?n:[]).filter((function(t){return"block"===t.selector}))}),(function(t,e){var n;return[null!==(n=null==t?void 0:t[e])&&void 0!==n?n:w]}));function T(t,e){var n;return null!==(n=null==t?void 0:t[e])&&void 0!==n?n:w}var N=Object(j.a)((function(t,e,n){var r;return(null!==(r=null==t?void 0:t[e])&&void 0!==r?r:[]).filter((function(t){return"range"===t.selector&&n===t.richTextIdentifier})).map((function(t){var e=t.range,n=Object(a.a)(t,["range"]);return A(A({},e),n)}))}),(function(t,e){var n;return[null!==(n=null==t?void 0:t[e])&&void 0!==n?n:w]}));function P(t){return Object(O.flatMap)(t,(function(t){return t}))}var E=n(193);function I(t){var e=t.blockClientId,n=t.richTextIdentifier,r=void 0===n?null:n,o=t.range,a=void 0===o?null:o,i=t.selector,u=void 0===i?"range":i,c=t.source,l=void 0===c?"default":c,f=t.id,s={type:"ANNOTATION_ADD",id:void 0===f?Object(E.a)():f,blockClientId:e,richTextIdentifier:r,source:l,selector:u};return"range"===u&&(s.range=a),s}function R(t){return{type:"ANNOTATION_REMOVE",annotationId:t}}function S(t,e,n){return{type:"ANNOTATION_UPDATE_RANGE",annotationId:t,start:e,end:n}}function D(t){return{type:"ANNOTATION_REMOVE_SOURCE",source:t}}var k=Object(p.createReduxStore)(c,{reducer:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"ANNOTATION_ADD":var r=n.blockClientId,o={id:n.id,blockClientId:r,richTextIdentifier:n.richTextIdentifier,source:n.source,selector:n.selector,range:n.range};if("range"===o.selector&&!h(o.range))return e;var a=null!==(t=null==e?void 0:e[r])&&void 0!==t?t:[];return g(g({},e),{},Object(v.a)({},r,[].concat(Object(b.a)(a),[o])));case"ANNOTATION_REMOVE":return Object(O.mapValues)(e,(function(t){return m(t,(function(t){return t.id!==n.annotationId}))}));case"ANNOTATION_UPDATE_RANGE":return Object(O.mapValues)(e,(function(t){var e=!1,r=t.map((function(t){return t.id===n.annotationId?(e=!0,g(g({},t),{},{range:{start:n.start,end:n.end}})):t}));return e?r:t}));case"ANNOTATION_REMOVE_SOURCE":return Object(O.mapValues)(e,(function(t){return m(t,(function(t){return t.source!==n.source}))}))}return e},selectors:r,actions:o});Object(p.register)(k)}});
|
1 |
+
window.wp=window.wp||{},window.wp.annotations=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=526)}({1:function(t,e){t.exports=window.wp.i18n},13:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(48);function o(t,e){if(null==t)return{};var n,o,a=Object(r.a)(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}},15:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(25),o=n(39),a=n(31);function i(t){return function(t){if(Array.isArray(t))return Object(r.a)(t)}(t)||Object(o.a)(t)||Object(a.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},192:function(t,e,n){"use strict";var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),o=new Uint8Array(16);function a(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}for(var i=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,u=function(t){return"string"==typeof t&&i.test(t)},c=[],l=0;l<256;++l)c.push((l+256).toString(16).substr(1));e.a=function(t,e,n){var r=(t=t||{}).random||(t.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]).toLowerCase();if(!u(n))throw TypeError("Stringified UUID is invalid");return n}(r)}},2:function(t,e){t.exports=window.lodash},24:function(t,e){t.exports=window.wp.richText},25:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,"a",(function(){return r}))},31:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(25);function o(t,e){if(t){if("string"==typeof t)return Object(r.a)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(t,e):void 0}}},34:function(t,e){t.exports=window.wp.hooks},39:function(t,e,n){"use strict";function r(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}n.d(e,"a",(function(){return r}))},4:function(t,e){t.exports=window.wp.data},48:function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,o={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}n.d(e,"a",(function(){return r}))},5:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},50:function(t,e,n){"use strict";var r,o;function a(t){return[t]}function i(){var t={clear:function(){t.head=null}};return t}function u(t,e,n){var r;if(t.length!==e.length)return!1;for(r=n;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,e.a=function(t,e){var n,c;function l(){n=o?new WeakMap:i()}function f(){var n,r,o,a,i,l=arguments.length;for(a=new Array(l),o=0;o<l;o++)a[o]=arguments[o];for(i=e.apply(null,a),(n=c(i)).isUniqueByDependants||(n.lastDependants&&!u(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(u(r.args,a,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:t.apply(null,a)},a[0]=null,r.args=a,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return e||(e=a),c=o?function(t){var e,o,a,u,c,l=n,f=!0;for(e=0;e<t.length;e++){if(!(c=o=t[e])||"object"!=typeof c){f=!1;break}l.has(o)?l=l.get(o):(a=new WeakMap,l.set(o,a),l=a)}return l.has(r)||((u=i()).isUniqueByDependants=f,l.set(r,u)),l.get(r)}:function(){return n},f.getDependants=e,f.clear=l,l(),f}},526:function(t,e,n){"use strict";n.r(e),n.d(e,"store",(function(){return k}));var r={};n.r(r),n.d(r,"__experimentalGetAnnotationsForBlock",(function(){return _})),n.d(r,"__experimentalGetAllAnnotationsForBlock",(function(){return T})),n.d(r,"__experimentalGetAnnotationsForRichText",(function(){return N})),n.d(r,"__experimentalGetAnnotations",(function(){return P}));var o={};n.r(o),n.d(o,"__experimentalAddAnnotation",(function(){return I})),n.d(o,"__experimentalRemoveAnnotation",(function(){return R})),n.d(o,"__experimentalUpdateAnnotationRange",(function(){return S})),n.d(o,"__experimentalRemoveAnnotationsBySource",(function(){return D}));var a=n(13),i=n(24),u=n(1),c="core/annotations",l={name:"core/annotation",title:Object(u.__)("Annotation"),tagName:"mark",className:"annotation-text",attributes:{className:"class",id:"id"},edit:function(){return null},__experimentalGetPropsForEditableTreePreparation:function(t,e){var n=e.richTextIdentifier,r=e.blockClientId;return{annotations:t(c).__experimentalGetAnnotationsForRichText(r,n)}},__experimentalCreatePrepareEditableTree:function(t){var e=t.annotations;return function(t,n){if(0===e.length)return t;var r={formats:t,text:n};return(r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.forEach((function(e){var n=e.start,r=e.end;n>t.text.length&&(n=t.text.length),r>t.text.length&&(r=t.text.length);var o="annotation-text-"+e.source,a="annotation-text-"+e.id;t=Object(i.applyFormat)(t,{type:"core/annotation",attributes:{className:o,id:a}},n,r)})),t}(r,e)).formats}},__experimentalGetPropsForEditableTreeChangeHandler:function(t){return{removeAnnotation:t(c).__experimentalRemoveAnnotation,updateAnnotationRange:t(c).__experimentalUpdateAnnotationRange}},__experimentalCreateOnChangeEditableValue:function(t){return function(e){var n=function(t){var e={};return t.forEach((function(t,n){(t=(t=t||[]).filter((function(t){return"core/annotation"===t.type}))).forEach((function(t){var r=t.attributes.id;r=r.replace("annotation-text-",""),e.hasOwnProperty(r)||(e[r]={start:n}),e[r].end=n+1}))})),e}(e),r=t.removeAnnotation,o=t.updateAnnotationRange;!function(t,e,n){var r=n.removeAnnotation,o=n.updateAnnotationRange;t.forEach((function(t){var n=e[t.id];if(n){var a=t.start,i=t.end;a===n.start&&i===n.end||o(t.id,n.start,n.end)}else r(t.id)}))}(t.annotations,n,{removeAnnotation:r,updateAnnotationRange:o})}}},f=l.name,s=Object(a.a)(l,["name"]);Object(i.registerFormatType)(f,s);var d=n(34),p=n(4);Object(d.addFilter)("editor.BlockListBlock","core/annotations",(function(t){return Object(p.withSelect)((function(t,e){var n=e.clientId,r=e.className;return{className:t(c).__experimentalGetAnnotationsForBlock(n).map((function(t){return"is-annotated-by-"+t.source})).concat(r).filter(Boolean).join(" ")}}))(t)}));var b=n(15),v=n(5),O=n(2);function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach((function(e){Object(v.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function m(t,e){var n=t.filter(e);return t.length===n.length?t:n}function h(t){return Object(O.isNumber)(t.start)&&Object(O.isNumber)(t.end)&&t.start<=t.end}var j=n(50);function x(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?x(Object(n),!0).forEach((function(e){Object(v.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var w=[],_=Object(j.a)((function(t,e){var n;return(null!==(n=null==t?void 0:t[e])&&void 0!==n?n:[]).filter((function(t){return"block"===t.selector}))}),(function(t,e){var n;return[null!==(n=null==t?void 0:t[e])&&void 0!==n?n:w]}));function T(t,e){var n;return null!==(n=null==t?void 0:t[e])&&void 0!==n?n:w}var N=Object(j.a)((function(t,e,n){var r;return(null!==(r=null==t?void 0:t[e])&&void 0!==r?r:[]).filter((function(t){return"range"===t.selector&&n===t.richTextIdentifier})).map((function(t){var e=t.range,n=Object(a.a)(t,["range"]);return A(A({},e),n)}))}),(function(t,e){var n;return[null!==(n=null==t?void 0:t[e])&&void 0!==n?n:w]}));function P(t){return Object(O.flatMap)(t,(function(t){return t}))}var E=n(192);function I(t){var e=t.blockClientId,n=t.richTextIdentifier,r=void 0===n?null:n,o=t.range,a=void 0===o?null:o,i=t.selector,u=void 0===i?"range":i,c=t.source,l=void 0===c?"default":c,f=t.id,s={type:"ANNOTATION_ADD",id:void 0===f?Object(E.a)():f,blockClientId:e,richTextIdentifier:r,source:l,selector:u};return"range"===u&&(s.range=a),s}function R(t){return{type:"ANNOTATION_REMOVE",annotationId:t}}function S(t,e,n){return{type:"ANNOTATION_UPDATE_RANGE",annotationId:t,start:e,end:n}}function D(t){return{type:"ANNOTATION_REMOVE_SOURCE",source:t}}var k=Object(p.createReduxStore)(c,{reducer:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"ANNOTATION_ADD":var r=n.blockClientId,o={id:n.id,blockClientId:r,richTextIdentifier:n.richTextIdentifier,source:n.source,selector:n.selector,range:n.range};if("range"===o.selector&&!h(o.range))return e;var a=null!==(t=null==e?void 0:e[r])&&void 0!==t?t:[];return g(g({},e),{},Object(v.a)({},r,[].concat(Object(b.a)(a),[o])));case"ANNOTATION_REMOVE":return Object(O.mapValues)(e,(function(t){return m(t,(function(t){return t.id!==n.annotationId}))}));case"ANNOTATION_UPDATE_RANGE":return Object(O.mapValues)(e,(function(t){var e=!1,r=t.map((function(t){return t.id===n.annotationId?(e=!0,g(g({},t),{},{range:{start:n.start,end:n.end}})):t}));return e?r:t}));case"ANNOTATION_REMOVE_SOURCE":return Object(O.mapValues)(e,(function(t){return m(t,(function(t){return t.source!==n.source}))}))}return e},selectors:r,actions:o});Object(p.register)(k)}});
|
build/api-fetch/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '2ee430b4d29549efb1bb1c4db17885ff');
|
build/api-fetch/index.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.wp=window.wp||{},window.wp.apiFetch=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=526)}({1:function(e,t){e.exports=window.wp.i18n},13:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(48);function o(e,t){if(null==e)return{};var r,o,c=Object(n.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},16:function(e,t){e.exports=window.regeneratorRuntime},29:function(e,t){e.exports=window.wp.url},46:function(e,t,r){"use strict";function n(e,t,r,n,o,c,i){try{var u=e[c](i),a=u.value}catch(e){return void r(e)}u.done?t(a):Promise.resolve(a).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,c){var i=e.apply(t,r);function u(e){n(i,o,c,u,a,"next",e)}function a(e){n(i,o,c,u,a,"throw",e)}u(void 0)}))}}r.d(t,"a",(function(){return o}))},48:function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}r.d(t,"a",(function(){return n}))},5:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},526:function(e,t,r){"use strict";r.r(t);var n=r(5),o=r(13),c=r(1);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=function(e,t){var r,n,o=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(r=e.namespace.replace(/^\/|\/$/g,""),o=(n=e.endpoint.replace(/^\//,""))?r+"/"+n:r),delete e.namespace,delete e.endpoint,t(s(s({},e),{},{path:o}))};function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e){var t=e.split("?"),r=t[1],n=t[0];return r?n+"?"+r.split("&").map((function(e){return e.split("=")})).sort((function(e,t){return e[0].localeCompare(t[0])})).map((function(e){return e.join("=")})).join("&"):n}var b=r(16),d=r.n(b),j=r(46),y=r(29);function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var w=function(e){return e.json?e.json():Promise.reject(e)},g=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},P=function(e){var t=e.path&&-1!==e.path.indexOf("per_page=-1"),r=e.url&&-1!==e.url.indexOf("per_page=-1");return t||r},m=function(){var e=Object(j.a)(d.a.mark((function e(t,r){var n,c,i,u,a,s;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",r(t));case 2:if(P(t)){e.next=4;break}return e.abrupt("return",r(t));case 4:return e.next=6,I(v(v({},(f={per_page:100},void 0,void 0,l=(p=t).path,O=p.url,v(v({},Object(o.a)(p,["path","url"])),{},{url:O&&Object(y.addQueryArgs)(O,f),path:l&&Object(y.addQueryArgs)(l,f)}))),{},{parse:!1}));case 6:return n=e.sent,e.next=9,w(n);case 9:if(c=e.sent,Array.isArray(c)){e.next=12;break}return e.abrupt("return",c);case 12:if(i=g(n)){e.next=15;break}return e.abrupt("return",c);case 15:u=[].concat(c);case 16:if(!i){e.next=27;break}return e.next=19,I(v(v({},t),{},{path:void 0,url:i,parse:!1}));case 19:return a=e.sent,e.next=22,w(a);case 22:s=e.sent,u=u.concat(s),i=g(a),e.next=16;break;case 27:return e.abrupt("return",u);case 28:case"end":return e.stop()}var p,f,l,O}),e)})));return function(_x,t){return e.apply(this,arguments)}}();function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var S=new Set(["PATCH","PUT","DELETE"]),_=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},E=function(e){var t={code:"invalid_json",message:Object(c.__)("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},k=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(_(e,t)).catch((function(e){return T(e,t)}))};function T(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return E(e).then((function(e){var t={code:"unknown_error",message:Object(c.__)("An unknown error occurred.")};throw e||t}))}function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Q={Accept:"application/json, */*;q=0.1"},R={credentials:"include"},L=[function(e,t){return"string"!=typeof e.url||Object(y.hasQueryArg)(e.url,"_locale")||(e.url=Object(y.addQueryArgs)(e.url,{_locale:"user"})),"string"!=typeof e.path||Object(y.hasQueryArg)(e.path,"_locale")||(e.path=Object(y.addQueryArgs)(e.path,{_locale:"user"})),t(e)},p,function(e,t){var r=e.method,n=void 0===r?"GET":r;return S.has(n.toUpperCase())&&(e=D(D({},e),{},{headers:D(D({},e.headers),{},{"X-HTTP-Method-Override":n,"Content-Type":"application/json"}),method:"POST"})),t(e)},m],U=function(e){if(e.status>=200&&e.status<300)return e;throw e},G=function(e){var t=e.url,r=e.path,n=e.data,i=e.parse,u=void 0===i||i,a=Object(o.a)(e,["url","path","data","parse"]),s=e.body,p=e.headers;return p=N(N({},Q),p),n&&(s=JSON.stringify(n),p["Content-Type"]="application/json"),window.fetch(t||r,N(N(N({},R),a),{},{body:s,headers:p})).then((function(e){return Promise.resolve(e).then(U).catch((function(e){return T(e,u)})).then((function(e){return k(e,u)}))}),(function(){throw{code:"fetch_error",message:Object(c.__)("You are probably offline.")}}))};function H(e){return L.reduceRight((function(e,t){return function(r){return t(r,e)}}),G)(e).catch((function(t){return"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(H.nonceEndpoint).then(U).then((function(e){return e.text()})).then((function(t){return H.nonceMiddleware.nonce=t,H(e)}))}))}H.use=function(e){L.unshift(e)},H.setFetchHandler=function(e){G=e},H.createNonceMiddleware=function(e){function t(e,r){var n=e.headers,o=void 0===n?{}:n;for(var c in o)if("x-wp-nonce"===c.toLowerCase()&&o[c]===t.nonce)return r(e);return r(u(u({},e),{},{headers:u(u({},o),{},{"X-WP-Nonce":t.nonce})}))}return t.nonce=e,t},H.createPreloadingMiddleware=function(e){var t=Object.keys(e).reduce((function(t,r){return t[O(r)]=e[r],t}),{});return function(e,r){var n=e.parse,o=void 0===n||n;if("string"==typeof e.path){var c=e.method||"GET",i=O(e.path);if("GET"===c&&t[i]){var u=t[i];return delete t[i],Promise.resolve(o?u.body:new window.Response(JSON.stringify(u.body),{status:200,statusText:"OK",headers:u.headers}))}if("OPTIONS"===c&&t[c]&&t[c][i])return Promise.resolve(t[c][i])}return r(e)}},H.createRootURLMiddleware=function(e){return function(t,r){return p(t,(function(t){var n,o=t.url,c=t.path;return"string"==typeof c&&(n=e,-1!==e.indexOf("?")&&(c=c.replace("?","&")),c=c.replace(/^\//,""),"string"==typeof n&&-1!==n.indexOf("?")&&(c=c.replace("?","&")),o=n+c),r(l(l({},t),{},{url:o}))}))}},H.fetchAllMiddleware=m,H.mediaUploadMiddleware=function(e,t){if(!(e.path&&-1!==e.path.indexOf("/wp/v2/media")||e.url&&-1!==e.url.indexOf("/wp/v2/media")))return t(e,t);var r=0;return t(M(M({},e),{},{parse:!1})).catch((function(n){var o=n.headers.get("x-wp-upload-attachment-id");return n.status>=500&&n.status<600&&o?function e(n){return r++,t({path:"/wp/v2/media/".concat(n,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return r<5?e(n):(t({path:"/wp/v2/media/".concat(n,"?force=true"),method:"DELETE"}),Promise.reject())}))}(o).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:Object(c.__)("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(n)})):T(n,e.parse)})).then((function(t){return k(t,e.parse)}))};var I=t.default=H}}).default;
|
1 |
+
window.wp=window.wp||{},window.wp.apiFetch=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=525)}({1:function(e,t){e.exports=window.wp.i18n},13:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(48);function o(e,t){if(null==e)return{};var r,o,c=Object(n.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},16:function(e,t){e.exports=window.regeneratorRuntime},29:function(e,t){e.exports=window.wp.url},46:function(e,t,r){"use strict";function n(e,t,r,n,o,c,i){try{var u=e[c](i),a=u.value}catch(e){return void r(e)}u.done?t(a):Promise.resolve(a).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,c){var i=e.apply(t,r);function u(e){n(i,o,c,u,a,"next",e)}function a(e){n(i,o,c,u,a,"throw",e)}u(void 0)}))}}r.d(t,"a",(function(){return o}))},48:function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}r.d(t,"a",(function(){return n}))},5:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},525:function(e,t,r){"use strict";r.r(t);var n=r(5),o=r(13),c=r(1);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=function(e,t){var r,n,o=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(r=e.namespace.replace(/^\/|\/$/g,""),o=(n=e.endpoint.replace(/^\//,""))?r+"/"+n:r),delete e.namespace,delete e.endpoint,t(s(s({},e),{},{path:o}))};function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e){var t=e.split("?"),r=t[1],n=t[0];return r?n+"?"+r.split("&").map((function(e){return e.split("=")})).sort((function(e,t){return e[0].localeCompare(t[0])})).map((function(e){return e.join("=")})).join("&"):n}var b=r(16),d=r.n(b),j=r(46),y=r(29);function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var w=function(e){return e.json?e.json():Promise.reject(e)},g=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},P=function(e){var t=e.path&&-1!==e.path.indexOf("per_page=-1"),r=e.url&&-1!==e.url.indexOf("per_page=-1");return t||r},m=function(){var e=Object(j.a)(d.a.mark((function e(t,r){var n,c,i,u,a,s;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",r(t));case 2:if(P(t)){e.next=4;break}return e.abrupt("return",r(t));case 4:return e.next=6,I(v(v({},(f={per_page:100},void 0,void 0,l=(p=t).path,O=p.url,v(v({},Object(o.a)(p,["path","url"])),{},{url:O&&Object(y.addQueryArgs)(O,f),path:l&&Object(y.addQueryArgs)(l,f)}))),{},{parse:!1}));case 6:return n=e.sent,e.next=9,w(n);case 9:if(c=e.sent,Array.isArray(c)){e.next=12;break}return e.abrupt("return",c);case 12:if(i=g(n)){e.next=15;break}return e.abrupt("return",c);case 15:u=[].concat(c);case 16:if(!i){e.next=27;break}return e.next=19,I(v(v({},t),{},{path:void 0,url:i,parse:!1}));case 19:return a=e.sent,e.next=22,w(a);case 22:s=e.sent,u=u.concat(s),i=g(a),e.next=16;break;case 27:return e.abrupt("return",u);case 28:case"end":return e.stop()}var p,f,l,O}),e)})));return function(_x,t){return e.apply(this,arguments)}}();function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var S=new Set(["PATCH","PUT","DELETE"]),_=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},E=function(e){var t={code:"invalid_json",message:Object(c.__)("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},k=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(_(e,t)).catch((function(e){return T(e,t)}))};function T(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return E(e).then((function(e){var t={code:"unknown_error",message:Object(c.__)("An unknown error occurred.")};throw e||t}))}function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Q={Accept:"application/json, */*;q=0.1"},R={credentials:"include"},L=[function(e,t){return"string"!=typeof e.url||Object(y.hasQueryArg)(e.url,"_locale")||(e.url=Object(y.addQueryArgs)(e.url,{_locale:"user"})),"string"!=typeof e.path||Object(y.hasQueryArg)(e.path,"_locale")||(e.path=Object(y.addQueryArgs)(e.path,{_locale:"user"})),t(e)},p,function(e,t){var r=e.method,n=void 0===r?"GET":r;return S.has(n.toUpperCase())&&(e=D(D({},e),{},{headers:D(D({},e.headers),{},{"X-HTTP-Method-Override":n,"Content-Type":"application/json"}),method:"POST"})),t(e)},m],U=function(e){if(e.status>=200&&e.status<300)return e;throw e},G=function(e){var t=e.url,r=e.path,n=e.data,i=e.parse,u=void 0===i||i,a=Object(o.a)(e,["url","path","data","parse"]),s=e.body,p=e.headers;return p=N(N({},Q),p),n&&(s=JSON.stringify(n),p["Content-Type"]="application/json"),window.fetch(t||r,N(N(N({},R),a),{},{body:s,headers:p})).then((function(e){return Promise.resolve(e).then(U).catch((function(e){return T(e,u)})).then((function(e){return k(e,u)}))}),(function(){throw{code:"fetch_error",message:Object(c.__)("You are probably offline.")}}))};function H(e){return L.reduceRight((function(e,t){return function(r){return t(r,e)}}),G)(e).catch((function(t){return"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(H.nonceEndpoint).then(U).then((function(e){return e.text()})).then((function(t){return H.nonceMiddleware.nonce=t,H(e)}))}))}H.use=function(e){L.unshift(e)},H.setFetchHandler=function(e){G=e},H.createNonceMiddleware=function(e){function t(e,r){var n=e.headers,o=void 0===n?{}:n;for(var c in o)if("x-wp-nonce"===c.toLowerCase()&&o[c]===t.nonce)return r(e);return r(u(u({},e),{},{headers:u(u({},o),{},{"X-WP-Nonce":t.nonce})}))}return t.nonce=e,t},H.createPreloadingMiddleware=function(e){var t=Object.keys(e).reduce((function(t,r){return t[O(r)]=e[r],t}),{});return function(e,r){var n=e.parse,o=void 0===n||n;if("string"==typeof e.path){var c=e.method||"GET",i=O(e.path);if("GET"===c&&t[i]){var u=t[i];return delete t[i],Promise.resolve(o?u.body:new window.Response(JSON.stringify(u.body),{status:200,statusText:"OK",headers:u.headers}))}if("OPTIONS"===c&&t[c]&&t[c][i])return Promise.resolve(t[c][i])}return r(e)}},H.createRootURLMiddleware=function(e){return function(t,r){return p(t,(function(t){var n,o=t.url,c=t.path;return"string"==typeof c&&(n=e,-1!==e.indexOf("?")&&(c=c.replace("?","&")),c=c.replace(/^\//,""),"string"==typeof n&&-1!==n.indexOf("?")&&(c=c.replace("?","&")),o=n+c),r(l(l({},t),{},{url:o}))}))}},H.fetchAllMiddleware=m,H.mediaUploadMiddleware=function(e,t){if(!(e.path&&-1!==e.path.indexOf("/wp/v2/media")||e.url&&-1!==e.url.indexOf("/wp/v2/media")))return t(e,t);var r=0;return t(M(M({},e),{},{parse:!1})).catch((function(n){var o=n.headers.get("x-wp-upload-attachment-id");return n.status>=500&&n.status<600&&o?function e(n){return r++,t({path:"/wp/v2/media/".concat(n,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return r<5?e(n):(t({path:"/wp/v2/media/".concat(n,"?force=true"),method:"DELETE"}),Promise.reject())}))}(o).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:Object(c.__)("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(n)})):T(n,e.parse)})).then((function(t){return k(t,e.parse)}))};var I=t.default=H}}).default;
|
build/autop/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => 'cd77a4bebcf53a3a96bfa7f00dca54e3');
|
build/autop/index.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.wp=window.wp||{},window.wp.autop=function(e){var r={};function n(t){if(r[t])return r[t].exports;var p=r[t]={i:t,l:!1,exports:{}};return e[t].call(p.exports,p,p.exports,n),p.l=!0,p.exports}return n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},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,r){if(1&r&&(e=n(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var p in e)n.d(t,p,function(r){return e[r]}.bind(null,p));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=
|
1 |
+
window.wp=window.wp||{},window.wp.autop=function(e){var r={};function n(t){if(r[t])return r[t].exports;var p=r[t]={i:t,l:!1,exports:{}};return e[t].call(p.exports,p,p.exports,n),p.l=!0,p.exports}return n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},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,r){if(1&r&&(e=n(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var p in e)n.d(t,p,function(r){return e[r]}.bind(null,p));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=372)}({25:function(e,r,n){"use strict";function t(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}n.d(r,"a",(function(){return t}))},31:function(e,r,n){"use strict";n.d(r,"a",(function(){return p}));var t=n(25);function p(e,r){if(e){if("string"==typeof e)return Object(t.a)(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(t.a)(e,r):void 0}}},372:function(e,r,n){"use strict";n.r(r),n.d(r,"autop",(function(){return a})),n.d(r,"removep",(function(){return o}));var t=n(9),p=new RegExp("(<((?=!--|!\\[CDATA\\[)((?=!-)!(?:-(?!->)[^\\-]*)*(?:--\x3e)?|!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?)|[^>]*>?))");function c(e,r){for(var n=function(e){for(var r,n=[],t=e;r=t.match(p);){var c=r.index;n.push(t.slice(0,c)),n.push(r[0]),t=t.slice(c+r[0].length)}return t.length&&n.push(t),n}(e),t=!1,c=Object.keys(r),a=1;a<n.length;a+=2)for(var o=0;o<c.length;o++){var i=c[o];if(-1!==n[a].indexOf(i)){n[a]=n[a].replace(new RegExp(i,"g"),r[i]),t=!0;break}}return t&&(e=n.join("")),e}function a(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[];if(""===e.trim())return"";if(-1!==(e+="\n").indexOf("<pre")){var p=e.split("</pre>"),a=p.pop();e="";for(var o=0;o<p.length;o++){var i=p[o],l=i.indexOf("<pre");if(-1!==l){var u="<pre wp-pre-tag-"+o+"></pre>";n.push([u,i.substr(l)+"</pre>"]),e+=i.substr(0,l)+u}else e+=i}e+=a}var s="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";-1!==(e=c(e=(e=(e=(e=e.replace(/<br\s*\/?>\s*<br\s*\/?>/g,"\n\n")).replace(new RegExp("(<"+s+"[\\s/>])","g"),"\n\n$1")).replace(new RegExp("(</"+s+">)","g"),"$1\n\n")).replace(/\r\n|\r/g,"\n"),{"\n":" \x3c!-- wpnl --\x3e "})).indexOf("<option")&&(e=(e=e.replace(/\s*<option/g,"<option")).replace(/<\/option>\s*/g,"</option>")),-1!==e.indexOf("</object>")&&(e=(e=(e=e.replace(/(<object[^>]*>)\s*/g,"$1")).replace(/\s*<\/object>/g,"</object>")).replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),-1===e.indexOf("<source")&&-1===e.indexOf("<track")||(e=(e=(e=e.replace(/([<\[](?:audio|video)[^>\]]*[>\]])\s*/g,"$1")).replace(/\s*([<\[]\/(?:audio|video)[>\]])/g,"$1")).replace(/\s*(<(?:source|track)[^>]*>)\s*/g,"$1")),-1!==e.indexOf("<figcaption")&&(e=(e=e.replace(/\s*(<figcaption[^>]*>)/,"$1")).replace(/<\/figcaption>\s*/,"</figcaption>"));var f=(e=e.replace(/\n\n+/g,"\n\n")).split(/\n\s*\n/).filter(Boolean);return e="",f.forEach((function(r){e+="<p>"+r.replace(/^\n*|\n*$/g,"")+"</p>\n"})),e=(e=(e=(e=(e=(e=(e=(e=e.replace(/<p>\s*<\/p>/g,"")).replace(/<p>([^<]+)<\/(div|address|form)>/g,"<p>$1</p></$2>")).replace(new RegExp("<p>\\s*(</?"+s+"[^>]*>)\\s*</p>","g"),"$1")).replace(/<p>(<li.+?)<\/p>/g,"$1")).replace(/<p><blockquote([^>]*)>/gi,"<blockquote$1><p>")).replace(/<\/blockquote><\/p>/g,"</p></blockquote>")).replace(new RegExp("<p>\\s*(</?"+s+"[^>]*>)","g"),"$1")).replace(new RegExp("(</?"+s+"[^>]*>)\\s*</p>","g"),"$1"),r&&(e=(e=(e=(e=e.replace(/<(script|style).*?<\/\\1>/g,(function(e){return e[0].replace(/\n/g,"<WPPreserveNewline />")}))).replace(/<br>|<br\/>/g,"<br />")).replace(/(<br \/>)?\s*\n/g,(function(e,r){return r?e:"<br />\n"}))).replace(/<WPPreserveNewline \/>/g,"\n")),e=(e=(e=e.replace(new RegExp("(</?"+s+"[^>]*>)\\s*<br />","g"),"$1")).replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,"$1")).replace(/\n<\/p>$/g,"</p>"),n.forEach((function(r){var n=Object(t.a)(r,2),p=n[0],c=n[1];e=e.replace(p,c)})),-1!==e.indexOf("\x3c!-- wpnl --\x3e")&&(e=e.replace(/\s?<!-- wpnl -->\s?/g,"\n")),e}function o(e){var r="blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure",n=r+"|div|p",t=r+"|pre",p=[],c=!1,a=!1;return e?(-1===e.indexOf("<script")&&-1===e.indexOf("<style")||(e=e.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/g,(function(e){return p.push(e),"<wp-preserve>"}))),-1!==e.indexOf("<pre")&&(c=!0,e=e.replace(/<pre[^>]*>[\s\S]+?<\/pre>/g,(function(e){return(e=(e=e.replace(/<br ?\/?>(\r\n|\n)?/g,"<wp-line-break>")).replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"<wp-line-break>")).replace(/\r?\n/g,"<wp-line-break>")}))),-1!==e.indexOf("[caption")&&(a=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,(function(e){return e.replace(/<br([^>]*)>/g,"<wp-temp-br$1>").replace(/[\r\n\t]+/,"")}))),-1!==(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(new RegExp("\\s*</("+n+")>\\s*","g"),"</$1>\n")).replace(new RegExp("\\s*<((?:"+n+")(?: [^>]*)?)>","g"),"\n<$1>")).replace(/(<p [^>]+>[\s\S]*?)<\/p>/g,"$1</p#>")).replace(/<div( [^>]*)?>\s*<p>/gi,"<div$1>\n\n")).replace(/\s*<p>/gi,"")).replace(/\s*<\/p>\s*/gi,"\n\n")).replace(/\n[\s\u00a0]+\n/g,"\n\n")).replace(/(\s*)<br ?\/?>\s*/gi,(function(e,r){return r&&-1!==r.indexOf("\n")?"\n\n":"\n"}))).replace(/\s*<div/g,"\n<div")).replace(/<\/div>\s*/g,"</div>\n")).replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,"\n\n[caption$1[/caption]\n\n")).replace(/caption\]\n\n+\[caption/g,"caption]\n\n[caption")).replace(new RegExp("\\s*<((?:"+t+")(?: [^>]*)?)\\s*>","g"),"\n<$1>")).replace(new RegExp("\\s*</("+t+")>\\s*","g"),"</$1>\n")).replace(/<((li|dt|dd)[^>]*)>/g," \t<$1>")).indexOf("<option")&&(e=(e=e.replace(/\s*<option/g,"\n<option")).replace(/\s*<\/select>/g,"\n</select>")),-1!==e.indexOf("<hr")&&(e=e.replace(/\s*<hr( [^>]*)?>\s*/g,"\n\n<hr$1>\n\n")),-1!==e.indexOf("<object")&&(e=e.replace(/<object[\s\S]+?<\/object>/g,(function(e){return e.replace(/[\r\n]+/g,"")}))),e=(e=(e=(e=e.replace(/<\/p#>/g,"</p>\n")).replace(/\s*(<p [^>]+>[\s\S]*?<\/p>)/g,"\n$1")).replace(/^\s+/,"")).replace(/[\s\u00a0]+$/,""),c&&(e=e.replace(/<wp-line-break>/g,"\n")),a&&(e=e.replace(/<wp-temp-br([^>]*)>/g,"<br$1>")),p.length&&(e=e.replace(/<wp-preserve>/g,(function(){return p.shift()}))),e):""}},40:function(e,r,n){"use strict";function t(e){if(Array.isArray(e))return e}n.d(r,"a",(function(){return t}))},41:function(e,r,n){"use strict";function t(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(r,"a",(function(){return t}))},9:function(e,r,n){"use strict";n.d(r,"a",(function(){return a}));var t=n(40),p=n(31),c=n(41);function a(e,r){return Object(t.a)(e)||function(e,r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],_n=!0,t=!1,p=void 0;try{for(var c,a=e[Symbol.iterator]();!(_n=(c=a.next()).done)&&(n.push(c.value),!r||n.length!==r);_n=!0);}catch(e){t=!0,p=e}finally{try{_n||null==a.return||a.return()}finally{if(t)throw p}}return n}}(e,r)||Object(p.a)(e,r)||Object(c.a)()}}});
|
build/blob/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => 'd2fce4a3ed3c9b6cd2481b1ea4eafcf9');
|
build/blob/index.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.wp=window.wp||{},window.wp.blob=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=
|
1 |
+
window.wp=window.wp||{},window.wp.blob=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=373)}({373:function(e,n,t){"use strict";t.r(n),t.d(n,"createBlobURL",(function(){return f})),t.d(n,"getBlobByURL",(function(){return c})),t.d(n,"getBlobTypeByURL",(function(){return l})),t.d(n,"revokeBlobURL",(function(){return d})),t.d(n,"isBlobURL",(function(){return a}));var r=window.URL,o=r.createObjectURL,u=r.revokeObjectURL,i={};function f(e){var n=o(e);return i[n]=e,n}function c(e){return i[e]}function l(e){var n;return null===(n=c(e))||void 0===n?void 0:n.type.split("/")[0]}function d(e){i[e]&&u(e),delete i[e]}function a(e){return!(!e||!e.indexOf)&&0===e.indexOf("blob:")}}});
|
build/block-directory/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => 'e18b98127066ca0a4ceeff12e302f836');
|
build/block-directory/index.js
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
-
window.wp=window.wp||{},window.wp.blockDirectory=function(e){var t={};function n(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,n),c.l=!0,c.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 c in e)n.d(r,c,function(t){return e[t]}.bind(null,c));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=519)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10: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}))},11:function(e,t){e.exports=window.wp.blocks},13:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(48);function c(e,t){if(null==e)return{};var n,c,o=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(c=0;c<a.length;c++)n=a[c],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},14:function(e,t){e.exports=window.wp.compose},143:function(e,t,n){"use strict";var r=n(5),c=n(13),o=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,i=void 0===n?24:n,l=Object(c.a)(e,["icon","size"]);return Object(o.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:i,height:i},l))}},15:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(25),c=n(39),o=n(31);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(c.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},16:function(e,t){e.exports=window.regeneratorRuntime},183:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=o},2:function(e,t){e.exports=window.lodash},212:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"}));t.a=o},213:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"}));t.a=o},25:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},3:function(e,t){e.exports=window.wp.components},31:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(25);function c(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},334:function(e,t){e.exports=window.wp.editPost},34:function(e,t){e.exports=window.wp.hooks},375:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(c.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"}));t.a=o},39:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},4:function(e,t){e.exports=window.wp.data},40:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},41:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},46:function(e,t,n){"use strict";function r(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(c,o){var a=e.apply(t,n);function i(e){r(a,c,o,i,l,"next",e)}function l(e){r(a,c,o,i,l,"throw",e)}i(void 0)}))}}n.d(t,"a",(function(){return c}))},47:function(e,t){e.exports=window.wp.apiFetch},48:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,c={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(c[n]=e[n]);return c}n.d(t,"a",(function(){return r}))},5: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}))},51:function(e,t){e.exports=window.wp.notices},519:function(e,t,n){"use strict";n.r(t),n.d(t,"store",(function(){return ne}));var r={};n.r(r),n.d(r,"isRequestingDownloadableBlocks",(function(){return y})),n.d(r,"getDownloadableBlocks",(function(){return k})),n.d(r,"getInstalledBlockTypes",(function(){return v})),n.d(r,"getNewBlockTypes",(function(){return g})),n.d(r,"getUnusedBlockTypes",(function(){return h})),n.d(r,"isInstalling",(function(){return w})),n.d(r,"getErrorNotices",(function(){return E})),n.d(r,"getErrorNoticeForBlock",(function(){return _}));var c={};n.r(c),n.d(c,"fetchDownloadableBlocks",(function(){return U})),n.d(c,"receiveDownloadableBlocks",(function(){return K})),n.d(c,"installBlockType",(function(){return W})),n.d(c,"uninstallBlockType",(function(){return Y})),n.d(c,"addInstalledBlockType",(function(){return $})),n.d(c,"removeInstalledBlockType",(function(){return G})),n.d(c,"setIsInstalling",(function(){return q})),n.d(c,"setErrorNotice",(function(){return J})),n.d(c,"clearErrorNotice",(function(){return Q}));var o=n(0),a=n(63),i=n(34),l=n(11),s=n(4),u=n(5),b=n(55),d=n(15),f=n(2);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=Object(s.combineReducers)({downloadableBlocks: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_DOWNLOADABLE_BLOCKS":return O(O({},e),{},Object(u.a)({},t.filterValue,{isRequesting:!0}));case"RECEIVE_DOWNLOADABLE_BLOCKS":return O(O({},e),{},Object(u.a)({},t.filterValue,{results:t.downloadableBlocks,isRequesting:!1}))}return e},blockManagement:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{installedBlockTypes:[],isInstalling:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_INSTALLED_BLOCK_TYPE":return O(O({},e),{},{installedBlockTypes:[].concat(Object(d.a)(e.installedBlockTypes),[t.item])});case"REMOVE_INSTALLED_BLOCK_TYPE":return O(O({},e),{},{installedBlockTypes:e.installedBlockTypes.filter((function(e){return e.name!==t.item.name}))});case"SET_INSTALLING_BLOCK":return O(O({},e),{},{isInstalling:O(O({},e.isInstalling),{},Object(u.a)({},t.blockId,t.isInstalling))})}return e},errorNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_ERROR_NOTICE":return O(O({},e),{},Object(u.a)({},t.blockId,{message:t.message,isFatal:t.isFatal}));case"CLEAR_ERROR_NOTICE":return Object(f.omit)(e,t.blockId)}return e}});function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t.length)return!1;if(t.some((function(t){return t.name===e.name})))return!0;for(var n=0;n<t.length;n++)if(j(e,t[n].innerBlocks))return!0;return!1}function y(e,t){return!(!e.downloadableBlocks[t]||!e.downloadableBlocks[t].isRequesting)&&e.downloadableBlocks[t].isRequesting}function k(e,t){return e.downloadableBlocks[t]&&e.downloadableBlocks[t].results?e.downloadableBlocks[t].results:[]}function v(e){return e.blockManagement.installedBlockTypes}var g=Object(s.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks();return v(t).filter((function(e){return j(e,n)}))}})),h=Object(s.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks();return v(t).filter((function(e){return!j(e,n)}))}}));function w(e,t){return e.blockManagement.isInstalling[t]||!1}function E(e){return e.errorNotices}function _(e,t){return e.errorNotices[t]}var B=n(16),S=n.n(B),x=n(1),P=n(51),N=n(46),T=n(47),I=n.n(T);function L(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return C(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,c=function(){};return{s:c,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var D=function(e){return new Promise((function(t,n){var r=document.createElement(e.nodeName);["id","rel","src","href","type"].forEach((function(t){e[t]&&(r[t]=e[t])})),e.innerHTML&&r.appendChild(document.createTextNode(e.innerHTML)),r.onload=function(){return t(!0)},r.onerror=function(){return n(new Error("Error loading asset."))},document.body.appendChild(r),("link"===r.nodeName.toLowerCase()||"script"===r.nodeName.toLowerCase()&&!r.src)&&t()}))};function A(e){return{type:"LOAD_ASSETS",assets:e}}var R={LOAD_ASSETS:function(){return Object(N.a)(S.a.mark((function e(){var t,n,r,c,o,a,i;return S.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,I()({url:document.location.href,parse:!1});case 2:return t=e.sent,e.next=5,t.text();case 5:n=e.sent,r=(new window.DOMParser).parseFromString(n,"text/html"),c=Array.from(r.querySelectorAll('link[rel="stylesheet"],script')).filter((function(e){return e.id&&!document.getElementById(e.id)})),o=L(c),e.prev=9,o.s();case 11:if((a=o.n()).done){e.next=17;break}return i=a.value,e.next=15,D(i);case 15:e.next=11;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(9),o.e(e.t0);case 22:return e.prev=22,o.f(),e.finish(22);case 25:case"end":return e.stop()}}),e,null,[[9,19,22,25]])})))()}};function M(e){if(!e)return!1;var t=e.links["wp:plugin"]||e.links.self;return!(!t||!t.length)&&t[0].href}var F=S.a.mark(W),V=S.a.mark(Y);function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function U(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function K(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}function W(e){var t,n,r,c,o,a,i,u,d;return S.a.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return t=e.id,n=e.assets,r=!1,f.next=4,Q(t);case 4:return f.prev=4,f.next=7,q(e.id,!0);case 7:if(c=M(e),o={},!c){f.next=14;break}return f.next=12,Object(b.apiFetch)({url:c,data:{status:"active"},method:"PUT"});case 12:f.next=18;break;case 14:return f.next=16,Object(b.apiFetch)({path:"wp/v2/plugins",data:{slug:e.id,status:"active"},method:"POST"});case 16:a=f.sent,o=a._links;case 18:return f.next=20,$(H(H({},e),{},{links:H(H({},e.links),o)}));case 20:return f.next=22,A(n);case 22:return f.next=24,s.controls.select(l.store.name,"getBlockTypes");case 24:if(f.sent.some((function(t){return t.name===e.name}))){f.next=27;break}throw new Error(Object(x.__)("Error registering block. Try reloading the page."));case 27:r=!0,f.next=38;break;case 30:return f.prev=30,f.t0=f.catch(4),i=f.t0.message||Object(x.__)("An error occurred."),u=f.t0 instanceof Error,(d={folder_exists:Object(x.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:Object(x.__)("Error installing block. You can reload the page and try again.")})[f.t0.code]&&(u=!0,i=d[f.t0.code]),f.next=38,J(t,i,u);case 38:return f.next=40,q(e.id,!1);case 40:return f.abrupt("return",r);case 41:case"end":return f.stop()}}),F,null,[[4,30]])}function Y(e){return S.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(b.apiFetch)({url:M(e),data:{status:"inactive"},method:"PUT"});case 3:return t.next=5,Object(b.apiFetch)({url:M(e),method:"DELETE"});case 5:return t.next=7,G(e);case 7:t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(0),t.next=13,s.controls.dispatch(P.store,"createErrorNotice",t.t0.message||Object(x.__)("An error occurred."));case 13:case"end":return t.stop()}}),V,null,[[0,9]])}function $(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function G(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function q(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function J(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"SET_ERROR_NOTICE",blockId:e,message:t,isFatal:n}}function Q(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var X={getDownloadableBlocks:S.a.mark((function e(t){var n,r;return S.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,U(t);case 5:return e.next=7,Object(b.apiFetch)({path:"wp/v2/block-directory/search?term=".concat(t)});case 7:return n=e.sent,r=n.map((function(e){return Object(f.mapKeys)(e,(function(e,t){return Object(f.camelCase)(t)}))})),e.next=11,K(r,t);case 11:e.next=15;break;case 13:e.prev=13,e.t0=e.catch(2);case 15:case"end":return e.stop()}}),e,null,[[2,13]])}))};function Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var te={reducer:m,selectors:r,actions:c,controls:ee(ee({},b.controls),R),resolvers:X},ne=Object(s.createReduxStore)("core/block-directory",te);function re(){var e=Object(s.useDispatch)(ne).uninstallBlockType,t=Object(s.useSelect)((function(e){var t=e("core/editor"),n=t.isAutosavingPost;return(0,t.isSavingPost)()&&!n()}),[]),n=Object(s.useSelect)((function(e){return e(ne).getUnusedBlockTypes()}),[]);return Object(o.useEffect)((function(){t&&n.length&&n.forEach((function(t){e(t),Object(l.unregisterBlockType)(t.name)}))}),[t]),null}Object(s.register)(ne);var ce=n(9),oe=n(6),ae=n(14),ie=n(3),le=n(54),se=function(e){var t=e.author,n=e.authorBlockCount,r=e.authorBlockRating;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"block-directory-downloadable-block-author-info__content-author"},Object(x.sprintf)(
|
2 |
/* translators: %s: author name. */
|
3 |
Object(x.__)("Authored by %s"),t)),Object(o.createElement)("span",{className:"block-directory-downloadable-block-author-info__content"},r>0?Object(x.sprintf)(
|
4 |
/* translators: 1: number of blocks. 2: average rating. */
|
5 |
Object(x._n)("This author has %1$d block, with an average rating of %2$.1f.","This author has %1$d blocks, with an average rating of %2$.1f.",n),n,r):Object(x.sprintf)(
|
6 |
/* translators: 1: number of blocks. */
|
7 |
-
Object(x._n)("This author has %1$d block.","This author has %1$d blocks.",n),n)))},ue=n(68),be=n(
|
8 |
/* translators: %s: number of stars. */
|
9 |
Object(x.__)("%s out of 5 stars"),n)},Object(f.times)(r,(function(e){return Object(o.createElement)(be.a,{key:"full_stars_".concat(e),icon:de.a,size:16})})),Object(f.times)(c,(function(e){return Object(o.createElement)(be.a,{key:"half_stars_".concat(e),icon:pe,size:16})})),Object(f.times)(a,(function(e){return Object(o.createElement)(be.a,{key:"empty_stars_".concat(e),icon:Oe.a,size:16})})))},je=function(e){var t=e.rating,n=e.ratingCount;return Object(o.createElement)("div",{className:"block-directory-block-ratings"},Object(o.createElement)(me,{rating:t}),Object(o.createElement)("span",{className:"block-directory-block-ratings__rating-count","aria-label":Object(x.sprintf)(// translators: %d: number of ratings (number).
|
10 |
Object(x._n)("%d total rating","%d total ratings",n),n)},"(",n,")"))},ye=function(e){var t=e.icon,n=e.title;return Object(o.createElement)("div",{className:"block-directory-downloadable-block-icon"},null!==t.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)?Object(o.createElement)("img",{src:t,alt:Object(x.sprintf)(// translators: %s: Name of the plugin e.g: "Akismet".
|
11 |
-
Object(x.__)("%s block icon"),n)}):Object(o.createElement)(oe.BlockIcon,{icon:t,showColors:!0}))},ke=function(e){var t=e.icon,n=e.title,r=e.rating,c=e.ratingCount,a=e.isLoading,i=void 0!==a&&a,l=e.isInstallable,s=void 0===l||l,u=e.onClick;return Object(o.createElement)("div",{className:"block-directory-downloadable-block-header__row"},Object(o.createElement)(ye,{icon:t,title:n}),Object(o.createElement)("div",{className:"block-directory-downloadable-block-header__column"},Object(o.createElement)("h2",{className:"block-directory-downloadable-block-header__title"},Object(ue.decodeEntities)(n)),Object(o.createElement)(je,{rating:r,ratingCount:c})),Object(o.createElement)(ie.Button,{isSecondary:!0,isBusy:i,disabled:i||!s,onClick:function(e){e.preventDefault(),!i&&s&&u()}},i?Object(x.__)("Adding…"):Object(x.__)("Add block")))},ve=Object(o.createElement)(fe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(o.createElement)(fe.Path,{d:"M18 3.5c0 .62-.38 1.16-.92 1.38v13.11H1.99l4.22-6.73c-.13-.23-.21-.48-.21-.76C6 9.67 6.67 9 7.5 9S9 9.67 9 10.5c0 .13-.02.25-.05.37l1.44.63c.27-.3.67-.5 1.11-.5.18 0 .35.04.51.09l3.58-6.41c-.36-.27-.59-.7-.59-1.18 0-.83.67-1.5 1.5-1.5.19 0 .36.04.53.1l.05-.09v.11c.54.22.92.76.92 1.38zm-1.92 13.49V5.85l-3.29 5.89c.13.23.21.48.21.76 0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5l.01-.07-1.63-.72c-.25.18-.55.29-.88.29-.18 0-.35-.04-.51-.1l-3.2 5.09h12.29z"})),ge=n(
|
12 |
/* translators: %d: number of active installations. */
|
13 |
Object(x.__)("%d+ Million active installations"),Math.floor(n/1e6)):0===n?Object(x.__)("Less than 10 active installations"):Object(x.sprintf)(
|
14 |
/* translators: %d: number of active installations. */
|
15 |
Object(x.__)("%d+ active installations"),n),Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",{className:"block-directory-downloadable-block-info__content"},Object(ue.decodeEntities)(r)),Object(o.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(o.createElement)(be.a,{className:"block-directory-downloadable-block-info__icon",icon:ve}),t),Object(o.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(o.createElement)(be.a,{className:"block-directory-downloadable-block-info__icon",icon:ge.a}),// translators: %s: Humanized date of last update e.g: "2 months ago".
|
16 |
Object(x.sprintf)(Object(x.__)("Updated %s"),c)))},we=function(e){var t=e.block,n=e.onClick,r=Object(s.useSelect)((function(e){return e(ne).getErrorNoticeForBlock(t.id)}),[t]);return r?Object(o.createElement)(ie.Notice,{status:"error",isDismissible:!1,className:"block-directory-downloadable-block-notice"},Object(o.createElement)("div",{className:"block-directory-downloadable-block-notice__content"},r.message),Object(o.createElement)(ie.Button,{isSmall:!0,isPrimary:!0,onClick:function(){if(r.isFatal)return window.location.reload(),!1;n(t)}},r.isFatal?Object(x.__)("Reload"):Object(x.__)("Retry"))):null};function Ee(e){var t=e.item,n=e.onClick,r=Object(s.useSelect)((function(e){var n=e(ne),r=n.isInstalling,c=(0,n.getErrorNoticeForBlock)(t.id),o=c&&c.isFatal;return{isLoading:r(t.id),isInstallable:!o}}),[t]),c=r.isLoading,a=r.isInstallable,i=t.icon,l=t.title,u=t.description,b=t.rating,d=t.activeInstalls,f=t.ratingCount,p=t.author,O=t.humanizedUpdated,m=t.authorBlockCount,j=t.authorBlockRating;return Object(o.createElement)("li",{className:"block-directory-downloadable-block-list-item"},Object(o.createElement)("article",{className:"block-directory-downloadable-block-list-item__panel"},Object(o.createElement)("header",{className:"block-directory-downloadable-block-list-item__header"},Object(o.createElement)(ke,{icon:i,onClick:n,title:l,rating:b,ratingCount:f,isLoading:c,isInstallable:a})),Object(o.createElement)("section",{className:"block-directory-downloadable-block-list-item__body"},Object(o.createElement)(we,{onClick:n,block:t}),Object(o.createElement)(he,{activeInstalls:d,description:u,humanizedUpdated:O})),Object(o.createElement)("footer",{className:"block-directory-downloadable-block-list-item__footer"},Object(o.createElement)(se,{author:p,authorBlockCount:m,authorBlockRating:j}))))}var _e=function(e){var t=e.items,n=e.onHover,r=void 0===n?f.noop:n,c=e.onSelect,a=Object(s.useDispatch)(ne).installBlockType;return t.length?Object(o.createElement)("ul",{role:"list",className:"block-directory-downloadable-blocks-list"},t.map((function(e){return Object(o.createElement)(Ee,{key:e.id,onClick:function(){Object(l.getBlockType)(e.name)?c(e):a(e).then((function(t){t&&c(e)})),r(null)},item:e})}))):null},Be=Object(ae.compose)([Object(s.withSelect)((function(e,t){var n=t.filterValue,r=t.rootClientId,c=void 0===r?null:r,o=e(ne),a=o.getDownloadableBlocks,i=o.isRequestingDownloadableBlocks,l=e(oe.store).canInsertBlockType,s=e("core").canUser("read","block-directory/search");return{downloadableItems:s?a(n).filter((function(e){return l(e,c,!0)})):[],hasPermission:s,isLoading:i(n)}}))])((function(e){var t=e.downloadableItems,n=e.onSelect,r=e.onHover,c=e.hasPermission,a=e.isLoading,i=e.isWaiting,l=Object(ae.useDebounce)(le.speak,500);return!1===c?(l(Object(x.__)("No blocks found in your library.")),Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(x.__)("No blocks found in your library."))):void 0===c||a||i?Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(o.createElement)(ie.Spinner,null)):t.length?(l(Object(x.sprintf)(
|
17 |
/* translators: %s: number of available blocks. */
|
18 |
-
Object(x._n)("No blocks found in your library. We did find %d block available for download.","No blocks found in your library. We did find %d blocks available for download.",t.length),t.length)),Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description"},Object(x.__)("No blocks found in your library. These blocks can be downloaded and installed:")),Object(o.createElement)(_e,{items:t,onSelect:n,onHover:r}))):Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(x.__)("No blocks found in your library."))})),Se=function(){var e=Object(o.useState)(""),t=Object(ce.a)(e,2),n=t[0],r=t[1],c=Object(f.debounce)(r,400);return Object(o.createElement)(oe.__experimentalInserterMenuExtension,null,(function(e){var t=e.onSelect,r=e.onHover,a=e.filterValue,i=e.hasItems,l=e.rootClientId;return i||!a?null:(n!==a&&c(a),Object(o.createElement)(Be,{onSelect:t,onHover:r,rootClientId:l,filterValue:n,isWaiting:a!==n}))}))},xe=n(
|
19 |
/* translators: %s: Name of the block author. */
|
20 |
Object(x.__)("By %s"),c))))}))):null}function Te(){var e=Object(s.useSelect)((function(e){return e(ne).getNewBlockTypes()}),[]);return e.length?Object(o.createElement)(xe.PluginPrePublishPanel,{icon:Pe.a,title:Object(x.sprintf)(// translators: %d: number of blocks (number).
|
21 |
Object(x._n)("Added: %d block","Added: %d blocks",e.length),e.length),initialOpen:!0},Object(o.createElement)("p",{className:"installed-blocks-pre-publish-panel__copy"},Object(x._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)),Object(o.createElement)(Ne,{items:e})):null}var Ie=n(13),Le=n(10);function Ce(e){var t=e.attributes,n=e.block,r=e.clientId,c=Object(s.useSelect)((function(e){return e(ne).isInstalling(n.id)})),a=Object(s.useDispatch)(ne).installBlockType,i=Object(s.useDispatch)("core/block-editor").replaceBlock;return Object(o.createElement)(ie.Button,{onClick:function(){return a(n).then((function(e){if(e){var c=Object(l.getBlockType)(n.name),o=Object(l.parse)(t.originalContent),a=Object(ce.a)(o,1)[0];a&&i(r,Object(l.createBlock)(c.name,a.attributes,a.innerBlocks))}}))},disabled:c,isBusy:c,isPrimary:!0},Object(x.sprintf)(
|
1 |
+
window.wp=window.wp||{},window.wp.blockDirectory=function(e){var t={};function n(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,n),c.l=!0,c.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 c in e)n.d(r,c,function(t){return e[t]}.bind(null,c));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=518)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10: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}))},11:function(e,t){e.exports=window.wp.blocks},13:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(48);function c(e,t){if(null==e)return{};var n,c,o=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(c=0;c<a.length;c++)n=a[c],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},14:function(e,t){e.exports=window.wp.compose},142:function(e,t,n){"use strict";var r=n(5),c=n(13),o=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,i=void 0===n?24:n,l=Object(c.a)(e,["icon","size"]);return Object(o.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:i,height:i},l))}},15:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(25),c=n(39),o=n(31);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(c.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},16:function(e,t){e.exports=window.regeneratorRuntime},182:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=o},2:function(e,t){e.exports=window.lodash},211:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"}));t.a=o},212:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"}));t.a=o},25:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},3:function(e,t){e.exports=window.wp.components},31:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(25);function c(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},333:function(e,t){e.exports=window.wp.editPost},34:function(e,t){e.exports=window.wp.hooks},374:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(c.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"}));t.a=o},39:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},4:function(e,t){e.exports=window.wp.data},40:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},41:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},46:function(e,t,n){"use strict";function r(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(c,o){var a=e.apply(t,n);function i(e){r(a,c,o,i,l,"next",e)}function l(e){r(a,c,o,i,l,"throw",e)}i(void 0)}))}}n.d(t,"a",(function(){return c}))},47:function(e,t){e.exports=window.wp.apiFetch},48:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,c={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(c[n]=e[n]);return c}n.d(t,"a",(function(){return r}))},5: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}))},51:function(e,t){e.exports=window.wp.notices},518:function(e,t,n){"use strict";n.r(t),n.d(t,"store",(function(){return ne}));var r={};n.r(r),n.d(r,"isRequestingDownloadableBlocks",(function(){return y})),n.d(r,"getDownloadableBlocks",(function(){return k})),n.d(r,"getInstalledBlockTypes",(function(){return v})),n.d(r,"getNewBlockTypes",(function(){return g})),n.d(r,"getUnusedBlockTypes",(function(){return h})),n.d(r,"isInstalling",(function(){return w})),n.d(r,"getErrorNotices",(function(){return E})),n.d(r,"getErrorNoticeForBlock",(function(){return _}));var c={};n.r(c),n.d(c,"fetchDownloadableBlocks",(function(){return U})),n.d(c,"receiveDownloadableBlocks",(function(){return K})),n.d(c,"installBlockType",(function(){return W})),n.d(c,"uninstallBlockType",(function(){return Y})),n.d(c,"addInstalledBlockType",(function(){return $})),n.d(c,"removeInstalledBlockType",(function(){return G})),n.d(c,"setIsInstalling",(function(){return q})),n.d(c,"setErrorNotice",(function(){return J})),n.d(c,"clearErrorNotice",(function(){return Q}));var o=n(0),a=n(63),i=n(34),l=n(11),s=n(4),u=n(5),b=n(55),d=n(15),f=n(2);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=Object(s.combineReducers)({downloadableBlocks: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_DOWNLOADABLE_BLOCKS":return O(O({},e),{},Object(u.a)({},t.filterValue,{isRequesting:!0}));case"RECEIVE_DOWNLOADABLE_BLOCKS":return O(O({},e),{},Object(u.a)({},t.filterValue,{results:t.downloadableBlocks,isRequesting:!1}))}return e},blockManagement:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{installedBlockTypes:[],isInstalling:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_INSTALLED_BLOCK_TYPE":return O(O({},e),{},{installedBlockTypes:[].concat(Object(d.a)(e.installedBlockTypes),[t.item])});case"REMOVE_INSTALLED_BLOCK_TYPE":return O(O({},e),{},{installedBlockTypes:e.installedBlockTypes.filter((function(e){return e.name!==t.item.name}))});case"SET_INSTALLING_BLOCK":return O(O({},e),{},{isInstalling:O(O({},e.isInstalling),{},Object(u.a)({},t.blockId,t.isInstalling))})}return e},errorNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_ERROR_NOTICE":return O(O({},e),{},Object(u.a)({},t.blockId,{message:t.message,isFatal:t.isFatal}));case"CLEAR_ERROR_NOTICE":return Object(f.omit)(e,t.blockId)}return e}});function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t.length)return!1;if(t.some((function(t){return t.name===e.name})))return!0;for(var n=0;n<t.length;n++)if(j(e,t[n].innerBlocks))return!0;return!1}function y(e,t){return!(!e.downloadableBlocks[t]||!e.downloadableBlocks[t].isRequesting)&&e.downloadableBlocks[t].isRequesting}function k(e,t){return e.downloadableBlocks[t]&&e.downloadableBlocks[t].results?e.downloadableBlocks[t].results:[]}function v(e){return e.blockManagement.installedBlockTypes}var g=Object(s.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks();return v(t).filter((function(e){return j(e,n)}))}})),h=Object(s.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks();return v(t).filter((function(e){return!j(e,n)}))}}));function w(e,t){return e.blockManagement.isInstalling[t]||!1}function E(e){return e.errorNotices}function _(e,t){return e.errorNotices[t]}var B=n(16),S=n.n(B),x=n(1),P=n(51),N=n(46),T=n(47),I=n.n(T);function L(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return C(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,c=function(){};return{s:c,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var D=function(e){return new Promise((function(t,n){var r=document.createElement(e.nodeName);["id","rel","src","href","type"].forEach((function(t){e[t]&&(r[t]=e[t])})),e.innerHTML&&r.appendChild(document.createTextNode(e.innerHTML)),r.onload=function(){return t(!0)},r.onerror=function(){return n(new Error("Error loading asset."))},document.body.appendChild(r),("link"===r.nodeName.toLowerCase()||"script"===r.nodeName.toLowerCase()&&!r.src)&&t()}))};function A(e){return{type:"LOAD_ASSETS",assets:e}}var R={LOAD_ASSETS:function(){return Object(N.a)(S.a.mark((function e(){var t,n,r,c,o,a,i;return S.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,I()({url:document.location.href,parse:!1});case 2:return t=e.sent,e.next=5,t.text();case 5:n=e.sent,r=(new window.DOMParser).parseFromString(n,"text/html"),c=Array.from(r.querySelectorAll('link[rel="stylesheet"],script')).filter((function(e){return e.id&&!document.getElementById(e.id)})),o=L(c),e.prev=9,o.s();case 11:if((a=o.n()).done){e.next=17;break}return i=a.value,e.next=15,D(i);case 15:e.next=11;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(9),o.e(e.t0);case 22:return e.prev=22,o.f(),e.finish(22);case 25:case"end":return e.stop()}}),e,null,[[9,19,22,25]])})))()}};function M(e){if(!e)return!1;var t=e.links["wp:plugin"]||e.links.self;return!(!t||!t.length)&&t[0].href}var F=S.a.mark(W),V=S.a.mark(Y);function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function U(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function K(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}function W(e){var t,n,r,c,o,a,i,u,d;return S.a.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return t=e.id,n=e.assets,r=!1,f.next=4,Q(t);case 4:return f.prev=4,f.next=7,q(e.id,!0);case 7:if(c=M(e),o={},!c){f.next=14;break}return f.next=12,Object(b.apiFetch)({url:c,data:{status:"active"},method:"PUT"});case 12:f.next=18;break;case 14:return f.next=16,Object(b.apiFetch)({path:"wp/v2/plugins",data:{slug:e.id,status:"active"},method:"POST"});case 16:a=f.sent,o=a._links;case 18:return f.next=20,$(H(H({},e),{},{links:H(H({},e.links),o)}));case 20:return f.next=22,A(n);case 22:return f.next=24,s.controls.select(l.store.name,"getBlockTypes");case 24:if(f.sent.some((function(t){return t.name===e.name}))){f.next=27;break}throw new Error(Object(x.__)("Error registering block. Try reloading the page."));case 27:r=!0,f.next=38;break;case 30:return f.prev=30,f.t0=f.catch(4),i=f.t0.message||Object(x.__)("An error occurred."),u=f.t0 instanceof Error,(d={folder_exists:Object(x.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:Object(x.__)("Error installing block. You can reload the page and try again.")})[f.t0.code]&&(u=!0,i=d[f.t0.code]),f.next=38,J(t,i,u);case 38:return f.next=40,q(e.id,!1);case 40:return f.abrupt("return",r);case 41:case"end":return f.stop()}}),F,null,[[4,30]])}function Y(e){return S.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(b.apiFetch)({url:M(e),data:{status:"inactive"},method:"PUT"});case 3:return t.next=5,Object(b.apiFetch)({url:M(e),method:"DELETE"});case 5:return t.next=7,G(e);case 7:t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(0),t.next=13,s.controls.dispatch(P.store,"createErrorNotice",t.t0.message||Object(x.__)("An error occurred."));case 13:case"end":return t.stop()}}),V,null,[[0,9]])}function $(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function G(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function q(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function J(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"SET_ERROR_NOTICE",blockId:e,message:t,isFatal:n}}function Q(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var X={getDownloadableBlocks:S.a.mark((function e(t){var n,r;return S.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,U(t);case 5:return e.next=7,Object(b.apiFetch)({path:"wp/v2/block-directory/search?term=".concat(t)});case 7:return n=e.sent,r=n.map((function(e){return Object(f.mapKeys)(e,(function(e,t){return Object(f.camelCase)(t)}))})),e.next=11,K(r,t);case 11:e.next=15;break;case 13:e.prev=13,e.t0=e.catch(2);case 15:case"end":return e.stop()}}),e,null,[[2,13]])}))};function Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var te={reducer:m,selectors:r,actions:c,controls:ee(ee({},b.controls),R),resolvers:X},ne=Object(s.createReduxStore)("core/block-directory",te);function re(){var e=Object(s.useDispatch)(ne).uninstallBlockType,t=Object(s.useSelect)((function(e){var t=e("core/editor"),n=t.isAutosavingPost;return(0,t.isSavingPost)()&&!n()}),[]),n=Object(s.useSelect)((function(e){return e(ne).getUnusedBlockTypes()}),[]);return Object(o.useEffect)((function(){t&&n.length&&n.forEach((function(t){e(t),Object(l.unregisterBlockType)(t.name)}))}),[t]),null}Object(s.register)(ne);var ce=n(9),oe=n(6),ae=n(14),ie=n(3),le=n(54),se=function(e){var t=e.author,n=e.authorBlockCount,r=e.authorBlockRating;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"block-directory-downloadable-block-author-info__content-author"},Object(x.sprintf)(
|
2 |
/* translators: %s: author name. */
|
3 |
Object(x.__)("Authored by %s"),t)),Object(o.createElement)("span",{className:"block-directory-downloadable-block-author-info__content"},r>0?Object(x.sprintf)(
|
4 |
/* translators: 1: number of blocks. 2: average rating. */
|
5 |
Object(x._n)("This author has %1$d block, with an average rating of %2$.1f.","This author has %1$d blocks, with an average rating of %2$.1f.",n),n,r):Object(x.sprintf)(
|
6 |
/* translators: 1: number of blocks. */
|
7 |
+
Object(x._n)("This author has %1$d block.","This author has %1$d blocks.",n),n)))},ue=n(68),be=n(142),de=n(211),fe=n(7),pe=Object(o.createElement)(fe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(fe.Path,{d:"M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z"})),Oe=n(212),me=function(e){var t=e.rating,n=.5*Math.round(t/.5),r=Math.floor(t),c=Math.ceil(t-r),a=5-(r+c);return Object(o.createElement)("div",{"aria-label":Object(x.sprintf)(
|
8 |
/* translators: %s: number of stars. */
|
9 |
Object(x.__)("%s out of 5 stars"),n)},Object(f.times)(r,(function(e){return Object(o.createElement)(be.a,{key:"full_stars_".concat(e),icon:de.a,size:16})})),Object(f.times)(c,(function(e){return Object(o.createElement)(be.a,{key:"half_stars_".concat(e),icon:pe,size:16})})),Object(f.times)(a,(function(e){return Object(o.createElement)(be.a,{key:"empty_stars_".concat(e),icon:Oe.a,size:16})})))},je=function(e){var t=e.rating,n=e.ratingCount;return Object(o.createElement)("div",{className:"block-directory-block-ratings"},Object(o.createElement)(me,{rating:t}),Object(o.createElement)("span",{className:"block-directory-block-ratings__rating-count","aria-label":Object(x.sprintf)(// translators: %d: number of ratings (number).
|
10 |
Object(x._n)("%d total rating","%d total ratings",n),n)},"(",n,")"))},ye=function(e){var t=e.icon,n=e.title;return Object(o.createElement)("div",{className:"block-directory-downloadable-block-icon"},null!==t.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)?Object(o.createElement)("img",{src:t,alt:Object(x.sprintf)(// translators: %s: Name of the plugin e.g: "Akismet".
|
11 |
+
Object(x.__)("%s block icon"),n)}):Object(o.createElement)(oe.BlockIcon,{icon:t,showColors:!0}))},ke=function(e){var t=e.icon,n=e.title,r=e.rating,c=e.ratingCount,a=e.isLoading,i=void 0!==a&&a,l=e.isInstallable,s=void 0===l||l,u=e.onClick;return Object(o.createElement)("div",{className:"block-directory-downloadable-block-header__row"},Object(o.createElement)(ye,{icon:t,title:n}),Object(o.createElement)("div",{className:"block-directory-downloadable-block-header__column"},Object(o.createElement)("h2",{className:"block-directory-downloadable-block-header__title"},Object(ue.decodeEntities)(n)),Object(o.createElement)(je,{rating:r,ratingCount:c})),Object(o.createElement)(ie.Button,{isSecondary:!0,isBusy:i,disabled:i||!s,onClick:function(e){e.preventDefault(),!i&&s&&u()}},i?Object(x.__)("Adding…"):Object(x.__)("Add block")))},ve=Object(o.createElement)(fe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(o.createElement)(fe.Path,{d:"M18 3.5c0 .62-.38 1.16-.92 1.38v13.11H1.99l4.22-6.73c-.13-.23-.21-.48-.21-.76C6 9.67 6.67 9 7.5 9S9 9.67 9 10.5c0 .13-.02.25-.05.37l1.44.63c.27-.3.67-.5 1.11-.5.18 0 .35.04.51.09l3.58-6.41c-.36-.27-.59-.7-.59-1.18 0-.83.67-1.5 1.5-1.5.19 0 .36.04.53.1l.05-.09v.11c.54.22.92.76.92 1.38zm-1.92 13.49V5.85l-3.29 5.89c.13.23.21.48.21.76 0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5l.01-.07-1.63-.72c-.25.18-.55.29-.88.29-.18 0-.35-.04-.51-.1l-3.2 5.09h12.29z"})),ge=n(374),he=function(e){var t,n=e.activeInstalls,r=e.description,c=e.humanizedUpdated;return t=n>1e6?Object(x.sprintf)(
|
12 |
/* translators: %d: number of active installations. */
|
13 |
Object(x.__)("%d+ Million active installations"),Math.floor(n/1e6)):0===n?Object(x.__)("Less than 10 active installations"):Object(x.sprintf)(
|
14 |
/* translators: %d: number of active installations. */
|
15 |
Object(x.__)("%d+ active installations"),n),Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",{className:"block-directory-downloadable-block-info__content"},Object(ue.decodeEntities)(r)),Object(o.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(o.createElement)(be.a,{className:"block-directory-downloadable-block-info__icon",icon:ve}),t),Object(o.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(o.createElement)(be.a,{className:"block-directory-downloadable-block-info__icon",icon:ge.a}),// translators: %s: Humanized date of last update e.g: "2 months ago".
|
16 |
Object(x.sprintf)(Object(x.__)("Updated %s"),c)))},we=function(e){var t=e.block,n=e.onClick,r=Object(s.useSelect)((function(e){return e(ne).getErrorNoticeForBlock(t.id)}),[t]);return r?Object(o.createElement)(ie.Notice,{status:"error",isDismissible:!1,className:"block-directory-downloadable-block-notice"},Object(o.createElement)("div",{className:"block-directory-downloadable-block-notice__content"},r.message),Object(o.createElement)(ie.Button,{isSmall:!0,isPrimary:!0,onClick:function(){if(r.isFatal)return window.location.reload(),!1;n(t)}},r.isFatal?Object(x.__)("Reload"):Object(x.__)("Retry"))):null};function Ee(e){var t=e.item,n=e.onClick,r=Object(s.useSelect)((function(e){var n=e(ne),r=n.isInstalling,c=(0,n.getErrorNoticeForBlock)(t.id),o=c&&c.isFatal;return{isLoading:r(t.id),isInstallable:!o}}),[t]),c=r.isLoading,a=r.isInstallable,i=t.icon,l=t.title,u=t.description,b=t.rating,d=t.activeInstalls,f=t.ratingCount,p=t.author,O=t.humanizedUpdated,m=t.authorBlockCount,j=t.authorBlockRating;return Object(o.createElement)("li",{className:"block-directory-downloadable-block-list-item"},Object(o.createElement)("article",{className:"block-directory-downloadable-block-list-item__panel"},Object(o.createElement)("header",{className:"block-directory-downloadable-block-list-item__header"},Object(o.createElement)(ke,{icon:i,onClick:n,title:l,rating:b,ratingCount:f,isLoading:c,isInstallable:a})),Object(o.createElement)("section",{className:"block-directory-downloadable-block-list-item__body"},Object(o.createElement)(we,{onClick:n,block:t}),Object(o.createElement)(he,{activeInstalls:d,description:u,humanizedUpdated:O})),Object(o.createElement)("footer",{className:"block-directory-downloadable-block-list-item__footer"},Object(o.createElement)(se,{author:p,authorBlockCount:m,authorBlockRating:j}))))}var _e=function(e){var t=e.items,n=e.onHover,r=void 0===n?f.noop:n,c=e.onSelect,a=Object(s.useDispatch)(ne).installBlockType;return t.length?Object(o.createElement)("ul",{role:"list",className:"block-directory-downloadable-blocks-list"},t.map((function(e){return Object(o.createElement)(Ee,{key:e.id,onClick:function(){Object(l.getBlockType)(e.name)?c(e):a(e).then((function(t){t&&c(e)})),r(null)},item:e})}))):null},Be=Object(ae.compose)([Object(s.withSelect)((function(e,t){var n=t.filterValue,r=t.rootClientId,c=void 0===r?null:r,o=e(ne),a=o.getDownloadableBlocks,i=o.isRequestingDownloadableBlocks,l=e(oe.store).canInsertBlockType,s=e("core").canUser("read","block-directory/search");return{downloadableItems:s?a(n).filter((function(e){return l(e,c,!0)})):[],hasPermission:s,isLoading:i(n)}}))])((function(e){var t=e.downloadableItems,n=e.onSelect,r=e.onHover,c=e.hasPermission,a=e.isLoading,i=e.isWaiting,l=Object(ae.useDebounce)(le.speak,500);return!1===c?(l(Object(x.__)("No blocks found in your library.")),Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(x.__)("No blocks found in your library."))):void 0===c||a||i?Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(o.createElement)(ie.Spinner,null)):t.length?(l(Object(x.sprintf)(
|
17 |
/* translators: %s: number of available blocks. */
|
18 |
+
Object(x._n)("No blocks found in your library. We did find %d block available for download.","No blocks found in your library. We did find %d blocks available for download.",t.length),t.length)),Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description"},Object(x.__)("No blocks found in your library. These blocks can be downloaded and installed:")),Object(o.createElement)(_e,{items:t,onSelect:n,onHover:r}))):Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(x.__)("No blocks found in your library."))})),Se=function(){var e=Object(o.useState)(""),t=Object(ce.a)(e,2),n=t[0],r=t[1],c=Object(f.debounce)(r,400);return Object(o.createElement)(oe.__experimentalInserterMenuExtension,null,(function(e){var t=e.onSelect,r=e.onHover,a=e.filterValue,i=e.hasItems,l=e.rootClientId;return i||!a?null:(n!==a&&c(a),Object(o.createElement)(Be,{onSelect:t,onHover:r,rootClientId:l,filterValue:n,isWaiting:a!==n}))}))},xe=n(333),Pe=n(182);function Ne(e){var t=e.items;return t.length?Object(o.createElement)("ul",{className:"block-directory-compact-list"},t.map((function(e){var t=e.icon,n=e.id,r=e.title,c=e.author;return Object(o.createElement)("li",{key:n,className:"block-directory-compact-list__item"},Object(o.createElement)(ye,{icon:t,title:r}),Object(o.createElement)("div",{className:"block-directory-compact-list__item-details"},Object(o.createElement)("div",{className:"block-directory-compact-list__item-title"},r),Object(o.createElement)("div",{className:"block-directory-compact-list__item-author"},Object(x.sprintf)(
|
19 |
/* translators: %s: Name of the block author. */
|
20 |
Object(x.__)("By %s"),c))))}))):null}function Te(){var e=Object(s.useSelect)((function(e){return e(ne).getNewBlockTypes()}),[]);return e.length?Object(o.createElement)(xe.PluginPrePublishPanel,{icon:Pe.a,title:Object(x.sprintf)(// translators: %d: number of blocks (number).
|
21 |
Object(x._n)("Added: %d block","Added: %d blocks",e.length),e.length),initialOpen:!0},Object(o.createElement)("p",{className:"installed-blocks-pre-publish-panel__copy"},Object(x._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)),Object(o.createElement)(Ne,{items:e})):null}var Ie=n(13),Le=n(10);function Ce(e){var t=e.attributes,n=e.block,r=e.clientId,c=Object(s.useSelect)((function(e){return e(ne).isInstalling(n.id)})),a=Object(s.useDispatch)(ne).installBlockType,i=Object(s.useDispatch)("core/block-editor").replaceBlock;return Object(o.createElement)(ie.Button,{onClick:function(){return a(n).then((function(e){if(e){var c=Object(l.getBlockType)(n.name),o=Object(l.parse)(t.originalContent),a=Object(ce.a)(o,1)[0];a&&i(r,Object(l.createBlock)(c.name,a.attributes,a.innerBlocks))}}))},disabled:c,isBusy:c,isPrimary:!0},Object(x.sprintf)(
|
build/block-editor/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-wordcount'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-wordcount'), 'version' => '15e232858ce46f7e5ee73a002f018aec');
|
build/block-editor/index.js
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
window.wp=window.wp||{},window.wp.blockEditor=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=509)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10: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}))},101:function(e,t,n){"use strict";t.__esModule=!0;var r=n(218);t.default=r.TextareaAutosize},11:function(e,t){e.exports=window.wp.blocks},12:function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r))e.push(o.apply(null,r));else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?e.exports=o:void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},126:function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(214)),c=r(n(215)),i=n(8),l=r(i),a=r(n(184)),s=r(n(216)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(){var e=i.useState(!1)[1];return i.useCallback((function(){return e((function(e){return!e}))}),[])}function b(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return u.fun(e)?e.apply(void 0,n):e}function m(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return u.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var v,g,O=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),h=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof O&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof O&&e.removeChild(s(t))}))},t}return a(t,e),t}(O),j=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof O&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof O&&e.removeChild(s(t))}))},t}a(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof O)&&(t[n]=r instanceof O?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(O);function k(e,t){v={fn:e,transform:t}}function y(e){g=e}var _,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},C=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function w(e){_=e}var S,B=function(){return Date.now()};function I(e){S=e}var x,P,T=function(e){return e.current};function N(e){x=e}var D=Object.freeze({get applyAnimatedValues(){return v},injectApplyAnimatedValues:k,get colorNames(){return g},injectColorNames:y,get requestFrame(){return E},get cancelFrame(){return C},injectFrame:function(e,t){E=e,C=t},get interpolation(){return _},injectStringInterpolator:w,get now(){return B},injectNow:function(e){B=e},get defaultElement(){return S},injectDefaultElement:I,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return x},injectCreateAnimatedStyle:N,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),A=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:x(t.style)}):t,r.update=n,r.attach(),r}return a(t,e),t}(j),R=!1,L=new Set,M=function e(){if(!R)return!1;var t=B(),n=L,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var i=c,l=!1,a=0;a<i.configs.length;a++){for(var s=i.configs[a],u=void 0,d=void 0,b=0;b<s.animatedValues.length;b++){var f=s.animatedValues[b];if(!f.done){var p=s.fromValues[b],m=s.toValues[b],v=f.lastPosition,g=m instanceof O,h=Array.isArray(s.initialVelocity)?s.initialVelocity[b]:s.initialVelocity;if(g&&(m=m.getValue()),s.immediate)f.setValue(m),f.done=!0;else if("string"!=typeof p&&"string"!=typeof m){if(void 0!==s.duration)v=p+s.easing((t-f.startTime)/s.duration)*(m-p),u=t>=f.startTime+s.duration;else if(s.decay)v=p+h/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-v)<.1)&&(m=v);else{d=void 0!==f.lastTime?f.lastTime:t,h=void 0!==f.lastVelocity?f.lastVelocity:s.initialVelocity,t>d+64&&(d=t);for(var j=Math.floor(t-d),k=0;k<j;++k)v+=1*(h+=(-s.tension*(v-m)+-s.friction*h)/s.mass*1/1e3)/1e3;var y=!(!s.clamp||0===s.tension)&&(p<m?v>m:v<m),_=Math.abs(h)<=s.precision,C=0===s.tension||Math.abs(m-v)<=s.precision;u=y||_&&C,f.lastVelocity=h,f.lastTime=t}g&&!s.toValues[b].done&&(u=!1),u?(f.value!==m&&(v=m),f.done=!0):l=!0,f.setValue(v),f.lastPosition=v}else f.setValue(m),f.done=!0}}i.props.onFrame&&(i.values[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),l||(L.delete(i),i.stop(!0))}return L.size?P?P():E(e):R=!1,R};function F(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return F({range:e,output:t,extrapolate:n});if(_&&"string"==typeof e.output[0])return _(e);var r=e,o=r.output,c=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",l=r.extrapolateRight||r.extrapolate||"extend",a=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,i,l,a){var s=a?a(e):e;if(s<t){if("identity"===i)return s;"clamp"===i&&(s=t)}if(s>n){if("identity"===l)return s;"clamp"===l&&(s=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t),s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r,s)}(e,c[t],c[t+1],o[t],o[t+1],a,i,l,r.map)}}var V=function(e){function t(n,r,o){var c;return(c=e.call(this)||this).calc=void 0,c.payload=n instanceof h&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],c.calc=F(r,o),c}a(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t){this.calc=F(e,t)},n.interpolate=function(e,n){return new t(this,e,n)},t}(h),H=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}a(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t){return new V(this,e,t)},t}(O),z=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new H(e)})),n}a(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(h),G=0,U=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=m(e),n=t.delay,r=void 0===n?0:n,i=t.to,l=c(t,["delay","to"]);if(u.arr(i)||u.fun(i))this.queue.push(o({},l,{delay:r,to:i}));else if(i){var a={};Object.entries(i).forEach((function(e){var t,n=e[0],c=e[1],i=o({to:(t={},t[n]=c,t),delay:p(r,n)},l),s=a[i.delay]&&a[i.delay].to;a[i.delay]=o({},a[i.delay],i,{to:o({},s,i.to)})})),this.queue=Object.values(a)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(l),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var n=e.from,r=void 0===n?{}:n,c=e.to,i=void 0===c?{}:c;u.obj(r)&&(t.merged=o({},r,t.merged)),u.obj(i)&&(t.merged=o({},t.merged,i))}));var n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((function(o,i){var l=o.delay,a=c(o,["delay"]),s=function(o){i===r.length-1&&n===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(a.to)||u.fun(a.to);l?setTimeout((function(){n===t.guid&&(d?t.runAsync(a,s):t.diff(a).start(s))}),l):d?t.runAsync(a,s):t.diff(a).start(s)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,L.has(this)||L.add(this),R||(R=!0,E(P||M));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,L.has(this)&&L.delete(this)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,l=Promise.resolve(void 0);if(u.arr(r.to))for(var a=function(e){var t=e,c=o({},r,m(r.to[t]));u.arr(c.config)&&(c.config=c.config[t]),l=l.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s<r.to.length;s++)a(s);else if(u.fun(r.to)){var d,b=0;l=l.then((function(){return r.to((function(e){var t=o({},r,m(e));if(u.arr(t.config)&&(t.config=t.config[b]),b++,i===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}l.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,i=n.to,l=void 0===i?{}:i,a=n.config,s=void 0===a?{}:a,d=n.reverse,m=n.attach,v=n.reset,O=n.immediate;if(d){var h=[l,c];c=h[0],l=h[1]}this.merged=o({},c,this.merged,l),this.hasChanged=!1;var j=m&&m(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],i=n[1],l=e[r]||{},a=u.num(i),d=u.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!g[i],m=u.arr(i),h=!a&&!m&&!d,k=u.und(c[r])?i:c[r],y=a||m||d?i:1,E=p(s,r);j&&(y=j.animations[r].parent);var C,w=l.parent,S=l.interpolation,I=f(j?y.getPayload():y),x=i;h&&(x=_({range:[0,1],output:[i,i]})(1));var P,T=S&&S.getValue(),N=!u.und(w)&&l.animatedValues.some((function(e){return!e.done})),D=!u.equ(x,T),A=!u.equ(x,l.previous),R=!u.equ(E,l.config);if(v||A&&D||R){var L;if(a||d)w=S=l.parent||new H(k);else if(m)w=S=l.parent||new z(k);else if(h){var M=l.interpolation&&l.interpolation.calc(l.parent.value);M=void 0===M||v?k:M,l.parent?(w=l.parent).setValue(0,!1):w=new H(0);var F={output:[M,i]};l.interpolation?(S=l.interpolation,l.interpolation.updateConfig(F)):S=w.interpolate(F)}return I=f(j?y.getPayload():y),C=f(w.getPayload()),v&&!h&&w.setValue(k,!1),t.hasChanged=!0,C.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=N?e.lastVelocity:void 0,e.lastTime=N?e.lastTime:void 0,e.startTime=B(),e.done=!1,e.animatedStyles.clear()})),p(O,r)&&w.setValue(h?y:i,!1),o({},e,((L={})[r]=o({},l,{name:r,parent:w,interpolation:S,animatedValues:C,toValues:I,previous:x,config:E,fromValues:f(w.getValue()),immediate:p(O,r),initialVelocity:b(E.velocity,0),clamp:b(E.clamp,!1),precision:b(E.precision,.01),tension:b(E.tension,170),friction:b(E.friction,26),mass:b(E.mass,1),duration:E.duration,easing:b(E.easing,(function(e){return e})),decay:E.decay}),L))}return D?e:(h&&(w.setValue(1,!1),S.updateConfig({output:[x,x]})),w.done=!0,t.hasChanged=!0,o({},e,((P={})[r]=o({},e[r],{previous:x}),P)))}),this.animations),this.hasChanged)for(var k in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[k]=this.animations[k].interpolation,this.values[k]=this.animations[k].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),W=function(e,t){var n=i.useRef(!1),r=i.useRef(),o=u.fun(t),c=i.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new U,i=o?p(t,r,c):t[r];return 0===r&&(n=i.ref),c.update(i),n||c.start(),c})),n]}),[e]),l=c[0],a=c[1];r.current=l,i.useImperativeHandle(a,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var s=i.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?p(e,n,t):e[n]),a||t.start()}))}}),[e]);i.useEffect((function(){n.current?o||s(t):a||r.current.forEach((function(e){return e.start()}))})),i.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var d=r.current.map((function(e){return e.getValues()}));return o?[d,s,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:d},K=0,q=function(e,t){return("function"==typeof t?e.map(t):f(t)).map(String)},$=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,i=c(e,["items","keys"]);return t=f(void 0!==t?t:null),o({items:t,keys:q(t,r)},i)};function Y(e,t){var n=function(){if(o){if(c>=r.length)return"break";i=r[c++]}else{if((c=r.next()).done)return"break";i=c.value}var n=i.key,l=function(e){return e.key!==n};(u.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(l),e.current.deleted=e.current.deleted.filter(l))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var i;if("break"===n())break}e.current.forceUpdate()}var X=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof O||(t=v.transform(t)),n.payload=t,n}return a(t,e),t}(j),Q={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+J(Z,Z,Z)),te=new RegExp("rgba"+J(Z,Z,Z,Z)),ne=new RegExp("hsl"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{6})$/,le=/^#([0-9a-fA-F]{8})$/;function ae(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}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=ae(o,r,e+1/3),i=ae(o,r,e),l=ae(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*i)<<16|Math.round(255*l)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function be(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function pe(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:Q.hasOwnProperty(t)?Q[t]:(n=ee.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|255)>>>0:(n=te.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|be(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=le.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(de(n[1]),fe(n[2]),fe(n[3])))>>>0:(n=re.exec(t))?(se(de(n[1]),fe(n[2]),fe(n[3]))|be(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var me=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ve=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(Q).join("|")+")","g"),Oe={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","Ms","Moz","O"];function je(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Oe.hasOwnProperty(e)&&Oe[e]?(""+t).trim():t+"px"}Oe=Object.keys(Oe).reduce((function(e,t){return he.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),Oe);var ke={};N((function(e){return new X(e)})),I("div"),w((function(e){var t=e.output.map((function(e){return e.replace(ve,pe)})).map((function(e){return e.replace(ge,pe)})),n=t[0].match(me).map((function(){return[]}));t.forEach((function(e){e.match(me).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(me).map((function(t,r){return F(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(me,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),y(Q),k((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,i=t.scrollLeft,l=c(t,["style","children","scrollTop","scrollLeft"]),a="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var u=0===s.indexOf("--"),d=je(s,n[s],u);"float"===s&&(s="cssFloat"),u?e.style.setProperty(s,d):e.style[s]=d}for(var b in l){var f=a?b:ke[b]||(ke[b]=b.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,l[b])}}),(function(e){return e}));var ye,_e,Ee=(ye=function(e){return i.forwardRef((function(t,n){var r=d(),a=i.useRef(!0),s=i.useRef(null),b=i.useRef(null),f=i.useCallback((function(e){var t=s.current;s.current=new A(e,(function(){b.current&&!1===v.fn(b.current,s.current.getAnimatedValue())&&r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){a.current=!1,s.current&&s.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(b,a,r)})),f(t);var p=s.current.getValue(),m=(p.scrollTop,p.scrollLeft,c(p,["scrollTop","scrollLeft"]));return l.createElement(e,o({},m,{ref:function(e){return b.current=(t=e,(r=n)&&(u.fun(r)?r(t):u.obj(r)&&(r.current=t)),t);var t,r}}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=_e?t[0].toLowerCase()+t.substring(1):t;return e[n]=ye(n),e}),ye)}),Ce=Ee(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=M,t.animated=Ce,t.a=Ce,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=D,t.useSpring=function(e){var t=u.fun(e),n=W(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=i.useRef(!1),r=u.fun(t),c=p(t),l=i.useRef(),a=W(e,(function(e,t){return 0===e&&(l.current=[]),l.current.push(t),o({},c,{config:p(c.config,e),attach:e>0&&function(){return l.current[e-1]}})})),s=a[0],d=a[1],b=a[2],f=i.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=l.current[r];return o({},e,{config:p(e.config||c.config,t),attach:i&&function(){return i}})}))}}),[e,c.reverse]);return i.useEffect((function(){n.current&&!r&&f(t)})),i.useEffect((function(){n.current=!0}),[]),r?[s,f,b]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),l=$(r),a=l.lazy,s=void 0!==a&&a,u=(l.unique,l.reset),b=void 0!==u&&u,f=(l.enter,l.leave,l.update,l.onDestroyed),m=(l.keys,l.items,l.onFrame),v=l.onRest,g=l.onStart,O=l.ref,h=c(l,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),j=d(),k=i.useRef(!1),y=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!k.current&&new Map,forceUpdate:j});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(y.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(y.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(y.current.instances).map((function(e){return e[1]}))}}})),y.current=function(e,t){for(var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),l=$(t),a=l.items,s=l.keys,u=l.initial,d=l.from,b=l.enter,f=l.leave,m=l.update,v=l.trail,g=void 0===v?0:v,O=l.unique,h=l.config,j=l.order,k=void 0===j?["enter","leave","update"]:j,y=$(r),_=y.keys,E=y.items,C=o({},i.current),w=[].concat(i.deleted),S=Object.keys(C),B=new Set(S),I=new Set(s),x=s.filter((function(e){return!B.has(e)})),P=i.transitions.filter((function(e){return!e.destroyed&&!I.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return B.has(e)})),N=-g;k.length;)switch(k.shift()){case"enter":x.forEach((function(e,t){O&&w.find((function(t){return t.originalKey===e}))&&(w=w.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=a[r],c=n&&void 0!==u?"initial":"enter";C[e]={slot:c,originalKey:e,key:O?String(e):K++,item:o,trail:N+=g,config:p(h,o,c),from:p(n&&void 0!==u?u||{}:d,o),to:p(b,o)}}));break;case"leave":P.forEach((function(e){var t=_.indexOf(e),n=E[t];w.unshift(o({},C[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=g,config:p(h,n,"leave"),to:p(f,n)})),delete C[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=a[t];C[e]=o({},C[e],{item:n,slot:"update",trail:N+=g,config:p(h,n,"update"),to:p(m,n)})}))}var D=s.map((function(e){return C[e]}));return w.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=D.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),D=[].concat(D.slice(0,t),[r],D.slice(t))})),o({},i,{changed:x.length||P.length||T.length,first:n&&0===x.length,transitions:D,current:C,deleted:w,prevProps:t})}(y.current,r),y.current.changed&&y.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,i=e.trail,l=e.key,a=e.item;y.current.instances.has(l)||y.current.instances.set(l,new U);var u=y.current.instances.get(l),d=o({},h,{to:r,from:n,config:c,ref:O,onRest:function(n){y.current.mounted&&(e.destroyed&&(O||s||Y(y,l),f&&f(a)),!Array.from(y.current.instances).some((function(e){return!e[1].idle}))&&(O||s)&&y.current.deleted.length>0&&Y(y),v&&v(a,t,n))},onStart:g&&function(){return g(a,t)},onFrame:m&&function(e){return m(a,t,e)},delay:i,reset:b&&"enter"===t});u.update(d),y.current.paused||u.start()})),i.useEffect((function(){return y.current.mounted=k.current=!0,function(){y.current.mounted=k.current=!1,Array.from(y.current.instances).map((function(e){return e[1].destroy()})),y.current.instances.clear()}}),[]),y.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:y.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){u.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var l=n*t[r];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+l})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=W},13:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(48);function o(e,t){if(null==e)return{};var n,o,c=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},137:function(e,t,n){"use strict";e.exports=n(222)},138:function(e,t){e.exports=window.wp.wordcount},14:function(e,t){e.exports=window.wp.compose},141:function(e,t){e.exports=window.wp.shortcode},143:function(e,t,n){"use strict";var r=n(5),o=n(13),c=n(0);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,l=void 0===n?24:n,a=Object(o.a)(e,["icon","size"]);return Object(c.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:l,height:l},a))}},144:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"}));t.a=c},145:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},146:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=c},15:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(25),o=n(39),c=n(31);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(o.a)(e)||Object(c.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},155:function(e,t,n){"use strict";var r=n(156);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var l=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 l.name="Invariant Violation",l}}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,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},156:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},16:function(e,t){e.exports=window.regeneratorRuntime},17:function(e,t){e.exports=window.wp.keycodes},170:function(e,t){e.exports=window.wp.tokenList},183:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=c},184:function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},185:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=c},19: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}))},2:function(e,t){e.exports=window.lodash},200: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}},214:function(e,t){function n(){return e.exports=n=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},n.apply(this,arguments)}e.exports=n},215:function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},216:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},217:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=c},218: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 __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),c=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};t.__esModule=!0;var l=n(8),a=n(35),s=n(219),u=n(220),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,r=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||r?setTimeout((function(){return e.textarea&&s(e.textarea)})):this.textarea&&s(this.textarea),this.textarea&&this.textarea.addEventListener("autosize:resized",this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener("autosize:resized",this.onResize),s.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),r=(t.onChange,t.style),o=(t.innerRef,t.children),a=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),s=this.state.lineHeight,u=n&&s?s*n:null;return l.createElement("textarea",c({},a,{onChange:this.onChange,style:u?c({},r,{maxHeight:u}):r,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),o)},t.prototype.componentDidUpdate=function(){this.textarea&&s.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.any,async:a.bool},t}(l.Component);t.TextareaAutosize=l.forwardRef((function(e,t){return l.createElement(d,c({},e,{innerRef:t}))}))},219:function(e,t,n){var r,o;void 0===(o="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))}}),c=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){c=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){var t=o.get(e);t&&t.destroy()}function l(e){var t=o.get(e);t&&t.update()}var a=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((a=function(e){return e}).destroy=function(e){return e},a.update=function(e){return e}):((a=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t,n=null,r=null,i=null,l=function(){e.clientWidth!==r&&d()},a=function(t){window.removeEventListener("resize",l,!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",l,!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"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function s(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",r=e.clientWidth,t.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),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(s("scroll"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(s("hidden"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),i!==r){i=r;var o=c("autosize:resized");try{e.dispatchEvent(o)}catch(e){}}}}(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},a.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=a,e.exports=t.default})?r.apply(t,[e,t]):r)||(e.exports=o)},22: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}))},220:function(e,t,n){var r=n(221);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 c=e.nodeName,i=document.createElement(c);i.innerHTML=" ","TEXTAREA"===c.toUpperCase()&&i.setAttribute("rows","1");var l=r(e,"font-size");i.style.fontSize=l,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i),n=i.offsetHeight,a.removeChild(i)}return n}},221: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()}))]}},222:function(e,t,n){"use strict";var r=n(223);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=r.getWindow(t));var o=n.allowHorizontalScroll,c=n.onlyScrollIfNeeded,i=n.alignWithTop,l=n.alignWithLeft,a=n.offsetTop||0,s=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;o=void 0===o||o;var b=r.isWindow(t),f=r.offset(e),p=r.outerHeight(e),m=r.outerWidth(e),v=void 0,g=void 0,O=void 0,h=void 0,j=void 0,k=void 0,y=void 0,_=void 0,E=void 0,C=void 0;b?(y=t,C=r.height(y),E=r.width(y),_={left:r.scrollLeft(y),top:r.scrollTop(y)},j={left:f.left-_.left-s,top:f.top-_.top-a},k={left:f.left+m-(_.left+E)+d,top:f.top+p-(_.top+C)+u},h=_):(v=r.offset(t),g=t.clientHeight,O=t.clientWidth,h={left:t.scrollLeft,top:t.scrollTop},j={left:f.left-(v.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-s,top:f.top-(v.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-a},k={left:f.left+m-(v.left+O+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:f.top+p-(v.top+g+(parseFloat(r.css(t,"borderBottomWidth"))||0))+u}),j.top<0||k.top>0?!0===i?r.scrollTop(t,h.top+j.top):!1===i?r.scrollTop(t,h.top+k.top):j.top<0?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top):c||((i=void 0===i||!!i)?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top)),o&&(j.left<0||k.left>0?!0===l?r.scrollLeft(t,h.left+j.left):!1===l?r.scrollLeft(t,h.left+k.left):j.left<0?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+k.left):c||((l=void 0===l||!!l)?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+k.left)))}},223: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 c(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 i(e){return c(e)}function l(e){return c(e,!0)}function a(e){var t=function(e){var t,n=void 0,r=void 0,o=e.ownerDocument,c=o.body,i=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=i.clientLeft||c.clientLeft||0,top:r-=i.clientTop||c.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=i(r),t.top+=l(r),t}var s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),u=/^(top|right|bottom|left)$/,d="left",b=void 0;function f(e,t){for(var n=0;n<e.length;n++)t(e[n])}function p(e){return"border-box"===b(e,"boxSizing")}"undefined"!=typeof window&&(b=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,c=n||o.defaultView.getComputedStyle(e,null);return c&&(r=c.getPropertyValue(t)||c[t]),r}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!u.test(t)){var r=e.style,o=r[d],c=e.runtimeStyle[d];e.runtimeStyle[d]=e.currentStyle[d],r[d]="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r[d]=o,e.runtimeStyle[d]=c}return""===n?"auto":n});var m=["margin","border","padding"];function v(e,t,n){var r={},o=e.style,c=void 0;for(c in t)t.hasOwnProperty(c)&&(r[c]=o[c],o[c]=t[c]);for(c in n.call(e),t)t.hasOwnProperty(c)&&(o[c]=r[c])}function g(e,t,n){var r=0,o=void 0,c=void 0,i=void 0;for(c=0;c<t.length;c++)if(o=t[c])for(i=0;i<n.length;i++){var l;l="border"===o?o+n[i]+"Width":o+n[i],r+=parseFloat(b(e,l))||0}return r}function O(e){return null!=e&&e==e.window}var h={};function j(e,t,n){if(O(e))return"width"===t?h.viewportWidth(e):h.viewportHeight(e);if(9===e.nodeType)return"width"===t?h.docWidth(e):h.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],o="width"===t?e.offsetWidth:e.offsetHeight,c=(b(e),p(e)),i=0;(null==o||o<=0)&&(o=void 0,(null==(i=b(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===n&&(n=c?1:-1);var l=void 0!==o||c,a=o||i;if(-1===n)return l?a-g(e,["border","padding"],r):i;if(l){var s=2===n?-g(e,["border"],r):g(e,["margin"],r);return a+(1===n?0:s)}return i+g(e,m.slice(n),r)}f(["Width","Height"],(function(e){h["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],h["viewport"+e](n))},h["viewport"+e]=function(t){var n="client"+e,r=t.document,o=r.body,c=r.documentElement[n];return"CSS1Compat"===r.compatMode&&c||o&&o[n]||c}}));var k={position:"absolute",visibility:"hidden",display:"block"};function y(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=j.apply(void 0,n):v(e,k,(function(){t=j.apply(void 0,n)})),t}function _(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)):b(e,t);for(var c in t)t.hasOwnProperty(c)&&_(e,c,t[c])}f(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);h["outer"+t]=function(t,n){return t&&y(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];h[e]=function(t,r){return void 0===r?t&&y(t,e,-1):t?(b(t),p(t)&&(r+=g(t,["padding","border"],n)),_(t,e,r)):void 0}})),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 a(e);!function(e,t){"static"===_(e,"position")&&(e.style.position="relative");var n=a(e),r={},o=void 0,c=void 0;for(c in t)t.hasOwnProperty(c)&&(o=parseFloat(_(e,c))||0,r[c]=o+t[c]-n[c]);_(e,r)}(e,t)},isWindow:O,each:f,css:_,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(O(e)){if(void 0===t)return i(e);window.scrollTo(t,l(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(O(e)){if(void 0===t)return l(e);window.scrollTo(i(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},h)},224:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));t.a=c},24:function(e,t){e.exports=window.wp.richText},240:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.a=c},25:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},259:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));t.a=c},260:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=c},261:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=c},262:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));t.a=c},263:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));t.a=c},264:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(o.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));t.a=c},265:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.a=c},27: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}))},28: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}))},29:function(e,t){e.exports=window.wp.url},3:function(e,t){e.exports=window.wp.components},30:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(57);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&&Object(r.a)(e,t)}},31:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(25);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},32:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(43),o=n(19);function c(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},33:function(e,t){e.exports=window.wp.dom},335:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.diffChars=function(e,t,n){return o.diff(e,t,n)},t.characterDiff=void 0;var o=new(((r=n(380))&&r.__esModule?r:{default:r}).default);t.characterDiff=o},336:function(e,t,n){"use strict";t.match=function(e,t){return a(e).some((function(e){var n=e.inverse,r="all"===e.type||t.type===e.type;if(r&&n||!r&&!n)return!1;var o=e.expressions.every((function(e){var n=e.feature,r=e.modifier,o=e.value,c=t[n];if(!c)return!1;switch(n){case"orientation":case"scan":return c.toLowerCase()===o.toLowerCase();case"width":case"height":case"device-width":case"device-height":o=d(o),c=d(c);break;case"resolution":o=u(o),c=u(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":o=s(o),c=s(c);break;case"grid":case"color":case"color-index":case"monochrome":o=parseInt(o,10)||1,c=parseInt(c,10)||0}switch(r){case"min":return c>=o;case"max":return c<=o;default:return c===o}}));return o&&!n||!o&&n}))},t.parse=a;var r=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,o=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,c=/^(?:(min|max)-)?(.+)/,i=/(em|rem|px|cm|mm|in|pt|pc)?$/,l=/(dpi|dpcm|dppx)?$/;function a(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(r),n=t[1],i=t[2],l=t[3]||"",a={};return a.inverse=!!n&&"not"===n.toLowerCase(),a.type=i?i.toLowerCase():"all",l=l.match(/\([^\)]+\)/g)||[],a.expressions=l.map((function(e){var t=e.match(o),n=t[1].toLowerCase().match(c);return{modifier:n[1],feature:n[2],value:t[2]}})),a}))}function s(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function u(e){var t=parseFloat(e);switch(String(e).match(l)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function d(e){var t=parseFloat(e);switch(String(e).match(i)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},337: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=[],l=!0;return function e(d){var b=n?c(d):d,f={},p=!0,m={node:b,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){m.isRoot||(m.parent.node[m.key]=e),m.node=e,t&&(p=!1)},delete:function(e){delete m.parent.node[m.key],e&&(p=!1)},remove:function(e){a(m.parent.node)?m.parent.node.splice(m.key,1):delete m.parent.node[m.key],e&&(p=!1)},keys:null,before:function(e){f.before=e},after:function(e){f.after=e},pre:function(e){f.pre=e},post:function(e){f.post=e},stop:function(){l=!1},block:function(){p=!1}};if(!l)return m;function v(){if("object"==typeof m.node&&null!==m.node){m.keys&&m.node_===m.node||(m.keys=i(m.node)),m.isLeaf=0==m.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===d){m.circular=o[e];break}}else m.isLeaf=!0,m.keys=null;m.notLeaf=!m.isLeaf,m.notRoot=!m.isRoot}v();var g=t.call(m,m.node);return void 0!==g&&m.update&&m.update(g),f.before&&f.before.call(m,m.node),p?("object"!=typeof m.node||null===m.node||m.circular||(o.push(m),v(),s(m.keys,(function(t,o){r.push(t),f.pre&&f.pre.call(m,m.node[t],t);var c=e(m.node[t]);n&&u.call(m.node,t)&&(m.node[t]=c.node),c.isLast=o==m.keys.length-1,c.isFirst=0==o,f.post&&f.post.call(m,c),r.pop()})),o.pop()),f.after&&f.after.call(m,m.node),m):m}(e).node}function c(e){if("object"==typeof e&&null!==e){var t;if(a(e))t=[];else if("[object Date]"===l(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===l(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===l(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===l(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===l(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===l(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 s(i(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 l=c(r);return e.push(r),t.push(l),s(i(r),(function(e){l[e]=n(r[e])})),e.pop(),t.pop(),l}return r}(this.value)};var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function l(e){return Object.prototype.toString.call(e)}var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};s(i(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}},34:function(e,t){e.exports=window.wp.hooks},35:function(e,t,n){e.exports=n(155)()},37:function(e,t){e.exports=window.wp.deprecated},376:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));t.a=c},377:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));t.a=c},378:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));t.a=c},379:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));t.a=c},380:function(e,t,n){"use strict";function r(){}function o(e,t,n,r,o){for(var c=0,i=t.length,l=0,a=0;c<i;c++){var s=t[c];if(s.removed){if(s.value=e.join(r.slice(a,a+s.count)),a+=s.count,c&&t[c-1].added){var u=t[c-1];t[c-1]=t[c],t[c]=u}}else{if(!s.added&&o){var d=n.slice(l,l+s.count);d=d.map((function(e,t){var n=r[a+t];return n.length>e.length?n:e})),s.value=e.join(d)}else s.value=e.join(n.slice(l,l+s.count));l+=s.count,s.added||(a+=s.count)}}var b=t[i-1];return i>1&&"string"==typeof b.value&&(b.added||b.removed)&&e.equals("",b.value)&&(t[i-2].value+=b.value,t.pop()),t}function c(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var i=this;function l(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,u=1,d=a+s,b=[{newPos:-1,components:[]}],f=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=a&&f+1>=s)return l([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*u;n<=u;n+=2){var r=void 0,d=b[n-1],f=b[n+1],p=(f?f.newPos:0)-n;d&&(b[n-1]=void 0);var m=d&&d.newPos+1<a,v=f&&0<=p&&p<s;if(m||v){if(!m||v&&d.newPos<f.newPos?(r=c(f),i.pushComponent(r.components,void 0,!0)):((r=d).newPos++,i.pushComponent(r.components,!0,void 0)),p=i.extractCommon(r,t,e,n),r.newPos+1>=a&&p+1>=s)return l(o(i,r.components,t,e,i.useLongestToken));b[n]=r}else b[n]=void 0}u++}if(r)!function e(){setTimeout((function(){if(u>d)return r();p()||e()}),0)}();else for(;u<=d;){var m=p();if(m)return m}},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,c=n.length,i=e.newPos,l=i-r,a=0;i+1<o&&l+1<c&&this.equals(t[i+1],n[l+1]);)i++,l++,a++;return a&&e.components.push({count:a}),e.newPos=i,l},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("")}}},381:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(o.Path,{d:"M2 2h5v11H2V2zm6 0h5v5H8V2zm6 0h4v16h-4V2zM8 8h5v5H8V8zm-6 6h11v4H2v-4z"}));t.a=c},382:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));t.a=c},39:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},4:function(e,t){e.exports=window.wp.data},40:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},41:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},43: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)}n.d(t,"a",(function(){return r}))},44:function(e,t){e.exports=window.wp.keyboardShortcuts},46:function(e,t,n){"use strict";function r(e,t,n,r,o,c,i){try{var l=e[c](i),a=l.value}catch(e){return void n(e)}l.done?t(a):Promise.resolve(a).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,c){var i=e.apply(t,n);function l(e){r(i,o,c,l,a,"next",e)}function a(e){r(i,o,c,l,a,"throw",e)}l(void 0)}))}}n.d(t,"a",(function(){return o}))},48:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},5: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}))},50:function(e,t,n){"use strict";var r,o;function c(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function l(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,a;function s(){n=o?new WeakMap:i()}function u(){var n,r,o,c,i,s=arguments.length;for(c=new Array(s),o=0;o<s;o++)c[o]=arguments[o];for(i=t.apply(null,c),(n=a(i)).isUniqueByDependants||(n.lastDependants&&!l(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(l(r.args,c,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,c)},c[0]=null,r.args=c,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=c),a=o?function(e){var t,o,c,l,a,s=n,u=!0;for(t=0;t<e.length;t++){if(!(a=o=e[t])||"object"!=typeof a){u=!1;break}s.has(o)?s=s.get(o):(c=new WeakMap,s.set(o,c),s=c)}return s.has(r)||((l=i()).isUniqueByDependants=u,s.set(r,l)),s.get(r)}:function(){return n},u.getDependants=t,u.clear=s,s(),u}},509:function(e,t,n){"use strict";n.r(t),n.d(t,"getColorClassName",(function(){return Pe})),n.d(t,"getColorObjectByAttributeValues",(function(){return Ie})),n.d(t,"getColorObjectByColorValue",(function(){return xe})),n.d(t,"createCustomColorsHOC",(function(){return qn})),n.d(t,"withColors",(function(){return $n})),n.d(t,"__experimentalUseColors",(function(){return ur})),n.d(t,"__experimentalGetGradientClass",(function(){return Ne})),n.d(t,"getGradientValueBySlug",(function(){return De})),n.d(t,"__experimentalGetGradientObjectByGradientValue",(function(){return Ae})),n.d(t,"getGradientSlugByValue",(function(){return Re})),n.d(t,"__experimentalUseGradient",(function(){return Le})),n.d(t,"getFontSize",(function(){return un})),n.d(t,"getFontSizeClass",(function(){return bn})),n.d(t,"getFontSizeObjectByValue",(function(){return dn})),n.d(t,"FontSizePicker",(function(){return fn})),n.d(t,"withFontSizes",(function(){return mr})),n.d(t,"AlignmentToolbar",(function(){return _r})),n.d(t,"Autocomplete",(function(){return Hr})),n.d(t,"BlockAlignmentToolbar",(function(){return z})),n.d(t,"__experimentalBlockFullHeightAligmentToolbar",(function(){return Gr})),n.d(t,"__experimentalBlockAlignmentMatrixToolbar",(function(){return Ur})),n.d(t,"BlockBreadcrumb",(function(){return Dl})),n.d(t,"BlockContextProvider",(function(){return Ml})),n.d(t,"BlockControls",(function(){return C})),n.d(t,"BlockColorsStyleSelector",(function(){return zl})),n.d(t,"BlockEdit",(function(){return Wl})),n.d(t,"useBlockEditContext",(function(){return h})),n.d(t,"BlockFormatControls",(function(){return Xl})),n.d(t,"BlockIcon",(function(){return Mr})),n.d(t,"BlockNavigationDropdown",(function(){return Vd})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return Ed})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return tb})),n.d(t,"__experimentalBlockNavigationTree",(function(){return Rd})),n.d(t,"__experimentalBlockVariationPicker",(function(){return rb})),n.d(t,"__experimentalBlockVariationTransforms",(function(){return ib})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return pb})),n.d(t,"ButtonBlockerAppender",(function(){return Ns})),n.d(t,"ColorPalette",(function(){return Ob})),n.d(t,"ColorPaletteControl",(function(){return hb})),n.d(t,"ContrastChecker",(function(){return it})),n.d(t,"__experimentalGradientPicker",(function(){return yb})),n.d(t,"__experimentalGradientPickerControl",(function(){return _b})),n.d(t,"__experimentalGradientPickerPanel",(function(){return Eb})),n.d(t,"__experimentalFontAppearanceControl",(function(){return Yt})),n.d(t,"__experimentalFontFamilyControl",(function(){return nn})),n.d(t,"__experimentalColorGradientControl",(function(){return $e})),n.d(t,"__experimentalPanelColorGradientSettings",(function(){return rt})),n.d(t,"__experimentalImageSizeControl",(function(){return wb})),n.d(t,"InnerBlocks",(function(){return Fb})),n.d(t,"__experimentalUseInnerBlocksProps",(function(){return Mb})),n.d(t,"InspectorAdvancedControls",(function(){return ee})),n.d(t,"InspectorControls",(function(){return ce})),n.d(t,"__experimentalLinkControl",(function(){return gf})),n.d(t,"__experimentalLinkControlSearchInput",(function(){return uf})),n.d(t,"__experimentalLinkControlSearchResults",(function(){return Zb})),n.d(t,"__experimentalLinkControlSearchItem",(function(){return Qb})),n.d(t,"LineHeightControl",(function(){return zt})),n.d(t,"MediaReplaceFlow",(function(){return yf})),n.d(t,"MediaPlaceholder",(function(){return Bf})),n.d(t,"MediaUpload",(function(){return jf})),n.d(t,"MediaUploadCheck",(function(){return kf})),n.d(t,"PanelColorSettings",(function(){return Jn})),n.d(t,"PlainText",(function(){return Pf})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return Nf})),n.d(t,"RichText",(function(){return eb})),n.d(t,"RichTextShortcut",(function(){return Df})),n.d(t,"RichTextToolbarButton",(function(){return Af})),n.d(t,"__unstableRichTextInputEvent",(function(){return Rf})),n.d(t,"ToolSelector",(function(){return Mf})),n.d(t,"__experimentalUnitControl",(function(){return Ff})),n.d(t,"URLInput",(function(){return $b})),n.d(t,"URLInputButton",(function(){return zf})),n.d(t,"URLPopover",(function(){return wf})),n.d(t,"__experimentalImageURLInputUI",(function(){return Kf})),n.d(t,"withColorContext",(function(){return gb})),n.d(t,"__experimentalBlockSettingsMenuFirstItem",(function(){return _u})),n.d(t,"__experimentalInserterMenuExtension",(function(){return js})),n.d(t,"__experimentalPreviewOptions",(function(){return $f})),n.d(t,"__experimentalUseResizeCanvas",(function(){return tp})),n.d(t,"BlockInspector",(function(){return ap})),n.d(t,"BlockList",(function(){return Ku})),n.d(t,"useBlockProps",(function(){return sd})),n.d(t,"__experimentalBlock",(function(){return bp})),n.d(t,"BlockMover",(function(){return Xs})),n.d(t,"BlockPreview",(function(){return qa})),n.d(t,"BlockSelectionClearer",(function(){return pp})),n.d(t,"__unstableUseBlockSelectionClearer",(function(){return fp})),n.d(t,"BlockSettingsMenu",(function(){return Nu})),n.d(t,"BlockSettingsMenuControls",(function(){return xu})),n.d(t,"BlockTitle",(function(){return Nl})),n.d(t,"BlockToolbar",(function(){return Mu})),n.d(t,"CopyHandler",(function(){return vu})),n.d(t,"__unstableUseClipboardHandler",(function(){return mu})),n.d(t,"DefaultBlockAppender",(function(){return Ts})),n.d(t,"__unstableUseEditorStyles",(function(){return Mp})),n.d(t,"Inserter",(function(){return Ps})),n.d(t,"__experimentalLibrary",(function(){return Fp})),n.d(t,"__experimentalSearchForm",(function(){return Ma})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return Hp})),n.d(t,"MultiSelectScrollIntoView",(function(){return Gp})),n.d(t,"__unstableUseScrollMultiSelectionIntoView",(function(){return zp})),n.d(t,"NavigableToolbar",(function(){return $s})),n.d(t,"ObserveTyping",(function(){return qp})),n.d(t,"__unstableUseTypingObserver",(function(){return Kp})),n.d(t,"__unstableUseMouseMoveTypingReset",(function(){return Wp})),n.d(t,"PreserveScrollInReorder",(function(){return $p})),n.d(t,"SkipToSelectedBlock",(function(){return np})),n.d(t,"Typewriter",(function(){return Zp})),n.d(t,"__unstableUseTypewriter",(function(){return Qp})),n.d(t,"Warning",(function(){return ha})),n.d(t,"WritingFlow",(function(){return cd})),n.d(t,"__unstableUseCanvasClickRedirect",(function(){return em})),n.d(t,"useBlockDisplayInformation",(function(){return Tl})),n.d(t,"__unstableIframe",(function(){return cm})),n.d(t,"__experimentalUseNoRecursiveRenders",(function(){return lm})),n.d(t,"BlockEditorProvider",(function(){return Ua})),n.d(t,"__experimentalUseSimulatedMediaQuery",(function(){return ep})),n.d(t,"__experimentalUseEditorFeature",(function(){return ge})),n.d(t,"transformStyles",(function(){return Lp})),n.d(t,"validateThemeColors",(function(){return am})),n.d(t,"validateThemeGradients",(function(){return sm})),n.d(t,"__experimentalGetMatchingVariation",(function(){return ob})),n.d(t,"storeConfig",(function(){return xl})),n.d(t,"store",(function(){return Pl})),n.d(t,"SETTINGS_DEFAULTS",(function(){return Kr}));var r={};n.r(r),n.d(r,"getBlockName",(function(){return Oo})),n.d(r,"isBlockValid",(function(){return ho})),n.d(r,"getBlockAttributes",(function(){return jo})),n.d(r,"getBlock",(function(){return ko})),n.d(r,"__unstableGetBlockWithoutInnerBlocks",(function(){return yo})),n.d(r,"getBlocks",(function(){return _o})),n.d(r,"__unstableGetBlockWithBlockTree",(function(){return Eo})),n.d(r,"__unstableGetBlockTree",(function(){return Co})),n.d(r,"getClientIdsOfDescendants",(function(){return wo})),n.d(r,"getClientIdsWithDescendants",(function(){return So})),n.d(r,"getGlobalBlockCount",(function(){return Bo})),n.d(r,"getBlocksByClientId",(function(){return Io})),n.d(r,"getBlockCount",(function(){return xo})),n.d(r,"getSelectionStart",(function(){return Po})),n.d(r,"getSelectionEnd",(function(){return To})),n.d(r,"getBlockSelectionStart",(function(){return No})),n.d(r,"getBlockSelectionEnd",(function(){return Do})),n.d(r,"getSelectedBlockCount",(function(){return Ao})),n.d(r,"hasSelectedBlock",(function(){return Ro})),n.d(r,"getSelectedBlockClientId",(function(){return Lo})),n.d(r,"getSelectedBlock",(function(){return Mo})),n.d(r,"getBlockRootClientId",(function(){return Fo})),n.d(r,"getBlockParents",(function(){return Vo})),n.d(r,"getBlockParentsByBlockName",(function(){return Ho})),n.d(r,"getBlockHierarchyRootClientId",(function(){return zo})),n.d(r,"getLowestCommonAncestorWithSelectedBlock",(function(){return Go})),n.d(r,"getAdjacentBlockClientId",(function(){return Uo})),n.d(r,"getPreviousBlockClientId",(function(){return Wo})),n.d(r,"getNextBlockClientId",(function(){return Ko})),n.d(r,"getSelectedBlocksInitialCaretPosition",(function(){return qo})),n.d(r,"getSelectedBlockClientIds",(function(){return $o})),n.d(r,"getMultiSelectedBlockClientIds",(function(){return Yo})),n.d(r,"getMultiSelectedBlocks",(function(){return Xo})),n.d(r,"getFirstMultiSelectedBlockClientId",(function(){return Qo})),n.d(r,"getLastMultiSelectedBlockClientId",(function(){return Zo})),n.d(r,"isFirstMultiSelectedBlock",(function(){return Jo})),n.d(r,"isBlockMultiSelected",(function(){return ec})),n.d(r,"isAncestorMultiSelected",(function(){return tc})),n.d(r,"getMultiSelectedBlocksStartClientId",(function(){return nc})),n.d(r,"getMultiSelectedBlocksEndClientId",(function(){return rc})),n.d(r,"getBlockOrder",(function(){return oc})),n.d(r,"getBlockIndex",(function(){return cc})),n.d(r,"isBlockSelected",(function(){return ic})),n.d(r,"hasSelectedInnerBlock",(function(){return lc})),n.d(r,"isBlockWithinSelection",(function(){return ac})),n.d(r,"hasMultiSelection",(function(){return sc})),n.d(r,"isMultiSelecting",(function(){return uc})),n.d(r,"isSelectionEnabled",(function(){return dc})),n.d(r,"getBlockMode",(function(){return bc})),n.d(r,"isTyping",(function(){return fc})),n.d(r,"isDraggingBlocks",(function(){return pc})),n.d(r,"getDraggedBlockClientIds",(function(){return mc})),n.d(r,"isBlockBeingDragged",(function(){return vc})),n.d(r,"isAncestorBeingDragged",(function(){return gc})),n.d(r,"isCaretWithinFormattedText",(function(){return Oc})),n.d(r,"getBlockInsertionPoint",(function(){return hc})),n.d(r,"isBlockInsertionPointVisible",(function(){return jc})),n.d(r,"isValidTemplate",(function(){return kc})),n.d(r,"getTemplate",(function(){return yc})),n.d(r,"getTemplateLock",(function(){return _c})),n.d(r,"canInsertBlockType",(function(){return Cc})),n.d(r,"canInsertBlocks",(function(){return wc})),n.d(r,"getInserterItems",(function(){return Tc})),n.d(r,"getBlockTransformItems",(function(){return Nc})),n.d(r,"hasInserterItems",(function(){return Dc})),n.d(r,"__experimentalGetAllowedBlocks",(function(){return Ac})),n.d(r,"getBlockListSettings",(function(){return Rc})),n.d(r,"getSettings",(function(){return Lc})),n.d(r,"isLastBlockChangePersistent",(function(){return Mc})),n.d(r,"__experimentalGetBlockListSettingsForBlocks",(function(){return Fc})),n.d(r,"__experimentalGetParsedReusableBlock",(function(){return Vc})),n.d(r,"__experimentalGetReusableBlockTitle",(function(){return Hc})),n.d(r,"__unstableIsLastBlockChangeIgnored",(function(){return zc})),n.d(r,"__experimentalGetLastBlockAttributeChanges",(function(){return Gc})),n.d(r,"isNavigationMode",(function(){return Wc})),n.d(r,"hasBlockMovingClientId",(function(){return Kc})),n.d(r,"didAutomaticChange",(function(){return qc})),n.d(r,"isBlockHighlighted",(function(){return $c})),n.d(r,"areInnerBlocksControlled",(function(){return Yc})),n.d(r,"__experimentalGetActiveBlockIdByBlockNames",(function(){return Xc}));var o={};n.r(o),n.d(o,"resetBlocks",(function(){return Ci})),n.d(o,"validateBlocksToTemplate",(function(){return wi})),n.d(o,"resetSelection",(function(){return Si})),n.d(o,"receiveBlocks",(function(){return Bi})),n.d(o,"updateBlockAttributes",(function(){return Ii})),n.d(o,"updateBlock",(function(){return xi})),n.d(o,"selectBlock",(function(){return Pi})),n.d(o,"selectPreviousBlock",(function(){return Ti})),n.d(o,"selectNextBlock",(function(){return Ni})),n.d(o,"startMultiSelect",(function(){return Di})),n.d(o,"stopMultiSelect",(function(){return Ai})),n.d(o,"multiSelect",(function(){return Ri})),n.d(o,"clearSelectedBlock",(function(){return Li})),n.d(o,"toggleSelection",(function(){return Mi})),n.d(o,"replaceBlocks",(function(){return Vi})),n.d(o,"replaceBlock",(function(){return Hi})),n.d(o,"moveBlocksDown",(function(){return Gi})),n.d(o,"moveBlocksUp",(function(){return Ui})),n.d(o,"moveBlocksToPosition",(function(){return Wi})),n.d(o,"moveBlockToPosition",(function(){return Ki})),n.d(o,"insertBlock",(function(){return qi})),n.d(o,"insertBlocks",(function(){return $i})),n.d(o,"__unstableSetInsertionPoint",(function(){return Yi})),n.d(o,"showInsertionPoint",(function(){return Xi})),n.d(o,"hideInsertionPoint",(function(){return Qi})),n.d(o,"setTemplateValidity",(function(){return Zi})),n.d(o,"synchronizeTemplate",(function(){return Ji})),n.d(o,"mergeBlocks",(function(){return el})),n.d(o,"removeBlocks",(function(){return tl})),n.d(o,"removeBlock",(function(){return nl})),n.d(o,"replaceInnerBlocks",(function(){return rl})),n.d(o,"toggleBlockMode",(function(){return ol})),n.d(o,"startTyping",(function(){return cl})),n.d(o,"stopTyping",(function(){return il})),n.d(o,"startDraggingBlocks",(function(){return ll})),n.d(o,"stopDraggingBlocks",(function(){return al})),n.d(o,"enterFormattedText",(function(){return sl})),n.d(o,"exitFormattedText",(function(){return ul})),n.d(o,"selectionChange",(function(){return dl})),n.d(o,"insertDefaultBlock",(function(){return bl})),n.d(o,"updateBlockListSettings",(function(){return fl})),n.d(o,"updateSettings",(function(){return pl})),n.d(o,"__unstableSaveReusableBlock",(function(){return ml})),n.d(o,"__unstableMarkLastChangeAsPersistent",(function(){return vl})),n.d(o,"__unstableMarkNextChangeAsNotPersistent",(function(){return gl})),n.d(o,"__unstableMarkAutomaticChange",(function(){return Ol})),n.d(o,"__unstableMarkAutomaticChangeFinal",(function(){return hl})),n.d(o,"setNavigationMode",(function(){return jl})),n.d(o,"setBlockMovingClientId",(function(){return kl})),n.d(o,"duplicateBlocks",(function(){return yl})),n.d(o,"insertBeforeBlock",(function(){return _l})),n.d(o,"insertAfterBlock",(function(){return El})),n.d(o,"toggleBlockHighlight",(function(){return Cl})),n.d(o,"flashBlock",(function(){return wl})),n.d(o,"setHasControlledInnerBlocks",(function(){return Sl}));var c=n(24),i=n(10),l=n(5),a=n(0),s=n(12),u=n.n(s),d=n(2),b=n(14),f=n(34),p=n(11),m=n(4),v=n(3),g=Object(a.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:d.noop,clientId:null}),O=g.Provider;function h(){return Object(a.useContext)(g)}function j(){var e=h(),t=e.isSelected,n=e.clientId,r=e.name,o=Object(m.useSelect)((function(e){if(!t){var o=e("core/block-editor"),c=o.getBlockName,i=o.isFirstMultiSelectedBlock,l=o.getMultiSelectedBlockClientIds;return!!i(n)&&l().every((function(e){return c(e)===r}))}}),[n,t,r]);return t||o}var k=Object(v.createSlotFill)("BlockControls"),y=k.Fill,_=k.Slot,E=function(e){var t=e.controls,n=e.children;return j()?Object(a.createElement)(y,null,(function(e){var r=Object(d.isEmpty)(e)?null:e;return Object(a.createElement)(v.__experimentalToolbarContext.Provider,{value:r},Object(a.createElement)(v.ToolbarGroup,{controls:t}),n)})):null};E.Slot=function(e){var t=Object(a.useContext)(v.__experimentalToolbarContext);return Object(a.createElement)(_,Object(i.a)({},e,{fillProps:t}))};var C=E,w=n(1),S=n(7),B=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),I=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),x=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),P=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),T=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),N={type:"default"},D=Object(a.createContext)(N),A=D.Provider;function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M={left:{icon:B,title:Object(w.__)("Align left")},center:{icon:I,title:Object(w.__)("Align center")},right:{icon:x,title:Object(w.__)("Align right")},wide:{icon:P,title:Object(w.__)("Wide width")},full:{icon:T,title:Object(w.__)("Full width")}},F=["left","center","right","wide","full"],V=["wide","full"],H={isAlternate:!0},z=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?F:r,c=e.isCollapsed,i=void 0===c||c,l=Object(m.useSelect)((function(e){return{wideControlsEnabled:(0,e("core/block-editor").getSettings)().alignWide}})).wideControlsEnabled,s=void 0!==l&&l,u=Object(a.useContext)(D);if("default"!==u.type)return null;var d=u.alignments,b=void 0===d?F:d,f=o.filter((function(e){return(s||!V.includes(e))&&b.includes(e)}));if(0===f.length)return null;var p=M[t],g=M.center;return Object(a.createElement)(v.ToolbarGroup,{popoverProps:H,isCollapsed:i,icon:p?p.icon:g.icon,label:Object(w.__)("Align"),toggleProps:{describedBy:Object(w.__)("Change alignment")},controls:f.map((function(e){return L(L({},M[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})};function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var W=["left","center","right","wide","full"],K=["wide","full"];function q(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?W.filter((function(t){return e.includes(t)})):!0===e?W:[],!r||!0===e&&!n?d.without.apply(void 0,[t].concat(K)):t}var $=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=q(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0));return[r.length>0&&t.isSelected&&Object(a.createElement)(C,{key:"align-controls"},Object(a.createElement)(z,{value:t.attributes.align,onChange:function(e){var n,r;e||(null===(n=Object(p.getBlockType)(t.name).attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e=""),t.setAttributes({align:e})},controls:r})),Object(a.createElement)(e,Object(i.a)({key:"edit"},t))]}}),"withToolbarControls"),Y=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=t.attributes.align,o=Object(m.useSelect)((function(e){return!!e("core/block-editor").getSettings().alignWide}),[]);if(void 0===r)return Object(a.createElement)(e,t);var c=q(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0),o),l=t.wrapperProps;return c.includes(r)&&(l=U(U({},l),{},{"data-align":r})),Object(a.createElement)(e,Object(i.a)({},t,{wrapperProps:l}))}}));Object(f.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(d.has)(e.attributes,["align","type"])||Object(p.hasBlockSupport)(e,"align")&&(e.attributes=U(U({},e.attributes),{},{align:{type:"string",enum:[].concat(W,[""])}})),e})),Object(f.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Y),Object(f.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",$),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){var r=n.align;return q(Object(p.getBlockSupport)(t,"align"),Object(p.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=u()("align".concat(r),e.className)),e}));var X=Object(v.createSlotFill)("InspectorAdvancedControls"),Q=X.Fill,Z=X.Slot;function J(e){var t=e.children;return h().isSelected?Object(a.createElement)(Q,null,t):null}J.slotName="InspectorAdvancedControls",J.Slot=Z;var ee=J,te=Object(v.createSlotFill)("InspectorControls"),ne=te.Fill,re=te.Slot;function oe(e){var t=e.children;return j()?Object(a.createElement)(ne,null,t):null}oe.Slot=re;var ce=oe;function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ae=/[\s#]/g,se=Object(b.createHigherOrderComponent)((function(e){return function(t){if(Object(p.hasBlockSupport)(t.name,"anchor")&&t.isSelected){var n="web"===a.Platform.OS,r=Object(a.createElement)(v.TextControl,{className:"html-anchor-control",label:Object(w.__)("HTML anchor"),help:Object(a.createElement)(a.Fragment,null,Object(w.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),Object(a.createElement)(v.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(w.__)("Learn more about anchors"))),value:t.attributes.anchor||"",valuePlaceholder:n?null:Object(w.__)("Add an anchor"),onChange:function(e){e=e.replace(ae,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(e,t),n&&Object(a.createElement)(ee,null,r),!n&&"core/heading"===t.name&&Object(a.createElement)(ce,null,Object(a.createElement)(v.PanelBody,{title:Object(w.__)("Heading settings")},r)))}return Object(a.createElement)(e,t)}}),"withInspectorControl");function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Object(f.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return Object(d.has)(e.attributes,["anchor","type"])||Object(p.hasBlockSupport)(e,"anchor")&&(e.attributes=le(le({},e.attributes),{},{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",se),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return Object(p.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));var be=Object(b.createHigherOrderComponent)((function(e){return function(t){return Object(p.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(a.createElement)(a.Fragment,null,Object(a.createElement)(e,t),Object(a.createElement)(ee,null,Object(a.createElement)(v.TextControl,{autoComplete:"off",label:Object(w.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})},help:Object(w.__)("Separate multiple classes with spaces.")}))):Object(a.createElement)(e,t)}}),"withInspectorControl");function fe(e){e="<div data-custom-class-name>".concat(e,"</div>");var t=Object(p.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(f.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Object(p.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=de(de({},e.attributes),{},{className:{type:"string"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",be),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Object(p.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=u()(e.className,n.className)),e})),Object(f.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",(function(e,t,n){if(Object(p.hasBlockSupport)(t,"customClassName",!0)){var r=Object(d.omit)(e,["className"]),o=Object(p.getSaveContent)(t,r),c=fe(o),i=fe(n),l=Object(d.difference)(i,c);l.length?e.className=l.join(" "):o&&delete e.className}return e}));var pe=n(15);Object(f.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Object(p.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(d.uniq)([Object(p.getBlockDefaultClassName)(t.name)].concat(Object(pe.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(p.getBlockDefaultClassName)(t.name)),e}));var me={"color.palette":function(e){return void 0===e.colors?void 0:e.colors},"color.gradients":function(e){return void 0===e.gradients?void 0:e.gradients},"color.custom":function(e){return void 0===e.disableCustomColors?void 0:!e.disableCustomColors},"color.customGradient":function(e){return void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients},"typography.fontSizes":function(e){return void 0===e.fontSizes?void 0:e.fontSizes},"typography.customFontSize":function(e){return void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes},"typography.customLineHeight":function(e){return e.enableCustomLineHeight},"spacing.units":function(e){if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw"]:e.enableCustomUnits},"spacing.customPadding":function(e){return e.enableCustomSpacing}};function ve(e,t){for(var n in t)if(t[n]!==e[n])return!1;return!0}function ge(e){var t=h(),n=t.name,r=t.clientId;return Object(m.useSelect)((function(t){var o,c=t("core/block-editor"),i=c.getBlockAttributes,l=(0,c.getSettings)(),a=t(p.store).getBlockType(n),s=n,u=Object(d.get)(a,["supports","__experimentalSelector"]);if(Object(d.isObject)(u)){var b=i(r)||{};for(var f in u)if(ve(b,u[f].attributes)){s=f;break}}var m="__experimentalFeatures.defaults.".concat(e),v="__experimentalFeatures.".concat(s,".").concat(e),g=null!==(o=Object(d.get)(l,v))&&void 0!==o?o:Object(d.get)(l,m);if(void 0!==g)return g;var O=me[e]?me[e](l):void 0;return void 0!==O?O:"typography.dropCap"===e||void 0}),[n,r,e])}var Oe=function e(t){if(!Object(d.isObject)(t))return t;var n=Object(d.pickBy)(Object(d.mapValues)(t,e),d.identity);return Object(d.isEqual)(n,{})?void 0:n};function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ke(e){var t,n=e.attributes.style,r=e.setAttributes;return _e(e)?null:Object(a.createElement)(v.RangeControl,{value:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,label:Object(w.__)("Border radius"),min:0,max:50,initialPosition:0,allowReset:!0,onChange:function(e){var t=je(je({},n),{},{border:je(je({},null==n?void 0:n.border),{},{radius:e})});r({style:Oe(t)})}})}function ye(e){var t=Object(p.getBlockSupport)(e,Ee);return!!(!0===t||null!=t&&t.radius)}function _e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!ge("border.customRadius");return!ye(t)||n}var Ee="__experimentalBorder";function Ce(e){var t=we(e),n=function(e){if("web"!==a.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,Ee);return!!(!0===t||null!=t&&t.radius)}(e.name);return t||!n?null:Object(a.createElement)(ce,null,Object(a.createElement)(v.PanelBody,{title:Object(w.__)("Border settings")},Object(a.createElement)(ke,e)))}var we=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[_e(e)];return t.every(Boolean)},Se=n(60),Be=n.n(Se),Ie=function(e,t,n){if(t){var r=Object(d.find)(e,{slug:t});if(r)return r}return{color:n}},xe=function(e,t){return Object(d.find)(e,{color:t})};function Pe(e,t){if(e&&t)return"has-".concat(Object(d.kebabCase)(t),"-").concat(e)}var Te=[];function Ne(e){if(e)return"has-".concat(e,"-gradient-background")}function De(e,t){var n=Object(d.find)(e,["slug",t]);return n&&n.gradient}function Ae(e,t){return Object(d.find)(e,["gradient",t])}function Re(e,t){var n=Ae(e,t);return n&&n.slug}function Le(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.gradientAttribute,n=void 0===t?"gradient":t,r=e.customGradientAttribute,o=void 0===r?"customGradient":r,c=h(),i=c.clientId,s=ge("color.gradients")||Te,u=Object(m.useSelect)((function(e){var t=(0,e("core/block-editor").getBlockAttributes)(i)||{};return{customGradient:t[o],gradient:t[n]}}),[i,n,o]),d=u.gradient,b=u.customGradient,f=Object(m.useDispatch)("core/block-editor"),p=f.updateBlockAttributes,v=Object(a.useCallback)((function(e){var t,r,c=Re(s,e);p(i,c?(r={},Object(l.a)(r,n,c),Object(l.a)(r,o,void 0),r):(t={},Object(l.a)(t,n,void 0),Object(l.a)(t,o,e),t))}),[s,i,p]),g=Ne(d);return{gradientClass:g,gradientValue:d?De(s,d):b,setGradient:v}}var Me=n(9),Fe=n(13);function Ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
|
2 |
// translators: first %s: the color name or value (e.g. red or #ff0000)
|
3 |
var ze=Object(w.__)("(Color: %s)"),Ge=Object(w.__)("(Gradient: %s)"),Ue=["colors","disableCustomColors","gradients","disableCustomGradients"];// translators: first %s: the gradient name or value (e.g. red to green or linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)
|
4 |
function We(e){var t,n,r=e.colors,o=e.gradients,c=e.label,i=e.currentTab,l=e.colorValue,s=e.gradientValue;if("color"===i){if(l){var u=xe(r,t=l),d=u&&u.name;n=Object(w.sprintf)(ze,d||t)}}else if("gradient"===i&&s){var b=Ae(o,t=s),f=b&&b.name;n=Object(w.sprintf)(Ge,f||t)}return Object(a.createElement)(a.Fragment,null,c,!!t&&Object(a.createElement)(v.ColorIndicator,{colorValue:t,"aria-label":n}))}function Ke(e){var t=e.colors,n=e.gradients,r=e.disableCustomColors,o=e.disableCustomGradients,c=e.className,l=e.label,s=e.onColorChange,b=e.onGradientChange,f=e.colorValue,p=e.gradientValue,m=e.clearable,g=s&&(!Object(d.isEmpty)(t)||!r),O=b&&(!Object(d.isEmpty)(n)||!o),h=Object(a.useState)(p?"gradient":!!g&&"color"),j=Object(Me.a)(h,2),k=j[0],y=j[1];return g||O?Object(a.createElement)(v.BaseControl,{className:u()("block-editor-color-gradient-control",c)},Object(a.createElement)("fieldset",null,Object(a.createElement)("legend",null,Object(a.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},Object(a.createElement)(v.BaseControl.VisualLabel,null,Object(a.createElement)(We,{currentTab:k,label:l,colorValue:f,gradientValue:p})))),g&&O&&Object(a.createElement)(v.ButtonGroup,{className:"block-editor-color-gradient-control__button-tabs"},Object(a.createElement)(v.Button,{isSmall:!0,isPressed:"color"===k,onClick:function(){return y("color")}},Object(w.__)("Solid")),Object(a.createElement)(v.Button,{isSmall:!0,isPressed:"gradient"===k,onClick:function(){return y("gradient")}},Object(w.__)("Gradient"))),("color"===k||!O)&&Object(a.createElement)(v.ColorPalette,Object(i.a)({value:f,onChange:O?function(e){s(e),b()}:s},{colors:t,disableCustomColors:r},{clearable:m})),("gradient"===k||!g)&&Object(a.createElement)(v.__experimentalGradientPicker,Object(i.a)({value:p,onChange:g?function(e){b(e),s()}:b},{gradients:n,disableCustomGradients:o},{clearable:m})))):null}function qe(e){var t={};return t.colors=ge("color.palette"),t.gradients=ge("color.gradients"),t.disableCustomColors=!ge("color.custom"),t.disableCustomGradients=!ge("color.customGradient"),Object(a.createElement)(Ke,He(He({},t),e))}var $e=function(e){return Object(d.every)(Ue,(function(t){return e.hasOwnProperty(t)}))?Object(a.createElement)(Ke,e):Object(a.createElement)(qe,e)};function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
|
5 |
// translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
|
6 |
var Qe=Object(w.__)("(%s: color %s)"),Ze=Object(w.__)("(%s: gradient %s)"),Je=["colors","disableCustomColors","gradients","disableCustomGradients"],et=function(e){var t=e.colors,n=e.gradients;return e.settings.map((function(e,r){var o,c=e.colorValue,i=e.gradientValue,l=e.label,s=e.colors,u=e.gradients;if(!c&&!i)return null;if(c){var d=xe(s||t,c);o=Object(w.sprintf)(Qe,l.toLowerCase(),d&&d.name||c)}else{var b=Ae(u||n,c);o=Object(w.sprintf)(Ze,l.toLowerCase(),b&&b.name||i)}return Object(a.createElement)(v.ColorIndicator,{key:r,colorValue:c||i,"aria-label":o})}))},tt=function(e){var t=e.className,n=e.colors,r=e.gradients,o=e.disableCustomColors,c=e.disableCustomGradients,l=e.children,s=e.settings,b=e.title,f=Object(Fe.a)(e,["className","colors","gradients","disableCustomColors","disableCustomGradients","children","settings","title"]);if(Object(d.isEmpty)(n)&&Object(d.isEmpty)(r)&&o&&c&&Object(d.every)(s,(function(e){return Object(d.isEmpty)(e.colors)&&Object(d.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)})))return null;var p=Object(a.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},b,Object(a.createElement)(et,{colors:n,gradients:r,settings:s}));return Object(a.createElement)(v.PanelBody,Object(i.a)({className:u()("block-editor-panel-color-gradient-settings",t),title:p},f),s.map((function(e,t){return Object(a.createElement)($e,Object(i.a)({key:t},Xe({colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:c},e)))})),l)},nt=function(e){var t={};return t.colors=ge("color.palette"),t.gradients=ge("color.gradients"),t.disableCustomColors=!ge("color.custom"),t.disableCustomGradients=!ge("color.customGradient"),Object(a.createElement)(tt,Xe(Xe({},t),e))},rt=function(e){return Object(d.every)(Je,(function(t){return e.hasOwnProperty(t)}))?Object(a.createElement)(tt,e):Object(a.createElement)(nt,e)},ot=n(54);// translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
|
7 |
-
function ct(e){var t=e.tinyBackgroundColor,n=e.tinyTextColor,r=e.backgroundColor,o=e.textColor,c=t.getBrightness()<n.getBrightness()?Object(w.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):Object(w.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return Object(a.useEffect)((function(){Object(ot.speak)(Object(w.__)("This color combination may be hard for people to read."))}),[r,o]),Object(a.createElement)("div",{className:"block-editor-contrast-checker"},Object(a.createElement)(v.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},c))}var it=function(e){var t=e.backgroundColor,n=e.fallbackBackgroundColor,r=e.fallbackTextColor,o=e.fontSize,c=e.isLargeText,i=e.textColor;if(!t&&!n||!i&&!r)return null;var l=Be()(t||n),s=Be()(i||r);return 1!==l.getAlpha()||1!==s.getAlpha()||Be.a.isReadable(l,s,{level:"AA",size:c||!1!==c&&o>=24?"large":"small"})?null:Object(a.createElement)(ct,{backgroundColor:t,textColor:i,tinyBackgroundColor:l,tinyTextColor:s})};function lt(e,t){return t.getElementById("block-"+e)}function at(e,t){return t.closest(".block-editor-block-list__block")===e}function st(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(e){var t=e.closest(".block-editor-block-list__block");if(t)return t.id.slice("block-".length)}}function ut(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function dt(e){var t=e.settings,n=e.clientId,r=e.enableContrastChecking,o=void 0===r||r,c=Object(a.useState)(),i=Object(Me.a)(c,2),l=i[0],s=i[1],u=Object(a.useState)(),d=Object(Me.a)(u,2),b=d[0],f=d[1];return Object(a.useEffect)((function(){if(o){var e=lt(n,document);if(e){f(ut(e).color);for(var t=e,r=ut(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===t.parentNode.ELEMENT_NODE;)r=ut(t=t.parentNode).backgroundColor;s(r)}}})),Object(a.createElement)(ce,null,Object(a.createElement)(rt,{title:Object(w.__)("Color settings"),initialOpen:!1,settings:t},o&&Object(a.createElement)(it,{backgroundColor:l,textColor:b})))}function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pt=[],mt=function(e){var t=Object(p.getBlockSupport)(e,"color");return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},vt=function(e){if("web"!==a.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,"color");return Object(d.isObject)(t)&&!!t.link},gt=function(e){if("web"!==a.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,"color");return Object(d.isObject)(t)&&!!t.gradients},Ot=function(e){var t=Object(p.getBlockSupport)(e,"color");return t&&!1!==t.text};function ht(e,t,n){var r,o,c,i,a,s;if(!mt(t))return e;var d=gt(t),b=n.backgroundColor,f=n.textColor,p=n.gradient,m=n.style,v=Pe("background-color",b),g=Ne(p),O=Pe("color",f),h=u()(e.className,O,g,(s={},Object(l.a)(s,v,!(d&&null!=m&&null!==(r=m.color)&&void 0!==r&&r.gradient||!v)),Object(l.a)(s,"has-text-color",f||(null==m||null===(o=m.color)||void 0===o?void 0:o.text)),Object(l.a)(s,"has-background",b||(null==m||null===(c=m.color)||void 0===c?void 0:c.background)||d&&(p||(null==m||null===(i=m.color)||void 0===i?void 0:i.gradient))),Object(l.a)(s,"has-link-color",null==m||null===(a=m.color)||void 0===a?void 0:a.link),s));return e.className=h||void 0,e}var jt=function(e,t){var n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?Ie(e,n[1]).color:t};function kt(e){var t,n,r,o,c,i,s=e.name,u=e.attributes,d=ge("color.link"),b=ge("color.palette")||pt,f=ge("color.gradients")||pt,m=Object(a.useRef)(u);if(Object(a.useEffect)((function(){m.current=u}),[u]),!mt(s)||"web"!==a.Platform.OS)return null;var v,g,O,h=(v=s,(g=Object(p.getBlockSupport)(v,"color"))&&!1!==g.background),j=gt(s),k=u.style,y=u.textColor,_=u.backgroundColor,E=u.gradient;if(j&&E)O=De(f,E);else if(j){var C;O=null==k||null===(C=k.color)||void 0===C?void 0:C.gradient}var S=function(t){return function(n){var r,o,c=xe(b,n),i=t+"Color",a=ft(ft({},m.current.style),{},{color:ft(ft({},null===(r=m.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color),{},Object(l.a)({},t,null!=c&&c.slug?void 0:n))}),s=null!=c&&c.slug?c.slug:void 0,u=Object(l.a)({style:Oe(a)},i,s);e.setAttributes(u),m.current=ft(ft({},m.current),u)}};return Object(a.createElement)(dt,{enableContrastChecking:!("web"!==a.Platform.OS||E||null!=k&&null!==(t=k.color)&&void 0!==t&&t.gradient),clientId:e.clientId,settings:[].concat(Object(pe.a)(Ot(s)?[{label:Object(w.__)("Text Color"),onColorChange:S("text"),colorValue:Ie(b,y,null==k||null===(n=k.color)||void 0===n?void 0:n.text).color}]:[]),Object(pe.a)(h||j?[{label:Object(w.__)("Background Color"),onColorChange:h?S("background"):void 0,colorValue:Ie(b,_,null==k||null===(r=k.color)||void 0===r?void 0:r.background).color,gradientValue:O,onGradientChange:j?function(t){var n,r=Re(f,t);if(r){var o,c,i,l=ft(ft({},null===(o=m.current)||void 0===o?void 0:o.style),{},{color:ft(ft({},null===(c=m.current)||void 0===c||null===(i=c.style)||void 0===i?void 0:i.color),{},{gradient:void 0})});n={style:Oe(l),gradient:r}}else{var a,s,u,d=ft(ft({},null===(a=m.current)||void 0===a?void 0:a.style),{},{color:ft(ft({},null===(s=m.current)||void 0===s||null===(u=s.style)||void 0===u?void 0:u.color),{},{gradient:t})});n={style:Oe(d),gradient:void 0}}e.setAttributes(n),m.current=ft(ft({},m.current),n)}:void 0}]:[]),Object(pe.a)(d&&vt(s)?[{label:Object(w.__)("Link Color"),onColorChange:function(t){var n,r=xe(b,t);e.setAttributes({style:ft(ft({},e.attributes.style),{},{color:ft(ft({},null===(n=e.attributes.style)||void 0===n?void 0:n.color),{},{link:null!=r&&r.slug?"var:preset|color|".concat(r.slug):t})})})},colorValue:jt(b,null==k||null===(o=k.color)||void 0===o?void 0:o.link),clearable:!(null===(c=e.attributes.style)||void 0===c||null===(i=c.color)||void 0===i||!i.link)}]:[]))})}var yt=Object(b.createHigherOrderComponent)((function(e){return function(t){var n,r,o,c=t.name,l=t.attributes,s=l.backgroundColor,u=l.textColor,d=ge("color.palette")||pt;if(!mt(c))return Object(a.createElement)(e,t);var b={color:u?null===(n=Ie(d,u))||void 0===n?void 0:n.color:void 0,backgroundColor:s?null===(r=Ie(d,s))||void 0===r?void 0:r.color:void 0},f=t.wrapperProps;return f=ft(ft({},t.wrapperProps),{},{style:ft(ft({},b),null===(o=t.wrapperProps)||void 0===o?void 0:o.style)}),Object(a.createElement)(e,Object(i.a)({},t,{wrapperProps:f}))}}));Object(f.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return mt(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),gt(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",ht),Object(f.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!mt(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),ht(r,e,n)},e})),Object(f.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",yt);var _t=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})),Et=n(376),Ct=[{name:Object(w.__)("Underline"),value:"underline",icon:_t},{name:Object(w.__)("Strikethrough"),value:"line-through",icon:Et.a}];function wt(e){var t=e.value,n=e.onChange;return Object(a.createElement)("fieldset",{className:"block-editor-text-decoration-control"},Object(a.createElement)("legend",null,Object(w.__)("Decoration")),Object(a.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},Ct.map((function(e){return Object(a.createElement)(v.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===t,onClick:function(){return n(e.value===t?void 0:e.value)},"aria-label":e.name})}))))}function St(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?St(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):St(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function It(e){var t,n=e.attributes.style,r=e.setAttributes;return xt(e)?null:Object(a.createElement)(wt,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){r({style:Oe(Bt(Bt({},n),{},{typography:Bt(Bt({},null==n?void 0:n.typography),{},{textDecoration:e})}))})}})}function xt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Object(p.hasBlockSupport)(t,"__experimentalTextDecoration"),r=ge("typography.customTextDecorations");return n||!r}var Pt=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})),Tt=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M10.8 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.1-.4-.3-.9-.4-1.6-.4-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.3 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.5.1-.7 0-.8-.1zM9.1 16c-.2.3-.5.6-.9.8-.4.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.5-3.9c-.3-.6-.7-1.1-1.2-1.5-.5-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1 0-.6-.2-1.3-.5-1.9zm-1.6 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.5-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})),Nt=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"})),Dt=[{name:Object(w.__)("Uppercase"),value:"uppercase",icon:Pt},{name:Object(w.__)("Lowercase"),value:"lowercase",icon:Tt},{name:Object(w.__)("Capitalize"),value:"capitalize",icon:Nt}];function At(e){var t=e.value,n=e.onChange;return Object(a.createElement)("fieldset",{className:"block-editor-text-transform-control"},Object(a.createElement)("legend",null,Object(w.__)("Letter case")),Object(a.createElement)("div",{className:"block-editor-text-transform-control__buttons"},Dt.map((function(e){return Object(a.createElement)(v.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:t===e.value,"aria-label":e.name,onClick:function(){return n(t===e.value?void 0:e.value)}})}))))}function Rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rt(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mt(e){var t,n=e.attributes.style,r=e.setAttributes;return Ft(e)?null:Object(a.createElement)(At,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){r({style:Oe(Lt(Lt({},n),{},{typography:Lt(Lt({},null==n?void 0:n.typography),{},{textTransform:e})}))})}})}function Ft(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Object(p.hasBlockSupport)(t,"__experimentalTextTransform"),r=ge("typography.customTextTransforms");return n||!r}function Vt(e){var t=!xt(e),n=!Ft(e);return t||n?Object(a.createElement)("div",{className:"block-editor-text-decoration-and-transform"},t&&Object(a.createElement)(It,e),n&&Object(a.createElement)(Mt,e)):null}var Ht=n(17);function zt(e){var t=e.value,n=e.onChange,r=function(e){return void 0!==e&&""!==e}(t),o=r?t:"";return Object(a.createElement)("div",{className:"block-editor-line-height-control"},Object(a.createElement)(v.TextControl,{autoComplete:"off",onKeyDown:function(e){e.keyCode!==Ht.ZERO||r||(e.preventDefault(),n("0"))},onChange:function(e){if(r)n(e);else{var t=e;switch(e){case"".concat(.1):t=1.6;break;case"0":t=1.4}n(t)}},label:Object(w.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:o,min:0}))}function Gt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gt(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Wt(e){var t,n=e.attributes.style;return Kt(e)?null:Object(a.createElement)(zt,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:function(t){var r=Ut(Ut({},n),{},{typography:Ut(Ut({},null==n?void 0:n.typography),{},{lineHeight:t})});e.setAttributes({style:Oe(r)})}})}function Kt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!ge("typography.customLineHeight");return!Object(p.hasBlockSupport)(t,"lineHeight")||n}var qt=[{name:Object(w.__)("Regular"),value:"normal"},{name:Object(w.__)("Italic"),value:"italic"}],$t=[{name:Object(w.__)("Thin"),value:"100"},{name:Object(w.__)("Extra Light"),value:"200"},{name:Object(w.__)("Light"),value:"300"},{name:Object(w.__)("Regular"),value:"400"},{name:Object(w.__)("Medium"),value:"500"},{name:Object(w.__)("Semi Bold"),value:"600"},{name:Object(w.__)("Bold"),value:"700"},{name:Object(w.__)("Extra Bold"),value:"800"},{name:Object(w.__)("Black"),value:"900"}];function Yt(e){var t=e.onChange,n=e.hasFontStyles,r=void 0===n||n,o=e.hasFontWeights,c=void 0===o||o,i=e.value,l=i.fontStyle,s=i.fontWeight,u=r||c,d={key:"default",name:Object(w.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},b=Object(a.useMemo)((function(){return r&&c?(e=[d],qt.forEach((function(t){var n=t.name,r=t.value;$t.forEach((function(t){var o=t.name,c=t.value,i="normal"===r?o:Object(w.sprintf)(
|
8 |
/* translators: 1: Font weight name. 2: Font style name. */
|
9 |
-
Object(w.__)("%1$s %2$s"),o,n);e.push({key:"".concat(r,"-").concat(c),name:i,style:{fontStyle:r,fontWeight:c}})}))})),e):r?function(){var e=[d];return qt.forEach((function(t){var n=t.name,r=t.value;e.push({key:r,name:n,style:{fontStyle:r,fontWeight:void 0}})})),e}():function(){var e=[d];return $t.forEach((function(t){var n=t.name,r=t.value;e.push({key:r,name:n,style:{fontStyle:void 0,fontWeight:r}})})),e}();var e}),[e.options]),f=b.find((function(e){return e.style.fontStyle===l&&e.style.fontWeight===s}));return Object(a.createElement)("fieldset",{className:"components-font-appearance-control"},u&&Object(a.createElement)(v.CustomSelectControl,{className:"components-font-appearance-control__select",label:r?c?Object(w.__)("Appearance"):Object(w.__)("Font style"):Object(w.__)("Font weight"),options:b,value:f,onChange:function(e){var n=e.selectedItem;return t(n.style)}}))}function Xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xt(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zt(e){var t,n,r=e.attributes.style,o=e.setAttributes,c=!Jt(e),i=!en(e);if(!c&&!i)return null;var l=null==r||null===(t=r.typography)||void 0===t?void 0:t.fontStyle,s=null==r||null===(n=r.typography)||void 0===n?void 0:n.fontWeight;return Object(a.createElement)(Yt,{onChange:function(e){o({style:Oe(Qt(Qt({},r),{},{typography:Qt(Qt({},null==r?void 0:r.typography),{},{fontStyle:e.fontStyle,fontWeight:e.fontWeight})}))})},hasFontStyles:c,hasFontWeights:i,value:{fontStyle:l,fontWeight:s}})}function Jt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(p.hasBlockSupport)(t,"__experimentalFontStyle"),r=ge("typography.customFontStyle");return!n||!r}function en(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(p.hasBlockSupport)(t,"__experimentalFontWeight"),r=ge("typography.customFontWeight");return!n||!r}function tn(e){var t=Jt(e),n=en(e);return t&&n}function nn(e){var t=e.value,n=void 0===t?"":t,r=e.onChange,o=e.fontFamilies,c=Object(Fe.a)(e,["value","onChange","fontFamilies"]),l=ge("typography.fontFamilies");if(o||(o=l),Object(d.isEmpty)(o))return null;var s=[{value:"",label:Object(w.__)("Default")}].concat(Object(pe.a)(o.map((function(e){var t=e.fontFamily;return{value:t,label:e.name||t}}))));return Object(a.createElement)(v.SelectControl,Object(i.a)({label:Object(w.__)("Font family"),options:s,value:n,onChange:r,labelPosition:"top"},c))}function rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function on(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rn(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cn(e){var t,n=e.name,r=e.setAttributes,o=e.attributes.style,c=void 0===o?{}:o,i=ge("typography.fontFamilies");if(ln({name:n}))return null;var l=function(e,t){var n=/var:preset\|font-family\|(.+)/.exec(t);if(n&&n[1]){var r=Object(d.find)(e,(function(e){return e.slug===n[1]}));if(r)return r.fontFamily}return t}(i,null===(t=c.typography)||void 0===t?void 0:t.fontFamily);return Object(a.createElement)(nn,{className:"block-editor-hooks-font-family-control",fontFamilies:i,value:l,onChange:function(e){var t=Object(d.find)(i,(function(t){return t.fontFamily===e}));r({style:Oe(on(on({},c),{},{typography:on(on({},c.typography||{}),{},{fontFamily:t?"var:preset|font-family|".concat(t.slug):e||void 0})}))})}})}function ln(e){var t=e.name,n=ge("typography.fontFamilies");return!n||0===n.length||!Object(p.hasBlockSupport)(t,"__experimentalFontFamily")}var an=n(170),sn=n.n(an),un=function(e,t,n){if(t){var r=Object(d.find)(e,{slug:t});if(r)return r}return{size:n}};function dn(e,t){return Object(d.find)(e,{size:t})||{size:t}}function bn(e){if(e)return"has-".concat(Object(d.kebabCase)(e),"-font-size")}var fn=function(e){var t=ge("typography.fontSizes"),n=!ge("typography.customFontSize");return Object(a.createElement)(v.FontSizePicker,Object(i.a)({},e,{fontSizes:t,disableCustomFontSizes:n}))};function pn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pn(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vn(e,t,n){if(!Object(p.hasBlockSupport)(t,"fontSize"))return e;var r=new sn.a(e.className);r.add(bn(n.fontSize));var o=r.value;return e.className=o||void 0,e}function gn(e){var t,n,r=e.attributes,o=r.fontSize,c=r.style,i=e.setAttributes,l=On(e),s=ge("typography.fontSizes");if(l)return null;var u=un(s,o,null==c||null===(t=c.typography)||void 0===t?void 0:t.fontSize),d=(null==u?void 0:u.size)||(null==c||null===(n=c.typography)||void 0===n?void 0:n.fontSize)||o;return Object(a.createElement)(fn,{onChange:function(e){var t=dn(s,e).slug;i({style:Oe(mn(mn({},c),{},{typography:mn(mn({},null==c?void 0:c.typography),{},{fontSize:t?void 0:e})})),fontSize:t})},value:d})}function On(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=ge("typography.fontSizes"),r=!(null==n||!n.length);return!Object(p.hasBlockSupport)(t,"fontSize")||!r}var hn=Object(b.createHigherOrderComponent)((function(e){return function(t){var n,r=ge("typography.fontSizes"),o=t.name,c=t.attributes,i=c.fontSize,l=c.style,s=t.wrapperProps,u=mn({},t);if(Object(p.hasBlockSupport)(o,"fontSize")&&i&&(null==l||null===(n=l.typography)||void 0===n||!n.fontSize)){var d,b=un(r,i,null==l||null===(d=l.typography)||void 0===d?void 0:d.fontSize).size;u.wrapperProps=mn(mn({},s),{},{style:mn({fontSize:b},null==s?void 0:s.style)})}return Object(a.createElement)(e,u)}}),"withFontSizeInlineStyles");Object(f.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return Object(p.hasBlockSupport)(e,"fontSize")?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",vn),Object(f.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!Object(p.hasBlockSupport)(e,"fontSize"))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),vn(r,e,n)},e})),Object(f.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",hn);var jn=["lineHeight","fontSize","__experimentalFontStyle","__experimentalFontWeight","__experimentalFontFamily","__experimentalTextDecoration","__experimentalTextTransform"];function kn(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[tn(e),On(e),Kt(e),ln(e),xt(e),Ft(e)];return t.filter(Boolean).length===t.length}(e),n=yn(e.name);return t||!n?null:Object(a.createElement)(ce,null,Object(a.createElement)(v.PanelBody,{title:Object(w.__)("Typography")},Object(a.createElement)(v.__unstableComponentSystemProvider,{__unstableNextInclude:["WPComponentsFontSizePicker"]},Object(a.createElement)(cn,e),Object(a.createElement)(gn,e),Object(a.createElement)(Zt,e),Object(a.createElement)(Wt,e),Object(a.createElement)(Vt,e))))}var yn=function(e){return"web"===a.Platform.OS&&jn.some((function(t){return Object(p.hasBlockSupport)(e,t)}))};function En(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?En(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):En(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wn(e){var t,n=e.name,r=e.attributes.style,o=e.setAttributes,c=ge("spacing.units"),i=null==c?void 0:c.map((function(e){return{value:e,label:e}}));return function(e){var t=Object(p.getBlockSupport)(e,"spacing");return t&&!1!==t.padding}(n)?a.Platform.select({web:Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:function(e){var t=Cn(Cn({},r),{},{spacing:{padding:e}});o({style:Oe(t)})},onChangeShowVisualizer:function(e){var t=Cn(Cn({},r),{},{visualizers:{padding:e}});o({style:Oe(t)})},label:Object(w.__)("Padding"),units:i})),native:null}):null}function Sn(e){var t=e.children,n=Object(Fe.a)(e,["children"]);return ge("spacing.customPadding")?Object(a.createElement)(ce,n,Object(a.createElement)(v.PanelBody,{title:Object(w.__)("Spacing")},t)):null}function Bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function In(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bn(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xn=[].concat(Object(pe.a)(jn),[Ee,"color","spacing"]),Pn=function(e){return xn.some((function(t){return Object(p.hasBlockSupport)(e,t)}))};function Tn(e){if(Object(d.startsWith)(e,"var:")){var t=e.slice("var:".length).split("|").join("--");return"var(--wp--".concat(t,")")}return e}function Nn(e,t,n){if(!Pn(t))return e;var r=n.style;return e.style=In(In({},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return Object.keys(p.__EXPERIMENTAL_STYLE_PROPERTY).forEach((function(n){var r=p.__EXPERIMENTAL_STYLE_PROPERTY[n].value,o=p.__EXPERIMENTAL_STYLE_PROPERTY[n].properties;Object(d.has)(e,r)&&(o?o.forEach((function(o){t[n+Object(d.capitalize)(o)]=Tn(Object(d.get)(e,[].concat(Object(pe.a)(r),[o])))})):t[n]=Tn(Object(d.get)(e,r)))})),t}(r)),e.style),e}var Dn=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=Object(p.hasBlockSupport)(n,"spacing");return[Object(a.createElement)(kn,Object(i.a)({key:"typography"},t)),Object(a.createElement)(Ce,Object(i.a)({key:"border"},t)),Object(a.createElement)(kt,Object(i.a)({key:"colors"},t)),Object(a.createElement)(e,Object(i.a)({key:"edit"},t)),r&&Object(a.createElement)(Sn,{key:"spacing"},Object(a.createElement)(wn,t))]}}),"withToolbarControls");Object(f.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Pn(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",Nn),Object(f.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!Pn(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),Nn(r,e,n)},e})),Object(f.addFilter)("editor.BlockEdit","core/style/with-block-controls",Dn);var An=n(27),Rn=n(28),Ln=n(19),Mn=n(30),Fn=n(32),Vn=n(22);function Hn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hn(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Gn=[],Un=function(e){return Object(b.createHigherOrderComponent)((function(t){return function(n){return Object(a.createElement)(t,Object(i.a)({},n,{colors:e}))}}),"withCustomColorPalette")},Wn=function(){return Object(b.createHigherOrderComponent)((function(e){return function(t){var n=ge("color.palette")||Gn;return Object(a.createElement)(e,Object(i.a)({},t,{colors:n}))}}),"withEditorColorPalette")};function Kn(e,t){var n=Object(d.reduce)(e,(function(e,t){return zn(zn({},e),Object(d.isString)(t)?Object(l.a)({},t,Object(d.kebabCase)(t)):t)}),{});return Object(b.compose)([t,function(e){return function(t){Object(Mn.a)(i,t);var r,o,c=(r=i,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(Vn.a)(r);if(o){var n=Object(Vn.a)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Object(Fn.a)(this,e)});function i(e){var t;return Object(An.a)(this,i),(t=c.call(this,e)).setters=t.createSetters(),t.colorUtils={getMostReadableColor:t.getMostReadableColor.bind(Object(Ln.a)(t))},t.state={},t}return Object(Rn.a)(i,[{key:"getMostReadableColor",value:function(e){return function(e,t){return Be.a.mostReadable(t,Object(d.map)(e,"color")).toHexString()}(this.props.colors,e)}},{key:"createSetters",value:function(){var e=this;return Object(d.reduce)(n,(function(t,n,r){var o=Object(d.upperFirst)(r),c="custom".concat(o);return t["set".concat(o)]=e.createSetColor(r,c),t}),{})}},{key:"createSetColor",value:function(e,t){var n=this;return function(r){var o,c=xe(n.props.colors,r);n.props.setAttributes((o={},Object(l.a)(o,e,c&&c.slug?c.slug:void 0),Object(l.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(a.createElement)(e,zn(zn(zn(zn({},this.props),{},{colors:void 0},this.state),this.setters),{},{colorUtils:this.colorUtils}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=e.attributes,o=e.colors;return Object(d.reduce)(n,(function(e,n,c){var i=Ie(o,r[c],r["custom".concat(Object(d.upperFirst)(c))]),l=t[c];return(null==l?void 0:l.color)===i.color&&l?e[c]=l:e[c]=zn(zn({},i),{},{class:Pe(n,i.slug)}),e}),{})}}]),i}(a.Component)}])}function qn(e){return function(){for(var t=Un(e),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Object(b.createHigherOrderComponent)(Kn(r,t),"withCustomColors")}}function $n(){for(var e=Wn(),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Object(b.createHigherOrderComponent)(Kn(n,e),"withColors")}var Yn=n(72),Xn=n.n(Yn);function Qn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qn(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Jn=function(e){var t=e.colorSettings,n=Object(Fe.a)(e,["colorSettings"]),r=t.map((function(e){var t=e.value,n=e.onChange;return Zn(Zn({},Object(Fe.a)(e,["value","onChange"])),{},{colorValue:t,onColorChange:n})}));return Object(a.createElement)(rt,Object(i.a)({settings:r,gradients:[],disableCustomGradients:!0},n))},er=function(e,t,n){return"function"==typeof e?e(t):!0===e?n:e};function tr(e){var t=e.title,n=e.colorSettings,r=e.colorPanelProps,o=e.contrastCheckers,c=e.detectedBackgroundColor,l=e.detectedColor,s=e.panelChildren,u=e.initialOpen;return Object(a.createElement)(Jn,Object(i.a)({title:t,initialOpen:u,colorSettings:Object.values(n)},r),o&&(Array.isArray(o)?o.map((function(e){var t=e.backgroundColor,r=e.textColor,o=Object(Fe.a)(e,["backgroundColor","textColor"]);return t=er(t,n,c),r=er(r,n,l),Object(a.createElement)(it,Object(i.a)({key:"".concat(t,"-").concat(r),backgroundColor:t,textColor:r},o))})):Object(d.map)(n,(function(e){var t=e.value,r=o.backgroundColor,s=o.textColor;return r=er(r||t,n,c),s=er(s||t,n,l),Object(a.createElement)(it,Object(i.a)({},o,{key:"".concat(r,"-").concat(s),backgroundColor:r,textColor:s}))}))),"function"==typeof s?s(n):s)}function nr(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return rr(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rr(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}function rr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function or(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?or(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):or(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ir(e){return e.ownerDocument.defaultView.getComputedStyle(e)}var lr=[],ar={textColor:Object(w.__)("Text Color"),backgroundColor:Object(w.__)("Background Color")},sr=function(e){return Object(a.createElement)(ce,null,Object(a.createElement)(tr,e))};function ur(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{panelTitle:Object(w.__)("Color settings")},n=t.panelTitle,r=void 0===n?Object(w.__)("Color settings"):n,o=t.colorPanelProps,c=t.contrastCheckers,i=t.panelChildren,s=t.colorDetector,b=(s=void 0===s?{}:s).targetRef,f=s.backgroundColorTargetRef,p=void 0===f?b:f,v=s.textColorTargetRef,g=void 0===v?b:v,O=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],j=h(),k=j.clientId,y=ge("color.palette")||lr,_=Object(m.useSelect)((function(e){return{attributes:(0,e("core/block-editor").getBlockAttributes)(k)}}),[k]),E=_.attributes,C=Object(m.useDispatch)("core/block-editor"),S=C.updateBlockAttributes,B=Object(a.useCallback)((function(e){return S(k,e)}),[S,k]),I=Object(a.useMemo)((function(){return Xn()((function(e,t,n,r,o,c){return function(i){var s,b=i.children,f=i.className,p=void 0===f?"":f,m=i.style,v=void 0===m?{}:m,g={};r?g=Object(l.a)({},t,o):c&&(g=Object(l.a)({},t,c));var O={className:u()(p,(s={},Object(l.a)(s,"has-".concat(Object(d.kebabCase)(r),"-").concat(Object(d.kebabCase)(t)),r),Object(l.a)(s,n||"has-".concat(Object(d.kebabCase)(e)),r||c),s)),style:cr(cr({},g),v)};return Object(d.isFunction)(b)?b(O):a.Children.map(b,(function(e){return Object(a.cloneElement)(e,{className:u()(e.props.className,O.className),style:cr(cr({},O.style),e.props.style||{})})}))}}),{maxSize:e.length})}),[e.length]),x=Object(a.useMemo)((function(){return Xn()((function(e,t){return function(n){var r=t.find((function(e){return e.color===n}));B(Object(l.a)({},r?Object(d.camelCase)("custom ".concat(e)):e,void 0)),B(Object(l.a)({},r?e:Object(d.camelCase)("custom ".concat(e)),r?r.slug:n))}}),{maxSize:e.length})}),[B,e.length]),P=Object(a.useState)(),T=Object(Me.a)(P,2),N=T[0],D=T[1],A=Object(a.useState)(),R=Object(Me.a)(A,2),L=R[0],M=R[1];return Object(a.useEffect)((function(){if(c){var e,t=!1,n=!1,r=nr(Object(d.castArray)(c));try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.backgroundColor,l=o.textColor;if(t||(t=!0===i),n||(n=!0===l),t&&n)break}}catch(e){r.e(e)}finally{r.f()}if(n&&M(ir(g.current).color),t){for(var a=p.current,s=ir(a).backgroundColor;"rgba(0, 0, 0, 0)"===s&&a.parentNode&&a.parentNode.nodeType===a.parentNode.ELEMENT_NODE;)s=ir(a=a.parentNode).backgroundColor;D(s)}}}),[e.reduce((function(e,t){return"".concat(e," | ").concat(E[t.name]," | ").concat(E[Object(d.camelCase)("custom ".concat(t.name))])}),"")].concat(Object(pe.a)(O))),Object(a.useMemo)((function(){var t={},n=e.reduce((function(e,n){"string"==typeof n&&(n={name:n});var r=cr(cr({},n),{},{color:E[n.name]}),o=r.name,c=r.property,i=void 0===c?o:c,l=r.className,a=r.panelLabel,s=void 0===a?n.label||ar[o]||Object(d.startCase)(o):a,u=r.componentName,b=void 0===u?Object(d.startCase)(o).replace(/\s/g,""):u,f=r.color,p=void 0===f?n.color:f,m=r.colors,v=void 0===m?y:m,g=E[Object(d.camelCase)("custom ".concat(o))],O=g?void 0:v.find((function(e){return e.slug===p}));return e[b]=I(o,i,l,p,O&&O.color,g),e[b].displayName=b,e[b].color=g||O&&O.color,e[b].slug=p,e[b].setColor=x(o,v),t[b]={value:O?O.color:E[Object(d.camelCase)("custom ".concat(o))],onChange:e[b].setColor,label:s,colors:v},v||delete t[b].colors,e}),{}),l={title:r,initialOpen:!1,colorSettings:t,colorPanelProps:o,contrastCheckers:c,detectedBackgroundColor:N,detectedColor:L,panelChildren:i};return cr(cr({},n),{},{ColorPanel:Object(a.createElement)(tr,l),InspectorControlsColorPanel:Object(a.createElement)(sr,l)})}),[E,B,L,N].concat(Object(pe.a)(O)))}function dr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function br(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dr(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Vn.a)(e);if(t){var o=Object(Vn.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Fn.a)(this,n)}}var pr=[],mr=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(d.reduce)(t,(function(e,t){return e[t]="custom".concat(Object(d.upperFirst)(t)),e}),{});return Object(b.createHigherOrderComponent)(Object(b.compose)([Object(b.createHigherOrderComponent)((function(e){return function(t){var n=ge("typography.fontSizes")||pr;return Object(a.createElement)(e,Object(i.a)({},t,{fontSizes:n}))}}),"withFontSizes"),function(e){return function(t){Object(Mn.a)(o,t);var n=fr(o);function o(e){var t;return Object(An.a)(this,o),(t=n.call(this,e)).setters=t.createSetters(),t.state={},t}return Object(Rn.a)(o,[{key:"createSetters",value:function(){var e=this;return Object(d.reduce)(r,(function(t,n,r){var o=Object(d.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,c=Object(d.find)(n.props.fontSizes,{size:Number(r)});n.props.setAttributes((o={},Object(l.a)(o,e,c&&c.slug?c.slug:void 0),Object(l.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(a.createElement)(e,br(br(br({},this.props),{},{fontSizes:void 0},this.state),this.setters))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.attributes,o=e.fontSizes,c=function(e,r){return!t[r]||(n[r]?n[r]!==t[r].slug:t[r].size!==n[e])};if(!Object(d.some)(r,c))return null;var i=Object(d.reduce)(Object(d.pickBy)(r,c),(function(e,t,r){var c=n[r],i=un(o,c,n[t]);return e[r]=br(br({},i),{},{class:bn(c)}),e}),{});return br(br({},t),i)}}]),o}(a.Component)}]),"withFontSizes")},vr=n(377),gr=n(378),Or=n(379);function hr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hr(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kr=[{icon:vr.a,title:Object(w.__)("Align text left"),align:"left"},{icon:gr.a,title:Object(w.__)("Align text center"),align:"center"},{icon:Or.a,title:Object(w.__)("Align text right"),align:"right"}],yr={position:"bottom right",isAlternate:!0},_r=function(e){var t=e.value,n=e.onChange,r=e.alignmentControls,o=void 0===r?kr:r,c=e.label,i=void 0===c?Object(w.__)("Align"):c,l=e.describedBy,s=void 0===l?Object(w.__)("Change text alignment"):l,u=e.isCollapsed,b=void 0===u||u;function f(e){return function(){return n(t===e?void 0:e)}}var p=Object(d.find)(o,(function(e){return e.align===t}));return Object(a.createElement)(v.ToolbarGroup,{isCollapsed:b,icon:p?p.icon:Object(w.isRTL)()?Or.a:vr.a,label:i,toggleProps:{describedBy:s},popoverProps:yr,controls:o.map((function(e){var n=e.align,r=t===n;return jr(jr({},e),{},{isActive:r,role:b?"menuitemradio":void 0,onClick:f(n)})}))})},Er=function(e){return e.name||""},Cr=function(e){return e.title},wr=function(e){return e.description||""},Sr=function(e){return e.keywords||[]},Br=function(e){return e.category},Ir=function(){return null};function xr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(e=(e=Object(d.deburr)(e)).replace(/^\//,"")).toLowerCase()}var Pr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(d.words)(xr(e))},Tr=function(e,t){return Object(d.differenceWith)(e,Pr(t),(function(e,t){return t.includes(e)}))},Nr=function(e,t,n,r){return 0===Pr(r).length?e:Dr(e,r,{getCategory:function(e){var n;return null===(n=Object(d.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:function(e){var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}})},Dr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Pr(t);if(0===r.length)return e;var o=e.map((function(e){return[e,Ar(e,t,n)]})).filter((function(e){return Object(Me.a)(e,2)[1]>0}));return o.sort((function(e,t){var n=Object(Me.a)(e,2)[1];return Object(Me.a)(t,2)[1]-n})),o.map((function(e){return Object(Me.a)(e,1)[0]}))};function Ar(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getName,o=void 0===r?Er:r,c=n.getTitle,i=void 0===c?Cr:c,l=n.getDescription,a=void 0===l?wr:l,s=n.getKeywords,u=void 0===s?Sr:s,b=n.getCategory,f=void 0===b?Br:b,p=n.getCollection,m=void 0===p?Ir:p,v=o(e),g=i(e),O=a(e),h=u(e),j=f(e),k=m(e),y=xr(t),_=xr(g),E=0;if(y===_)E+=30;else if(_.startsWith(y))E+=20;else{var C=[v,g,O].concat(Object(pe.a)(h),[j,k]).join(" "),w=Object(d.words)(y),S=Tr(w,C);0===S.length&&(E+=10)}return 0!==E&&v.startsWith("core/")&&E++,E}var Rr=function(e,t){var n=Object(m.useSelect)((function(t){var n=t("core/block-editor").getInserterItems,r=t(p.store),o=r.getCategories,c=r.getCollections;return{categories:o(),collections:c(),items:n(e)}}),[e]),r=n.categories,o=n.collections;return[n.items,r,o,Object(a.useCallback)((function(e){var n=e.name,r=e.initialAttributes,o=e.innerBlocks,c=Object(p.createBlock)(n,r,Object(p.createBlocksFromInnerBlocksTemplate)(o));t(c)}),[t])]},Lr=n(183);function Mr(e){var t,n=e.icon,r=e.showColors,o=void 0!==r&&r,c=e.className;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:Lr.a});var i=Object(a.createElement)(v.Icon,{icon:n&&n.src?n.src:n}),l=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return Object(a.createElement)("span",{style:l,className:u()("block-editor-block-icon",c,{"has-colors":o})},i)}var Fr={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems:function(e){var t=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getBlockName,o=t.getBlockInsertionPoint,c=n();return{selectedBlockName:c?r(c):null,rootClientId:o().rootClientId}}),[]),n=t.rootClientId,r=t.selectedBlockName,o=Rr(n,d.noop),c=Object(Me.a)(o,3),i=c[0],l=c[1],s=c[2],u=Object(a.useMemo)((function(){return(e.trim()?Nr(i,l,s,e):Object(d.orderBy)(i,["frecency"],["desc"])).filter((function(e){return e.name!==r})).slice(0,9)}),[e,r,i,l,s]);return[Object(a.useMemo)((function(){return u.map((function(e){var t=e.title,n=e.icon,r=e.isDisabled;return{key:"block-".concat(e.id),value:e,label:Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Mr,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))}),[u])]},allowContext:function(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion:function(e){var t=e.name,n=e.initialAttributes,r=e.innerBlocks;return{action:"replace",value:Object(p.createBlock)(t,n,Object(p.createBlocksFromInnerBlocksTemplate)(r))}}},Vr=[],Hr=function(e){var t=h().name,n=e.completers,r=void 0===n?Vr:n;return r=Object(a.useMemo)((function(){var e=r;return t===Object(p.getDefaultBlockName)()&&(e=e.concat([Fr])),Object(f.hasFilter)("editor.Autocomplete.completers")&&(e===r&&(e=e.map(d.clone)),e=Object(f.applyFilters)("editor.Autocomplete.completers",e,t)),e}),[r,t]),Object(a.createElement)(v.Autocomplete,Object(i.a)({},e,{completers:r}))},zr=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"})),Gr=function(e){var t=e.isActive,n=e.label,r=void 0===n?Object(w.__)("Toggle full height"):n,o=e.onToggle,c=e.isDisabled;return Object(a.createElement)(v.ToolbarGroup,null,Object(a.createElement)(v.ToolbarButton,{isActive:t,icon:zr,label:r,onClick:function(){return o(!t)},disabled:c}))},Ur=function(e){var t=e.label,n=void 0===t?Object(w.__)("Change matrix alignment"):t,r=e.onChange,o=void 0===r?d.noop:r,c=e.value,i=void 0===c?"center":c,l=e.isDisabled,s=Object(a.createElement)(v.__experimentalAlignmentMatrixControl.Icon,{value:i}),u="block-editor-block-alignment-matrix-toolbar",b="".concat(u,"__popover");return Object(a.createElement)(v.Dropdown,{position:"bottom right",className:u,popoverProps:{className:b,isAlternate:!0},renderToggle:function(e){var t=e.onToggle,r=e.isOpen;return Object(a.createElement)(v.ToolbarGroup,null,Object(a.createElement)(v.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":r,onKeyDown:function(e){r||e.keyCode!==Ht.DOWN||(e.preventDefault(),e.stopPropagation(),t())},label:n,icon:s,showTooltip:!0,disabled:l}))},renderContent:function(){return Object(a.createElement)(v.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:o,value:i})}})},Wr={insertUsage:{}},Kr={alignWide:!1,colors:[{name:Object(w.__)("Black"),slug:"black",color:"#000000"},{name:Object(w.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(w.__)("White"),slug:"white",color:"#ffffff"},{name:Object(w.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(w.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(w.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(w.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(w.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(w.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(w.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(w.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(w.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(w._x)("Small","font size name"),size:13,slug:"small"},{name:Object(w._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(w._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(w._x)("Large","font size name"),size:36,slug:"large"},{name:Object(w._x)("Huge","font size name"),size:42,slug:"huge"}],imageSizes:[{slug:"thumbnail",name:Object(w.__)("Thumbnail")},{slug:"medium",name:Object(w.__)("Medium")},{slug:"large",name:Object(w.__)("Large")},{slug:"full",name:Object(w.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,availableLegacyWidgets:{},__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],gradients:[{name:Object(w.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:Object(w.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:Object(w.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:Object(w.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:Object(w.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:Object(w.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:Object(w.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(w.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:Object(w.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:Object(w.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:Object(w.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(w.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function qr(e,t,n){return[].concat(Object(pe.a)(e.slice(0,n)),Object(pe.a)(Object(d.castArray)(t)),Object(pe.a)(e.slice(n)))}function $r(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(pe.a)(e);return o.splice(t,r),qr(o,e.slice(t,t+r),n)}function Yr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yr(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(l.a)({},t,[]);return e.forEach((function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,Qr(o,r))})),n}function Zr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce((function(e,n){return Object.assign(e,Object(l.a)({},n.clientId,t),Zr(n.innerBlocks,n.clientId))}),{})}function Jr(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.identity,n={},r=Object(pe.a)(e);r.length;){var o=r.shift(),c=o.innerBlocks,i=Object(Fe.a)(o,["innerBlocks"]);r.push.apply(r,Object(pe.a)(c)),n[i.clientId]=t(i)}return n}function eo(e){return Jr(e,(function(e){return Object(d.omit)(e,"attributes")}))}function to(e){return Jr(e,(function(e){return e.attributes}))}function no(e,t){return e===t?Xr({},e):t}function ro(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&Object(d.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,r=t.attributes,Object(d.isEqual)(Object(d.keys)(n),Object(d.keys)(r)));var n,r}var oo=function(e){return e.reduce((function(e,t){return e[t]={},e}),{})},co=Object(d.flow)(m.combineReducers,(function(e){return function(t,n){if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){var r=n.id,o=n.updatedId;if(r===o)return t;(t=Xr({},t)).attributes=Object(d.mapValues)(t.attributes,(function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?Xr(Xr({},e),{},{ref:o}):e}))}return e(t,n)}}),(function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=e(t,n);if(r===t)return t;r.cache=t.cache?t.cache:{};var o=function(e){return e.reduce((function(e,n){var r=n;do{e.push(r),r=t.parents[r]}while(r&&!t.controlledInnerBlocks[r]);return e}),[])};switch(n.type){case"RESET_BLOCKS":r.cache=Object(d.mapValues)(Jr(n.blocks),(function(){return{}}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":var c=Object(d.keys)(Jr(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&c.push(n.rootClientId),r.cache=Xr(Xr({},r.cache),oo(o(c)));break;case"UPDATE_BLOCK":r.cache=Xr(Xr({},r.cache),oo(o([n.clientId])));break;case"UPDATE_BLOCK_ATTRIBUTES":r.cache=Xr(Xr({},r.cache),oo(o(n.clientIds)));break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var i=oo(o(n.replacedClientIds));r.cache=Xr(Xr(Xr({},Object(d.omit)(r.cache,n.replacedClientIds)),Object(d.omit)(i,n.replacedClientIds)),oo(Object(d.keys)(Jr(n.blocks))));break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":r.cache=Xr(Xr({},Object(d.omit)(r.cache,n.removedClientIds)),oo(Object(d.difference)(o(n.clientIds),n.clientIds)));break;case"MOVE_BLOCKS_TO_POSITION":var l=Object(pe.a)(n.clientIds);n.fromRootClientId&&l.push(n.fromRootClientId),n.toRootClientId&&l.push(n.toRootClientId),r.cache=Xr(Xr({},r.cache),oo(o(l)));break;case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":var a=[];n.rootClientId&&a.push(n.rootClientId),r.cache=Xr(Xr({},r.cache),oo(o(a)));break;case"SAVE_REUSABLE_BLOCK_SUCCESS":var s=Object(d.keys)(Object(d.omitBy)(r.attributes,(function(e,t){return"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId})));r.cache=Xr(Xr({},r.cache),oo(o(s)))}return r}}),(function(e){return function(t,n){var r=function(e){for(var r=e,o=0;o<r.length;o++){var c;!t.order[r[o]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[r[o]]||(r===e&&(r=Object(pe.a)(r)),(c=r).push.apply(c,Object(pe.a)(t.order[r[o]])))}return r};if(t)switch(n.type){case"REMOVE_BLOCKS":n=Xr(Xr({},n),{},{type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(n.clientIds)});break;case"REPLACE_BLOCKS":n=Xr(Xr({},n),{},{type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:r(n.clientIds)})}return e(t,n)}}),(function(e){return function(t,n){if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);var r={};if(Object.keys(t.controlledInnerBlocks).length)for(var o=Object(pe.a)(n.blocks);o.length;){var c=o.shift(),i=c.innerBlocks,l=Object(Fe.a)(c,["innerBlocks"]);o.push.apply(o,Object(pe.a)(i)),t.controlledInnerBlocks[l.clientId]&&(r[l.clientId]=!0)}var a=t;t.order[n.rootClientId]&&(a=e(a,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order[n.rootClientId]}));var s=a;return n.blocks.length&&((s=e(s,Xr(Xr({},n),{},{type:"INSERT_BLOCKS",index:0}))).order=Xr(Xr({},s.order),Object(d.reduce)(r,(function(e,n,r){return t.order[r]&&(e[r]=t.order[r]),e}),{}))),s}}),(function(e){return function(t,n){if(t&&"RESET_BLOCKS"===n.type){var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(d.reduce)(t[n],(function(n,o){return r[o]?n:[].concat(Object(pe.a)(n),[o],Object(pe.a)(e(t,o)))}),[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(d.pickBy)(t.controlledInnerBlocks));return Xr(Xr({},t),{},{byClientId:Xr(Xr({},Object(d.omit)(t.byClientId,r)),eo(n.blocks)),attributes:Xr(Xr({},Object(d.omit)(t.attributes,r)),to(n.blocks)),order:Xr(Xr({},Object(d.omit)(t.order,r)),Object(d.omit)(Qr(n.blocks),o)),parents:Xr(Xr({},Object(d.omit)(t.parents,r)),Zr(n.blocks)),cache:Xr(Xr({},Object(d.omit)(t.cache,r)),Object(d.omit)(Object(d.mapValues)(Jr(n.blocks),(function(){return{}})),o))})}return e(t,n)}}),(function(e){var t,n=!1;return function(r,o){var c=e(r,o),i="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===c&&!i){var l;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;var a=null===(l=null==r?void 0:r.isPersistentChange)||void 0===l||l;return r.isPersistentChange===a?r:Xr(Xr({},c),{},{isPersistentChange:a})}return c=Xr(Xr({},c),{},{isPersistentChange:i?!n:!ro(o,t)}),t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,c}}),(function(e){var t=new Set(["RECEIVE_BLOCKS"]);return function(n,r){var o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}))({byClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return eo(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return Xr(Xr({},e),eo(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(d.omit)(t.updates,"attributes");return Object(d.isEmpty)(n)?e:Xr(Xr({},e),{},Object(l.a)({},t.clientId,Xr(Xr({},e[t.clientId]),n)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?Xr(Xr({},Object(d.omit)(e,t.replacedClientIds)),eo(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},attributes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return to(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return Xr(Xr({},e),to(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?Xr(Xr({},e),{},Object(l.a)({},t.clientId,Xr(Xr({},e[t.clientId]),t.updates.attributes))):e;case"UPDATE_BLOCK_ATTRIBUTES":if(t.clientIds.every((function(t){return!e[t]})))return e;var n=t.clientIds.reduce((function(n,r){return Xr(Xr({},n),{},Object(l.a)({},r,Object(d.reduce)(t.attributes,(function(t,n,o){return n!==t[o]&&((t=no(e[r],t))[o]=n),t}),e[r])))}),{});return t.clientIds.every((function(t){return n[t]===e[t]}))?e:Xr(Xr({},e),n);case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?Xr(Xr({},Object(d.omit)(e,t.replacedClientIds)),to(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},order:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return Qr(t.blocks);case"RECEIVE_BLOCKS":return Xr(Xr({},e),Object(d.omit)(Qr(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=e[r]||[],c=Qr(t.blocks,r),i=t.index,a=void 0===i?o.length:i;return Xr(Xr(Xr({},e),c),{},Object(l.a)({},r,qr(o,c[r],a)));case"MOVE_BLOCKS_TO_POSITION":var s,u=t.fromRootClientId,b=void 0===u?"":u,f=t.toRootClientId,p=void 0===f?"":f,m=t.clientIds,v=t.index,g=void 0===v?e[p].length:v;if(b===p){var O=e[p],h=O.indexOf(m[0]);return Xr(Xr({},e),{},Object(l.a)({},p,$r(e[p],h,g,m.length)))}return Xr(Xr({},e),{},(s={},Object(l.a)(s,b,d.without.apply(void 0,[e[b]].concat(Object(pe.a)(m)))),Object(l.a)(s,p,qr(e[p],m,g)),s));case"MOVE_BLOCKS_UP":var j=t.clientIds,k=t.rootClientId,y=void 0===k?"":k,_=Object(d.first)(j),E=e[y];if(!E.length||_===Object(d.first)(E))return e;var C=E.indexOf(_);return Xr(Xr({},e),{},Object(l.a)({},y,$r(E,C,C-1,j.length)));case"MOVE_BLOCKS_DOWN":var w=t.clientIds,S=t.rootClientId,B=void 0===S?"":S,I=Object(d.first)(w),x=Object(d.last)(w),P=e[B];if(!P.length||x===Object(d.last)(P))return e;var T=P.indexOf(I);return Xr(Xr({},e),{},Object(l.a)({},B,$r(P,T,T+1,w.length)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var N=t.clientIds;if(!t.blocks)return e;var D=Qr(t.blocks);return Object(d.flow)([function(e){return Object(d.omit)(e,t.replacedClientIds)},function(e){return Xr(Xr({},e),Object(d.omit)(D,""))},function(e){return Object(d.mapValues)(e,(function(e){return Object(d.reduce)(e,(function(e,t){return t===N[0]?[].concat(Object(pe.a)(e),Object(pe.a)(D[""])):(-1===N.indexOf(t)&&e.push(t),e)}),[])}))}])(e);case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.flow)([function(e){return Object(d.omit)(e,t.removedClientIds)},function(e){return Object(d.mapValues)(e,(function(e){return d.without.apply(void 0,[e].concat(Object(pe.a)(t.removedClientIds)))}))}])(e)}return e},parents:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return Zr(t.blocks);case"RECEIVE_BLOCKS":return Xr(Xr({},e),Zr(t.blocks));case"INSERT_BLOCKS":return Xr(Xr({},e),Zr(t.blocks,t.rootClientId||""));case"MOVE_BLOCKS_TO_POSITION":return Xr(Xr({},e),t.clientIds.reduce((function(e,n){return e[n]=t.toRootClientId||"",e}),{}));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Xr(Xr({},Object(d.omit)(e,t.replacedClientIds)),Zr(t.blocks,e[t.clientIds[0]]));case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.clientId,o=t.hasControlledInnerBlocks;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===n?Xr(Xr({},e),{},Object(l.a)({},r,o)):e}});function io(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":if(-1===t.clientIds.indexOf(e.clientId))return e;var n=t.indexToSelect||t.blocks.length-1,r=t.blocks[n];if(!r)return{};if(r.clientId===e.clientId)return e;var o={clientId:r.clientId};return"number"==typeof t.initialPosition&&(o.initialPosition=t.initialPosition),o}return e}function lo(e,t,n){switch(t.type){case"CLEAR_SELECTED_BLOCK":case"SELECT_BLOCK":case"SELECTION_CHANGE":case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":return n}return e}var ao=Object(m.combineReducers)({blocks:co,isTyping:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.startOffset},selectionEnd:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.endOffset}};case"RESET_SELECTION":var o=r.selectionStart,c=r.selectionEnd;return{selectionStart:o,selectionEnd:c};case"MULTI_SELECT":var i=r.start,l=r.end;return{selectionStart:{clientId:i},selectionEnd:{clientId:l}};case"RESET_BLOCKS":var a=null==n||null===(e=n.selectionStart)||void 0===e?void 0:e.clientId,s=null==n||null===(t=n.selectionEnd)||void 0===t?void 0:t.clientId;if(!a&&!s)return n;if(!r.blocks.some((function(e){return e.clientId===a})))return{selectionStart:{},selectionEnd:{}};if(!r.blocks.some((function(e){return e.clientId===s})))return Xr(Xr({},n),{},{selectionEnd:n.selectionStart})}return{selectionStart:io(n.selectionStart,r),selectionEnd:io(n.selectionEnd,r)}},isMultiSelecting:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(e,t){return"REPLACE_BLOCKS"===t.type&&"number"==typeof t.initialPosition||"SELECT_BLOCK"===t.type?t.initialPosition:"REMOVE_BLOCKS"===t.type||"START_TYPING"===t.type?e:void 0},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 Xr(Xr({},e),{},Object(l.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(d.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(d.isEqual)(e[n],t.settings)?e:Xr(Xr({},e),{},Object(l.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(d.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"SET_INSERTION_POINT":case"SHOW_INSERTION_POINT":var n=t.rootClientId,r=t.index;return{rootClientId:n,index:r}}return lo(e,t,null)},insertionPointVisibility:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":return!0;case"HIDE_INSERTION_POINT":return!1}return lo(e,t,!1)},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 Xr(Xr({},e),{},{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Kr,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return Xr(Xr({},e),t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wr,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(p.isReusableBlock)(n)&&(o.ref=n.attributes.ref,r+="/"+n.attributes.ref),Xr(Xr({},e),{},{insertUsage:Xr(Xr({},e.insertUsage),{},Object(l.a)({},r,{time:t.time,count:e.insertUsage[r]?e.insertUsage[r].count+1:1,insert:o}))})}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return Object(l.a)({},t.clientId,t.updates.attributes);case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((function(e,n){return Xr(Xr({},e),{},Object(l.a)({},n,t.attributes))}),{})}return null},isNavigationMode:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":var n=t.clientId;return t.isHighlighted?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e}}),so=n(43),uo=n(50);function bo(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return fo(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fo(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}function fo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function po(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?po(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):po(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vo=Object(a.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(v.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(a.createElement)(v.G,null,Object(a.createElement)(v.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"}))),go=[];function Oo(e,t){var n=e.blocks.byClientId[t];if("web"!==a.Platform.OS&&"core/social-link"===(null==n?void 0:n.name)){var r=e.blocks.attributes[t].service;return r?"".concat("core/social-link","-").concat(r):"core/social-link"}return n?n.name:null}function ho(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}function jo(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}var ko=Object(uo.a)((function(e,t){var n=e.blocks.byClientId[t];return n?mo(mo({},n),{},{attributes:jo(e,t),innerBlocks:Yc(e,t)?go:_o(e,t)}):null}),(function(e,t){return[e.blocks.cache[t]]})),yo=Object(uo.a)((function(e,t){var n=e.blocks.byClientId[t];return n?mo(mo({},n),{},{attributes:jo(e,t)}):null}),(function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t]]})),_o=Object(uo.a)((function(e,t){return Object(d.map)(oc(e,t),(function(t){return ko(e,t)}))}),(function(e,t){return Object(d.map)(e.blocks.order[t||""],(function(t){return e.blocks.cache[t]}))})),Eo=Object(uo.a)((function(e,t){var n=e.blocks.byClientId[t];return n?mo(mo({},n),{},{attributes:jo(e,t),innerBlocks:Co(e,t)}):null}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),Co=Object(uo.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(oc(e,t),(function(t){return Eo(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),wo=function e(t,n){return Object(d.flatMap)(n,(function(n){var r=oc(t,n);return[].concat(Object(pe.a)(r),Object(pe.a)(e(t,r)))}))},So=Object(uo.a)((function(e){var t=oc(e);return[].concat(Object(pe.a)(t),Object(pe.a)(wo(e,t)))}),(function(e){return[e.blocks.order]})),Bo=Object(uo.a)((function(e,t){var n=So(e);return t?Object(d.reduce)(n,(function(n,r){return e.blocks.byClientId[r].name===t?n+1:n}),0):n.length}),(function(e){return[e.blocks.order,e.blocks.byClientId]})),Io=Object(uo.a)((function(e,t){return Object(d.map)(Object(d.castArray)(t),(function(t){return ko(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function xo(e,t){return oc(e,t).length}function Po(e){return e.selection.selectionStart}function To(e){return e.selection.selectionEnd}function No(e){return e.selection.selectionStart.clientId}function Do(e){return e.selection.selectionEnd.clientId}function Ao(e){return Yo(e).length||(e.selection.selectionStart.clientId?1:0)}function Ro(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return!!n.clientId&&n.clientId===r.clientId}function Lo(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd,o=n.clientId;return o&&o===r.clientId?o:null}function Mo(e){var t=Lo(e);return t?ko(e,t):null}function Fo(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}var Vo=Object(uo.a)((function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[],o=t;e.blocks.parents[o];)o=e.blocks.parents[o],r.push(o);return n?r:r.reverse()}),(function(e){return[e.blocks.parents]})),Ho=Object(uo.a)((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Vo(e,t,r);return Object(d.map)(Object(d.filter)(Object(d.map)(o,(function(t){return{id:t,name:Oo(e,t)}})),(function(e){var t=e.name;return Array.isArray(n)?n.includes(t):t===n})),(function(e){return e.id}))}),(function(e){return[e.blocks.parents]}));function zo(e,t){var n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function Go(e,t){for(var n,r=Lo(e),o=[].concat(Object(pe.a)(Vo(e,t)),[t]),c=[].concat(Object(pe.a)(Vo(e,r)),[r]),i=Math.min(o.length,c.length),l=0;l<i&&o[l]===c[l];l++)n=o[l];return n}function Uo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Lo(e)),void 0===t&&(t=n<0?Qo(e):Zo(e)),!t)return null;var r=Fo(e,t);if(null===r)return null;var o=e.blocks.order,c=o[r],i=c.indexOf(t),l=i+1*n;return l<0||l===c.length?null:c[l]}function Wo(e,t){return Uo(e,t,-1)}function Ko(e,t){return Uo(e,t,1)}function qo(e){return e.initialPosition}var $o=Object(uo.a)((function(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;if(void 0===n.clientId||void 0===r.clientId)return go;if(n.clientId===r.clientId)return[n.clientId];var o=Fo(e,n.clientId);if(null===o)return go;var c=oc(e,o),i=c.indexOf(n.clientId),l=c.indexOf(r.clientId);return i>l?c.slice(l,i+1):c.slice(i,l+1)}),(function(e){return[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]}));function Yo(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?go:$o(e)}var Xo=Object(uo.a)((function(e){var t=Yo(e);return t.length?t.map((function(t){return ko(e,t)})):go}),(function(e){return[].concat(Object(pe.a)($o.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])}));function Qo(e){return Object(d.first)(Yo(e))||null}function Zo(e){return Object(d.last)(Yo(e))||null}function Jo(e,t){return Qo(e)===t}function ec(e,t){return-1!==Yo(e).indexOf(t)}var tc=Object(uo.a)((function(e,t){for(var n=t,r=!1;n&&!r;)r=ec(e,n=Fo(e,n));return r}),(function(e){return[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]}));function nc(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?null:n.clientId||null}function rc(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?null:r.clientId||null}function oc(e,t){return e.blocks.order[t||""]||go}function cc(e,t,n){return oc(e,n).indexOf(t)}function ic(e,t){var n=e.selection,r=n.selectionStart,o=n.selectionEnd;return r.clientId===o.clientId&&r.clientId===t}function lc(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(d.some)(oc(e,t),(function(t){return ic(e,t)||ec(e,t)||n&&lc(e,t,n)}))}function ac(e,t){if(!t)return!1;var n=Yo(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function sc(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId!==r.clientId}function uc(e){return e.isMultiSelecting}function dc(e){return e.isSelectionEnabled}function bc(e,t){return e.blocksMode[t]||"visual"}function fc(e){return e.isTyping}function pc(e){return!!e.draggedBlocks.length}function mc(e){return e.draggedBlocks}function vc(e,t){return e.draggedBlocks.includes(t)}function gc(e,t){if(!pc(e))return!1;var n=Vo(e,t);return Object(d.some)(n,(function(t){return vc(e,t)}))}function Oc(e){return e.isCaretWithinFormattedText}function hc(e){var t,n,r=e.insertionPoint,o=e.selection.selectionEnd;if(null!==r)return r;var c=o.clientId;return c?(t=Fo(e,c)||void 0,n=cc(e,o.clientId,t)+1):n=oc(e).length,{rootClientId:t,index:n}}function jc(e){return e.insertionPointVisibility}function kc(e){return e.template.isValid}function yc(e){return e.settings.template}function _c(e,t){if(!t)return e.settings.templateLock;var n=Rc(e,t);return n?n.templateLock:null}var Ec=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(d.isBoolean)(e)?e:Object(d.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n};if(t&&"object"===Object(so.a)(t)?t=(n=t).name:n=Object(p.getBlockType)(t),!n)return!1;var c=Lc(e),i=c.allowedBlockTypes,l=o(i,t,!0);if(!l)return!1;var a=!!_c(e,r);if(a)return!1;var s=Rc(e,r);if(r&&void 0===s)return!1;var u=null==s?void 0:s.allowedBlocks,b=o(u,t),f=n.parent,m=Oo(e,r),v=o(f,m);return null!==b&&null!==v?b||v:null!==b?b:null===v||v},Cc=Object(uo.a)(Ec,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function wc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((function(t){return Cc(e,Oo(e,t),n)}))}function Sc(e,t){var n,r;return null!==(n=null===(r=e.preferences.insertUsage)||void 0===r?void 0:r[t])&&void 0!==n?n:null}var Bc=function(e,t,n){return!!Object(p.hasBlockSupport)(t,"inserter",!0)&&Ec(e,t.name,n)},Ic=function(e){return function(t){return mo(mo({},e),{},{id:"".concat(e.id,"-").concat(t.name),icon:t.icon||e.icon,title:t.title||e.title,description:t.description||e.description,category:t.category||e.category,example:t.hasOwnProperty("example")?t.example:e.example,initialAttributes:mo(mo({},e.initialAttributes),t.attributes),innerBlocks:t.innerBlocks,keywords:t.keywords||e.keywords})}},xc=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}},Pc=function(e,t){var n=t.buildScope,r=void 0===n?"inserter":n;return function(t){var n=t.name,o=!1;Object(p.hasBlockSupport)(t.name,"multiple",!0)||(o=Object(d.some)(Io(e,So(e)),{name:t.name}));var c=Sc(e,n)||{},i=c.time,l=c.count,a=void 0===l?0:l,s={id:n,name:t.name,title:t.title,icon:t.icon,isDisabled:o,frecency:xc(i,a)};if("transform"===r)return s;var u=t.variations.filter((function(e){var t=e.scope;return!t||t.includes("inserter")}));return mo(mo({},s),{},{initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:u,example:t.example,utility:1})}},Tc=Object(uo.a)((function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=Pc(e,{buildScope:"inserter"}),o=function(t){var n,r="core/block/".concat(t.id),o=Vc(e,t.id);1===o.length&&(n=Object(p.getBlockType)(o[0].name));var c=Sc(e,r)||{},i=c.time,l=c.count,a=xc(i,void 0===l?0:l);return{id:r,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n?n.icon:vo,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:a}},c=Object(p.getBlockTypes)().filter((function(t){return Bc(e,t,n)})).map(r),i=Ec(e,"core/block",n)?Uc(e).map(o):[],l=c.filter((function(e){var t=e.variations;return!(void 0===t?[]:t).some((function(e){return e.isDefault}))})),a=[],s=bo(c);try{for(s.s();!(t=s.n()).done;){var u=t.value,d=u.variations,b=void 0===d?[]:d;if(b.length){var f=Ic(u);a.push.apply(a,Object(pe.a)(b.map(f)))}}}catch(e){s.e(e)}finally{s.f()}return[].concat(Object(pe.a)(l),a,Object(pe.a)(i))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Uc(e),Object(p.getBlockTypes)()]})),Nc=Object(uo.a)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=Pc(e,{buildScope:"transform"}),o=Object(p.getBlockTypes)().filter((function(t){return Bc(e,t,n)})).map(r),c=Object(d.mapKeys)(o,(function(e){return e.name})),i=Object(p.getPossibleBlockTransformations)(t).reduce((function(e,t){return c[null==t?void 0:t.name]&&e.push(c[t.name]),e}),[]),l=Object(d.orderBy)(i,(function(e){return c[e.name].frecency}),"desc");return l}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]})),Dc=Object(uo.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object(d.some)(Object(p.getBlockTypes)(),(function(n){return Bc(e,n,t)}));if(n)return!0;var r=Ec(e,"core/block",t)&&Uc(e).length>0;return r}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Uc(e),Object(p.getBlockTypes)()]})),Ac=Object(uo.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return Object(d.filter)(Object(p.getBlockTypes)(),(function(n){return Bc(e,n,t)}))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]}));function Rc(e,t){return e.blockListSettings[t]}function Lc(e){return e.settings}function Mc(e){return e.blocks.isPersistentChange}var Fc=Object(uo.a)((function(e,t){return Object(d.filter)(e.blockListSettings,(function(e,n){return t.includes(n)}))}),(function(e){return[e.blockListSettings]})),Vc=Object(uo.a)((function(e,t){var n=Object(d.find)(Uc(e),(function(e){return e.id===t}));return n?Object(p.parse)("string"==typeof n.content.raw?n.content.raw:n.content):null}),(function(e){return[Uc(e)]})),Hc=Object(uo.a)((function(e,t){var n,r=Object(d.find)(Uc(e),(function(e){return e.id===t}));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(function(e){return[Uc(e)]}));function zc(e){return e.blocks.isIgnoredChange}function Gc(e){return e.lastBlockAttributesChange}function Uc(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:go}function Wc(e){return e.isNavigationMode}function Kc(e){return e.hasBlockMovingClientId}function qc(e){return!!e.automaticChangeStatus}function $c(e,t){return e.highlightedBlock===t}function Yc(e,t){return!!e.blocks.controlledInnerBlocks[t]}var Xc=Object(uo.a)((function(e,t){if(!t.length)return null;var n=Lo(e);if(t.includes(Oo(e,n)))return n;var r=Yo(e),o=Ho(e,n||r[0],t);return o?Object(d.last)(o):null}),(function(e,t){return[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]})),Qc=n(16),Zc=n.n(Qc),Jc={SLEEP:function(e){var t=e.duration;return new Promise((function(e){setTimeout(e,t)}))},MARK_AUTOMATIC_CHANGE_FINAL_CONTROL:Object(m.createRegistryControl)((function(e){return function(){var t=window.requestIdleCallback;(void 0===t?function(e){return setTimeout(e,100)}:t)((function(){return e.dispatch("core/block-editor").__unstableMarkAutomaticChangeFinal()}))}}))};function ei(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ti(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ti(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}function ti(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ni(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ri(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ni(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ni(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oi=Zc.a.mark(Ei),ci=Zc.a.mark(Ci),ii=Zc.a.mark(wi),li=Zc.a.mark(Ti),ai=Zc.a.mark(Ni),si=Zc.a.mark(Ri),ui=Zc.a.mark(Vi),di=Zc.a.mark(Wi),bi=Zc.a.mark(Ki),fi=Zc.a.mark($i),pi=Zc.a.mark(Ji),mi=Zc.a.mark(el),vi=Zc.a.mark(tl),gi=Zc.a.mark(Ol),Oi=Zc.a.mark(jl),hi=Zc.a.mark(kl),ji=Zc.a.mark(yl),ki=Zc.a.mark(_l),yi=Zc.a.mark(El),_i=Zc.a.mark(wl);function Ei(){return Zc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m.controls.select("core/block-editor","getBlockCount");case 2:if(0!==e.sent){e.next=7;break}return e.next=6,bl();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),oi)}function Ci(e){return Zc.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,{type:"RESET_BLOCKS",blocks:e};case 2:return t.delegateYield(wi(e),"t0",3);case 3:return t.abrupt("return",t.t0);case 4:case"end":return t.stop()}}),ci)}function wi(e){var t,n,r,o;return Zc.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,m.controls.select("core/block-editor","getTemplate");case 2:return t=c.sent,c.next=5,m.controls.select("core/block-editor","getTemplateLock");case 5:return n=c.sent,r=!t||"all"!==n||Object(p.doBlocksMatchTemplate)(e,t),c.next=9,m.controls.select("core/block-editor","isValidTemplate");case 9:if(o=c.sent,r===o){c.next=14;break}return c.next=13,Zi(r);case 13:return c.abrupt("return",r);case 14:case"end":return c.stop()}}),ii)}function Si(e,t){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t}}function Bi(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function Ii(e,t){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Object(d.castArray)(e),attributes:t}}function xi(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Pi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function Ti(e){var t;return Zc.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,m.controls.select("core/block-editor","getPreviousBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,Pi(t,-1);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),li)}function Ni(e){var t;return Zc.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,m.controls.select("core/block-editor","getNextBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,Pi(t);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),ai)}function Di(){return{type:"START_MULTI_SELECT"}}function Ai(){return{type:"STOP_MULTI_SELECT"}}function Ri(e,t){var n;return Zc.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,{type:"MULTI_SELECT",start:e,end:t};case 2:return r.next=4,m.controls.select("core/block-editor","getSelectedBlockCount");case 4:n=r.sent,Object(ot.speak)(Object(w.sprintf)(
|
10 |
/* translators: %s: number of selected blocks */
|
11 |
-
Object(w._n)("%s block selected.","%s blocks selected.",n),n),"assertive");case 6:case"end":return r.stop()}}),si)}function Li(){return{type:"CLEAR_SELECTED_BLOCK"}}function Mi(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Fi(e,t){var n,r,o=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((function(e){var t,n=e.name;if(!Object(p.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!o[n])return e;var r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=r&&r.includes("is-style-"))return e;var c=e.attributes,i=void 0===c?{}:c,l=o[n];return ri(ri({},e),{},{attributes:ri(ri({},i),{},{className:"".concat(r||""," is-style-").concat(l).trim()})})}))}function Vi(e,t,n,r,o){var c,i,l;return Zc.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return e=Object(d.castArray)(e),a.t0=Fi,a.t1=Object(d.castArray)(t),a.next=5,m.controls.select("core/block-editor","getSettings");case 5:return a.t2=a.sent,t=(0,a.t0)(a.t1,a.t2),a.next=9,m.controls.select("core/block-editor","getBlockRootClientId",Object(d.first)(e));case 9:c=a.sent,i=0;case 11:if(!(i<t.length)){a.next=21;break}return l=t[i],a.next=15,m.controls.select("core/block-editor","canInsertBlockType",l.name,c);case 15:if(a.sent){a.next=18;break}return a.abrupt("return");case 18:i++,a.next=11;break;case 21:return a.next=23,{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:r,meta:o};case 23:return a.delegateYield(Ei(),"t3",24);case 24:case"end":return a.stop()}}),ui)}function Hi(e,t){return Vi(e,t)}function zi(e){return function(t,n){return{clientIds:Object(d.castArray)(t),type:e,rootClientId:n}}}var Gi=zi("MOVE_BLOCKS_DOWN"),Ui=zi("MOVE_BLOCKS_UP");function Wi(e){var t,n,r,o,c,i=arguments;return Zc.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=i.length>1&&void 0!==i[1]?i[1]:"",n=i.length>2&&void 0!==i[2]?i[2]:"",r=i.length>3?i[3]:void 0,l.next=5,m.controls.select("core/block-editor","getTemplateLock",t);case 5:if("all"!==(o=l.sent)){l.next=8;break}return l.abrupt("return");case 8:if(c={type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r},t!==n){l.next=13;break}return l.next=12,c;case 12:return l.abrupt("return");case 13:if("insert"!==o){l.next=15;break}return l.abrupt("return");case 15:return l.next=17,m.controls.select("core/block-editor","canInsertBlocks",e,n);case 17:if(!l.sent){l.next=21;break}return l.next=21,c;case 21:case"end":return l.stop()}}),di)}function Ki(e){var t,n,r,o=arguments;return Zc.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=o.length>1&&void 0!==o[1]?o[1]:"",n=o.length>2&&void 0!==o[2]?o[2]:"",r=o.length>3?o[3]:void 0,c.next=5,Wi([e],t,n,r);case 5:case"end":return c.stop()}}),bi)}function qi(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return $i([e],t,n,r)}function $i(e,t,n){var r,o,c,i,l,a,s=arguments;return Zc.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return r=!(s.length>3&&void 0!==s[3])||s[3],o=s.length>4?s[4]:void 0,u.t0=Fi,u.t1=Object(d.castArray)(e),u.next=6,m.controls.select("core/block-editor","getSettings");case 6:u.t2=u.sent,e=(0,u.t0)(u.t1,u.t2),c=[],i=ei(e),u.prev=10,i.s();case 12:if((l=i.n()).done){u.next=20;break}return a=l.value,u.next=16,m.controls.select("core/block-editor","canInsertBlockType",a.name,n);case 16:u.sent&&c.push(a);case 18:u.next=12;break;case 20:u.next=25;break;case 22:u.prev=22,u.t3=u.catch(10),i.e(u.t3);case 25:return u.prev=25,i.f(),u.finish(25);case 28:if(!c.length){u.next=30;break}return u.abrupt("return",{type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,meta:o});case 30:case"end":return u.stop()}}),fi,null,[[10,22,25,28]])}function Yi(e,t){return{type:"SET_INSERTION_POINT",rootClientId:e,index:t}}function Xi(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function Qi(){return{type:"HIDE_INSERTION_POINT"}}function Zi(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function Ji(){var e,t,n;return Zc.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,{type:"SYNCHRONIZE_TEMPLATE"};case 2:return r.next=4,m.controls.select("core/block-editor","getBlocks");case 4:return e=r.sent,r.next=7,m.controls.select("core/block-editor","getTemplate");case 7:return t=r.sent,n=Object(p.synchronizeBlocksWithTemplate)(e,t),r.next=11,Ci(n);case 11:return r.abrupt("return",r.sent);case 12:case"end":return r.stop()}}),pi)}function el(e,t){var n,r,o,i,l,a,s,u,b,f,v,g,O,h,j,k,y,_,E,C,w,S,B,I,x,P,T,N,D,A,R,L,M,F;return Zc.a.wrap((function(V){for(;;)switch(V.prev=V.next){case 0:return n=[e,t],V.next=3,{type:"MERGE_BLOCKS",blocks:n};case 3:return r=n[0],o=n[1],V.next=6,m.controls.select("core/block-editor","getBlock",r);case 6:if(i=V.sent,(l=Object(p.getBlockType)(i.name)).merge){V.next=12;break}return V.next=11,Pi(i.clientId);case 11:return V.abrupt("return");case 12:return V.next=14,m.controls.select("core/block-editor","getBlock",o);case 14:return a=V.sent,s=Object(p.getBlockType)(a.name),V.next=18,m.controls.select("core/block-editor","getSelectionStart");case 18:if(u=V.sent,b=u.clientId,f=u.attributeKey,v=u.offset,g=(b===r?l:s).attributes[f],O=(b===r||b===o)&&void 0!==f&&void 0!==v&&!!g,g||("number"==typeof f?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ".concat(Object(so.a)(f))):window.console.error("The RichText identifier prop does not match any attributes defined by the block.")),h="",j=Object(p.cloneBlock)(i),k=Object(p.cloneBlock)(a),O&&(_=(y=b===r?j:k).attributes[f],E=g.multiline,C=g.__unstableMultilineWrapperTags,w=g.__unstablePreserveWhiteSpace,S=Object(c.insert)(Object(c.create)({html:_,multilineTag:E,multilineWrapperTags:C,preserveWhiteSpace:w}),h,v,v),y.attributes[f]=Object(c.toHTMLString)({value:S,multilineTag:E,preserveWhiteSpace:w})),(B=i.name===a.name?[k]:Object(p.switchToBlockType)(k,i.name))&&B.length){V.next=33;break}return V.abrupt("return");case 33:if(I=l.merge(j.attributes,B[0].attributes),!O){V.next=45;break}return x=Object(d.findKey)(I,(function(e){return"string"==typeof e&&-1!==e.indexOf(h)})),P=I[x],T=l.attributes[x],N=T.multiline,D=T.__unstableMultilineWrapperTags,A=T.__unstablePreserveWhiteSpace,R=Object(c.create)({html:P,multilineTag:N,multilineWrapperTags:D,preserveWhiteSpace:A}),L=R.text.indexOf(h),M=Object(c.remove)(R,L,L+1),F=Object(c.toHTMLString)({value:M,multilineTag:N,preserveWhiteSpace:A}),I[x]=F,V.next=45,dl(i.clientId,x,L,L);case 45:return V.delegateYield(Vi([i.clientId,a.clientId],[ri(ri({},i),{},{attributes:ri(ri({},i.attributes),I)})].concat(Object(pe.a)(B.slice(1)))),"t0",46);case 46:case"end":return V.stop()}}),mi)}function tl(e){var t,n,r,o,c=arguments;return Zc.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t=!(c.length>1&&void 0!==c[1])||c[1],e&&e.length){i.next=3;break}return i.abrupt("return");case 3:return e=Object(d.castArray)(e),i.next=6,m.controls.select("core/block-editor","getBlockRootClientId",e[0]);case 6:return n=i.sent,i.next=9,m.controls.select("core/block-editor","getTemplateLock",n);case 9:if(!i.sent){i.next=12;break}return i.abrupt("return");case 12:if(!t){i.next=18;break}return i.next=15,Ti(e[0]);case 15:r=i.sent,i.next=21;break;case 18:return i.next=20,m.controls.select("core/block-editor","getPreviousBlockClientId",e[0]);case 20:r=i.sent;case 21:return i.next=23,{type:"REMOVE_BLOCKS",clientIds:e};case 23:return i.delegateYield(Ei(),"t0",24);case 24:return o=i.t0,i.abrupt("return",[r||o]);case 26:case"end":return i.stop()}}),vi)}function nl(e,t){return tl([e],t)}function rl(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,time:Date.now()}}function ol(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function cl(){return{type:"START_TYPING"}}function il(){return{type:"STOP_TYPING"}}function ll(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function al(){return{type:"STOP_DRAGGING_BLOCKS"}}function sl(){return{type:"ENTER_FORMATTED_TEXT"}}function ul(){return{type:"EXIT_FORMATTED_TEXT"}}function dl(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function bl(e,t,n){var r=Object(p.getDefaultBlockName)();if(r)return qi(Object(p.createBlock)(r,e),n,t)}function fl(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function pl(e){return{type:"UPDATE_SETTINGS",settings:e}}function ml(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function vl(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function gl(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function Ol(){return Zc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{type:"MARK_AUTOMATIC_CHANGE"};case 2:return e.next=4,{type:"MARK_AUTOMATIC_CHANGE_FINAL_CONTROL"};case 4:case"end":return e.stop()}}),gi)}function hl(){return{type:"MARK_AUTOMATIC_CHANGE_FINAL"}}function jl(){var e,t=arguments;return Zc.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=!(t.length>0&&void 0!==t[0])||t[0],n.next=3,{type:"SET_NAVIGATION_MODE",isNavigationMode:e};case 3:e?Object(ot.speak)(Object(w.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):Object(ot.speak)(Object(w.__)("You are currently in edit mode. To return to the navigation mode, press Escape."));case 4:case"end":return n.stop()}}),Oi)}function kl(){var e,t=arguments;return Zc.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=t.length>0&&void 0!==t[0]?t[0]:null,n.next=3,{type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e};case 3:e&&Object(ot.speak)(Object(w.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."));case 4:case"end":return n.stop()}}),hi)}function yl(e){var t,n,r,o,c,i,l=arguments;return Zc.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(t=!(l.length>1&&void 0!==l[1])||l[1],e||e.length){a.next=3;break}return a.abrupt("return");case 3:return a.next=5,m.controls.select("core/block-editor","getBlocksByClientId",e);case 5:return n=a.sent,a.next=8,m.controls.select("core/block-editor","getBlockRootClientId",e[0]);case 8:if(r=a.sent,!Object(d.some)(n,(function(e){return!e}))){a.next=11;break}return a.abrupt("return");case 11:if(o=n.map((function(e){return e.name})),!Object(d.some)(o,(function(e){return!Object(p.hasBlockSupport)(e,"multiple",!0)}))){a.next=14;break}return a.abrupt("return");case 14:return a.next=16,m.controls.select("core/block-editor","getBlockIndex",Object(d.last)(Object(d.castArray)(e)),r);case 16:return c=a.sent,i=n.map((function(e){return Object(p.cloneBlock)(e)})),a.next=20,$i(i,c+1,r,t);case 20:if(!(i.length>1&&t)){a.next=23;break}return a.next=23,Ri(Object(d.first)(i).clientId,Object(d.last)(i).clientId);case 23:return a.abrupt("return",i.map((function(e){return e.clientId})));case 24:case"end":return a.stop()}}),ji)}function _l(e){var t,n;return Zc.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,m.controls.select("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,m.controls.select("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,m.controls.select("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,bl({},t,n);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),ki)}function El(e){var t,n;return Zc.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,m.controls.select("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,m.controls.select("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,m.controls.select("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,bl({},t,n+1);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),yi)}function Cl(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function wl(e){return Zc.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Cl(e,!0);case 2:return t.next=4,{type:"SLEEP",duration:150};case 4:return t.next=6,Cl(e,!1);case 6:case"end":return t.stop()}}),_i)}function Sl(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function Bl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Il(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bl(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xl={reducer:ao,selectors:r,actions:o,controls:Jc},Pl=Object(m.createReduxStore)("core/block-editor",Il(Il({},xl),{},{persist:["preferences"]}));function Tl(e){return Object(m.useSelect)((function(t){if(!e)return null;var n=t(Pl),r=n.getBlockName,o=n.getBlockAttributes,c=t(p.store),i=c.getBlockType,l=c.getBlockVariations,a=r(e),s=i(a);if(!s)return null;var u=l(a),d={title:s.title,icon:s.icon,description:s.description};if(null==u||!u.length)return d;var b=o(e),f=u.find((function(e){var t;return null===(t=e.isActive)||void 0===t?void 0:t.call(e,b,e.attributes)}));return f?{title:f.title||s.title,icon:f.icon||s.icon,description:f.description||s.description}:d}),[e])}function Nl(e){var t=e.clientId,n=Object(m.useSelect)((function(e){if(!t)return{};var n=e("core/block-editor"),r=n.getBlockName,o=n.getBlockAttributes,c=n.__experimentalGetReusableBlockTitle,i=r(t);if(!i)return{};var l=Object(p.isReusableBlock)(Object(p.getBlockType)(i));return{attributes:o(t),name:i,reusableBlockTitle:l&&c(o(t).ref)}}),[t]),r=n.attributes,o=n.name,c=n.reusableBlockTitle,i=Tl(t);if(!o||!i)return null;var l=Object(p.getBlockType)(o),a=Object(p.__experimentalGetBlockLabel)(l,r);return a!==l.title?"".concat(l.title,": ").concat(Object(d.truncate)(a,{length:15})):c?Object(d.truncate)(c,{length:35}):i.title}Object(m.registerStore)("core/block-editor",Il(Il({},xl),{},{persist:["preferences"]}));var Dl=function(){var e=Object(m.useDispatch)("core/block-editor"),t=e.selectBlock,n=e.clearSelectedBlock,r=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectionStart,r=t.getSelectedBlockClientId,o=t.getBlockParents,c=r();return{parents:o(c),clientId:c,hasSelection:!!n().clientId}}),[]),o=r.clientId,c=r.parents,i=r.hasSelection;return Object(a.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":Object(w.__)("Block breadcrumb")},Object(a.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&Object(a.createElement)(v.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:n},Object(w.__)("Document")),!i&&Object(w.__)("Document")),c.map((function(e){return Object(a.createElement)("li",{key:e},Object(a.createElement)(v.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:function(){return t(e)}},Object(a.createElement)(Nl,{clientId:e})))})),!!o&&Object(a.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},Object(a.createElement)(Nl,{clientId:o})))};function Al(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Al(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Al(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ll=Object(a.createContext)({});function Ml(e){var t=e.value,n=e.children,r=Object(a.useContext)(Ll),o=Object(a.useMemo)((function(){return Rl(Rl({},r),t)}),[r,t]);return Object(a.createElement)(Ll.Provider,{value:o,children:n})}var Fl=Ll,Vl=function(){return Object(a.createElement)(v.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Object(a.createElement)(v.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"}))},Hl=function(e){var t=e.style,n=e.className;return Object(a.createElement)("div",{className:"block-library-colors-selector__icon-container"},Object(a.createElement)("div",{className:"".concat(n," block-library-colors-selector__state-selection"),style:t},Object(a.createElement)(Vl,null)))},zl=function(e){var t,n,r,o=e.children,c=Object(Fe.a)(e,["children"]);return Object(a.createElement)(v.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:(t=c,n=t.TextColor,r=t.BackgroundColor,function(e){var t=e.onToggle,o=e.isOpen;return Object(a.createElement)(v.ToolbarGroup,null,Object(a.createElement)(v.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:Object(w.__)("Open Colors Selector"),onClick:t,onKeyDown:function(e){o||e.keyCode!==Ht.DOWN||(e.preventDefault(),e.stopPropagation(),t())},icon:Object(a.createElement)(r,null,Object(a.createElement)(n,null,Object(a.createElement)(Hl,null)))}))}),renderContent:function(){return o}})},Gl={},Ul=Object(v.withFilters)("editor.BlockEdit")((function(e){var t=e.attributes,n=void 0===t?{}:t,r=e.name,o=Object(p.getBlockType)(r),c=Object(a.useContext)(Fl),l=Object(a.useMemo)((function(){return o&&o.usesContext?Object(d.pick)(c,o.usesContext):Gl}),[o,c]);if(!o)return null;var s=o.edit||o.save;if(o.apiVersion>1||Object(p.hasBlockSupport)(o,"lightBlockWrapper",!1))return Object(a.createElement)(s,Object(i.a)({},e,{context:l}));var b=Object(p.hasBlockSupport)(o,"className",!0)?Object(p.getBlockDefaultClassName)(r):null,f=u()(b,n.className);return Object(a.createElement)(s,Object(i.a)({},e,{context:l,className:f}))}));function Wl(e){var t={name:e.name,isSelected:e.isSelected,clientId:e.clientId,onFocus:e.onFocus,onCaretVerticalPositionChange:e.onCaretVerticalPositionChange};return Object(a.createElement)(O,{value:Object(a.useMemo)((function(){return t}),Object.values(t))},Object(a.createElement)(Ul,e))}var Kl=Object(v.createSlotFill)("BlockFormatControls"),ql=Kl.Fill,$l=Kl.Slot,Yl=function(e){return h().isSelected?Object(a.createElement)(ql,null,(function(t){var n=Object(d.isEmpty)(t)?null:t;return Object(a.createElement)(v.__experimentalToolbarContext.Provider,{value:n},e.children)})):null};Yl.Slot=function(e){var t=Object(a.useContext)(v.__experimentalToolbarContext);return Object(a.createElement)($l,Object(i.a)({},e,{fillProps:t}))};var Xl=Yl,Ql=n(44),Zl=n(46),Jl=n(263),ea=n(126),ta=n(33),na=function(e){return e+1},ra=function(e){return{top:e.offsetTop,left:e.offsetLeft}},oa=function(e,t,n,r,o){var c=Object(b.useReducedMotion)()||!r,i=Object(a.useReducer)(na,0),l=Object(Me.a)(i,2),s=l[0],u=l[1],d=Object(a.useReducer)(na,0),f=Object(Me.a)(d,2),p=f[0],m=f[1],v=Object(a.useState)({x:0,y:0}),g=Object(Me.a)(v,2),O=g[0],h=g[1],j=Object(a.useMemo)((function(){return e.current?ra(e.current):null}),[o]),k=Object(a.useMemo)((function(){if(!n||!e.current)return function(){};var t=Object(ta.getScrollContainer)(e.current);if(!t)return function(){};var r=e.current.getBoundingClientRect();return function(){var n=e.current.getBoundingClientRect().top-r.top;n&&(t.scrollTop+=n)}}),[o,n]);function y(n){var r=n.x,o=n.y;r=Math.round(r),o=Math.round(o),r===y.x&&o===y.y||(function(n){var r=n.x,o=n.y;if(e.current){var c=0===r&&0===o;e.current.style.transformOrigin=c?"":"center",e.current.style.transform=c?"":"translate3d(".concat(r,"px,").concat(o,"px,0)"),e.current.style.zIndex=!t||c?"":"1",k()}}({x:r,y:o}),y.x=r,y.y=o)}Object(a.useLayoutEffect)((function(){s&&m()}),[s]),Object(a.useLayoutEffect)((function(){if(j)if(c)k();else{e.current.style.transform="";var t=ra(e.current);u(),h({x:Math.round(j.left-t.left),y:Math.round(j.top-t.top)})}}),[o]),y.x=0,y.y=0,Object(ea.useSpring)({from:{x:O.x,y:O.y},to:{x:0,y:0},reset:s!==p,config:{mass:5,tension:2e3,friction:200},immediate:c,onFrame:y})},ca=Object(ea.animated)(v.__experimentalTreeGridRow);function ia(e){var t=e.isSelected,n=e.position,r=e.level,o=e.rowCount,c=e.children,l=e.className,s=e.path,d=Object(Fe.a)(e,["isSelected","position","level","rowCount","children","className","path"]),b=Object(a.useRef)(null),f=s.join("_"),p=oa(b,t,!1,!0,f);return Object(a.createElement)(ca,Object(i.a)({ref:b,style:p,className:u()("block-editor-block-navigation-leaf",l),level:r,positionInSet:n,setSize:o},d),c)}var la=n(260),aa=n(261),sa=n(262),ua=n(217);var da=function(e,t){return"up"===e?"horizontal"===t?Object(w.isRTL)()?la.a:aa.a:sa.a:"down"===e?"horizontal"===t?Object(w.isRTL)()?aa.a:la.a:ua.a:null},ba=function(e,t){return"up"===e?"horizontal"===t?Object(w.isRTL)()?Object(w.__)("Move right"):Object(w.__)("Move left"):Object(w.__)("Move up"):"down"===e?"horizontal"===t?Object(w.isRTL)()?Object(w.__)("Move left"):Object(w.__)("Move right"):Object(w.__)("Move down"):null},fa=Object(a.forwardRef)((function(e,t){var n=e.clientIds,r=e.direction,o=e.orientation,c=Object(Fe.a)(e,["clientIds","direction","orientation"]),l=Object(b.useInstanceId)(fa),s=Object(d.castArray)(n).length,f=Object(m.useSelect)((function(e){var t=e("core/block-editor"),c=t.getBlockIndex,i=t.getBlockRootClientId,l=t.getBlockOrder,a=t.getBlock,s=t.getBlockListSettings,u=Object(d.castArray)(n),b=Object(d.first)(u),f=i(b),m=c(b,f),v=c(Object(d.last)(u),f),g=l(f),O=a(b),h=0===m,j=v===g.length-1,k=(s(f)||{}).orientation;return{blockType:O?Object(p.getBlockType)(O.name):null,isDisabled:"up"===r?h:j,rootClientId:f,firstIndex:m,isFirst:h,isLast:j,orientation:o||k}}),[n,r]),g=f.blockType,O=f.isDisabled,h=f.rootClientId,j=f.isFirst,k=f.isLast,y=f.firstIndex,_=f.orientation,E=void 0===_?"vertical":_,C=Object(m.useDispatch)("core/block-editor"),S=C.moveBlocksDown,B=C.moveBlocksUp,I="up"===r?B:S,x="block-editor-block-mover-button__description-".concat(l);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.Button,Object(i.a)({ref:t,className:u()("block-editor-block-mover-button","is-".concat(r,"-button")),icon:da(r,E),label:ba(r,E),"aria-describedby":x},c,{onClick:O?null:function(e){I(n,h),c.onClick&&c.onClick(e)},"aria-disabled":O})),Object(a.createElement)("span",{id:x,className:"block-editor-block-mover-button__description"},function(e,t,n,r,o,c,i){var l=n+1,a=function(e){return"up"===e?"horizontal"===i?Object(w.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===i?Object(w.isRTL)()?"left":"right":"down":null};if(e>1)return function(e,t,n,r,o){var c=t+1;return o<0&&n?Object(w.__)("Blocks cannot be moved up as they are already at the top"):o>0&&r?Object(w.__)("Blocks cannot be moved down as they are already at the bottom"):o<0&&!n?Object(w.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
|
12 |
Object(w._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,c):o>0&&!r?Object(w.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
|
13 |
Object(w._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,c):void 0}(e,n,r,o,c);if(r&&o)return Object(w.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
|
14 |
Object(w.__)("Block %s is the only block, and cannot be moved"),t);if(c>0&&!o){var s=a("down");if("down"===s)return Object(w.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
@@ -23,10 +23,10 @@ Object(w.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l-1
|
|
23 |
Object(w.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l-1)}if(c<0&&r){var b=a("up");if("up"===b)return Object(w.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
24 |
Object(w.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===b)return Object(w.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
25 |
Object(w.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===b)return Object(w.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
26 |
-
Object(w.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(s,g&&g.title,y,j,k,"up"===r?-1:1,E)))})),pa=Object(a.forwardRef)((function(e,t){return Object(a.createElement)(fa,Object(i.a)({direction:"up",ref:t},e))})),ma=Object(a.forwardRef)((function(e,t){return Object(a.createElement)(fa,Object(i.a)({direction:"down",ref:t},e))})),va=Object(a.createContext)({__experimentalFeatures:!1}),ga=function(){return Object(a.useContext)(va)},Oa=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),ha=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(a.createElement)("div",{className:u()(t,"block-editor-warning")},Object(a.createElement)("div",{className:"block-editor-warning__contents"},Object(a.createElement)("p",{className:"block-editor-warning__message"},r),(a.Children.count(n)>0||o)&&Object(a.createElement)("div",{className:"block-editor-warning__actions"},a.Children.count(n)>0&&a.Children.map(n,(function(e,t){return Object(a.createElement)("span",{key:t,className:"block-editor-warning__action"},e)})),o&&Object(a.createElement)(v.DropdownMenu,{className:"block-editor-warning__secondary",icon:Oa,label:Object(w.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(function(){return Object(a.createElement)(v.MenuGroup,null,o.map((function(e,t){return Object(a.createElement)(v.MenuItem,{onClick:e.onClick,key:t},e.title)})))})))))},ja=n(
|
27 |
// translators: Button to fix block content
|
28 |
title:Object(w._x)("Resolve","imperative verb"),onClick:b},i&&{title:Object(w.__)("Convert to HTML"),onClick:t},{title:Object(w.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)}),[b,t,r]);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(ha,{actions:[Object(a.createElement)(v.Button,{key:"recover",onClick:o,isPrimary:!0},Object(w.__)("Attempt Block Recovery"))],secondaryActions:m},Object(w.__)("This block contains unexpected or invalid content.")),u&&Object(a.createElement)(v.Modal,{title:// translators: Dialog title to fix block content
|
29 |
-
Object(w.__)("Resolve Block"),onRequestClose:f,className:"block-editor-block-compare"},Object(a.createElement)(ya,{block:c,onKeep:t,onConvert:n,convertor:_a,convertButtonText:Object(w.__)("Convert to Blocks")})))})),Ca=Object(a.createElement)(ha,{className:"block-editor-block-list__block-crash-warning"},Object(w.__)("This block has encountered an error and cannot be previewed.")),wa=function(){return Ca};var Sa=function(e){Object(Mn.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Vn.a)(t);if(n){var o=Object(Vn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Fn.a)(this,e)});function o(){var e;return Object(An.a)(this,o),(e=r.apply(this,arguments)).state={hasError:!1},e}return Object(Rn.a)(o,[{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}}]),o}(a.Component),Ba=n(101),Ia=n.n(Ba),xa=function(e){var t=e.clientId,n=Object(a.useState)(""),r=Object(Me.a)(n,2),o=r[0],c=r[1],i=Object(m.useSelect)((function(e){return e("core/block-editor").getBlock(t)}),[t]),l=Object(m.useDispatch)("core/block-editor").updateBlock;return Object(a.useEffect)((function(){c(Object(p.getBlockContent)(i))}),[i]),Object(a.createElement)(Ia.a,{className:"block-editor-block-list__block-html-textarea",value:o,onBlur:function(){var e=Object(p.getBlockType)(i.name),n=Object(p.getBlockAttributes)(e,o,i.attributes),r=o||Object(p.getSaveContent)(e,n),a=!o||Object(p.isValidBlockContent)(e,n,r);l(t,{attributes:n,originalContent:r,isValid:a}),o||c({content:r})},onChange:function(e){return c(e.target.value)}})},Pa=n(68),Ta=n(185),Na=[Object(a.createInterpolateElement)(Object(w.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:Object(a.createElement)("kbd",null)}),Object(a.createInterpolateElement)(Object(w.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:Object(a.createElement)("kbd",null)}),Object(a.createInterpolateElement)(Object(w.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:Object(a.createElement)("kbd",null)}),Object(w.__)("Drag files into the editor to automatically insert media blocks."),Object(w.__)("Change a block's type by pressing the block icon on the toolbar.")],Da=function(){var e=Object(a.useState)(Math.floor(Math.random()*Na.length)),t=Object(Me.a)(e,1)[0];return Object(a.createElement)(v.Tip,null,Na[t])},Aa=n(144),Ra=n(143),La=n(259),Ma=function e(t){var n=t.className,r=t.onChange,o=t.value,c=t.placeholder,i=Object(b.useInstanceId)(e),l=Object(a.useRef)();return Object(a.createElement)("div",{className:u()("block-editor-inserter__search",n)},Object(a.createElement)(v.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-".concat(i)},c),Object(a.createElement)("input",{ref:l,className:"block-editor-inserter__search-input",id:"block-editor-inserter__search-".concat(i),type:"search",placeholder:c,onChange:function(e){return r(e.target.value)},autoComplete:"off",value:o||""}),Object(a.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(a.createElement)(v.Button,{icon:Aa.a,label:Object(w.__)("Reset search"),onClick:function(){r(""),l.current.focus()}}),!o&&Object(a.createElement)(Ra.a,{icon:La.a})))},Fa=n(37),Va=n.n(Fa),Ha=function(e){var t=e.title,n=e.icon,r=e.description,o=e.blockType;return o&&(Va()("`blockType` property in `BlockCard component`",{alternative:"`title, icon and description` properties"}),t=o.title,n=o.icon,r=o.description),Object(a.createElement)("div",{className:"block-editor-block-card"},Object(a.createElement)(Mr,{icon:n,showColors:!0}),Object(a.createElement)("div",{className:"block-editor-block-card__content"},Object(a.createElement)("h2",{className:"block-editor-block-card__title"},t),Object(a.createElement)("span",{className:"block-editor-block-card__description"},r)))};function za(e){var t=e.clientId,n=void 0===t?null:t,r=e.value,o=e.selectionStart,c=e.selectionEnd,i=e.onChange,l=void 0===i?d.noop:i,s=e.onInput,u=void 0===s?d.noop:s,b=Object(m.useRegistry)(),f=b.dispatch("core/block-editor"),v=f.resetBlocks,g=f.resetSelection,O=f.replaceInnerBlocks,h=f.setHasControlledInnerBlocks,j=f.__unstableMarkNextChangeAsNotPersistent,k=b.select("core/block-editor"),y=k.getBlockName,_=k.getBlocks,E=Object(a.useRef)({incoming:null,outgoing:[]}),C=Object(a.useRef)(!1),w=Object(a.useRef)(u),S=Object(a.useRef)(l);Object(a.useEffect)((function(){w.current=u,S.current=l}),[u,l]),Object(a.useEffect)((function(){E.current.outgoing.includes(r)?Object(d.last)(E.current.outgoing)===r&&(E.current.outgoing=[]):_(n)!==r&&(E.current.outgoing=[],function(){if(r)if(j(),n){h(n,!0),j();var e=r.map((function(e){return Object(p.cloneBlock)(e)}));C.current&&(E.current.incoming=e),O(n,e)}else C.current&&(E.current.incoming=r),v(r)}(),o&&c&&g(o,c))}),[r,n]),Object(a.useEffect)((function(){var e=b.select("core/block-editor"),t=e.getSelectionStart,r=e.getSelectionEnd,o=e.isLastBlockChangePersistent,c=e.__unstableIsLastBlockChangeIgnored,i=_(n),l=o(),a=!1;C.current=!0;var s=b.subscribe((function(){if(null===n||null!==y(n)){var e=o(),s=_(n),u=s!==i;if(i=s,u&&(E.current.incoming||c()))return E.current.incoming=null,void(l=e);(u||a&&!u&&e&&!l)&&(l=e,E.current.outgoing.push(i),(l?S.current:w.current)(i,{selectionStart:t(),selectionEnd:r()})),a=u}}));return function(){return s()}}),[b,n])}var Ga,Ua=Object(b.createHigherOrderComponent)((function(e){return Object(m.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object(Fe.a)(t,["useSubRegistry","registry"]);if(!r)return Object(a.createElement)(e,Object(i.a)({registry:o},c));var l=Object(a.useState)(null),s=Object(Me.a)(l,2),u=s[0],d=s[1];return Object(a.useEffect)((function(){var e=Object(m.createRegistry)({},o);e.registerStore("core/block-editor",xl),d(e)}),[o]),u?Object(a.createElement)(m.RegistryProvider,{value:u},Object(a.createElement)(e,Object(i.a)({registry:u},c))):null}))}),"withRegistryProvider")((function(e){var t=e.children,n=e.settings,r=Object(m.useDispatch)("core/block-editor").updateSettings;return Object(a.useEffect)((function(){r(n)}),[n]),za(e),t}));function Wa(e){var t=e.onClick;return Object(a.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},Object(a.createElement)(v.Disabled,null,Object(a.createElement)(Ku,null)))}var Ka=function(e){var t=e.viewportWidth,n=e.__experimentalPadding,r=Object(b.useResizeObserver)(),o=Object(Me.a)(r,2),c=o[0],i=o[1].width,l=Object(b.useResizeObserver)(),s=Object(Me.a)(l,2),u=s[0],d=s[1].height;Ga=Ga||Object(b.pure)(Ku);var f=(i-2*n)/t;return Object(a.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:d*f+2*n}},c,Object(a.createElement)(v.Disabled,{style:{transform:"scale(".concat(f,")"),width:t,left:n,right:n,top:n},className:"block-editor-block-preview__content"},u,Object(a.createElement)(Ga,null)))},qa=Object(a.memo)((function(e){var t=e.blocks,n=e.__experimentalPadding,r=void 0===n?0:n,o=e.viewportWidth,c=void 0===o?1200:o,i=e.__experimentalLive,l=void 0!==i&&i,s=e.__experimentalOnClick,u=Object(m.useSelect)((function(e){return e("core/block-editor").getSettings()}),[]),b=Object(a.useMemo)((function(){return Object(d.castArray)(t)}),[t]);return t&&0!==t.length?Object(a.createElement)(Ua,{value:b,settings:u},l?Object(a.createElement)(Wa,{onClick:s}):Object(a.createElement)(Ka,{viewportWidth:c,__experimentalPadding:r})):null}));function $a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ya(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$a(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Xa=function(e){var t,n,r=e.item,o=r.name,c=r.title,i=r.icon,l=r.description,s=r.initialAttributes,u=Object(p.getBlockType)(o),d=Object(p.isReusableBlock)(r);return Object(a.createElement)("div",{className:"block-editor-inserter__preview-container"},Object(a.createElement)("div",{className:"block-editor-inserter__preview"},d||u.example?Object(a.createElement)("div",{className:"block-editor-inserter__preview-content"},Object(a.createElement)(qa,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=u.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:u.example?Object(p.getBlockFromExample)(r.name,{attributes:Ya(Ya({},u.example.attributes),s),innerBlocks:u.example.innerBlocks}):Object(p.createBlock)(o,s)})):Object(a.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},Object(w.__)("No Preview Available."))),!d&&Object(a.createElement)(Ha,{title:c,icon:i,description:l}))},Qa=Object(a.createElement)(S.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(a.createElement)(S.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function Za(e){var t=e.count,n=e.icon;return Object(a.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},Object(a.createElement)("div",{className:"block-editor-block-draggable-chip"},Object(a.createElement)(v.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},Object(a.createElement)(v.FlexItem,null,n?Object(a.createElement)(Mr,{icon:n}):Object(w.sprintf)(
|
30 |
/* translators: %d: Number of blocks. */
|
31 |
Object(w._n)("%d block","%d blocks",t),t)),Object(a.createElement)(v.FlexItem,null,Object(a.createElement)(Mr,{icon:Qa})))))}var Ja=function(e){var t=e.isEnabled,n=e.blocks,r=e.icon,o=e.children,c={type:"inserter",blocks:n};return Object(a.createElement)(v.Draggable,{transferData:c,__experimentalDragComponent:Object(a.createElement)(Za,{count:n.length,icon:r})},(function(e){var n=e.onDraggableStart,r=e.onDraggableEnd;return o({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?r:void 0})}))},es=Object(a.memo)((function(e){var t=e.className,n=e.composite,r=e.item,o=e.onSelect,c=e.onHover,l=e.isDraggable,s=Object(Fe.a)(e,["className","composite","item","onSelect","onHover","isDraggable"]),d=Object(a.useRef)(!1),b=r.icon?{backgroundColor:r.icon.background,color:r.icon.foreground}:{},f=Object(a.useMemo)((function(){return[Object(p.createBlock)(r.name,r.initialAttributes,Object(p.createBlocksFromInnerBlocksTemplate)(r.innerBlocks))]}),[r.name,r.initialAttributes,r.initialAttributes]);return Object(a.createElement)(Ja,{isEnabled:l&&!r.disabled,blocks:f,icon:r.icon},(function(e){var l=e.draggable,f=e.onDragStart,p=e.onDragEnd;return Object(a.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:l,onDragStart:function(e){d.current=!0,f&&(c(null),f(e))},onDragEnd:function(e){d.current=!1,p&&p(e)}},Object(a.createElement)(v.__unstableCompositeItem,Object(i.a)({role:"option",as:v.Button},n,{className:u()("block-editor-block-types-list__item",t),disabled:r.isDisabled,onClick:function(e){e.preventDefault(),o(r),c(null)},onFocus:function(){d.current||c(r)},onMouseEnter:function(){d.current||c(r)},onMouseLeave:function(){return c(null)},onBlur:function(){return c(null)},focusable:!0},s),Object(a.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:b},Object(a.createElement)(Mr,{icon:r.icon,showColors:!0})),Object(a.createElement)("span",{className:"block-editor-block-types-list__item-title"},r.title)))}))})),ts=function(e){var t=e.items,n=void 0===t?[]:t,r=e.onSelect,o=e.onHover,c=void 0===o?function(){}:o,l=e.children,s=e.label,u=e.isDraggable,d=void 0===u||u,b=Object(v.__unstableUseCompositeState)();return Object(a.createElement)(v.__unstableComposite,Object(i.a)({},b,{role:"listbox",className:"block-editor-block-types-list","aria-label":s}),n.map((function(e){return Object(a.createElement)(es,{key:e.id,item:e,className:Object(p.getBlockMenuDefaultClassName)(e.id),onSelect:r,onHover:c,composite:b,isDraggable:d})})),l)},ns=function(e){var t=e.title,n=e.icon,r=e.children;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"block-editor-inserter__panel-header"},Object(a.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),Object(a.createElement)(v.Icon,{icon:n})),Object(a.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};function rs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var os=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.showMostUsedBlocks,c=Rr(t,n),i=Object(Me.a)(c,4),s=i[0],u=i[1],b=i[2],f=i[3],p=Object(a.useMemo)((function(){return Object(d.orderBy)(s,["frecency"],["desc"]).slice(0,6)}),[s]),m=Object(a.useMemo)((function(){return s.filter((function(e){return!e.category}))}),[s]),v=Object(a.useMemo)((function(){var e=function(e){return Object(d.findIndex)(u,(function(t){return t.slug===e.category}))};return Object(d.flow)((function(e){return e.filter((function(e){return e.category&&"reusable"!==e.category}))}),(function(t){return Object(d.sortBy)(t,e)}),(function(e){return Object(d.groupBy)(e,"category")}))(s)}),[s,u]),g=Object(a.useMemo)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rs(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},b);return Object.keys(b).forEach((function(t){e[t]=s.filter((function(e){return function(e){return e.name.split("/")[0]}(e)===t})),0===e[t].length&&delete e[t]})),e}),[s,b]);return Object(a.useEffect)((function(){return function(){return r(null)}}),[]),Object(a.createElement)("div",null,o&&!!p.length&&Object(a.createElement)(ns,{title:Object(w._x)("Most used","blocks")},Object(a.createElement)(ts,{items:p,onSelect:f,onHover:r,label:Object(w._x)("Most used","blocks")})),Object(d.map)(u,(function(e){var t=v[e.slug];return t&&t.length?Object(a.createElement)(ns,{key:e.slug,title:e.title,icon:e.icon},Object(a.createElement)(ts,{items:t,onSelect:f,onHover:r,label:e.title})):null})),!m.length&&Object(a.createElement)(ns,{className:"block-editor-inserter__uncategorized-blocks-panel",title:Object(w.__)("Uncategorized")},Object(a.createElement)(ts,{items:m,onSelect:f,onHover:r,label:Object(w.__)("Uncategorized")})),Object(d.map)(b,(function(e,t){var n=g[t];return n&&n.length?Object(a.createElement)(ns,{key:t,title:e.title,icon:e.icon},Object(a.createElement)(ts,{items:n,onSelect:f,onHover:r,label:e.title})):null})))},cs=function(e){var t,n=e.selectedCategory,r=e.patternCategories,o=e.onClickCategory,c=e.children;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:u()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns")},Object(a.createElement)(v.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:Object(w.__)("Filter patterns"),hideLabelFromVision:!0,value:n.name,onChange:function(e){o(r.find((function(t){return e===t.name})))},options:(t=[],r.map((function(e){return t.push({value:e.name,label:e.label})})),t)})),Object(a.createElement)("div",{className:"block-editor-inserter__panel-content"},c))},is=n(51),ls=function(e){var t=Object(m.useSelect)((function(e){var t=e("core/block-editor").getSettings();return{patterns:t.__experimentalBlockPatterns,patternCategories:t.__experimentalBlockPatternCategories}}),[]),n=t.patternCategories,r=t.patterns,o=Object(m.useDispatch)(is.store).createSuccessNotice;return[r,n,Object(a.useCallback)((function(t,n){e(Object(d.map)(n,(function(e){return Object(p.cloneBlock)(e)})),t.name),o(Object(w.sprintf)(
|
32 |
/* translators: %s: block pattern title. */
|
@@ -58,14 +58,14 @@ var E=Object(w.sprintf)(Object(w.__)("Block: %s"),k);Yu(o,s),id(o,s),oa(o,b||m,b
|
|
58 |
Object(w.__)("Block %1$d of %2$d, Level %3$d"),e,t,n)},hd=Object(a.forwardRef)((function e(t,n){var r=t.className,o=t.block.clientId,c=t.isSelected,i=t.onClick,l=t.position,s=t.siblingBlockCount,d=t.level,f=t.tabIndex,p=t.onFocus,m=t.onDragStart,g=t.onDragEnd,O=t.draggable,h=Tl(o),j=Object(b.useInstanceId)(e),k="block-navigation-block-select-button__".concat(j),y=Od(l,s,d);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.Button,{className:u()("block-editor-block-navigation-block-select-button",r),onClick:i,"aria-describedby":k,ref:n,tabIndex:f,onFocus:p,onDragStart:m,onDragEnd:g,draggable:O},Object(a.createElement)(gd,{level:d}),Object(a.createElement)(Mr,{icon:null==h?void 0:h.icon,showColors:!0}),Object(a.createElement)(Nl,{clientId:o}),c&&Object(a.createElement)(v.VisuallyHidden,null,Object(w.__)("(selected block)"))),Object(a.createElement)("div",{className:"block-editor-block-navigation-block-select-button__description",id:k},y))}));function jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jd(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yd=function(e){return"BlockNavigationBlock-".concat(e)},_d=Object(a.forwardRef)((function e(t,n){var r=Object(b.useInstanceId)(e),o=t.block.clientId;return Object(a.createElement)(v.Slot,{name:yd(o)},(function(e){if(!e.length)return Object(a.createElement)(hd,Object(i.a)({ref:n},t));var o=t.className,c=t.block,l=t.isSelected,s=t.position,d=t.siblingBlockCount,b=t.level,f=t.tabIndex,m=t.onFocus,g=c.name,O=Object(p.getBlockType)(g),h="block-navigation-block-slot__".concat(r),j=Od(s,d,b),k={tabIndex:f,onFocus:m,ref:n,"aria-describedby":h};return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:u()("block-editor-block-navigation-block-slot",o)},Object(a.createElement)(Mr,{icon:O.icon,showColors:!0}),a.Children.map(e,(function(e){return Object(a.cloneElement)(e,kd(kd({},e.props),k))})),l&&Object(a.createElement)(v.VisuallyHidden,null,Object(w.__)("(selected block)")),Object(a.createElement)("div",{className:"block-editor-block-navigation-block-slot__description",id:h},j)))}))})),Ed=function(e){var t=Object(a.useContext)(bd).clientId;return Object(a.createElement)(v.Fill,Object(i.a)({},e,{name:yd(t)}))},Cd=Object(a.forwardRef)((function(e,t){var n=e.onClick,r=e.block,o=e.isSelected,c=e.position,l=e.siblingBlockCount,s=e.level,d=Object(Fe.a)(e,["onClick","block","isSelected","position","siblingBlockCount","level"]),b=ga(),f=b.__experimentalFeatures,p=b.blockDropTarget,v=void 0===p?{}:p,g=r.clientId,O=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockRootClientId,r=t.hasBlockMovingClientId,o=t.getSelectedBlockClientId;return{rootClientId:n(g)||"",blockMovingClientId:r(),selectedBlockInBlockEditor:o()}}),[g]),h=O.rootClientId,j=O.blockMovingClientId,k=O.selectedBlockInBlockEditor,y=j&&k===g,_=v.rootClientId,E=v.clientId,C=v.dropPosition,w=_===h&&E===g&&"top"===C,S=_===h&&E===g&&"bottom"===C,B=_===g&&"inside"===C,I=u()("block-editor-block-navigation-block-contents",{"is-dropping-before":w||y,"is-dropping-after":S,"is-dropping-to-inner-blocks":B});return Object(a.createElement)(Ys,{clientIds:[r.clientId],elementId:"block-navigation-block-".concat(r.clientId)},(function(e){var u=e.draggable,b=e.onDragStart,p=e.onDragEnd;return f?Object(a.createElement)(_d,Object(i.a)({ref:t,className:I,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:l,level:s,draggable:u&&f,onDragStart:b,onDragEnd:p},d)):Object(a.createElement)(hd,Object(i.a)({ref:t,className:I,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:l,level:s,draggable:u&&f,onDragStart:b,onDragEnd:p},d))}))}));function wd(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Sd(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sd(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}function Sd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bd(e){var t=e.block,n=e.isSelected,r=e.onClick,o=e.position,c=e.level,i=e.rowCount,l=e.siblingBlockCount,s=e.showBlockMovers,d=e.path,b=Object(a.useRef)(null),f=Object(a.useState)(!1),p=Object(Me.a)(f,2),g=p[0],O=p[1],h=Object(a.useState)(!1),j=Object(Me.a)(h,2),k=j[0],y=j[1],_=t.clientId,E=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.isBlockBeingDragged,r=t.isAncestorBeingDragged,o=t.getBlockParents;return{isDragging:n(_)||r(_),blockParents:o(_)}}),[_]),C=E.isDragging,S=E.blockParents,B=Object(m.useDispatch)("core/block-editor").selectBlock,I=s&&l>0,x=g||k,P=u()("block-editor-block-navigation-block__mover-cell",{"is-visible":x}),T=ga().__experimentalFeatures,N=u()("block-editor-block-navigation-block__menu-cell",{"is-visible":x});return Object(a.useEffect)((function(){T&&n&&b.current.focus()}),[T,n]),Object(a.createElement)(ia,{className:u()({"is-selected":n,"is-dragging":C}),onMouseEnter:function(){return O(!0)},onMouseLeave:function(){return O(!1)},onFocus:function(){return y(!0)},onBlur:function(){return y(!1)},level:c,position:o,rowCount:i,path:d,id:"block-navigation-block-".concat(_),"data-block":_},Object(a.createElement)(v.__experimentalTreeGridCell,{className:"block-editor-block-navigation-block__contents-cell",colSpan:I?void 0:2,ref:b},(function(e){var i=e.ref,s=e.tabIndex,u=e.onFocus;return Object(a.createElement)("div",{className:"block-editor-block-navigation-block__contents-container"},Object(a.createElement)(Cd,{block:t,onClick:function(){return r(t.clientId)},isSelected:n,position:o,siblingBlockCount:l,level:c,ref:i,tabIndex:s,onFocus:u}))})),I&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.__experimentalTreeGridCell,{className:P,withoutGridItem:!0},Object(a.createElement)(v.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(a.createElement)(pa,{orientation:"vertical",clientIds:[_],ref:t,tabIndex:n,onFocus:r})})),Object(a.createElement)(v.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(a.createElement)(ma,{orientation:"vertical",clientIds:[_],ref:t,tabIndex:n,onFocus:r})})))),T&&Object(a.createElement)(v.__experimentalTreeGridCell,{className:N},(function(e){var t=e.ref,n=e.tabIndex,o=e.onFocus;return Object(a.createElement)(Tu,{clientIds:[_],icon:Jl.a,toggleProps:{ref:t,tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:r},(function(e){var t=e.onClose;return Object(a.createElement)(v.MenuGroup,null,Object(a.createElement)(v.MenuItem,{onClick:Object(Zl.a)(Zc.a.mark((function e(){var n,r,o;return Zc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!S.length){e.next=20;break}n=wd(S),e.prev=2,n.s();case 4:if((r=n.n()).done){e.next=10;break}return o=r.value,e.next=8,B(o);case 8:e.next=4;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:e.next=22;break;case 20:return e.next=22,B(null);case 22:return e.next=24,B(_);case 24:t();case 25:case"end":return e.stop()}}),e,null,[[2,12,15,18]])})))},Object(w.__)("Go to block")))}))})))}function Id(e){var t=e.parentBlockClientId,n=e.position,r=e.level,o=e.rowCount,c=e.path,i=Object(m.useSelect)((function(e){var n=e("core/block-editor"),r=n.isBlockBeingDragged,o=n.isAncestorBeingDragged;return r(t)||o(t)}),[t]),l=Object(b.useInstanceId)(Id),s="block-navigation-appender-row__description_".concat(l),d=Object(w.sprintf)(
|
59 |
/* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
|
60 |
Object(w.__)("Add block at position %1$d, Level %2$d"),n,r);return Object(a.createElement)(ia,{className:u()({"is-dragging":i}),level:r,position:n,rowCount:o,path:c},Object(a.createElement)(v.__experimentalTreeGridCell,{className:"block-editor-block-navigation-appender__cell",colSpan:"3"},(function(e){var n=e.ref,o=e.tabIndex,c=e.onFocus;return Object(a.createElement)("div",{className:"block-editor-block-navigation-appender__container"},Object(a.createElement)(gd,{level:r}),Object(a.createElement)(Ps,{rootClientId:t,__experimentalIsQuick:!0,__experimentalSelectBlockOnInsert:!1,"aria-describedby":s,toggleProps:{ref:n,tabIndex:o,onFocus:c}}),Object(a.createElement)("div",{className:"block-editor-block-navigation-appender__description",id:s},d))})))}function xd(e){var t=e.blocks,n=e.selectBlock,r=e.selectedBlockClientId,o=e.showAppender,c=e.showBlockMovers,i=e.showNestedBlocks,l=e.parentBlockClientId,s=e.level,u=void 0===s?1:s,b=e.terminatedLevels,f=void 0===b?[]:b,p=e.path,m=void 0===p?[]:p,v=!l,g=Object(d.compact)(t),O=function(e){return o&&!v&&r===e},h=O(l),j=g.length,k=h?j+1:j,y=k;return Object(a.createElement)(a.Fragment,null,Object(d.map)(g,(function(e,t){var l=e.clientId,s=e.innerBlocks,d=t+1,b=k===d?[].concat(Object(pe.a)(f),[u]):f,p=[].concat(Object(pe.a)(m),[d]),v=i&&!!s&&!!s.length,g=O(l);return Object(a.createElement)(a.Fragment,{key:l},Object(a.createElement)(Bd,{block:e,onClick:n,isSelected:r===l,level:u,position:d,rowCount:k,siblingBlockCount:j,showBlockMovers:c,terminatedLevels:f,path:p}),(v||g)&&Object(a.createElement)(xd,{blocks:s,selectedBlockClientId:r,selectBlock:n,showAppender:o,showBlockMovers:c,showNestedBlocks:i,parentBlockClientId:l,level:u+1,terminatedLevels:b,path:p}))})),h&&Object(a.createElement)(Id,{parentBlockClientId:l,position:k,rowCount:y,level:u,terminatedLevels:f,path:[].concat(Object(pe.a)(m),[y])}))}function Pd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Td(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nd(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}xd.defaultProps={selectBlock:function(){}};var Dd=["top","bottom"];function Ad(e){var t=Object(a.useState)(),n=Object(Me.a)(t,2),r=n[0],o=void 0===r?{}:r,c=n[1],i=Fs(o.rootClientId,o.blockIndex),s=Object(v.__unstableUseDropZone)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pd(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({element:e,withPosition:!0},i)),u=s.position,d=s.type,b=function(e,t,n){var r=Object(m.useSelect)((function(e){var t=e("core/block-editor");return{canInsertBlocks:t.canInsertBlocks,getBlockRootClientId:t.getBlockRootClientId,getBlockIndex:t.getBlockIndex,getBlockCount:t.getBlockCount,getDraggedBlockClientIds:t.getDraggedBlockClientIds}}),[]),o=r.getBlockRootClientId,c=r.getBlockIndex,i=r.getBlockCount,l=r.getDraggedBlockClientIds,s=r.canInsertBlocks,u=Object(a.useRef)(),d=!!t;return Object(a.useEffect)((function(){if(e.current&&d){var t="default"===n,r=t?l():void 0,a=Array.from(e.current.querySelectorAll("[data-block]"));u.current=a.map((function(e){var n=e.dataset.block,l=o(n);return{clientId:n,rootClientId:l,blockIndex:c(n,l),element:e,isDraggedBlock:!!t&&r.includes(n),innerBlockCount:i(n),canInsertDraggedBlocksAsSibling:!t||s(r,l),canInsertDraggedBlocksAsChild:!t||s(r,n)}}))}}),[e,d,n,s,i,c,o,l]),u}(e,u,d);if(Object(a.useEffect)((function(){if(u){var e=function(e,t){var n,r,o,c,i,l=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Td(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Td(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}(e);try{for(l.s();!(i=l.n()).done;){var a=i.value;if(!a.isDraggedBlock){var s=a.element.getBoundingClientRect(),u=Hs(t,s,Dd),d=Object(Me.a)(u,2),b=d[0],f=d[1],p=Nd(t,s);if(void 0===o||b<o||p){o=b;var m=e.indexOf(a),v=e[m-1];if("top"===f&&v&&v.rootClientId===a.rootClientId&&!v.isDraggedBlock?(r=v,n="bottom",c=v.element.getBoundingClientRect()):(r=a,n=f,c=s),p)break}}}}catch(e){l.e(e)}finally{l.f()}if(r){var g="bottom"===n;if(g&&r.canInsertDraggedBlocksAsChild&&(r.innerBlockCount>0||function(e,t){var n=t.left+t.width/2;return e.x>n}(t,c)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(r.canInsertDraggedBlocksAsSibling){var O=g?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+O,dropPosition:n}}}}(b.current,u);e&&c(e)}}),[b,u]),u)return o}function Rd(e){var t=e.__experimentalFeatures,n=Object(Fe.a)(e,["__experimentalFeatures"]),r=Object(a.useRef)(),o=Ad(r);t||(o=void 0);var c=Object(a.useMemo)((function(){return{__experimentalFeatures:t,blockDropTarget:o}}),[t,o]);return Object(a.createElement)(v.__experimentalTreeGrid,{className:"block-editor-block-navigation-tree","aria-label":Object(w.__)("Block navigation structure"),ref:r},Object(a.createElement)(va.Provider,{value:c},Object(a.createElement)(xd,n)))}var Ld=Object(b.compose)(Object(m.withSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getBlockHierarchyRootClientId,o=t.__unstableGetBlockWithBlockTree,c=t.__unstableGetBlockTree,i=n();return{rootBlocks:c(),rootBlock:i?o(r(i)):null,selectedBlockClientId:i}})),Object(m.withDispatch)((function(e,t){var n=t.onSelect,r=void 0===n?d.noop:n;return{selectBlock:function(t){e("core/block-editor").selectBlock(t),r(t)}}})))((function(e){var t=e.rootBlock,n=e.rootBlocks,r=e.selectedBlockClientId,o=e.selectBlock,c=e.__experimentalFeatures;if(!n||0===n.length)return null;var i=t&&(t.clientId!==r||t.innerBlocks&&0!==t.innerBlocks.length);return Object(a.createElement)("div",{className:"block-editor-block-navigation__container"},Object(a.createElement)("p",{className:"block-editor-block-navigation__label"},Object(w.__)("List view")),Object(a.createElement)(Rd,{blocks:i?[t]:n,selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c,showNestedBlocks:!0}))})),Md=Object(a.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},Object(a.createElement)(v.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));function Fd(e){var t=e.isEnabled,n=e.onToggle,r=e.isOpen,o=e.innerRef,c=Object(Fe.a)(e,["isEnabled","onToggle","isOpen","innerRef"]);Object(Ql.useShortcut)("core/edit-post/toggle-block-navigation",Object(a.useCallback)(n,[n]),{bindGlobal:!0,isDisabled:!t});var l=Object(m.useSelect)((function(e){return e(Ql.store).getShortcutRepresentation("core/edit-post/toggle-block-navigation")}),[]);return Object(a.createElement)(v.Button,Object(i.a)({},c,{ref:o,icon:Md,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0
|
61 |
-
/* translators: button label text should, if possible, be under 16 characters. */,label:Object(w.__)("Outline"),className:"block-editor-block-navigation",shortcut:l,"aria-disabled":!t}))}var Vd=Object(a.forwardRef)((function(e,t){var n=e.isDisabled,r=e.__experimentalFeatures,o=Object(Fe.a)(e,["isDisabled","__experimentalFeatures"]),c=Object(m.useSelect)((function(e){return!!e("core/block-editor").getBlockCount()}),[])&&!n;return Object(a.createElement)(v.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(a.createElement)(Fd,Object(i.a)({},o,{innerRef:t,isOpen:n,onToggle:r,isEnabled:c}))},renderContent:function(e){var t=e.onClose;return Object(a.createElement)(Ld,{onSelect:t,__experimentalFeatures:r})}})})),Hd=n(
|
62 |
-
/* translators: button label text should, if possible, be under 16 characters. */,label:Object(w.__)("More"),toggleProps:t,controls:Object(d.orderBy)(e.map((function(e){return Object(Me.a)(e,1)[0].props})),"title"),popoverProps:Kd})}))}))))},$d=function(e){var t=e.inline,n=e.anchorRef;return t?Object(a.createElement)(v.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},Object(a.createElement)(qd,null)):Object(a.createElement)(Xl,null,Object(a.createElement)(qd,null))};function Yd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yd(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qd(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function Zd(e){var t=e.allowedFormats,n=e.formattingControls;return e.disableFormats?Zd.EMPTY_ARRAY:t||n?t||(Va()("wp.blockEditor.RichText formattingControls prop",{alternative:"allowedFormats"}),n.map((function(e){return"core/".concat(e)}))):void 0}Zd.EMPTY_ARRAY=[];var Jd=Object(a.forwardRef)((function e(t,n){var r=t.children,o=t.tagName,l=t.value,s=t.onChange,d=t.isSelected,f=t.multiline,v=t.inlineToolbar,g=t.wrapperClassName,O=t.autocompleters,j=t.onReplace,k=t.placeholder,y=t.keepPlaceholderOnFocus,_=t.allowedFormats,E=t.formattingControls,C=t.withoutInteractiveFormatting,w=t.onRemove,S=t.onMerge,B=t.onSplit,I=t.__unstableOnSplitAtEnd,x=t.__unstableOnSplitMiddle,P=t.identifier,T=t.preserveWhiteSpace,N=t.__unstablePastePlainText,D=t.__unstableEmbedURLOnPaste,A=t.__unstableDisableFormats,R=t.disableLineBreaks,L=t.unstableOnFocus,M=t.__unstableAllowPrefixTransformations,F=t.__unstableMultilineRootTag,V=t.__unstableMobileNoFocusOnMount,H=t.deleteEnter,z=t.placeholderTextColor,G=t.textAlign,U=t.selectionColor,W=t.tagsToEliminate,K=t.rootTagsToEliminate,q=t.disableEditingMenu,$=t.fontSize,Y=t.fontFamily,X=t.fontWeight,Q=t.fontStyle,Z=t.minWidth,J=t.maxWidth,ee=t.onBlur,te=t.setRef,ne=Object(Fe.a)(t,["children","tagName","value","onChange","isSelected","multiline","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","keepPlaceholderOnFocus","allowedFormats","formattingControls","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","__unstableOnSplitMiddle","identifier","preserveWhiteSpace","__unstablePastePlainText","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableMultilineRootTag","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","setRef"]),re=Object(b.useInstanceId)(e);P=P||re;var oe=Object(a.useRef)(),ce=n||oe,ie=h(),le=ie.clientId,ae=ie.onCaretVerticalPositionChange,se=ie.isSelected,ue=Object(m.useSelect)((function(e){var t,n=e("core/block-editor"),r=n.isCaretWithinFormattedText,o=n.getSelectionStart,c=n.getSelectionEnd,i=n.getSettings,l=n.didAutomaticChange,s=n.__unstableGetBlockWithoutInnerBlocks,u=n.isMultiSelecting,b=n.hasMultiSelection,f=o(),m=c(),v=i().__experimentalUndo;void 0===d?t=f.clientId===le&&f.attributeKey===P:d&&(t=f.clientId===le);var g={};if("native"===a.Platform.OS){var O=le&&s(le);g={shouldBlurOnUnmount:O&&t&&Object(p.isUnmodifiedDefaultBlock)(O)}}return Xd({isCaretWithinFormattedText:r(),selectionStart:t?f.offset:void 0,selectionEnd:t?m.offset:void 0,isSelected:t,didAutomaticChange:l(),disabled:u()||b(),undo:v},g)})),de=ue.isCaretWithinFormattedText,be=ue.selectionStart,fe=ue.selectionEnd,me=ue.isSelected,ve=ue.didAutomaticChange,ge=ue.disabled,Oe=ue.undo,he=ue.shouldBlurOnUnmount,je=Object(m.useDispatch)("core/block-editor"),ke=je.__unstableMarkLastChangeAsPersistent,ye=je.enterFormattedText,_e=je.exitFormattedText,Ee=je.selectionChange,Ce=je.__unstableMarkAutomaticChange,we=Qd(f),Se=Zd({allowedFormats:_,formattingControls:E,disableFormats:A}),Be=!Se||Se.length>0,Ie=l,xe=s;Array.isArray(l)&&(Ie=p.children.toHTML(l),xe=function(e){return s(p.children.fromDOM(Object(c.__unstableCreateElement)(document,e).childNodes))});var Pe=Object(a.useCallback)((function(e,t){Ee(le,P,e,t)}),[le,P]),Te=Object(a.useCallback)((function(e){var t=e.value,n=e.isReverse;S&&S(!n),w&&Object(c.isEmpty)(t)&&n&&w(!n)}),[S,w]),Ne=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(j&&B){var n=[],r=Object(c.split)(e),o=Object(Me.a)(r,2),i=o[0],l=o[1],a=t.length>0,s=-1;a&&Object(c.isEmpty)(i)||(n.push(B(Object(c.toHTMLString)({value:i,multilineTag:we}))),s+=1),a?(n.push.apply(n,Object(pe.a)(t)),s+=t.length):x&&n.push(x()),(a||x)&&Object(c.isEmpty)(l)||n.push(B(Object(c.toHTMLString)({value:l,multilineTag:we})));var u=a?s:1,d=a?-1:null;j(n,u,d)}}),[j,B,we,x]),De=Object(a.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.shiftKey,o=j&&B;if(j){var i=Object(p.getBlockTransforms)("from").filter((function(e){return"enter"===e.type})),l=Object(p.findTransform)(i,(function(e){return e.regExp.test(t.text)}));l&&(j([l.transform({content:t.text})]),Ce())}if(f)r?R||n(Object(c.insert)(t,"\n")):o&&Object(c.__unstableIsEmptyLine)(t)?Ne(t):n(Object(c.__unstableInsertLineSeparator)(t));else{var a=t.text,s=t.start,u=t.end,d=I&&s===u&&u===a.length;r||!o&&!d?R||n(Object(c.insert)(t,"\n")):!o&&d?I():o&&Ne(t)}}),[j,B,Ce,f,Ne,I]),Ae=Object(a.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.html,i=e.plainText,l=e.files,a=e.activeFormats;if(N)n(Object(c.insert)(t,Object(c.create)({text:i})));else{if(l&&l.length&&!r){var s=Object(p.pasteHandler)({HTML:Wd(l),mode:"BLOCKS",tagName:o,preserveWhiteSpace:T});return window.console.log("Received items:\n\n",l),void(j&&Object(c.isEmpty)(t)?j(s):Ne(t,s))}var u,d=j&&B?"AUTO":"INLINE";"AUTO"===d&&Object(c.isEmpty)(t)&&(u=i,Object(Hd.regexp)(".*").test(u))&&(d="BLOCKS"),D&&Object(c.isEmpty)(t)&&Object(fs.isURL)(i.trim())&&(d="BLOCKS");var b=Object(p.pasteHandler)({HTML:r,plainText:i,mode:d,tagName:o,preserveWhiteSpace:T});if("string"==typeof b){var m=Object(c.create)({html:b});if(a.length)for(var v=m.formats.length;v--;)m.formats[v]=[].concat(Object(pe.a)(a),Object(pe.a)(m.formats[v]||[]));f&&(m=Object(c.replace)(m,/\n+/g,c.__UNSTABLE_LINE_SEPARATOR)),n(Object(c.insert)(t,m))}else b.length>0&&(j&&Object(c.isEmpty)(t)?j(b,b.length-1,-1):Ne(t,b))}}),[o,j,B,Ne,D,f,T,N]),Re=Object(a.useCallback)((function(e,t){if(j){var n=e.start,r=e.text;if(" "===r.slice(n-1,n)){var o=r.slice(0,n).trim(),i=Object(p.getBlockTransforms)("from").filter((function(e){return"prefix"===e.type})),l=Object(p.findTransform)(i,(function(e){var t=e.prefix;return o===t}));if(l){var a=t(Object(c.slice)(e,n,r.length)),s=l.transform(a);j([s]),Ce()}}}}),[j,Ce]),Le=Object(a.createElement)(c.__experimentalRichText,{clientId:le,identifier:P,ref:ce,value:Ie,onChange:xe,selectionStart:be,selectionEnd:fe,onSelectionChange:Pe,tagName:o,placeholder:k,allowedFormats:Se,withoutInteractiveFormatting:C,onEnter:De,onDelete:Te,onPaste:Ae,__unstableIsSelected:me,__unstableInputRule:Re,__unstableMultilineTag:we,__unstableIsCaretWithinFormattedText:de,__unstableOnEnterFormattedText:ye,__unstableOnExitFormattedText:_e,__unstableOnCreateUndoLevel:ke,__unstableMarkAutomaticChange:Ce,__unstableDidAutomaticChange:ve,__unstableUndo:Oe,__unstableDisableFormats:A,preserveWhiteSpace:T,disabled:ge,unstableOnFocus:L,__unstableAllowPrefixTransformations:M,__unstableMultilineRootTag:F,onCaretVerticalPositionChange:ae,blockIsSelected:void 0!==d?d:se,shouldBlurOnUnmount:he,__unstableMobileNoFocusOnMount:V,deleteEnter:H,placeholderTextColor:z,textAlign:G,selectionColor:U,tagsToEliminate:W,rootTagsToEliminate:K,disableEditingMenu:q,fontSize:$,fontFamily:Y,fontWeight:X,fontStyle:Q,minWidth:Z,maxWidth:J,onBlur:ee,setRef:te,id:ne.id,style:ne.style},(function(e){var t=e.isSelected,n=e.value,o=e.onChange,c=e.onFocus,l=e.editableProps,s=e.editableTagName;return Object(a.createElement)(a.Fragment,null,r&&r({value:n,onChange:o,onFocus:c}),t&&Be&&Object(a.createElement)($d,{inline:v,anchorRef:ce.current}),t&&Object(a.createElement)(Ud,null),Object(a.createElement)(Hr,{onReplace:j,completers:O,record:n,onChange:o,isSelected:t,contentRef:ce},(function(e){var t=e.listBoxId,n=e.activeId,r=e.onKeyDown;return Object(a.createElement)(s,Object(i.a)({},l,ne,{style:ne.style?Xd(Xd({},ne.style),l.style):l.style,className:u()("block-editor-rich-text__editable",ne.className,l.className,{"keep-placeholder-on-focus":y}),"aria-autocomplete":t?"list":void 0,"aria-owns":t,"aria-activedescendant":n,onKeyDown:function(e){r(e),l.onKeyDown(e)}}))})))}));return g?(Va()("wp.blockEditor.RichText wrapperClassName prop",{alternative:"className prop or create your own wrapper div"}),Object(a.createElement)("div",{className:u()("block-editor-rich-text",g)},Le)):Le}));Jd.Content=function(e){var t=e.value,n=e.tagName,r=e.multiline,o=Object(Fe.a)(e,["value","tagName","multiline"]);Array.isArray(t)&&(t=p.children.toHTML(t));var c=Qd(r);!t&&c&&(t="<".concat(c,"></").concat(c,">"));var i=Object(a.createElement)(a.RawHTML,null,t);return n?Object(a.createElement)(n,Object(d.omit)(o,["format"]),i):i},Jd.isEmpty=function(e){return!e||0===e.length},Jd.Content.defaultProps={format:"string",value:""};var eb=Jd;function tb(e){var t=e.value,n=e.onChange;return Object(a.createElement)(Ed,null,Object(a.createElement)(eb,{value:t,onChange:n,placeholder:Object(w.__)("Navigation item"),keepPlaceholderOnFocus:!0,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var nb=n(381),rb=function(e){var t=e.icon,n=void 0===t?nb.a:t,r=e.label,o=void 0===r?Object(w.__)("Choose variation"):r,c=e.instructions,i=void 0===c?Object(w.__)("Select a variation to start with."):c,l=e.variations,s=e.onSelect,d=e.allowSkip,b=u()("block-editor-block-variation-picker",{"has-many-variations":l.length>4});return Object(a.createElement)(v.Placeholder,{icon:n,label:o,instructions:i,className:b},Object(a.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(w.__)("Block variations")},l.map((function(e){return Object(a.createElement)("li",{key:e.name},Object(a.createElement)(v.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:function(){return s(e)},className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(a.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))}))),d&&Object(a.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(a.createElement)(v.Button,{isLink:!0,onClick:function(){return s()}},Object(w.__)("Skip"))))},ob=function(e,t){if(t&&e){var n=t.filter((function(t){var n=t.attributes;return!(!n||!Object.keys(n).length)&&Object(d.isMatch)(e,n)}));if(1===n.length)return n[0]}};function cb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ib=function(e){var t=e.blockClientId,n=Object(a.useState)(),r=Object(Me.a)(n,2),o=r[0],c=r[1],i=Object(m.useDispatch)("core/block-editor").updateBlockAttributes,s=Object(m.useSelect)((function(e){var n=e(p.store).getBlockVariations,r=e("core/block-editor"),o=r.getBlockName,c=r.getBlockAttributes,i=t&&o(t);return{variations:i&&n(i,"transform"),blockAttributes:c(t)}}),[t]),u=s.variations,d=s.blockAttributes;if(Object(a.useEffect)((function(){var e;c(null===(e=ob(d,u))||void 0===e?void 0:e.name)}),[d,u]),null==u||!u.length)return null;var b=u.map((function(e){return{value:e.name,label:e.title,info:e.description}})),f=function(e){i(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cb(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},u.find((function(t){return t.name===e})).attributes))},g="block-editor-block-variation-transforms";return Object(a.createElement)(v.DropdownMenu,{className:g,label:Object(w.__)("Transform to variation"),text:Object(w.__)("Transform to variation"),popoverProps:{position:"bottom center",className:"".concat(g,"__popover")},icon:ua.a,toggleProps:{iconPosition:"right"}},(function(){return Object(a.createElement)("div",{className:"".concat(g,"__container")},Object(a.createElement)(v.MenuGroup,null,Object(a.createElement)(v.MenuItemsChoice,{choices:b,value:o,onSelect:f})))}))},lb=Object(a.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(v.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),ab=Object(a.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(v.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"}));function sb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ub(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sb(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var db={top:{icon:Object(a.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(v.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(w._x)("Align top","Block vertical alignment setting")},center:{icon:ab,title:Object(w._x)("Align middle","Block vertical alignment setting")},bottom:{icon:lb,title:Object(w._x)("Align bottom","Block vertical alignment setting")}},bb=["top","center","bottom"],fb={isAlternate:!0},pb=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?bb:r,c=e.isCollapsed,i=void 0===c||c,l=db[t],s=db.top;return Object(a.createElement)(v.ToolbarGroup,{popoverProps:fb,isCollapsed:i,icon:l?l.icon:s.icon,label:Object(w._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((function(e){return ub(ub({},db[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})};function mb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mb(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gb=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=ge("color.palette"),r=!ge("color.custom"),o=void 0===t.colors?n:t.colors,c=void 0===t.disableCustomColors?r:t.disableCustomColors,i=!Object(d.isEmpty)(o)||!c;return Object(a.createElement)(e,vb(vb({},t),{},{colors:o,disableCustomColors:c,hasColorsToChoose:i}))}}),"withColorContext"),Ob=gb(v.ColorPalette);function hb(e){var t=e.onChange,n=e.value,r=Object(Fe.a)(e,["onChange","value"]);return Object(a.createElement)($e,Object(i.a)({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var jb=[];function kb(e){var t=ge("color.gradients")||jb,n=!ge("color.customGradient");return Object(a.createElement)(v.__experimentalGradientPicker,Object(i.a)({gradients:void 0!==e.gradients?e.gradient:t,disableCustomGradients:void 0!==e.disableCustomGradients?e.disableCustomGradients:n},e))}var yb=function(e){var t=void 0!==e.gradients&&void 0!==e.disableCustomGradients?v.__experimentalGradientPicker:kb;return Object(a.createElement)(t,e)};function _b(e){var t=e.className,n=e.value,r=e.onChange,o=e.label,c=void 0===o?Object(w.__)("Gradient Presets"):o,l=Object(Fe.a)(e,["className","value","onChange","label"]),s=ge("color.gradients"),b=!ge("color.customGradient");return Object(d.isEmpty)(s)&&b?null:Object(a.createElement)(v.BaseControl,{className:u()("block-editor-gradient-picker-control",t)},Object(a.createElement)(v.BaseControl.VisualLabel,null,c),Object(a.createElement)(yb,Object(i.a)({value:n,onChange:r,className:"block-editor-gradient-picker-control__gradient-picker-presets",gradients:s,disableCustomGradients:b},l)))}function Eb(e){var t=ge("color.gradients");return Object(d.isEmpty)(t)?null:Object(a.createElement)(v.PanelBody,{title:Object(w.__)("Gradient")},Object(a.createElement)(_b,e))}var Cb=[25,50,75,100];function wb(e){var t,n,r=e.imageWidth,o=e.imageHeight,c=e.imageSizeOptions,i=void 0===c?[]:c,l=e.isResizable,s=void 0===l||l,u=e.slug,b=e.width,f=e.height,p=e.onChange,m=e.onChangeImage,g=void 0===m?d.noop:m;function O(e,t){return function(){p({width:e,height:t})}}return Object(a.createElement)(a.Fragment,null,!Object(d.isEmpty)(i)&&Object(a.createElement)(v.SelectControl,{label:Object(w.__)("Image size"),value:u,options:i,onChange:g}),s&&Object(a.createElement)("div",{className:"block-editor-image-size-control"},Object(a.createElement)("p",{className:"block-editor-image-size-control__row"},Object(w.__)("Image dimensions")),Object(a.createElement)("div",{className:"block-editor-image-size-control__row"},Object(a.createElement)(v.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:Object(w.__)("Width"),value:null!==(t=null!=b?b:r)&&void 0!==t?t:"",min:1,onChange:function(e){return p({width:parseInt(e,10)})}}),Object(a.createElement)(v.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:Object(w.__)("Height"),value:null!==(n=null!=f?f:o)&&void 0!==n?n:"",min:1,onChange:function(e){return p({height:parseInt(e,10)})}})),Object(a.createElement)("div",{className:"block-editor-image-size-control__row"},Object(a.createElement)(v.ButtonGroup,{"aria-label":Object(w.__)("Image size presets")},Cb.map((function(e){var t=Math.round(r*(e/100)),n=Math.round(o*(e/100)),c=b===t&&f===n;return Object(a.createElement)(v.Button,{key:e,isSmall:!0,isPrimary:c,isPressed:c,onClick:O(t,n)},e,"%")}))),Object(a.createElement)(v.Button,{isSmall:!0,onClick:O()},Object(w.__)("Reset")))))}var Sb=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=h().clientId;return Object(a.createElement)(e,Object(i.a)({},t,{clientId:n}))}}),"withClientId"),Bb=Sb((function(e){var t=e.clientId,n=e.showSeparator,r=e.isFloating,o=e.onAddBlock;return Object(a.createElement)(Ns,{rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})})),Ib=Object(b.compose)([Sb,Object(m.withSelect)((function(e,t){var n=t.clientId,r=(0,e("core/block-editor").getBlockOrder)(n);return{lastBlockClientId:Object(d.last)(r)}}))])((function(e){var t=e.clientId,n=e.lastBlockClientId;return Object(a.createElement)(Ts,{rootClientId:t,lastBlockClientId:n})})),xb=n(69),Pb=n.n(xb),Tb=new WeakMap;function Nb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Db(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nb(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ab(e){var t=e.clientId,n=e.allowedBlocks,r=e.template,o=e.templateLock,c=e.wrapperRef,i=e.templateInsertUpdatesSelection,l=e.__experimentalCaptureToolbars,s=e.__experimentalAppenderTagName,u=e.renderAppender,b=e.orientation,f=e.placeholder,v=e.__experimentalLayout,g=void 0===v?N:v;!function(e,t,n,r,o){var c=Object(m.useDispatch)("core/block-editor").updateBlockListSettings,i=Object(m.useSelect)((function(t){var n=t("core/block-editor").getBlockRootClientId(e);return{blockListSettings:t("core/block-editor").getBlockListSettings(e),parentLock:t("core/block-editor").getTemplateLock(n)}}),[e]),l=i.blockListSettings,s=i.parentLock;Object(a.useLayoutEffect)((function(){var i={allowedBlocks:t,templateLock:void 0===n?s:n};void 0!==r&&(i.__experimentalCaptureToolbars=r),void 0!==o&&(i.orientation=o),Pb()(l,i)||c(e,i)}),[e,l,t,n,s,r,o,c])}(t,n,o,l,b),function(e,t,n,r){var o=Object(m.useDispatch)("core/block-editor").replaceInnerBlocks,c=Object(m.useSelect)((function(t){return t("core/block-editor").getBlocks(e)}),[e]),i=Object(a.useRef)(null);Object(a.useLayoutEffect)((function(){if((0===c.length||"all"===n)&&!Object(d.isEqual)(t,i.current)){i.current=t;var l=Object(p.synchronizeBlocksWithTemplate)(c,t);Object(d.isEqual)(l,c)||o(e,l,0===c.length&&r&&0!==l.length)}}),[c,t,n,e])}(t,r,o,i);var O=Object(m.useSelect)((function(e){var n=e("core/block-editor").getBlock(t),r=Object(p.getBlockType)(n.name);if(r&&r.providesContext)return function(e,t){Tb.has(t)||Tb.set(t,new WeakMap);var n=Tb.get(t);if(!n.has(e)){var r=Object(d.mapValues)(t.providesContext,(function(t){return e[t]}));n.set(e,r)}return n.get(e)}(n.attributes,r)}),[t]);return Object(a.createElement)(A,{value:g},Object(a.createElement)(Ml,{value:O},Object(a.createElement)($u,{rootClientId:t,renderAppender:u,__experimentalAppenderTagName:s,wrapperRef:c,placeholder:f})))}function Rb(e){return za(e),Object(a.createElement)(Ab,e)}var Lb=Object(a.forwardRef)((function(e,t){var n=Mb({ref:t},e);return Object(a.createElement)("div",{className:"block-editor-inner-blocks"},Object(a.createElement)("div",n))}));function Mb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(a.useRef)(),r=h(),o=r.clientId,c=Object(b.useViewportMatch)("medium","<"),l=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.isBlockSelected,i=t.hasSelectedInnerBlock,l=(0,t.isNavigationMode)()||c;return"core/template"!==n(o)&&!r(o)&&!i(o,!0)&&l}),[o,c]),s=e.ref||n,d=t.value&&t.onChange?Rb:Ab;return Db(Db({},e),{},{ref:s,className:u()(e.className,"block-editor-block-list__layout",{"has-overlay":l}),children:Object(a.createElement)(d,Object(i.a)({},t,{clientId:o,wrapperRef:s}))})}Lb.DefaultBlockAppender=Ib,Lb.ButtonBlockAppender=Bb,Lb.Content=Object(p.withBlockContentContext)((function(e){var t=e.BlockContent;return Object(a.createElement)(t,null)}));var Fb=Lb,Vb=n(264);function Hb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hb(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Gb=[{id:"opensInNewTab",title:Object(w.__)("Open in new tab")}],Ub=function(e){var t=e.value,n=e.onChange,r=void 0===n?d.noop:n,o=e.settings,c=void 0===o?Gb:o;if(!c||!c.length)return null;var i=function(e){return function(n){r(zb(zb({},t),{},Object(l.a)({},e.id,n)))}},s=c.map((function(e){return Object(a.createElement)(v.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:i(e),checked:!!t&&!!t[e.id]})}));return Object(a.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(a.createElement)(v.VisuallyHidden,{as:"legend"},Object(w.__)("Currently selected link settings")),s)},Wb=n(137),Kb=n.n(Wb);var qb=function(e){Object(Mn.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Vn.a)(t);if(n){var o=Object(Vn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Fn.a)(this,e)});function o(e){var t;return Object(An.a)(this,o),(t=r.call(this,e)).onChange=t.onChange.bind(Object(Ln.a)(t)),t.onFocus=t.onFocus.bind(Object(Ln.a)(t)),t.onKeyDown=t.onKeyDown.bind(Object(Ln.a)(t)),t.selectLink=t.selectLink.bind(Object(Ln.a)(t)),t.handleOnClick=t.handleOnClick.bind(Object(Ln.a)(t)),t.bindSuggestionNode=t.bindSuggestionNode.bind(Object(Ln.a)(t)),t.autocompleteRef=e.autocompleteRef||Object(a.createRef)(),t.inputRef=Object(a.createRef)(),t.updateSuggestions=Object(d.debounce)(t.updateSuggestions.bind(Object(Ln.a)(t)),200),t.suggestionNodes=[],t.isUpdatingSuggestions=!1,t.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""},t}return Object(Rn.a)(o,[{key:"componentDidUpdate",value:function(e){var t=this,n=this.state,r=n.showSuggestions,o=n.selectedSuggestion,c=this.props.value;r&&null!==o&&this.suggestionNodes[o]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,Kb()(this.suggestionNodes[o],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((function(){t.scrollingIntoView=!1}),100)),e.value!==c&&this.shouldShowInitialSuggestions()&&this.updateSuggestions()}},{key:"componentDidMount",value:function(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest}},{key:"bindSuggestionNode",value:function(e){var t=this;return function(n){t.suggestionNodes[e]=n}}},{key:"shouldShowInitialSuggestions",value:function(){var e=this.state.suggestions,t=this.props,n=t.__experimentalShowInitialSuggestions,r=void 0!==n&&n,o=t.value;return!this.isUpdatingSuggestions&&r&&!(o&&o.length)&&!(e&&e.length)}},{key:"updateSuggestions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=this.props,r=n.__experimentalFetchLinkSuggestions,o=n.__experimentalHandleURLSuggestions;if(r){var c=!(t&&t.length);if(c||!(t.length<2||!o&&Object(fs.isURL)(t))){this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});var i=r(t,{isInitialSuggestions:c});i.then((function(t){e.suggestionsRequest===i&&(e.setState({suggestions:t,loading:!1,showSuggestions:!!t.length}),t.length?e.props.debouncedSpeak(Object(w.sprintf)(
|
63 |
/* translators: %s: number of results. */
|
64 |
Object(w._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):e.props.debouncedSpeak(Object(w.__)("No results."),"assertive"),e.isUpdatingSuggestions=!1)})).catch((function(){e.suggestionsRequest===i&&(e.setState({loading:!1}),e.isUpdatingSuggestions=!1)})),this.suggestionsRequest=i}else this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1})}}},{key:"onChange",value:function(e){var t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t.trim())}},{key:"onFocus",value:function(){var e=this.state.suggestions,t=this.props,n=t.disableSuggestions,r=t.value;!r||n||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(r.trim())}},{key:"onKeyDown",value:function(e){var t=this.state,n=t.showSuggestions,r=t.selectedSuggestion,o=t.suggestions,c=t.loading;if(n&&o.length&&!c){var i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Ht.UP:e.stopPropagation(),e.preventDefault();var l=r?r-1:o.length-1;this.setState({selectedSuggestion:l});break;case Ht.DOWN:e.stopPropagation(),e.preventDefault();var a=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:a});break;case Ht.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak(Object(w.__)("Link selected.")));break;case Ht.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(i))}}else switch(e.keyCode){case Ht.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case Ht.DOWN:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}}},{key:"selectLink",value:function(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}},{key:"handleOnClick",value:function(e){this.selectLink(e),this.inputRef.current.focus()}},{key:"render",value:function(){return Object(a.createElement)(a.Fragment,null,this.renderControl(),this.renderSuggestions())}},{key:"renderControl",value:function(){var e=this.props,t=e.label,n=e.className,r=e.isFullWidth,o=e.instanceId,c=e.placeholder,i=void 0===c?Object(w.__)("Paste URL or type to search"):c,l=e.__experimentalRenderControl,s=e.value,d=void 0===s?"":s,b=this.state,f=b.loading,p=b.showSuggestions,m=b.selectedSuggestion,g=b.suggestionsListboxId,O=b.suggestionOptionIdPrefix,h={id:"url-input-control-".concat(o),label:t,className:u()("block-editor-url-input",n,{"is-full-width":r})},j={value:d,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:i,onKeyDown:this.onKeyDown,role:"combobox","aria-label":Object(w.__)("URL"),"aria-expanded":p,"aria-autocomplete":"list","aria-owns":g,"aria-activedescendant":null!==m?"".concat(O,"-").concat(m):void 0,ref:this.inputRef};return l?l(h,j,f):Object(a.createElement)(v.BaseControl,h,Object(a.createElement)("input",j),f&&Object(a.createElement)(v.Spinner,null))}},{key:"renderSuggestions",value:function(){var e=this,t=this.props,n=t.className,r=t.__experimentalRenderSuggestions,o=t.value,c=void 0===o?"":o,l=t.__experimentalShowInitialSuggestions,s=void 0!==l&&l,b=this.state,f=b.showSuggestions,p=b.suggestions,m=b.selectedSuggestion,g=b.suggestionsListboxId,O=b.suggestionOptionIdPrefix,h=b.loading,j={id:g,ref:this.autocompleteRef,role:"listbox"},k=function(t,n){return{role:"option",tabIndex:"-1",id:"".concat(O,"-").concat(n),ref:e.bindSuggestionNode(n),"aria-selected":n===m}};return Object(d.isFunction)(r)&&f&&p.length?r({suggestions:p,selectedSuggestion:m,suggestionsListProps:j,buildSuggestionItemProps:k,isLoading:h,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:s&&!(c&&c.length)}):!Object(d.isFunction)(r)&&f&&p.length?Object(a.createElement)(v.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(a.createElement)("div",Object(i.a)({},j,{className:u()("block-editor-url-input__suggestions","".concat(n,"__suggestions"))}),p.map((function(t,n){return Object(a.createElement)(v.Button,Object(i.a)({},k(0,n),{key:t.id,className:u()("block-editor-url-input__suggestion",{"is-selected":n===m}),onClick:function(){return e.handleOnClick(t)}}),t.title)})))):null}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.value,r=e.instanceId,o=e.disableSuggestions,c=e.__experimentalShowInitialSuggestions,i=void 0!==c&&c,l=t.showSuggestions,a=n&&n.length;return i||a||(l=!1),!0===o&&(l=!1),{showSuggestions:l,suggestionsListboxId:"block-editor-url-input-suggestions-".concat(r),suggestionOptionIdPrefix:"block-editor-url-input-suggestion-".concat(r)}}}]),o}(a.Component),$b=Object(b.compose)(b.withSafeTimeout,v.withSpokenMessages,b.withInstanceId,Object(m.withSelect)((function(e,t){if(!Object(d.isFunction)(t.__experimentalFetchLinkSuggestions))return{__experimentalFetchLinkSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}})))(qb),Yb=function(e){var t,n=e.searchTerm,r=e.onClick,o=e.itemProps,c=e.isSelected,l=e.buttonText;return n?(t=l?Object(d.isFunction)(l)?l(n):l:Object(a.createInterpolateElement)(Object(w.sprintf)(
|
65 |
/* translators: %s: search term. */
|
66 |
Object(w.__)("Create: <mark>%s</mark>"),n),{mark:Object(a.createElement)("mark",null)}),Object(a.createElement)(v.Button,Object(i.a)({},o,{className:u()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":c}),onClick:r}),Object(a.createElement)(Ra.a,{className:"block-editor-link-control__search-item-icon",icon:Ta.a}),Object(a.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(a.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null},Xb=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(a.createElement)(S.Path,{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"})),Qb=function(e){var t=e.itemProps,n=e.suggestion,r=e.isSelected,o=void 0!==r&&r,c=e.onClick,l=e.isURL,s=void 0!==l&&l,d=e.searchTerm,b=void 0===d?"":d,f=e.shouldShowType,p=void 0!==f&&f;return Object(a.createElement)(v.Button,Object(i.a)({},t,{onClick:c,className:u()("block-editor-link-control__search-item",{"is-selected":o,"is-url":s,"is-entity":!s})}),s&&Object(a.createElement)(Ra.a,{className:"block-editor-link-control__search-item-icon",icon:Xb}),Object(a.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(a.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(a.createElement)(v.TextHighlight,{text:n.title,highlight:b})),Object(a.createElement)("span",{"aria-hidden":!s,className:"block-editor-link-control__search-item-info"},!s&&(Object(fs.filterURLForDisplay)(Object(fs.safeDecodeURI)(n.url))||""),s&&Object(w.__)("Press ENTER to add this link"))),p&&n.type&&Object(a.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===n.type?"tag":n.type))};function Zb(e){var t=e.instanceId,n=e.withCreateSuggestion,r=e.currentInputValue,o=e.handleSuggestionClick,c=e.suggestionsListProps,l=e.buildSuggestionItemProps,s=e.suggestions,d=e.selectedSuggestion,b=e.isLoading,f=e.isInitialSuggestions,p=e.createSuggestionButtonText,m=e.suggestionsQuery,g=u()("block-editor-link-control__search-results",{"is-loading":b}),O=["url","mailto","tel","internal"],h=1===s.length&&O.includes(s[0].type.toLowerCase()),j=n&&!h&&!f,k=!(null!=m&&m.type),y="block-editor-link-control-search-results-label-".concat(t),_=f?Object(w.__)("Recently updated"):Object(w.sprintf)(
|
67 |
/* translators: %s: search term. */
|
68 |
-
Object(w.__)('Search results for "%s"'),r),E=Object(a.createElement)(f?a.Fragment:v.VisuallyHidden,{},Object(a.createElement)("span",{className:"block-editor-link-control__search-results-label",id:y},_));return Object(a.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},E,Object(a.createElement)("div",Object(i.a)({},c,{className:g,"aria-labelledby":y}),s.map((function(e,t){return j&&"__CREATE__"===e.type?Object(a.createElement)(Yb,{searchTerm:r,buttonText:p,onClick:function(){return o(e)},key:e.type,itemProps:l(e,t),isSelected:t===d}):"__CREATE__"===e.type?null:Object(a.createElement)(Qb,{key:"".concat(e.id,"-").concat(e.type),itemProps:l(e,t),suggestion:e,index:t,onClick:function(){o(e)},isSelected:t===d,isURL:O.includes(e.type.toLowerCase()),searchTerm:r,shouldShowType:k})}))))}function Jb(e){var t=Object(d.startsWith)(e,"#");return Object(fs.isURL)(e)||e&&e.includes("www.")||t}function ef(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ef(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ef(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nf=function(){return Promise.resolve([])},rf=function(e){var t="URL",n=Object(fs.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),Object(d.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?Object(fs.prependHTTP)(e):e,type:t}])},of=function(){var e=Object(Zl.a)(Zc.a.mark((function e(t,n,r,o,c,i){var l,a,s;return Zc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=n.isInitialSuggestions,e.next=3,Promise.all([r(t,n),o(t)]);case 3:if(a=e.sent,s=!t.includes(" "),a=s&&i&&!l?a[0].concat(a[1]):a[0],!l){e.next=8;break}return e.abrupt("return",a);case 8:return e.abrupt("return",Jb(t)||!c?a:a.concat({title:t,url:t,type:"__CREATE__"}));case 9:case"end":return e.stop()}}),e)})));return function(_x,t,n,r,o,c){return e.apply(this,arguments)}}();function cf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cf(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var af=Promise.resolve([]),sf=Object(a.forwardRef)((function(e,t){var n=e.value,r=e.children,o=e.currentLink,c=void 0===o?{}:o,i=e.className,l=void 0===i?null:i,s=e.placeholder,u=void 0===s?null:s,f=e.withCreateSuggestion,p=void 0!==f&&f,v=e.onCreateSuggestion,g=void 0===v?d.noop:v,O=e.onChange,h=void 0===O?d.noop:O,j=e.onSelect,k=void 0===j?d.noop:j,y=e.showSuggestions,_=void 0===y||y,E=e.renderSuggestions,C=void 0===E?function(e){return Object(a.createElement)(Zb,e)}:E,S=e.fetchSuggestions,B=void 0===S?null:S,I=e.allowDirectEntry,x=void 0===I||I,P=e.showInitialSuggestions,T=void 0!==P&&P,N=e.suggestionsQuery,D=void 0===N?{}:N,A=e.withURLSuggestion,R=void 0===A||A,L=e.createSuggestionButtonText,M=function(e,t,n,r){var o=Object(m.useSelect)((function(e){return{fetchSearchSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}}),[]).fetchSearchSuggestions,c=t?rf:nf;return Object(a.useCallback)((function(t,i){var l=i.isInitialSuggestions;return Jb(t)?c(t,{isInitialSuggestions:l}):of(t,tf(tf({},e),{},{isInitialSuggestions:l}),o,c,n,r)}),[c,o,n])}(D,x,p,R),F=_?B||M:af,V=Object(b.useInstanceId)(sf),H=Object(a.useState)(),z=Object(Me.a)(H,2),G=z[0],U=z[1],W=function(){var e=Object(Zl.a)(Zc.a.mark((function e(t){var n,r;return Zc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t,"__CREATE__"!==t.type){e.next=12;break}return e.prev=2,e.next=5,g(t.title);case 5:n=e.sent,null!==(r=n)&&void 0!==r&&r.url&&k(n),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(2);case 11:return e.abrupt("return");case 12:(x||n&&Object.keys(n).length>=1)&&k(lf(lf({},Object(d.omit)(c,"id","url")),n),n);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(_x){return e.apply(this,arguments)}}();return Object(a.createElement)("form",{onSubmit:function(e){e.preventDefault(),W(G||{url:n})}},Object(a.createElement)($b,{className:l,value:n,onChange:function(e,t){h(e),U(t)},placeholder:null!=u?u:Object(w.__)("Search or type url"),__experimentalRenderSuggestions:_?function(e){return C(lf(lf({},e),{},{instanceId:V,withCreateSuggestion:p,currentInputValue:n,createSuggestionButtonText:L,suggestionsQuery:D,handleSuggestionClick:function(t){e.handleSuggestionClick&&e.handleSuggestionClick(t),W(t)}}))}:null,__experimentalFetchLinkSuggestions:F,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:T,ref:t}),r)})),uf=sf,df=Object(v.createSlotFill)("BlockEditorLinkControlViewer"),bf=df.Slot,ff=df.Fill;function pf(e){var t=e.value,n=e.onEditClick,r=t&&Object(fs.filterURLForDisplay)(Object(fs.safeDecodeURI)(t.url),16)||"";return Object(a.createElement)("div",{"aria-label":Object(w.__)("Currently selected"),"aria-selected":"true",className:u()("block-editor-link-control__search-item",{"is-current":!0})},Object(a.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(a.createElement)(v.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},t&&t.title||r),t&&t.title&&Object(a.createElement)("span",{className:"block-editor-link-control__search-item-info"},r)),Object(a.createElement)(v.Button,{isSecondary:!0,onClick:function(){return n()},className:"block-editor-link-control__search-item-action"},Object(w.__)("Edit")),Object(a.createElement)(bf,{fillProps:t}))}var mf=function(e){var t=!1;return{promise:new Promise((function(n,r){e.then((function(e){return t?r({isCanceled:!0}):n(e)}),(function(e){return r(t?{isCanceled:!0}:e)}))})),cancel:function(){t=!0}}};function vf(e){var t=e.searchInputPlaceholder,n=e.value,r=e.settings,o=e.onChange,c=void 0===o?d.noop:o,i=e.noDirectEntry,l=void 0!==i&&i,s=e.showSuggestions,u=void 0===s||s,b=e.showInitialSuggestions,f=e.forceIsEditingLink,p=e.createSuggestion,m=e.withCreateSuggestion,g=e.inputValue,O=void 0===g?"":g,h=e.suggestionsQuery,j=void 0===h?{}:h,k=e.noURLSuggestion,y=void 0!==k&&k,_=e.createSuggestionButtonText;void 0===m&&p&&(m=!0);var E=Object(a.useRef)(!0),C=Object(a.useRef)(),S=Object(a.useState)(n&&n.url||""),B=Object(Me.a)(S,2),I=B[0],x=B[1],P=O||I,T=Object(a.useState)(void 0!==f?f:!n||!n.url),N=Object(Me.a)(T,2),D=N[0],A=N[1],R=Object(a.useRef)(!1);Object(a.useEffect)((function(){void 0!==f&&f!==D&&A(f)}),[f]),Object(a.useEffect)((function(){E.current?E.current=!1:(C.current.contains(C.current.ownerDocument.activeElement)||(ta.focus.focusable.find(C.current)[0]||C.current).focus(),R.current=!1)}),[D]);var L=function(e){var t=Object(a.useRef)(),n=Object(a.useState)(!1),r=Object(Me.a)(n,2),o=r[0],c=r[1],i=Object(a.useState)(null),l=Object(Me.a)(i,2),s=l[0],u=l[1],d=function(){var n=Object(Zl.a)(Zc.a.mark((function n(r){return Zc.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!0),u(null),n.prev=2,t.current=mf(Promise.resolve(e(r))),n.next=6,t.current.promise;case 6:return n.abrupt("return",n.sent);case 9:if(n.prev=9,n.t0=n.catch(2),!n.t0||!n.t0.isCanceled){n.next=13;break}return n.abrupt("return");case 13:throw u(n.t0.message||Object(w.__)("An unknown error occurred during creation. Please try again.")),n.t0;case 15:return n.prev=15,c(!1),n.finish(15);case 18:case"end":return n.stop()}}),n,null,[[2,9,15,18]])})));return function(_x){return n.apply(this,arguments)}}();return Object(a.useEffect)((function(){return function(){t.current&&t.current.cancel()}}),[]),{createPage:d,isCreatingPage:o,errorMessage:s}}(p),M=L.createPage,F=L.isCreatingPage,V=L.errorMessage;return Object(a.createElement)("div",{tabIndex:-1,ref:C,className:"block-editor-link-control"},F&&Object(a.createElement)("div",{className:"block-editor-link-control__loading"},Object(a.createElement)(v.Spinner,null)," ",Object(w.__)("Creating"),"…"),(D||!n)&&!F&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(a.createElement)(uf,{currentLink:n,className:"block-editor-link-control__search-input",placeholder:t,value:P,withCreateSuggestion:m,onCreateSuggestion:M,onChange:x,onSelect:function(e){var t;c(e),R.current=!(null===(t=C.current)||void 0===t||!t.contains(C.current.ownerDocument.activeElement)),A(!1)},showInitialSuggestions:b,allowDirectEntry:!l,showSuggestions:u,suggestionsQuery:j,withURLSuggestion:!y,createSuggestionButtonText:_},Object(a.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(a.createElement)(v.Button,{type:"submit",label:Object(w.__)("Submit"),icon:Vb.a,className:"block-editor-link-control__search-submit"})))),V&&Object(a.createElement)(v.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},V)),n&&!D&&!F&&Object(a.createElement)(pf,{value:n,onEditClick:function(){return A(!0)}}),Object(a.createElement)(Ub,{value:n,settings:r,onChange:c}))}vf.ViewerFill=ff;var gf=vf,Of=n(382),hf=n(265),jf=Object(v.withFilters)("editor.MediaUpload")((function(){return null})),kf=function(e){var t=e.fallback,n=void 0===t?null:t,r=e.children;return Object(m.useSelect)((function(e){return!!(0,e("core/block-editor").getSettings)().mediaUpload}),[])?r:n},yf=Object(b.compose)([Object(m.withDispatch)((function(e){var t=e(is.store);return{createNotice:t.createNotice,removeNotice:t.removeNotice}})),Object(v.withFilters)("editor.MediaReplaceFlow")])((function(e){var t=e.mediaURL,n=e.mediaId,r=e.allowedTypes,o=e.accept,c=e.onSelect,i=e.onSelectURL,l=e.onFilesUpload,s=void 0===l?d.noop:l,u=e.name,b=void 0===u?Object(w.__)("Replace"):u,f=e.createNotice,p=e.removeNotice,g=Object(a.useState)(t),O=Object(Me.a)(g,2),h=O[0],j=O[1],k=Object(m.useSelect)((function(e){return e("core/block-editor").getSettings().mediaUpload}),[]),y=Object(a.createRef)(),_=Object(d.uniqueId)("block-editor/media-replace-flow/error-notice/"),E=function(e){var t=document.createElement("div");t.innerHTML=Object(a.renderToString)(e);var n=t.textContent||t.innerText||"";setTimeout((function(){f("error",n,{speak:!0,id:_,isDismissible:!0})}),1e3)},C=function(e){c(e),j(e.url),Object(ot.speak)(Object(w.__)("The media file has been replaced")),p(_)},S=function(e){e.keyCode===Ht.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(a.createElement)(v.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(a.createElement)(v.ToolbarGroup,{className:"media-replace-flow"},Object(a.createElement)(v.ToolbarButton,{ref:y,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:S},b))},renderContent:function(e){return e.onClose,Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(a.createElement)(jf,{value:n,onSelect:function(e){return C(e)},allowedTypes:r,render:function(e){var t=e.open;return Object(a.createElement)(v.MenuItem,{icon:Of.a,onClick:t},Object(w.__)("Open Media Library"))}}),Object(a.createElement)(kf,null,Object(a.createElement)(v.FormFileUpload,{onChange:function(e){!function(e){var t=e.target.files;s(t),k({allowedTypes:r,filesList:t,onFileChange:function(e){var t=Object(Me.a)(e,1)[0];C(t)},onError:E})}(e)},accept:o,render:function(e){var t=e.openFileDialog;return Object(a.createElement)(v.MenuItem,{icon:hf.a,onClick:function(){t()}},Object(w.__)("Upload"))}}))),i&&Object(a.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:function(e){[Ht.TAB,Ht.ESCAPE].includes(e.keyCode)||e.stopPropagation()},onKeyPress:function(e){[Ht.TAB,Ht.ESCAPE].includes(e.keyCode)||e.stopPropagation()}},Object(a.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(w.__)("Current media URL:")),Object(a.createElement)(gf,{value:{url:h},settings:[],showSuggestions:!1,onChange:function(e){var t=e.url;j(t),i(t),y.current.focus()}})))}})})),_f=n(240);function Ef(e){var t=e.url,n=e.urlLabel,r=e.className,o=u()(r,"block-editor-url-popover__link-viewer-url");return t?Object(a.createElement)(v.ExternalLink,{className:o,href:t},n||Object(fs.filterURLForDisplay)(Object(fs.safeDecodeURI)(t))):Object(a.createElement)("span",{className:o})}function Cf(e){var t=e.additionalControls,n=e.children,r=e.renderSettings,o=e.position,c=void 0===o?"bottom center":o,l=e.focusOnMount,s=void 0===l?"firstElement":l,u=Object(Fe.a)(e,["additionalControls","children","renderSettings","position","focusOnMount"]),d=Object(a.useState)(!1),b=Object(Me.a)(d,2),f=b[0],p=b[1],m=!!r&&f;return Object(a.createElement)(v.Popover,Object(i.a)({className:"block-editor-url-popover",focusOnMount:s,position:c},u),Object(a.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(a.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&Object(a.createElement)(v.Button,{className:"block-editor-url-popover__settings-toggle",icon:ua.a,label:Object(w.__)("Link settings"),onClick:function(){p(!f)},"aria-expanded":f})),m&&Object(a.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!m&&Object(a.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}Cf.LinkEditor=function(e){var t=e.autocompleteRef,n=e.className,r=e.onChangeInputValue,o=e.value,c=Object(Fe.a)(e,["autocompleteRef","className","onChangeInputValue","value"]);return Object(a.createElement)("form",Object(i.a)({className:u()("block-editor-url-popover__link-editor",n)},c),Object(a.createElement)($b,{value:o,onChange:r,autocompleteRef:t}),Object(a.createElement)(v.Button,{icon:Vb.a,label:Object(w.__)("Apply"),type:"submit"}))},Cf.LinkViewer=function(e){var t=e.className,n=e.linkClassName,r=e.onEditLinkClick,o=e.url,c=e.urlLabel,l=Object(Fe.a)(e,["className","linkClassName","onEditLinkClick","url","urlLabel"]);return Object(a.createElement)("div",Object(i.a)({className:u()("block-editor-url-popover__link-viewer",t)},l),Object(a.createElement)(Ef,{url:o,urlLabel:c,className:n}),r&&Object(a.createElement)(v.Button,{icon:_f.a,label:Object(w.__)("Edit"),onClick:r}))};var wf=Cf,Sf=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(a.createElement)(wf,{onClose:o},Object(a.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},Object(a.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(w.__)("URL"),placeholder:Object(w.__)("Paste or type URL"),onChange:n,value:t}),Object(a.createElement)(v.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Vb.a,label:Object(w.__)("Apply"),type:"submit"})))},Bf=Object(v.withFilters)("editor.MediaPlaceholder")((function(e){var t=e.value,n=void 0===t?{}:t,r=e.allowedTypes,o=e.className,c=e.icon,i=e.labels,l=void 0===i?{}:i,s=e.mediaPreview,b=e.notices,f=e.isAppender,p=e.accept,g=e.addToGallery,O=e.multiple,h=void 0!==O&&O,j=e.dropZoneUIOnly,k=e.disableDropZone,y=e.disableMediaButtons,_=e.onError,E=e.onSelect,C=e.onCancel,S=e.onSelectURL,B=e.onDoubleClick,I=e.onFilesPreUpload,x=void 0===I?d.noop:I,P=e.onHTMLDrop,T=void 0===P?d.noop:P,N=e.children,D=Object(m.useSelect)((function(e){return(0,e("core/block-editor").getSettings)().mediaUpload}),[]),A=Object(a.useState)(""),R=Object(Me.a)(A,2),L=R[0],M=R[1],F=Object(a.useState)(!1),V=Object(Me.a)(F,2),H=V[0],z=V[1];Object(a.useEffect)((function(){var e;M(null!==(e=null==n?void 0:n.src)&&void 0!==e?e:"")}),[null==n?void 0:n.src]);var G=function(e){M(e.target.value)},U=function(){z(!0)},W=function(){z(!1)},K=function(e){e.preventDefault(),L&&S&&(S(L),W())},q=function(e){var t;if(x(e),h)if(g){var o=[];t=function(e){var t=(null!=n?n:[]).filter((function(e){return e.id?!o.some((function(t){var n=t.id;return Number(n)===Number(e.id)})):!o.some((function(t){var n=t.urlSlug;return e.url.includes(n)}))}));E(t.concat(e)),o=e.map((function(e){var t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else t=E;else t=function(e){var t=Object(Me.a)(e,1)[0];return E(t)};D({allowedTypes:r,filesList:e,onFileChange:t,onError:_})},$=function(e){q(e.target.files)},Y=function(e,t){var n=l.instructions,i=l.title;if(D||S||(n=Object(w.__)("To edit this block, you need permission to upload media.")),void 0===n||void 0===i){var d=null!=r?r:[],p=Object(Me.a)(d,1)[0],m=1===d.length,g=m&&"audio"===p,O=m&&"image"===p,h=m&&"video"===p;void 0===n&&D&&(n=Object(w.__)("Upload a media file or pick one from your media library."),g?n=Object(w.__)("Upload an audio file, pick one from your media library, or add one with a URL."):O?n=Object(w.__)("Upload an image file, pick one from your media library, or add one with a URL."):h&&(n=Object(w.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===i&&(i=Object(w.__)("Media"),g?i=Object(w.__)("Audio"):O?i=Object(w.__)("Image"):h&&(i=Object(w.__)("Video")))}var j=u()("block-editor-media-placeholder",o,{"is-appender":f});return Object(a.createElement)(v.Placeholder,{icon:c,label:i,instructions:n,className:j,notices:b,onClick:t,onDoubleClick:B,preview:s},e,N)},X=function(){return k?null:Object(a.createElement)(v.DropZone,{onFilesDrop:q,onHTMLDrop:T})},Q=function(){return C&&Object(a.createElement)(v.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(w.__)("Cancel"),isLink:!0,onClick:C},Object(w.__)("Cancel"))},Z=function(){return S&&Object(a.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(a.createElement)(v.Button,{className:"block-editor-media-placeholder__button",onClick:U,isPressed:H,isTertiary:!0},Object(w.__)("Insert from URL")),H&&Object(a.createElement)(Sf,{src:L,onChange:G,onSubmit:K,onClose:W}))};return j||y?(j&&Va()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{alternative:"disableMediaButtons"}),Object(a.createElement)(kf,null,X())):Object(a.createElement)(kf,{fallback:Y(Z())},function(){var e=Object(a.createElement)(jf,{addToGallery:g,gallery:h&&!(!r||0===r.length)&&r.every((function(e){return"image"===e||e.startsWith("image/")})),multiple:h,onSelect:E,allowedTypes:r,value:Array.isArray(n)?n.map((function(e){return e.id})):n.id,render:function(e){var t=e.open;return Object(a.createElement)(v.Button,{isTertiary:!0,onClick:function(e){e.stopPropagation(),t()}},Object(w.__)("Media Library"))}});if(D&&f)return Object(a.createElement)(a.Fragment,null,X(),Object(a.createElement)(v.FormFileUpload,{onChange:$,accept:p,multiple:h,render:function(t){var n=t.openFileDialog,r=Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.Button,{isPrimary:!0,className:u()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(w.__)("Upload")),e,Z(),Q());return Y(r,n)}}));if(D){var t=Object(a.createElement)(a.Fragment,null,X(),Object(a.createElement)(v.FormFileUpload,{isPrimary:!0,className:u()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:$,accept:p,multiple:h},Object(w.__)("Upload")),e,Z(),Q());return Y(t)}return Y(e)}())})),If=Object(a.forwardRef)((function(e,t){return Object(a.createElement)(eb,Object(i.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))}));If.Content=function(e){var t=e.value,n=void 0===t?"":t,r=e.tagName,o=void 0===r?"div":r,c=Object(Fe.a)(e,["value","tagName"]);return Object(a.createElement)(o,c,n)};var xf=If,Pf=Object(a.forwardRef)((function(e,t){var n=e.__experimentalVersion,r=Object(Fe.a)(e,["__experimentalVersion"]);if(2===n)return Object(a.createElement)(xf,Object(i.a)({ref:t},r));var o=r.className,c=r.onChange,l=Object(Fe.a)(r,["className","onChange"]);return Object(a.createElement)(Ia.a,Object(i.a)({ref:t,className:u()("block-editor-plain-text",o),onChange:function(e){return c(e.target.value)}},l))}));function Tf(e){var t=e.property,n=e.viewport,r=e.desc,o=Object(b.useInstanceId)(Tf),c=r||Object(w.sprintf)(
|
69 |
/* translators: 1: property name. 2: viewport name. */
|
70 |
Object(w._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),t,n.label);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("span",{"aria-describedby":"rbc-desc-".concat(o)},n.label),Object(a.createElement)(v.VisuallyHidden,{as:"span",id:"rbc-desc-".concat(o)},c))}var Nf=function(e){var t=e.title,n=e.property,r=e.toggleLabel,o=e.onIsResponsiveChange,c=e.renderDefaultControl,i=e.renderResponsiveControls,l=e.isResponsive,s=void 0!==l&&l,d=e.defaultLabel,b=void 0===d?{id:"all",
|
71 |
/* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
|
@@ -73,10 +73,10 @@ label:Object(w.__)("All")}:d,f=e.viewports,p=void 0===f?[{id:"small",label:Objec
|
|
73 |
/* translators: 'Toggle control label. Should the property be the same across all screen sizes or unique per screen size.'. %s property value for the control (eg: margin, padding...etc) */
|
74 |
Object(w.__)("Use the same %s on all screensizes."),n),g=Object(w.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),O=c(Object(a.createElement)(Tf,{property:n,viewport:b}),b);
|
75 |
/* translators: 'Help text for the responsive mode toggle control.' */return Object(a.createElement)("fieldset",{className:"block-editor-responsive-block-control"},Object(a.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),Object(a.createElement)("div",{className:"block-editor-responsive-block-control__inner"},Object(a.createElement)(v.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:m,checked:!s,onChange:o,help:g}),Object(a.createElement)("div",{className:u()("block-editor-responsive-block-control__group",{"is-responsive":s})},!s&&O,s&&(i?i(p):p.map((function(e){return Object(a.createElement)(a.Fragment,{key:e.id},c(Object(a.createElement)(Tf,{property:n,viewport:e}),e))}))))))};function Df(e){var t=e.character,n=e.type,r=e.onUse;return Object(b.useKeyboardShortcut)(Ht.rawShortcut[n](t),(function(){return r(),!1}),{bindGlobal:!0}),null}function Af(e){var t,n=e.name,r=e.shortcutType,o=e.shortcutCharacter,c=Object(Fe.a)(e,["name","shortcutType","shortcutCharacter"]),l="RichText.ToolbarControls";return n&&(l+=".".concat(n)),r&&o&&(t=Ht.displayShortcut[r](o)),Object(a.createElement)(v.Fill,{name:l},Object(a.createElement)(v.ToolbarButton,Object(i.a)({},c,{shortcut:t})))}var Rf=function(e){Object(Mn.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Vn.a)(t);if(n){var o=Object(Vn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Fn.a)(this,e)});function o(){var e;return Object(An.a)(this,o),(e=r.apply(this,arguments)).onInput=e.onInput.bind(Object(Ln.a)(e)),e}return Object(Rn.a)(o,[{key:"onInput",value:function(e){e.inputType===this.props.inputType&&this.props.onInput()}},{key:"componentDidMount",value:function(){document.addEventListener("input",this.onInput,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("input",this.onInput,!0)}},{key:"render",value:function(){return null}}]),o}(a.Component),Lf=Object(a.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(a.createElement)(v.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"})),Mf=Object(a.forwardRef)((function(e,t){var n=Object(m.useSelect)((function(e){return e("core/block-editor").isNavigationMode()}),[]),r=Object(m.useDispatch)("core/block-editor").setNavigationMode,o=function(e){r("edit"!==e)};return Object(a.createElement)(v.Dropdown,{renderToggle:function(r){var o=r.isOpen,c=r.onToggle;return Object(a.createElement)(v.Button,Object(i.a)({},e,{ref:t,icon:n?Lf:_f.a,"aria-expanded":o,"aria-haspopup":"true",onClick:c
|
76 |
-
/* translators: button label text should, if possible, be under 16 characters. */,label:Object(w.__)("Modes")}))},position:"bottom right",renderContent:function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.NavigableMenu,{role:"menu","aria-label":Object(w.__)("Modes")},Object(a.createElement)(v.MenuItemsChoice,{value:n?"select":"edit",onSelect:o,choices:[{value:"edit",label:Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Ra.a,{icon:_f.a}),Object(w.__)("Edit"))},{value:"select",label:Object(a.createElement)(a.Fragment,null,Lf,Object(w.__)("Select"))}]})),Object(a.createElement)("div",{className:"block-editor-tool-selector__help"},Object(w.__)("Tools offer different interactions for block selection & editing. To select, press Escape, to go back to editing, press Enter.")))}})}));function Ff(e){var t=e.units,n=Object(Fe.a)(e,["units"]),r=function(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.filter((function(t){return e.includes(t.value)}))}(ge("spacing.units")||[],e);return 0!==t.length&&t}(t);return Object(a.createElement)(v.__experimentalUnitControl,Object(i.a)({units:r},n))}var Vf=n(
|
77 |
/* translators: button label text should, if possible, be under 16 characters. */
|
78 |
-
children:Object(w.__)("Preview")};return Object(a.createElement)(v.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:l,toggleProps:s,icon:null},(function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.MenuGroup,null,Object(a.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Desktop")},icon:"Desktop"===c&&qf.a},Object(w.__)("Desktop")),Object(a.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Tablet")},icon:"Tablet"===c&&qf.a},Object(w.__)("Tablet")),Object(a.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Mobile")},icon:"Mobile"===c&&qf.a},Object(w.__)("Mobile"))),t)}))}var Yf=n(
|
79 |
/* translators: %d: number of blocks */
|
80 |
Object(w._n)("%d block","%d blocks",t.length),t.length)),Object(a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},Object(w.sprintf)(
|
81 |
/* translators: %d: number of words */
|
82 |
-
Object(w._n)("%d word","%d words",n),n))))}));function cp(e){var t=e.blockName,n=Object(m.useSelect)((function(e){var n,r,o=e("core/block-editor").getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==o||null===(n=o.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(r=null==o?void 0:o.onChange)&&void 0!==r?r:null,styles:e(p.store).getBlockStyles(t)}}),[t]),r=n.preferredStyle,o=n.onUpdatePreferredStyleVariations,c=n.styles,i=Object(a.useMemo)((function(){return[{label:Object(w.__)("Not set"),value:""}].concat(Object(pe.a)(c.map((function(e){return{label:e.label,value:e.name}}))))}),[c]),l=Object(a.useCallback)((function(e){o(t,e)}),[t,o]);return o&&Object(a.createElement)(v.SelectControl,{options:i,value:r||"",label:Object(w.__)("Default Style"),onChange:l})}var ip=function(e){var t=e.clientId,n=e.blockName,r=e.hasBlockStyles,o=e.bubblesVirtually,c=Tl(t);return Object(a.createElement)("div",{className:"block-editor-block-inspector"},Object(a.createElement)(Ha,c),Object(a.createElement)(ib,{blockClientId:t}),r&&Object(a.createElement)("div",null,Object(a.createElement)(v.PanelBody,{title:Object(w.__)("Styles")},Object(a.createElement)(cu,{clientId:t}),Object(p.hasBlockSupport)(n,"defaultStylePicker",!0)&&Object(a.createElement)(cp,{blockName:n}))),Object(a.createElement)(ce.Slot,{bubblesVirtually:o}),Object(a.createElement)("div",null,Object(a.createElement)(lp,{slotName:ee.slotName,bubblesVirtually:o})),Object(a.createElement)(np,{key:"back"}))},lp=function(e){var t=e.slotName,n=e.bubblesVirtually,r=Object(v.__experimentalUseSlot)(t);return Boolean(r.fills&&r.fills.length)?Object(a.createElement)(v.PanelBody,{className:"block-editor-block-inspector__advanced",title:Object(w.__)("Advanced"),initialOpen:!1},Object(a.createElement)(ee.Slot,{bubblesVirtually:n})):null},ap=Object(m.withSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getSelectedBlockCount,o=t.getBlockName,c=e(p.store).getBlockStyles,i=n(),l=i&&o(i),a=i&&Object(p.getBlockType)(l),s=i&&c(l);return{count:r(),hasBlockStyles:s&&s.length>0,selectedBlockName:l,selectedBlockClientId:i,blockType:a}}))((function(e){var t=e.blockType,n=e.count,r=e.hasBlockStyles,o=e.selectedBlockClientId,c=e.selectedBlockName,i=e.showNoBlockSelectedMessage,l=void 0===i||i,s=e.bubblesVirtually,u=void 0===s||s;if(n>1)return Object(a.createElement)("div",{className:"block-editor-block-inspector"},Object(a.createElement)(op,null),Object(a.createElement)(ce.Slot,{bubblesVirtually:u}));var d=c===Object(p.getUnregisteredTypeHandlerName)();return t&&o&&!d?Object(a.createElement)(ip,{clientId:o,blockName:t.name,hasBlockStyles:r,bubblesVirtually:u}):l?Object(a.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},Object(w.__)("No block selected.")):null}));function sp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function up(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sp(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dp=Object(a.forwardRef)((function(e,t){var n=e.children,r=e.tagName,o=void 0===r?"div":r,c=Object(Fe.a)(e,["children","tagName"]);Va()("wp.blockEditor.__experimentalBlock",{alternative:"wp.blockEditor.useBlockProps"});var i=sd(up(up({},c),{},{ref:t}));return Object(a.createElement)(o,i,n)})),bp=["p","div","h1","h2","h3","h4","h5","h6","ol","ul","li","figure","nav","pre","header","section","aside","footer","main"].reduce((function(e,t){return e[t]=Object(a.forwardRef)((function(e,n){return Object(a.createElement)(dp,Object(i.a)({},e,{ref:n,tagName:t}))})),e}),dp);function fp(e){var t=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.hasSelectedBlock,r=t.hasMultiSelection;return n()||r()})),n=Object(m.useDispatch)("core/block-editor").clearSelectedBlock;Object(a.useEffect)((function(){if(t)return e.current.addEventListener("mousedown",r),function(){e.current.removeEventListener("mousedown",r)};function r(e){e.target.closest(".wp-block")||n()}}),[t,n])}function pp(e){var t=Object(a.useRef)();return fp(t),Object(a.createElement)("div",Object(i.a)({ref:t},e))}var mp=n(337),vp=n.n(mp),gp=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Op(e){return e?e.replace(/^\s+|\s+$/g,""):""}var hp=n(200),jp=n.n(hp),kp=yp;function yp(e){this.options=e||{}}yp.prototype.emit=function(e){return e},yp.prototype.visit=function(e){return this[e.type](e)},yp.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 _p=Ep;function Ep(e){kp.call(this,e)}jp()(Ep,kp),Ep.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Ep.prototype.comment=function(e){return this.emit("",e.position)},Ep.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Ep.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Ep.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("}")},Ep.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Ep.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Ep.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Ep.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Ep.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Ep.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("}")},Ep.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Ep.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Ep.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Ep.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("}"):""},Ep.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Cp=wp;function wp(e){e=e||{},kp.call(this,e),this.indentation=e.indent}jp()(wp,kp),wp.prototype.compile=function(e){return this.stylesheet(e)},wp.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},wp.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},wp.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},wp.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}")},wp.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}")},wp.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},wp.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},wp.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}")},wp.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)+"}")},wp.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")},wp.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}")},wp.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}")},wp.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}")},wp.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},wp.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()+"}"):""},wp.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},wp.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var Sp=function(e,t){try{var n=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 c(){var e={line:n,column:r};return function(t){return t.position=new i(e),f(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}i.prototype.content=e;var l=[];function a(o){var c=new Error(t.source+":"+n+":"+r+": "+o);if(c.reason=o,c.filename=t.source,c.line=n,c.column=r,c.source=e,!t.silent)throw c;l.push(c)}function s(){return b(/^{\s*/)}function u(){return b(/^}/)}function d(){var t,n,r,o=[];for(f(),p(o);e.length&&"}"!==e.charAt(0)&&(t=C()||(n=void 0,r=void 0,n=c(),(r=v())?(p(),n({type:"rule",selectors:r,declarations:O()})):a("selector missing")));)!1!==t&&(o.push(t),p(o));return o}function b(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function f(){b(/^\s*/)}function p(e){var t;for(e=e||[];t=m();)!1!==t&&e.push(t);return e}function m(){var t=c();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 a("End of comment missing");var i=e.slice(2,n-2);return r+=2,o(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function v(){var e=b(/^([^{]+)/);if(e)return Op(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 g(){var e=c(),t=b(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=Op(t[0]),!b(/^:\s*/))return a("property missing ':'");var n=b(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(gp,""),value:n?Op(n[0]).replace(gp,""):""});return b(/^[;\s]*/),r}}function O(){var e,t=[];if(!s())return a("missing '{'");for(p(t);e=g();)!1!==e&&(t.push(e),p(t));return u()?t:a("missing '}'")}function h(){for(var e,t=[],n=c();e=b(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),b(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:O()})}var j,k=E("import"),y=E("charset"),_=E("namespace");function E(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=c(),r=b(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function C(){if("@"===e[0])return function(){var e=c(),t=b(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=b(/^([-\w]+)\s*/)))return a("@keyframes missing name");var r,o=t[1];if(!s())return a("@keyframes missing '{'");for(var i=p();r=h();)i.push(r),i=i.concat(p());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):a("@keyframes missing '}'")}}()||function(){var e=c(),t=b(/^@media *([^{]+)/);if(t){var n=Op(t[1]);if(!s())return a("@media missing '{'");var r=p().concat(d());return u()?e({type:"media",media:n,rules:r}):a("@media missing '}'")}}()||function(){var e=c(),t=b(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Op(t[1]),media:Op(t[2])})}()||function(){var e=c(),t=b(/^@supports *([^{]+)/);if(t){var n=Op(t[1]);if(!s())return a("@supports missing '{'");var r=p().concat(d());return u()?e({type:"supports",supports:n,rules:r}):a("@supports missing '}'")}}()||k()||y()||_()||function(){var e=c(),t=b(/^@([-\w]+)?document *([^{]+)/);if(t){var n=Op(t[1]),r=Op(t[2]);if(!s())return a("@document missing '{'");var o=p().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):a("@document missing '}'")}}()||function(){var e=c();if(b(/^@page */)){var t=v()||[];if(!s())return a("@page missing '{'");for(var n,r=p();n=g();)r.push(n),r=r.concat(p());return u()?e({type:"page",selectors:t,declarations:r}):a("@page missing '}'")}}()||function(){var e=c();if(b(/^@host\s*/)){if(!s())return a("@host missing '{'");var t=p().concat(d());return u()?e({type:"host",rules:t}):a("@host missing '}'")}}()||function(){var e=c();if(b(/^@font-face\s*/)){if(!s())return a("@font-face missing '{'");for(var t,n=p();t=g();)n.push(t),n=n.concat(p());return u()?e({type:"font-face",declarations:n}):a("@font-face missing '}'")}}()}return function e(t,n){var r=t&&"string"==typeof t.type,o=r?t:n;for(var c in t){var i=t[c];Array.isArray(i)?i.forEach((function(t){e(t,o)})):i&&"object"===Object(so.a)(i)&&e(i,o)}return r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null}),t}((j=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:j,parsingErrors:l}}))}(e);return r=vp.a.map(n,(function(e){if(!e)return e;var n=t(e);return this.update(n)})),((o=o||{}).compress?new _p(o):new Cp(o)).compile(r)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var r,o};function Bp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ip(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bp(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xp(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 Pp(e,t){return new URL(e,t).toString()}var Tp=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]};xp(o)&&r.push(o)}return r}(t.value).map((c=e,function(e){return Ip(Ip({},e),{},{newUrl:"url("+e.before+e.quote+Pp(e.value,c)+e.quote+e.after+")"})}));return Ip(Ip({},t),{},{value:(r=t.value,o=n,o.forEach((function(e){r=r.replace(e.source,e.newUrl)})),r)})}var r,o,c;return t}};function Np(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Np(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Np(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ap=/^(body|html|:root).*$/,Rp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?Dp(Dp({},n),{},{selectors:n.selectors.map((function(n){return t.includes(n.trim())?n:n.match(Ap)?n.replace(/^(body|html|:root)/,e):e+" "+n}))}):n}},Lp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(e,(function(e){var n=e.css,r=e.baseURL,o=e.__experimentalNoWrapper,c=[];return t&&!(void 0!==o&&o)&&c.push(Rp(t)),r&&c.push(Tp(r)),c.length?Sp(n,Object(b.compose)(c)):n}))};function Mp(e){var t=Object(a.useRef)([]);return Object(a.useCallback)((function(n){if(n){var r=Lp(e,".editor-styles-wrapper"),o=n.ownerDocument;t.current=Object(d.map)(Object(d.compact)(r),(function(e){var t=o.createElement("style");return t.innerHTML=e,o.body.appendChild(t),t})),function(e){var t=window.getComputedStyle(e,null).getPropertyValue("background-color"),n=e.ownerDocument.getElementsByTagName("body")[0];Be()(t).getLuminance()>.5?n.classList.remove("is-dark-theme"):n.classList.add("is-dark-theme")}(n)}else t.current.forEach((function(e){return e.ownerDocument.body.removeChild(e)}))}),[e])}var Fp=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.showInserterHelpPanel,c=e.showMostUsedBlocks,i=void 0!==c&&c,l=e.__experimentalSelectBlockOnInsert,s=e.__experimentalInsertionIndex,u=e.onSelect,b=void 0===u?d.noop:u,f=Object(m.useSelect)((function(e){var r=e("core/block-editor").getBlockRootClientId;return t||r(n)||void 0}),[n,t]);return Object(a.createElement)(Ss,{onSelect:b,rootClientId:f,clientId:n,isAppender:r,showInserterHelpPanel:o,showMostUsedBlocks:i,__experimentalSelectBlockOnInsert:l,__experimentalInsertionIndex:s})};function Vp(){var e=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientIds,r=t.getBlockOrder,o=t.getBlockRootClientId,c=n(),i=Object(Me.a)(c,1)[0];return{clientIds:c,rootBlocksClientIds:r(),rootClientId:o(i)}}),[]),t=e.clientIds,n=e.rootBlocksClientIds,r=e.rootClientId,o=Object(m.useDispatch)("core/block-editor"),c=o.duplicateBlocks,i=o.removeBlocks,l=o.insertAfterBlock,s=o.insertBeforeBlock,u=o.multiSelect,b=o.clearSelectedBlock,f=o.moveBlocksUp,p=o.moveBlocksDown;return Object(Ql.useShortcut)("core/block-editor/move-up",Object(a.useCallback)((function(e){e.preventDefault(),f(t,r)}),[t,f]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Ql.useShortcut)("core/block-editor/move-down",Object(a.useCallback)((function(e){e.preventDefault(),p(t,r)}),[t,p]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Ql.useShortcut)("core/block-editor/duplicate",Object(a.useCallback)((function(e){e.preventDefault(),c(t)}),[t,c]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Ql.useShortcut)("core/block-editor/remove",Object(a.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Ql.useShortcut)("core/block-editor/insert-after",Object(a.useCallback)((function(e){e.preventDefault(),l(Object(d.last)(t))}),[t,l]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Ql.useShortcut)("core/block-editor/insert-before",Object(a.useCallback)((function(e){e.preventDefault(),s(Object(d.first)(t))}),[t,s]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Ql.useShortcut)("core/block-editor/delete-multi-selection",Object(a.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{isDisabled:t.length<2}),Object(Ql.useShortcut)("core/block-editor/select-all",Object(a.useCallback)((function(e){e.preventDefault(),u(Object(d.first)(n),Object(d.last)(n))}),[n,u])),Object(Ql.useShortcut)("core/block-editor/unselect",Object(a.useCallback)((function(e){e.preventDefault(),b(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges()}),[t,b]),{isDisabled:t.length<2}),null}Vp.Register=function(){var e=Object(m.useDispatch)(Ql.store).registerShortcut;return Object(a.useEffect)((function(){e({name:"core/block-editor/duplicate",category:"block",description:Object(w.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:Object(w.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:Object(w.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:Object(w.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:Object(w.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:Object(w.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:Object(w.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:Object(w.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:Object(w.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:Object(w.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var Hp=Vp;function zp(e){var t=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockSelectionEnd,r=t.hasMultiSelection,o=t.isMultiSelecting,c=n();if(c&&!o()&&r())return c}),[]);Object(a.useEffect)((function(){if(t){var n=e.current.ownerDocument,r=lt(t,n);if(r){var o=Object(ta.getScrollContainer)(r);o&&Kb()(r,o,{onlyScrollIfNeeded:!0})}}}),[t])}function Gp(){var e=Object(a.useRef)();return zp(e),Object(a.createElement)("div",{ref:e})}var Up=new Set([Ht.UP,Ht.RIGHT,Ht.DOWN,Ht.LEFT,Ht.ENTER,Ht.BACKSPACE]);function Wp(e){var t=Object(m.useSelect)((function(e){return e("core/block-editor").isTyping()})),n=Object(m.useDispatch)("core/block-editor").stopTyping;Object(a.useEffect)((function(){if(t){var r,o,c=e.current.ownerDocument;return c.addEventListener("mousemove",i),function(){c.removeEventListener("mousemove",i)}}function i(e){var t=e.clientX,c=e.clientY;r&&o&&(r!==t||o!==c)&&n(),r=t,o=c}}),[t,n])}function Kp(e){var t=Object(m.useSelect)((function(e){return e("core/block-editor").isTyping()})),n=Object(m.useDispatch)("core/block-editor"),r=n.startTyping,o=n.stopTyping;Wp(e),Object(a.useEffect)((function(){var n=e.current,c=n.ownerDocument,i=c.defaultView;if(t){var l;function a(e){var t=e.target;l=i.setTimeout((function(){Object(ta.isTextField)(t)||o()}))}function s(e){var t=e.keyCode;t!==Ht.ESCAPE&&t!==Ht.TAB||o()}function u(){var e=i.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||o()}return n.addEventListener("focus",a),n.addEventListener("keydown",s),c.addEventListener("selectionchange",u),function(){i.clearTimeout(l),n.removeEventListener("focus",a),n.removeEventListener("keydown",s),c.removeEventListener("selectionchange",u)}}function d(e){var t=e.type,o=e.target;Object(ta.isTextField)(o)&&n.contains(o)&&("keydown"!==t||function(e){var t=e.keyCode;return!e.shiftKey&&Up.has(t)}(e))&&r()}return n.addEventListener("keypress",d),n.addEventListener("keydown",d),function(){n.removeEventListener("keypress",d),n.removeEventListener("keydown",d)}}),[t,r,o])}var qp=function(e){var t=e.children,n=Object(a.useRef)();return Kp(n),Object(a.createElement)("div",{ref:n},t)};function $p(){return Va()("PreserveScrollInReorder component",{hint:"This behavior is now built-in the block list"}),null}var Yp=-1!==window.navigator.userAgent.indexOf("Trident"),Xp=new Set([Ht.UP,Ht.DOWN,Ht.LEFT,Ht.RIGHT]);function Qp(e){var t=Object(m.useSelect)((function(e){return e("core/block-editor").hasSelectedBlock()}));Object(a.useEffect)((function(){if(t){var n,r,o,c=e.current.ownerDocument,i=c.defaultView;return i.addEventListener("scroll",l,!0),i.addEventListener("resize",l,!0),e.current.addEventListener("keydown",a),e.current.addEventListener("keyup",s),e.current.addEventListener("mousedown",u),e.current.addEventListener("touchstart",u),function(){i.removeEventListener("scroll",l,!0),i.removeEventListener("resize",l,!0),e.current.removeEventListener("keydown",a),e.current.removeEventListener("keyup",s),e.current.removeEventListener("mousedown",u),e.current.removeEventListener("touchstart",u),c.removeEventListener("selectionchange",d),i.cancelAnimationFrame(n),i.cancelAnimationFrame(r)}}function l(){n||(n=i.requestAnimationFrame((function(){b(),n=null})))}function a(e){r&&i.cancelAnimationFrame(r),r=i.requestAnimationFrame((function(){s(e),r=null}))}function s(t){var n=t.keyCode;if(f()){var r=Object(ta.computeCaretRect)(i);if(r)if(o)if(Xp.has(n))o=r;else{var l=r.top-o.top;if(0!==l){var a=Object(ta.getScrollContainer)(e.current);if(a){var s=a===c.body,u=s?i.scrollY:a.scrollTop,d=s?0:a.getBoundingClientRect().top,b=s?o.top/i.innerHeight:(o.top-d)/(i.innerHeight-d);if(0===u&&b<.75&&(p=e.current.querySelectorAll('[contenteditable="true"]'))[p.length-1]===c.activeElement)o=r;else{var p,m=s?i.innerHeight:a.clientHeight;o.top+o.height>d+m||o.top<d?o=r:s?i.scrollBy(0,l):a.scrollTop+=l}}}}else o=r}}function u(){c.addEventListener("selectionchange",d)}function d(){c.removeEventListener("selectionchange",d),b()}function b(){f()&&(o=Object(ta.computeCaretRect)(i))}function f(){return e.current.contains(c.activeElement)&&c.activeElement.isContentEditable}}),[t])}var Zp=Yp?function(e){return e.children}:function(e){var t=e.children,n=Object(a.useRef)();return Qp(n),Object(a.createElement)("div",{ref:n,className:"block-editor__typewriter"},t)},Jp=Object(d.overEvery)([ta.isTextField,ta.focus.tabbable.isTabbableIndex]);function em(e){Object(a.useEffect)((function(){function t(t){if(t.target===e.current){var n=ta.focus.focusable.find(e.current),r=Object(d.findLast)(n,Jp);r&&(Object(ta.placeCaretAtHorizontalEdge)(r,!0),t.preventDefault())}}return e.current.addEventListener("mousedown",t),function(){e.current.addEventListener("mousedown",t)}}),[])}var tm=n(73);function nm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rm(e){e.dir=document.dir,e.body.className="editor-styles-wrapper";var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return nm(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nm(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}(document.body.classList);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.startsWith("admin-color-")&&e.body.classList.add(r)}}catch(e){n.e(e)}finally{n.f()}}function om(e,t){if(e){var n=window.getComputedStyle(e.body,null).getPropertyValue("background-color");Be()(n).getLuminance()>.5?e.body.classList.remove("is-dark-theme"):e.body.classList.add("is-dark-theme");var r=Lp(t,".editor-styles-wrapper");Object(d.map)(Object(d.compact)(r),(function(t){var n=e.createElement("style");n.innerHTML=t,e.body.appendChild(n)}))}}var cm=Object(a.forwardRef)((function(e,t){var n=e.contentRef,r=e.editorStyles,o=e.children,c=e.head,l=Object(Fe.a)(e,["contentRef","editorStyles","children","head"]),s=Object(a.useState)(),u=Object(Me.a)(s,2),d=u[0],b=u[1];Object(a.useEffect)((function(){om(d,r)}),[r]);var f=Object(a.useCallback)((function(e){function t(){var t,o=e.contentDocument,i=o.readyState;return("interactive"===i||"complete"===i)&&(n.current=o.body,b(o),function(e,t){e.head.innerHTML="<style>body{margin:0}</style>"+t}(o,c),rm(o),t=o,Array.from(document.styleSheets).forEach((function(e){try{e.cssRules}catch(e){return}var n=e.ownerNode,r=e.cssRules;r&&Array.from(r).find((function(e){var t=e.selectorText;return t&&(t.includes(".".concat("editor-styles-wrapper"))||t.includes(".".concat("wp-block")))}))&&!t.getElementById(n.id)&&t.head.appendChild(n.cloneNode(!0))})),om(o,r),function(e){var t=e.defaultView,n=t.frameElement;function r(e){var r=Object.getPrototypeOf(e).constructor.name,o=window[r],c={};for(var i in e)c[i]=e[i];if(e instanceof t.MouseEvent){var l=n.getBoundingClientRect();c.clientX+=l.left,c.clientY+=l.top}var a=new o(e.type,c);!n.dispatchEvent(a)&&e.preventDefault()}for(var o=0,c=["keydown","keypress","dragover"];o<c.length;o++){var i=c[o];e.addEventListener(i,r)}}(o),rm(o),!0)}e&&(t()||e.addEventListener("load",(function(){t()})))}),[]);return Object(a.createElement)("iframe",Object(i.a)({},l,{ref:Object(a.useCallback)(Object(tm.a)([t,f]),[]),tabIndex:"0",title:Object(w.__)("Editor canvas"),name:"editor-canvas"}),d&&Object(a.createPortal)(o,d.body))})),im=Object(a.createContext)(new Set);function lm(e){var t=Object(a.useContext)(im),n=t.has(e),r=Object(a.useMemo)((function(){return n=e,(r=new Set(t)).add(n),r;var n,r}),[e,t]);return[n,Object(a.useCallback)((function(e){var t=e.children;return Object(a.createElement)(im.Provider,{value:r},t)}),[r])]}function am(e){if(void 0===e)e=Kr.colors;else{var t=e.filter((function(e){return e.color}));0===t.length?e=Kr.colors:t.length<e.length&&(e=t)}return e}function sm(e){if(void 0===e)e=Kr.gradients;else{var t=e.filter((function(e){return e.gradient}));0===t.length?e=Kr.gradients:t.length<e.length&&(e=t)}return e}},51:function(e,t){e.exports=window.wp.notices},52:function(e,t){e.exports=window.wp.blob},54:function(e,t){e.exports=window.wp.a11y},57:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},60:function(e,t,n){var r;!function(o){var c=/^\s+/,i=/\s+$/,l=0,a=o.round,s=o.min,u=o.max,d=o.random;function b(e,t){if(t=t||{},(e=e||"")instanceof b)return e;if(!(this instanceof b))return new b(e,t);var n=function(e){var t,n,r,l={r:0,g:0,b:0},a=1,d=null,b=null,f=null,p=!1,m=!1;return"string"==typeof e&&(e=function(e){e=e.replace(c,"").replace(i,"").toLowerCase();var t,n=!1;if(x[e])e=x[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=G.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=G.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=G.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=G.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=G.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=G.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=G.hex8.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),a:F(t[4]),format:n?"name":"hex8"}:(t=G.hex6.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),format:n?"name":"hex"}:(t=G.hex4.exec(e))?{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=G.hex3.exec(e))&&{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(t=e.r,n=e.g,r=e.b,l={r:255*N(t,255),g:255*N(n,255),b:255*N(r,255)},p=!0,m="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(d=L(e.s),b=L(e.v),l=function(e,t,n){e=6*N(e,360),t=N(t,100),n=N(n,100);var r=o.floor(e),c=e-r,i=n*(1-t),l=n*(1-c*t),a=n*(1-(1-c)*t),s=r%6;return{r:255*[n,l,i,i,a,n][s],g:255*[a,n,n,l,i,i][s],b:255*[i,i,a,n,n,l][s]}}(e.h,d,b),p=!0,m="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(d=L(e.s),f=L(e.l),l=function(e,t,n){var r,o,c;function i(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=N(e,360),t=N(t,100),n=N(n,100),0===t)r=o=c=n;else{var l=n<.5?n*(1+t):n+t-n*t,a=2*n-l;r=i(a,l,e+1/3),o=i(a,l,e),c=i(a,l,e-1/3)}return{r:255*r,g:255*o,b:255*c}}(e.h,d,f),p=!0,m="hsl"),e.hasOwnProperty("a")&&(a=e.a)),a=T(a),{ok:p,format:e.format||m,r:s(255,u(l.r,0)),g:s(255,u(l.g,0)),b:s(255,u(l.b,0)),a:a}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=a(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=n.ok,this._tc_id=l++}function f(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=u(e,t,n),i=s(e,t,n),l=(c+i)/2;if(c==i)r=o=0;else{var a=c-i;switch(o=l>.5?a/(2-c-i):a/(c+i),c){case e:r=(t-n)/a+(t<n?6:0);break;case t:r=(n-e)/a+2;break;case n:r=(e-t)/a+4}r/=6}return{h:r,s:o,l:l}}function p(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=u(e,t,n),i=s(e,t,n),l=c,a=c-i;if(o=0===c?0:a/c,c==i)r=0;else{switch(c){case e:r=(t-n)/a+(t<n?6:0);break;case t:r=(n-e)/a+2;break;case n:r=(e-t)/a+4}r/=6}return{h:r,s:o,v:l}}function m(e,t,n,r){var o=[R(a(e).toString(16)),R(a(t).toString(16)),R(a(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 v(e,t,n,r){return[R(M(r)),R(a(e).toString(16)),R(a(t).toString(16)),R(a(n).toString(16))].join("")}function g(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s-=t/100,n.s=D(n.s),b(n)}function O(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s+=t/100,n.s=D(n.s),b(n)}function h(e){return b(e).desaturate(100)}function j(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l+=t/100,n.l=D(n.l),b(n)}function k(e,t){t=0===t?0:t||10;var n=b(e).toRgb();return n.r=u(0,s(255,n.r-a(-t/100*255))),n.g=u(0,s(255,n.g-a(-t/100*255))),n.b=u(0,s(255,n.b-a(-t/100*255))),b(n)}function y(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l-=t/100,n.l=D(n.l),b(n)}function _(e,t){var n=b(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,b(n)}function E(e){var t=b(e).toHsl();return t.h=(t.h+180)%360,b(t)}function C(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+120)%360,s:t.s,l:t.l}),b({h:(n+240)%360,s:t.s,l:t.l})]}function w(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+90)%360,s:t.s,l:t.l}),b({h:(n+180)%360,s:t.s,l:t.l}),b({h:(n+270)%360,s:t.s,l:t.l})]}function S(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+72)%360,s:t.s,l:t.l}),b({h:(n+216)%360,s:t.s,l:t.l})]}function B(e,t,n){t=t||6,n=n||30;var r=b(e).toHsl(),o=360/n,c=[b(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,c.push(b(r));return c}function I(e,t){t=t||6;for(var n=b(e).toHsv(),r=n.h,o=n.s,c=n.v,i=[],l=1/t;t--;)i.push(b({h:r,s:o,v:c})),c=(c+l)%1;return i}b.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,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=T(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),r=a(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),r=a(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(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 c=[R(a(e).toString(16)),R(a(t).toString(16)),R(a(n).toString(16)),R(M(r))];return o&&c[0].charAt(0)==c[0].charAt(1)&&c[1].charAt(0)==c[1].charAt(1)&&c[2].charAt(0)==c[2].charAt(1)&&c[3].charAt(0)==c[3].charAt(1)?c[0].charAt(0)+c[1].charAt(0)+c[2].charAt(0)+c[3].charAt(0):c.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*N(this._r,255))+"%",g:a(100*N(this._g,255))+"%",b:a(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*N(this._r,255))+"%, "+a(100*N(this._g,255))+"%, "+a(100*N(this._b,255))+"%)":"rgba("+a(100*N(this._r,255))+"%, "+a(100*N(this._g,255))+"%, "+a(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=b(e);n="#"+v(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 b(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(j,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(O,arguments)},greyscale:function(){return this._applyModification(h,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(B,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},b.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return b(e,t)},b.equals=function(e,t){return!(!e||!t)&&b(e).toRgbString()==b(t).toRgbString()},b.random=function(){return b.fromRatio({r:d(),g:d(),b:d()})},b.mix=function(e,t,n){n=0===n?0:n||50;var r=b(e).toRgb(),o=b(t).toRgb(),c=n/100;return b({r:(o.r-r.r)*c+r.r,g:(o.g-r.g)*c+r.g,b:(o.b-r.b)*c+r.b,a:(o.a-r.a)*c+r.a})},b.readability=function(e,t){var n=b(e),r=b(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},b.isReadable=function(e,t,n){var r,o,c,i,l,a=b.readability(e,t);switch(o=!1,(c=n,"AA"!==(i=((c=c||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(l=(c.size||"small").toLowerCase())&&"large"!==l&&(l="small"),r={level:i,size:l}).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},b.mostReadable=function(e,t,n){var r,o,c,i,l=null,a=0;o=(n=n||{}).includeFallbackColors,c=n.level,i=n.size;for(var s=0;s<t.length;s++)(r=b.readability(e,t[s]))>a&&(a=r,l=b(t[s]));return b.isReadable(e,l,{level:c,size:i})||!o?l:(n.includeFallbackColors=!1,b.mostReadable(e,["#fff","#000"],n))};var x=b.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=b.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(x);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=s(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function D(e){return s(1,u(0,e))}function A(e){return parseInt(e,16)}function R(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function M(e){return o.round(255*parseFloat(e)).toString(16)}function F(e){return A(e)/255}var V,H,z,G=(H="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",z="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+z),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 U(e){return!!G.CSS_UNIT.exec(e)}e.exports?e.exports=b:void 0===(r=function(){return b}.call(t,n,t,e))||(e.exports=r)}(Math)},68:function(e,t){e.exports=window.wp.htmlEntities},69:function(e,t){e.exports=window.wp.isShallowEqual},7:function(e,t){e.exports=window.wp.primitives},72:function(e,t,n){e.exports=function(e,t){var n,r,o=0;function c(){var c,i,l=n,a=arguments.length;e:for(;l;){if(l.args.length===arguments.length){for(i=0;i<a;i++)if(l.args[i]!==arguments[i]){l=l.next;continue e}return l!==n&&(l===r&&(r=l.prev),l.prev.next=l.next,l.next&&(l.next.prev=l.prev),l.next=n,l.prev=null,n.prev=l,n=l),l.val}l=l.next}for(c=new Array(a),i=0;i<a;i++)c[i]=arguments[i];return l={args:c,val:e.apply(null,c)},n?(n.prev=l,l.next=n):r=l,o===t.maxSize?(r=r.prev).next=null:o++,n=l,l.val}return t=t||{},c.clear=function(){n=null,r=null,o=0},c}},73:function(e,t,n){"use strict";t.a=function(e){return function(t){e.forEach((function(e){"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}},8:function(e,t){e.exports=window.React},9:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(40),o=n(31),c=n(41);function i(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],_n=!0,r=!1,o=void 0;try{for(var c,i=e[Symbol.iterator]();!(_n=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{_n||null==i.return||i.return()}finally{if(r)throw o}}return n}}(e,t)||Object(o.a)(e,t)||Object(c.a)()}}});
|
1 |
+
window.wp=window.wp||{},window.wp.blockEditor=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=508)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10: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}))},100:function(e,t,n){"use strict";t.__esModule=!0;var r=n(217);t.default=r.TextareaAutosize},11:function(e,t){e.exports=window.wp.blocks},12:function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r))e.push(o.apply(null,r));else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?e.exports=o:void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},125:function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(213)),c=r(n(214)),i=n(8),l=r(i),a=r(n(183)),s=r(n(215)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(){var e=i.useState(!1)[1];return i.useCallback((function(){return e((function(e){return!e}))}),[])}function b(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return u.fun(e)?e.apply(void 0,n):e}function m(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return u.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var v,g,O=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),h=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof O&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof O&&e.removeChild(s(t))}))},t}return a(t,e),t}(O),j=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof O&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof O&&e.removeChild(s(t))}))},t}a(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof O)&&(t[n]=r instanceof O?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(O);function k(e,t){v={fn:e,transform:t}}function y(e){g=e}var _,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},C=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function w(e){_=e}var S,B=function(){return Date.now()};function I(e){S=e}var x,P,T=function(e){return e.current};function N(e){x=e}var D=Object.freeze({get applyAnimatedValues(){return v},injectApplyAnimatedValues:k,get colorNames(){return g},injectColorNames:y,get requestFrame(){return E},get cancelFrame(){return C},injectFrame:function(e,t){E=e,C=t},get interpolation(){return _},injectStringInterpolator:w,get now(){return B},injectNow:function(e){B=e},get defaultElement(){return S},injectDefaultElement:I,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return x},injectCreateAnimatedStyle:N,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),A=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:x(t.style)}):t,r.update=n,r.attach(),r}return a(t,e),t}(j),R=!1,L=new Set,M=function e(){if(!R)return!1;var t=B(),n=L,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var i=c,l=!1,a=0;a<i.configs.length;a++){for(var s=i.configs[a],u=void 0,d=void 0,b=0;b<s.animatedValues.length;b++){var f=s.animatedValues[b];if(!f.done){var p=s.fromValues[b],m=s.toValues[b],v=f.lastPosition,g=m instanceof O,h=Array.isArray(s.initialVelocity)?s.initialVelocity[b]:s.initialVelocity;if(g&&(m=m.getValue()),s.immediate)f.setValue(m),f.done=!0;else if("string"!=typeof p&&"string"!=typeof m){if(void 0!==s.duration)v=p+s.easing((t-f.startTime)/s.duration)*(m-p),u=t>=f.startTime+s.duration;else if(s.decay)v=p+h/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-v)<.1)&&(m=v);else{d=void 0!==f.lastTime?f.lastTime:t,h=void 0!==f.lastVelocity?f.lastVelocity:s.initialVelocity,t>d+64&&(d=t);for(var j=Math.floor(t-d),k=0;k<j;++k)v+=1*(h+=(-s.tension*(v-m)+-s.friction*h)/s.mass*1/1e3)/1e3;var y=!(!s.clamp||0===s.tension)&&(p<m?v>m:v<m),_=Math.abs(h)<=s.precision,C=0===s.tension||Math.abs(m-v)<=s.precision;u=y||_&&C,f.lastVelocity=h,f.lastTime=t}g&&!s.toValues[b].done&&(u=!1),u?(f.value!==m&&(v=m),f.done=!0):l=!0,f.setValue(v),f.lastPosition=v}else f.setValue(m),f.done=!0}}i.props.onFrame&&(i.values[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),l||(L.delete(i),i.stop(!0))}return L.size?P?P():E(e):R=!1,R};function F(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return F({range:e,output:t,extrapolate:n});if(_&&"string"==typeof e.output[0])return _(e);var r=e,o=r.output,c=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",l=r.extrapolateRight||r.extrapolate||"extend",a=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,i,l,a){var s=a?a(e):e;if(s<t){if("identity"===i)return s;"clamp"===i&&(s=t)}if(s>n){if("identity"===l)return s;"clamp"===l&&(s=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t),s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r,s)}(e,c[t],c[t+1],o[t],o[t+1],a,i,l,r.map)}}var V=function(e){function t(n,r,o){var c;return(c=e.call(this)||this).calc=void 0,c.payload=n instanceof h&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],c.calc=F(r,o),c}a(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t){this.calc=F(e,t)},n.interpolate=function(e,n){return new t(this,e,n)},t}(h),H=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}a(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t){return new V(this,e,t)},t}(O),z=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new H(e)})),n}a(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(h),G=0,U=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=m(e),n=t.delay,r=void 0===n?0:n,i=t.to,l=c(t,["delay","to"]);if(u.arr(i)||u.fun(i))this.queue.push(o({},l,{delay:r,to:i}));else if(i){var a={};Object.entries(i).forEach((function(e){var t,n=e[0],c=e[1],i=o({to:(t={},t[n]=c,t),delay:p(r,n)},l),s=a[i.delay]&&a[i.delay].to;a[i.delay]=o({},a[i.delay],i,{to:o({},s,i.to)})})),this.queue=Object.values(a)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(l),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var n=e.from,r=void 0===n?{}:n,c=e.to,i=void 0===c?{}:c;u.obj(r)&&(t.merged=o({},r,t.merged)),u.obj(i)&&(t.merged=o({},t.merged,i))}));var n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((function(o,i){var l=o.delay,a=c(o,["delay"]),s=function(o){i===r.length-1&&n===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(a.to)||u.fun(a.to);l?setTimeout((function(){n===t.guid&&(d?t.runAsync(a,s):t.diff(a).start(s))}),l):d?t.runAsync(a,s):t.diff(a).start(s)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,L.has(this)||L.add(this),R||(R=!0,E(P||M));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,L.has(this)&&L.delete(this)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,l=Promise.resolve(void 0);if(u.arr(r.to))for(var a=function(e){var t=e,c=o({},r,m(r.to[t]));u.arr(c.config)&&(c.config=c.config[t]),l=l.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s<r.to.length;s++)a(s);else if(u.fun(r.to)){var d,b=0;l=l.then((function(){return r.to((function(e){var t=o({},r,m(e));if(u.arr(t.config)&&(t.config=t.config[b]),b++,i===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}l.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,i=n.to,l=void 0===i?{}:i,a=n.config,s=void 0===a?{}:a,d=n.reverse,m=n.attach,v=n.reset,O=n.immediate;if(d){var h=[l,c];c=h[0],l=h[1]}this.merged=o({},c,this.merged,l),this.hasChanged=!1;var j=m&&m(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],i=n[1],l=e[r]||{},a=u.num(i),d=u.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!g[i],m=u.arr(i),h=!a&&!m&&!d,k=u.und(c[r])?i:c[r],y=a||m||d?i:1,E=p(s,r);j&&(y=j.animations[r].parent);var C,w=l.parent,S=l.interpolation,I=f(j?y.getPayload():y),x=i;h&&(x=_({range:[0,1],output:[i,i]})(1));var P,T=S&&S.getValue(),N=!u.und(w)&&l.animatedValues.some((function(e){return!e.done})),D=!u.equ(x,T),A=!u.equ(x,l.previous),R=!u.equ(E,l.config);if(v||A&&D||R){var L;if(a||d)w=S=l.parent||new H(k);else if(m)w=S=l.parent||new z(k);else if(h){var M=l.interpolation&&l.interpolation.calc(l.parent.value);M=void 0===M||v?k:M,l.parent?(w=l.parent).setValue(0,!1):w=new H(0);var F={output:[M,i]};l.interpolation?(S=l.interpolation,l.interpolation.updateConfig(F)):S=w.interpolate(F)}return I=f(j?y.getPayload():y),C=f(w.getPayload()),v&&!h&&w.setValue(k,!1),t.hasChanged=!0,C.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=N?e.lastVelocity:void 0,e.lastTime=N?e.lastTime:void 0,e.startTime=B(),e.done=!1,e.animatedStyles.clear()})),p(O,r)&&w.setValue(h?y:i,!1),o({},e,((L={})[r]=o({},l,{name:r,parent:w,interpolation:S,animatedValues:C,toValues:I,previous:x,config:E,fromValues:f(w.getValue()),immediate:p(O,r),initialVelocity:b(E.velocity,0),clamp:b(E.clamp,!1),precision:b(E.precision,.01),tension:b(E.tension,170),friction:b(E.friction,26),mass:b(E.mass,1),duration:E.duration,easing:b(E.easing,(function(e){return e})),decay:E.decay}),L))}return D?e:(h&&(w.setValue(1,!1),S.updateConfig({output:[x,x]})),w.done=!0,t.hasChanged=!0,o({},e,((P={})[r]=o({},e[r],{previous:x}),P)))}),this.animations),this.hasChanged)for(var k in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[k]=this.animations[k].interpolation,this.values[k]=this.animations[k].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),W=function(e,t){var n=i.useRef(!1),r=i.useRef(),o=u.fun(t),c=i.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new U,i=o?p(t,r,c):t[r];return 0===r&&(n=i.ref),c.update(i),n||c.start(),c})),n]}),[e]),l=c[0],a=c[1];r.current=l,i.useImperativeHandle(a,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var s=i.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?p(e,n,t):e[n]),a||t.start()}))}}),[e]);i.useEffect((function(){n.current?o||s(t):a||r.current.forEach((function(e){return e.start()}))})),i.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var d=r.current.map((function(e){return e.getValues()}));return o?[d,s,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:d},K=0,q=function(e,t){return("function"==typeof t?e.map(t):f(t)).map(String)},$=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,i=c(e,["items","keys"]);return t=f(void 0!==t?t:null),o({items:t,keys:q(t,r)},i)};function Y(e,t){var n=function(){if(o){if(c>=r.length)return"break";i=r[c++]}else{if((c=r.next()).done)return"break";i=c.value}var n=i.key,l=function(e){return e.key!==n};(u.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(l),e.current.deleted=e.current.deleted.filter(l))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var i;if("break"===n())break}e.current.forceUpdate()}var X=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof O||(t=v.transform(t)),n.payload=t,n}return a(t,e),t}(j),Q={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+J(Z,Z,Z)),te=new RegExp("rgba"+J(Z,Z,Z,Z)),ne=new RegExp("hsl"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{6})$/,le=/^#([0-9a-fA-F]{8})$/;function ae(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}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=ae(o,r,e+1/3),i=ae(o,r,e),l=ae(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*i)<<16|Math.round(255*l)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function be(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function pe(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:Q.hasOwnProperty(t)?Q[t]:(n=ee.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|255)>>>0:(n=te.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|be(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=le.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(de(n[1]),fe(n[2]),fe(n[3])))>>>0:(n=re.exec(t))?(se(de(n[1]),fe(n[2]),fe(n[3]))|be(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var me=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ve=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(Q).join("|")+")","g"),Oe={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","Ms","Moz","O"];function je(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Oe.hasOwnProperty(e)&&Oe[e]?(""+t).trim():t+"px"}Oe=Object.keys(Oe).reduce((function(e,t){return he.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),Oe);var ke={};N((function(e){return new X(e)})),I("div"),w((function(e){var t=e.output.map((function(e){return e.replace(ve,pe)})).map((function(e){return e.replace(ge,pe)})),n=t[0].match(me).map((function(){return[]}));t.forEach((function(e){e.match(me).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(me).map((function(t,r){return F(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(me,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),y(Q),k((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,i=t.scrollLeft,l=c(t,["style","children","scrollTop","scrollLeft"]),a="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var u=0===s.indexOf("--"),d=je(s,n[s],u);"float"===s&&(s="cssFloat"),u?e.style.setProperty(s,d):e.style[s]=d}for(var b in l){var f=a?b:ke[b]||(ke[b]=b.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,l[b])}}),(function(e){return e}));var ye,_e,Ee=(ye=function(e){return i.forwardRef((function(t,n){var r=d(),a=i.useRef(!0),s=i.useRef(null),b=i.useRef(null),f=i.useCallback((function(e){var t=s.current;s.current=new A(e,(function(){b.current&&!1===v.fn(b.current,s.current.getAnimatedValue())&&r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){a.current=!1,s.current&&s.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(b,a,r)})),f(t);var p=s.current.getValue(),m=(p.scrollTop,p.scrollLeft,c(p,["scrollTop","scrollLeft"]));return l.createElement(e,o({},m,{ref:function(e){return b.current=(t=e,(r=n)&&(u.fun(r)?r(t):u.obj(r)&&(r.current=t)),t);var t,r}}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=_e?t[0].toLowerCase()+t.substring(1):t;return e[n]=ye(n),e}),ye)}),Ce=Ee(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=M,t.animated=Ce,t.a=Ce,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=D,t.useSpring=function(e){var t=u.fun(e),n=W(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=i.useRef(!1),r=u.fun(t),c=p(t),l=i.useRef(),a=W(e,(function(e,t){return 0===e&&(l.current=[]),l.current.push(t),o({},c,{config:p(c.config,e),attach:e>0&&function(){return l.current[e-1]}})})),s=a[0],d=a[1],b=a[2],f=i.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=l.current[r];return o({},e,{config:p(e.config||c.config,t),attach:i&&function(){return i}})}))}}),[e,c.reverse]);return i.useEffect((function(){n.current&&!r&&f(t)})),i.useEffect((function(){n.current=!0}),[]),r?[s,f,b]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),l=$(r),a=l.lazy,s=void 0!==a&&a,u=(l.unique,l.reset),b=void 0!==u&&u,f=(l.enter,l.leave,l.update,l.onDestroyed),m=(l.keys,l.items,l.onFrame),v=l.onRest,g=l.onStart,O=l.ref,h=c(l,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),j=d(),k=i.useRef(!1),y=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!k.current&&new Map,forceUpdate:j});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(y.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(y.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(y.current.instances).map((function(e){return e[1]}))}}})),y.current=function(e,t){for(var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),l=$(t),a=l.items,s=l.keys,u=l.initial,d=l.from,b=l.enter,f=l.leave,m=l.update,v=l.trail,g=void 0===v?0:v,O=l.unique,h=l.config,j=l.order,k=void 0===j?["enter","leave","update"]:j,y=$(r),_=y.keys,E=y.items,C=o({},i.current),w=[].concat(i.deleted),S=Object.keys(C),B=new Set(S),I=new Set(s),x=s.filter((function(e){return!B.has(e)})),P=i.transitions.filter((function(e){return!e.destroyed&&!I.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return B.has(e)})),N=-g;k.length;)switch(k.shift()){case"enter":x.forEach((function(e,t){O&&w.find((function(t){return t.originalKey===e}))&&(w=w.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=a[r],c=n&&void 0!==u?"initial":"enter";C[e]={slot:c,originalKey:e,key:O?String(e):K++,item:o,trail:N+=g,config:p(h,o,c),from:p(n&&void 0!==u?u||{}:d,o),to:p(b,o)}}));break;case"leave":P.forEach((function(e){var t=_.indexOf(e),n=E[t];w.unshift(o({},C[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=g,config:p(h,n,"leave"),to:p(f,n)})),delete C[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=a[t];C[e]=o({},C[e],{item:n,slot:"update",trail:N+=g,config:p(h,n,"update"),to:p(m,n)})}))}var D=s.map((function(e){return C[e]}));return w.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=D.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),D=[].concat(D.slice(0,t),[r],D.slice(t))})),o({},i,{changed:x.length||P.length||T.length,first:n&&0===x.length,transitions:D,current:C,deleted:w,prevProps:t})}(y.current,r),y.current.changed&&y.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,i=e.trail,l=e.key,a=e.item;y.current.instances.has(l)||y.current.instances.set(l,new U);var u=y.current.instances.get(l),d=o({},h,{to:r,from:n,config:c,ref:O,onRest:function(n){y.current.mounted&&(e.destroyed&&(O||s||Y(y,l),f&&f(a)),!Array.from(y.current.instances).some((function(e){return!e[1].idle}))&&(O||s)&&y.current.deleted.length>0&&Y(y),v&&v(a,t,n))},onStart:g&&function(){return g(a,t)},onFrame:m&&function(e){return m(a,t,e)},delay:i,reset:b&&"enter"===t});u.update(d),y.current.paused||u.start()})),i.useEffect((function(){return y.current.mounted=k.current=!0,function(){y.current.mounted=k.current=!1,Array.from(y.current.instances).map((function(e){return e[1].destroy()})),y.current.instances.clear()}}),[]),y.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:y.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){u.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var l=n*t[r];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+l})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=W},13:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(48);function o(e,t){if(null==e)return{};var n,o,c=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},136:function(e,t,n){"use strict";e.exports=n(221)},137:function(e,t){e.exports=window.wp.wordcount},14:function(e,t){e.exports=window.wp.compose},140:function(e,t){e.exports=window.wp.shortcode},142:function(e,t,n){"use strict";var r=n(5),o=n(13),c=n(0);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,l=void 0===n?24:n,a=Object(o.a)(e,["icon","size"]);return Object(c.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:l,height:l},a))}},143:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"}));t.a=c},144:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},145:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=c},15:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(25),o=n(39),c=n(31);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(o.a)(e)||Object(c.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},154:function(e,t,n){"use strict";var r=n(155);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var l=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 l.name="Invariant Violation",l}}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,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},155:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},16:function(e,t){e.exports=window.regeneratorRuntime},169:function(e,t){e.exports=window.wp.tokenList},17:function(e,t){e.exports=window.wp.keycodes},182:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=c},183:function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},184:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=c},19: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}))},199: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}},2:function(e,t){e.exports=window.lodash},213:function(e,t){function n(){return e.exports=n=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},n.apply(this,arguments)}e.exports=n},214:function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},215:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},216:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=c},217: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 __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),c=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};t.__esModule=!0;var l=n(8),a=n(35),s=n(218),u=n(219),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,r=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||r?setTimeout((function(){return e.textarea&&s(e.textarea)})):this.textarea&&s(this.textarea),this.textarea&&this.textarea.addEventListener("autosize:resized",this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener("autosize:resized",this.onResize),s.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),r=(t.onChange,t.style),o=(t.innerRef,t.children),a=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),s=this.state.lineHeight,u=n&&s?s*n:null;return l.createElement("textarea",c({},a,{onChange:this.onChange,style:u?c({},r,{maxHeight:u}):r,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),o)},t.prototype.componentDidUpdate=function(){this.textarea&&s.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.any,async:a.bool},t}(l.Component);t.TextareaAutosize=l.forwardRef((function(e,t){return l.createElement(d,c({},e,{innerRef:t}))}))},218:function(e,t,n){var r,o;void 0===(o="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))}}),c=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){c=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){var t=o.get(e);t&&t.destroy()}function l(e){var t=o.get(e);t&&t.update()}var a=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((a=function(e){return e}).destroy=function(e){return e},a.update=function(e){return e}):((a=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t,n=null,r=null,i=null,l=function(){e.clientWidth!==r&&d()},a=function(t){window.removeEventListener("resize",l,!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",l,!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"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function s(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",r=e.clientWidth,t.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),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(s("scroll"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(s("hidden"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),i!==r){i=r;var o=c("autosize:resized");try{e.dispatchEvent(o)}catch(e){}}}}(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},a.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=a,e.exports=t.default})?r.apply(t,[e,t]):r)||(e.exports=o)},219:function(e,t,n){var r=n(220);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 c=e.nodeName,i=document.createElement(c);i.innerHTML=" ","TEXTAREA"===c.toUpperCase()&&i.setAttribute("rows","1");var l=r(e,"font-size");i.style.fontSize=l,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i),n=i.offsetHeight,a.removeChild(i)}return n}},22: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}))},220: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()}))]}},221:function(e,t,n){"use strict";var r=n(222);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=r.getWindow(t));var o=n.allowHorizontalScroll,c=n.onlyScrollIfNeeded,i=n.alignWithTop,l=n.alignWithLeft,a=n.offsetTop||0,s=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;o=void 0===o||o;var b=r.isWindow(t),f=r.offset(e),p=r.outerHeight(e),m=r.outerWidth(e),v=void 0,g=void 0,O=void 0,h=void 0,j=void 0,k=void 0,y=void 0,_=void 0,E=void 0,C=void 0;b?(y=t,C=r.height(y),E=r.width(y),_={left:r.scrollLeft(y),top:r.scrollTop(y)},j={left:f.left-_.left-s,top:f.top-_.top-a},k={left:f.left+m-(_.left+E)+d,top:f.top+p-(_.top+C)+u},h=_):(v=r.offset(t),g=t.clientHeight,O=t.clientWidth,h={left:t.scrollLeft,top:t.scrollTop},j={left:f.left-(v.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-s,top:f.top-(v.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-a},k={left:f.left+m-(v.left+O+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:f.top+p-(v.top+g+(parseFloat(r.css(t,"borderBottomWidth"))||0))+u}),j.top<0||k.top>0?!0===i?r.scrollTop(t,h.top+j.top):!1===i?r.scrollTop(t,h.top+k.top):j.top<0?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top):c||((i=void 0===i||!!i)?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top)),o&&(j.left<0||k.left>0?!0===l?r.scrollLeft(t,h.left+j.left):!1===l?r.scrollLeft(t,h.left+k.left):j.left<0?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+k.left):c||((l=void 0===l||!!l)?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+k.left)))}},222: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 c(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 i(e){return c(e)}function l(e){return c(e,!0)}function a(e){var t=function(e){var t,n=void 0,r=void 0,o=e.ownerDocument,c=o.body,i=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=i.clientLeft||c.clientLeft||0,top:r-=i.clientTop||c.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=i(r),t.top+=l(r),t}var s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),u=/^(top|right|bottom|left)$/,d="left",b=void 0;function f(e,t){for(var n=0;n<e.length;n++)t(e[n])}function p(e){return"border-box"===b(e,"boxSizing")}"undefined"!=typeof window&&(b=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,c=n||o.defaultView.getComputedStyle(e,null);return c&&(r=c.getPropertyValue(t)||c[t]),r}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!u.test(t)){var r=e.style,o=r[d],c=e.runtimeStyle[d];e.runtimeStyle[d]=e.currentStyle[d],r[d]="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r[d]=o,e.runtimeStyle[d]=c}return""===n?"auto":n});var m=["margin","border","padding"];function v(e,t,n){var r={},o=e.style,c=void 0;for(c in t)t.hasOwnProperty(c)&&(r[c]=o[c],o[c]=t[c]);for(c in n.call(e),t)t.hasOwnProperty(c)&&(o[c]=r[c])}function g(e,t,n){var r=0,o=void 0,c=void 0,i=void 0;for(c=0;c<t.length;c++)if(o=t[c])for(i=0;i<n.length;i++){var l;l="border"===o?o+n[i]+"Width":o+n[i],r+=parseFloat(b(e,l))||0}return r}function O(e){return null!=e&&e==e.window}var h={};function j(e,t,n){if(O(e))return"width"===t?h.viewportWidth(e):h.viewportHeight(e);if(9===e.nodeType)return"width"===t?h.docWidth(e):h.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],o="width"===t?e.offsetWidth:e.offsetHeight,c=(b(e),p(e)),i=0;(null==o||o<=0)&&(o=void 0,(null==(i=b(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===n&&(n=c?1:-1);var l=void 0!==o||c,a=o||i;if(-1===n)return l?a-g(e,["border","padding"],r):i;if(l){var s=2===n?-g(e,["border"],r):g(e,["margin"],r);return a+(1===n?0:s)}return i+g(e,m.slice(n),r)}f(["Width","Height"],(function(e){h["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],h["viewport"+e](n))},h["viewport"+e]=function(t){var n="client"+e,r=t.document,o=r.body,c=r.documentElement[n];return"CSS1Compat"===r.compatMode&&c||o&&o[n]||c}}));var k={position:"absolute",visibility:"hidden",display:"block"};function y(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=j.apply(void 0,n):v(e,k,(function(){t=j.apply(void 0,n)})),t}function _(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)):b(e,t);for(var c in t)t.hasOwnProperty(c)&&_(e,c,t[c])}f(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);h["outer"+t]=function(t,n){return t&&y(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];h[e]=function(t,r){return void 0===r?t&&y(t,e,-1):t?(b(t),p(t)&&(r+=g(t,["padding","border"],n)),_(t,e,r)):void 0}})),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 a(e);!function(e,t){"static"===_(e,"position")&&(e.style.position="relative");var n=a(e),r={},o=void 0,c=void 0;for(c in t)t.hasOwnProperty(c)&&(o=parseFloat(_(e,c))||0,r[c]=o+t[c]-n[c]);_(e,r)}(e,t)},isWindow:O,each:f,css:_,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(O(e)){if(void 0===t)return i(e);window.scrollTo(t,l(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(O(e)){if(void 0===t)return l(e);window.scrollTo(i(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},h)},223:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));t.a=c},239:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.a=c},24:function(e,t){e.exports=window.wp.richText},25:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},258:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));t.a=c},259:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=c},260:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=c},261:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));t.a=c},262:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));t.a=c},263:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(o.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));t.a=c},264:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.a=c},27: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}))},28: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}))},29:function(e,t){e.exports=window.wp.url},3:function(e,t){e.exports=window.wp.components},30:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(57);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&&Object(r.a)(e,t)}},31:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(25);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},32:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(43),o=n(19);function c(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},33:function(e,t){e.exports=window.wp.dom},334:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.diffChars=function(e,t,n){return o.diff(e,t,n)},t.characterDiff=void 0;var o=new(((r=n(379))&&r.__esModule?r:{default:r}).default);t.characterDiff=o},335:function(e,t,n){"use strict";t.match=function(e,t){return a(e).some((function(e){var n=e.inverse,r="all"===e.type||t.type===e.type;if(r&&n||!r&&!n)return!1;var o=e.expressions.every((function(e){var n=e.feature,r=e.modifier,o=e.value,c=t[n];if(!c)return!1;switch(n){case"orientation":case"scan":return c.toLowerCase()===o.toLowerCase();case"width":case"height":case"device-width":case"device-height":o=d(o),c=d(c);break;case"resolution":o=u(o),c=u(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":o=s(o),c=s(c);break;case"grid":case"color":case"color-index":case"monochrome":o=parseInt(o,10)||1,c=parseInt(c,10)||0}switch(r){case"min":return c>=o;case"max":return c<=o;default:return c===o}}));return o&&!n||!o&&n}))},t.parse=a;var r=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,o=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,c=/^(?:(min|max)-)?(.+)/,i=/(em|rem|px|cm|mm|in|pt|pc)?$/,l=/(dpi|dpcm|dppx)?$/;function a(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(r),n=t[1],i=t[2],l=t[3]||"",a={};return a.inverse=!!n&&"not"===n.toLowerCase(),a.type=i?i.toLowerCase():"all",l=l.match(/\([^\)]+\)/g)||[],a.expressions=l.map((function(e){var t=e.match(o),n=t[1].toLowerCase().match(c);return{modifier:n[1],feature:n[2],value:t[2]}})),a}))}function s(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function u(e){var t=parseFloat(e);switch(String(e).match(l)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function d(e){var t=parseFloat(e);switch(String(e).match(i)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},336: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=[],l=!0;return function e(d){var b=n?c(d):d,f={},p=!0,m={node:b,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){m.isRoot||(m.parent.node[m.key]=e),m.node=e,t&&(p=!1)},delete:function(e){delete m.parent.node[m.key],e&&(p=!1)},remove:function(e){a(m.parent.node)?m.parent.node.splice(m.key,1):delete m.parent.node[m.key],e&&(p=!1)},keys:null,before:function(e){f.before=e},after:function(e){f.after=e},pre:function(e){f.pre=e},post:function(e){f.post=e},stop:function(){l=!1},block:function(){p=!1}};if(!l)return m;function v(){if("object"==typeof m.node&&null!==m.node){m.keys&&m.node_===m.node||(m.keys=i(m.node)),m.isLeaf=0==m.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===d){m.circular=o[e];break}}else m.isLeaf=!0,m.keys=null;m.notLeaf=!m.isLeaf,m.notRoot=!m.isRoot}v();var g=t.call(m,m.node);return void 0!==g&&m.update&&m.update(g),f.before&&f.before.call(m,m.node),p?("object"!=typeof m.node||null===m.node||m.circular||(o.push(m),v(),s(m.keys,(function(t,o){r.push(t),f.pre&&f.pre.call(m,m.node[t],t);var c=e(m.node[t]);n&&u.call(m.node,t)&&(m.node[t]=c.node),c.isLast=o==m.keys.length-1,c.isFirst=0==o,f.post&&f.post.call(m,c),r.pop()})),o.pop()),f.after&&f.after.call(m,m.node),m):m}(e).node}function c(e){if("object"==typeof e&&null!==e){var t;if(a(e))t=[];else if("[object Date]"===l(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===l(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===l(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===l(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===l(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===l(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 s(i(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 l=c(r);return e.push(r),t.push(l),s(i(r),(function(e){l[e]=n(r[e])})),e.pop(),t.pop(),l}return r}(this.value)};var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function l(e){return Object.prototype.toString.call(e)}var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};s(i(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}},34:function(e,t){e.exports=window.wp.hooks},35:function(e,t,n){e.exports=n(154)()},37:function(e,t){e.exports=window.wp.deprecated},375:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));t.a=c},376:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));t.a=c},377:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));t.a=c},378:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));t.a=c},379:function(e,t,n){"use strict";function r(){}function o(e,t,n,r,o){for(var c=0,i=t.length,l=0,a=0;c<i;c++){var s=t[c];if(s.removed){if(s.value=e.join(r.slice(a,a+s.count)),a+=s.count,c&&t[c-1].added){var u=t[c-1];t[c-1]=t[c],t[c]=u}}else{if(!s.added&&o){var d=n.slice(l,l+s.count);d=d.map((function(e,t){var n=r[a+t];return n.length>e.length?n:e})),s.value=e.join(d)}else s.value=e.join(n.slice(l,l+s.count));l+=s.count,s.added||(a+=s.count)}}var b=t[i-1];return i>1&&"string"==typeof b.value&&(b.added||b.removed)&&e.equals("",b.value)&&(t[i-2].value+=b.value,t.pop()),t}function c(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var i=this;function l(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,u=1,d=a+s,b=[{newPos:-1,components:[]}],f=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=a&&f+1>=s)return l([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*u;n<=u;n+=2){var r=void 0,d=b[n-1],f=b[n+1],p=(f?f.newPos:0)-n;d&&(b[n-1]=void 0);var m=d&&d.newPos+1<a,v=f&&0<=p&&p<s;if(m||v){if(!m||v&&d.newPos<f.newPos?(r=c(f),i.pushComponent(r.components,void 0,!0)):((r=d).newPos++,i.pushComponent(r.components,!0,void 0)),p=i.extractCommon(r,t,e,n),r.newPos+1>=a&&p+1>=s)return l(o(i,r.components,t,e,i.useLongestToken));b[n]=r}else b[n]=void 0}u++}if(r)!function e(){setTimeout((function(){if(u>d)return r();p()||e()}),0)}();else for(;u<=d;){var m=p();if(m)return m}},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,c=n.length,i=e.newPos,l=i-r,a=0;i+1<o&&l+1<c&&this.equals(t[i+1],n[l+1]);)i++,l++,a++;return a&&e.components.push({count:a}),e.newPos=i,l},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("")}}},380:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(o.Path,{d:"M2 2h5v11H2V2zm6 0h5v5H8V2zm6 0h4v16h-4V2zM8 8h5v5H8V8zm-6 6h11v4H2v-4z"}));t.a=c},381:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));t.a=c},39:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},4:function(e,t){e.exports=window.wp.data},40:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},41:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},43: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)}n.d(t,"a",(function(){return r}))},44:function(e,t){e.exports=window.wp.keyboardShortcuts},46:function(e,t,n){"use strict";function r(e,t,n,r,o,c,i){try{var l=e[c](i),a=l.value}catch(e){return void n(e)}l.done?t(a):Promise.resolve(a).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,c){var i=e.apply(t,n);function l(e){r(i,o,c,l,a,"next",e)}function a(e){r(i,o,c,l,a,"throw",e)}l(void 0)}))}}n.d(t,"a",(function(){return o}))},48:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},5: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}))},50:function(e,t,n){"use strict";var r,o;function c(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function l(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,a;function s(){n=o?new WeakMap:i()}function u(){var n,r,o,c,i,s=arguments.length;for(c=new Array(s),o=0;o<s;o++)c[o]=arguments[o];for(i=t.apply(null,c),(n=a(i)).isUniqueByDependants||(n.lastDependants&&!l(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(l(r.args,c,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,c)},c[0]=null,r.args=c,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=c),a=o?function(e){var t,o,c,l,a,s=n,u=!0;for(t=0;t<e.length;t++){if(!(a=o=e[t])||"object"!=typeof a){u=!1;break}s.has(o)?s=s.get(o):(c=new WeakMap,s.set(o,c),s=c)}return s.has(r)||((l=i()).isUniqueByDependants=u,s.set(r,l)),s.get(r)}:function(){return n},u.getDependants=t,u.clear=s,s(),u}},508:function(e,t,n){"use strict";n.r(t),n.d(t,"getColorClassName",(function(){return Pe})),n.d(t,"getColorObjectByAttributeValues",(function(){return Ie})),n.d(t,"getColorObjectByColorValue",(function(){return xe})),n.d(t,"createCustomColorsHOC",(function(){return qn})),n.d(t,"withColors",(function(){return $n})),n.d(t,"__experimentalUseColors",(function(){return ur})),n.d(t,"__experimentalGetGradientClass",(function(){return Ne})),n.d(t,"getGradientValueBySlug",(function(){return De})),n.d(t,"__experimentalGetGradientObjectByGradientValue",(function(){return Ae})),n.d(t,"getGradientSlugByValue",(function(){return Re})),n.d(t,"__experimentalUseGradient",(function(){return Le})),n.d(t,"getFontSize",(function(){return un})),n.d(t,"getFontSizeClass",(function(){return bn})),n.d(t,"getFontSizeObjectByValue",(function(){return dn})),n.d(t,"FontSizePicker",(function(){return fn})),n.d(t,"withFontSizes",(function(){return mr})),n.d(t,"AlignmentToolbar",(function(){return _r})),n.d(t,"Autocomplete",(function(){return Hr})),n.d(t,"BlockAlignmentToolbar",(function(){return z})),n.d(t,"__experimentalBlockFullHeightAligmentToolbar",(function(){return Gr})),n.d(t,"__experimentalBlockAlignmentMatrixToolbar",(function(){return Ur})),n.d(t,"BlockBreadcrumb",(function(){return Dl})),n.d(t,"BlockContextProvider",(function(){return Ml})),n.d(t,"BlockControls",(function(){return C})),n.d(t,"BlockColorsStyleSelector",(function(){return zl})),n.d(t,"BlockEdit",(function(){return Wl})),n.d(t,"useBlockEditContext",(function(){return h})),n.d(t,"BlockFormatControls",(function(){return Xl})),n.d(t,"BlockIcon",(function(){return Mr})),n.d(t,"BlockNavigationDropdown",(function(){return Vd})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return Ed})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return tb})),n.d(t,"__experimentalBlockNavigationTree",(function(){return Rd})),n.d(t,"__experimentalBlockVariationPicker",(function(){return rb})),n.d(t,"__experimentalBlockVariationTransforms",(function(){return ib})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return pb})),n.d(t,"ButtonBlockerAppender",(function(){return Ns})),n.d(t,"ColorPalette",(function(){return Ob})),n.d(t,"ColorPaletteControl",(function(){return hb})),n.d(t,"ContrastChecker",(function(){return it})),n.d(t,"__experimentalGradientPicker",(function(){return yb})),n.d(t,"__experimentalGradientPickerControl",(function(){return _b})),n.d(t,"__experimentalGradientPickerPanel",(function(){return Eb})),n.d(t,"__experimentalFontAppearanceControl",(function(){return Yt})),n.d(t,"__experimentalFontFamilyControl",(function(){return nn})),n.d(t,"__experimentalColorGradientControl",(function(){return $e})),n.d(t,"__experimentalPanelColorGradientSettings",(function(){return rt})),n.d(t,"__experimentalImageSizeControl",(function(){return wb})),n.d(t,"InnerBlocks",(function(){return Fb})),n.d(t,"__experimentalUseInnerBlocksProps",(function(){return Mb})),n.d(t,"InspectorAdvancedControls",(function(){return ee})),n.d(t,"InspectorControls",(function(){return ce})),n.d(t,"__experimentalLinkControl",(function(){return gf})),n.d(t,"__experimentalLinkControlSearchInput",(function(){return uf})),n.d(t,"__experimentalLinkControlSearchResults",(function(){return Zb})),n.d(t,"__experimentalLinkControlSearchItem",(function(){return Qb})),n.d(t,"LineHeightControl",(function(){return zt})),n.d(t,"MediaReplaceFlow",(function(){return yf})),n.d(t,"MediaPlaceholder",(function(){return Bf})),n.d(t,"MediaUpload",(function(){return jf})),n.d(t,"MediaUploadCheck",(function(){return kf})),n.d(t,"PanelColorSettings",(function(){return Jn})),n.d(t,"PlainText",(function(){return Pf})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return Nf})),n.d(t,"RichText",(function(){return eb})),n.d(t,"RichTextShortcut",(function(){return Df})),n.d(t,"RichTextToolbarButton",(function(){return Af})),n.d(t,"__unstableRichTextInputEvent",(function(){return Rf})),n.d(t,"ToolSelector",(function(){return Mf})),n.d(t,"__experimentalUnitControl",(function(){return Ff})),n.d(t,"URLInput",(function(){return $b})),n.d(t,"URLInputButton",(function(){return zf})),n.d(t,"URLPopover",(function(){return wf})),n.d(t,"__experimentalImageURLInputUI",(function(){return Kf})),n.d(t,"withColorContext",(function(){return gb})),n.d(t,"__experimentalBlockSettingsMenuFirstItem",(function(){return _u})),n.d(t,"__experimentalInserterMenuExtension",(function(){return js})),n.d(t,"__experimentalPreviewOptions",(function(){return $f})),n.d(t,"__experimentalUseResizeCanvas",(function(){return tp})),n.d(t,"BlockInspector",(function(){return ap})),n.d(t,"BlockList",(function(){return Ku})),n.d(t,"useBlockProps",(function(){return sd})),n.d(t,"__experimentalBlock",(function(){return bp})),n.d(t,"BlockMover",(function(){return Xs})),n.d(t,"BlockPreview",(function(){return qa})),n.d(t,"BlockSelectionClearer",(function(){return pp})),n.d(t,"__unstableUseBlockSelectionClearer",(function(){return fp})),n.d(t,"BlockSettingsMenu",(function(){return Nu})),n.d(t,"BlockSettingsMenuControls",(function(){return xu})),n.d(t,"BlockTitle",(function(){return Nl})),n.d(t,"BlockToolbar",(function(){return Mu})),n.d(t,"CopyHandler",(function(){return vu})),n.d(t,"__unstableUseClipboardHandler",(function(){return mu})),n.d(t,"DefaultBlockAppender",(function(){return Ts})),n.d(t,"__unstableEditorStyles",(function(){return Fp})),n.d(t,"Inserter",(function(){return Ps})),n.d(t,"__experimentalLibrary",(function(){return Vp})),n.d(t,"__experimentalSearchForm",(function(){return Ma})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return zp})),n.d(t,"MultiSelectScrollIntoView",(function(){return Up})),n.d(t,"__unstableUseScrollMultiSelectionIntoView",(function(){return Gp})),n.d(t,"NavigableToolbar",(function(){return $s})),n.d(t,"ObserveTyping",(function(){return $p})),n.d(t,"__unstableUseTypingObserver",(function(){return qp})),n.d(t,"__unstableUseMouseMoveTypingReset",(function(){return Kp})),n.d(t,"PreserveScrollInReorder",(function(){return Yp})),n.d(t,"SkipToSelectedBlock",(function(){return np})),n.d(t,"Typewriter",(function(){return Jp})),n.d(t,"__unstableUseTypewriter",(function(){return Zp})),n.d(t,"Warning",(function(){return ha})),n.d(t,"WritingFlow",(function(){return cd})),n.d(t,"__unstableUseCanvasClickRedirect",(function(){return tm})),n.d(t,"useBlockDisplayInformation",(function(){return Tl})),n.d(t,"__unstableIframe",(function(){return om})),n.d(t,"__experimentalUseNoRecursiveRenders",(function(){return im})),n.d(t,"BlockEditorProvider",(function(){return Ua})),n.d(t,"__experimentalUseSimulatedMediaQuery",(function(){return ep})),n.d(t,"__experimentalUseEditorFeature",(function(){return ge})),n.d(t,"transformStyles",(function(){return Lp})),n.d(t,"validateThemeColors",(function(){return lm})),n.d(t,"validateThemeGradients",(function(){return am})),n.d(t,"__experimentalGetMatchingVariation",(function(){return ob})),n.d(t,"storeConfig",(function(){return xl})),n.d(t,"store",(function(){return Pl})),n.d(t,"SETTINGS_DEFAULTS",(function(){return Kr}));var r={};n.r(r),n.d(r,"getBlockName",(function(){return Oo})),n.d(r,"isBlockValid",(function(){return ho})),n.d(r,"getBlockAttributes",(function(){return jo})),n.d(r,"getBlock",(function(){return ko})),n.d(r,"__unstableGetBlockWithoutInnerBlocks",(function(){return yo})),n.d(r,"getBlocks",(function(){return _o})),n.d(r,"__unstableGetBlockWithBlockTree",(function(){return Eo})),n.d(r,"__unstableGetBlockTree",(function(){return Co})),n.d(r,"getClientIdsOfDescendants",(function(){return wo})),n.d(r,"getClientIdsWithDescendants",(function(){return So})),n.d(r,"getGlobalBlockCount",(function(){return Bo})),n.d(r,"getBlocksByClientId",(function(){return Io})),n.d(r,"getBlockCount",(function(){return xo})),n.d(r,"getSelectionStart",(function(){return Po})),n.d(r,"getSelectionEnd",(function(){return To})),n.d(r,"getBlockSelectionStart",(function(){return No})),n.d(r,"getBlockSelectionEnd",(function(){return Do})),n.d(r,"getSelectedBlockCount",(function(){return Ao})),n.d(r,"hasSelectedBlock",(function(){return Ro})),n.d(r,"getSelectedBlockClientId",(function(){return Lo})),n.d(r,"getSelectedBlock",(function(){return Mo})),n.d(r,"getBlockRootClientId",(function(){return Fo})),n.d(r,"getBlockParents",(function(){return Vo})),n.d(r,"getBlockParentsByBlockName",(function(){return Ho})),n.d(r,"getBlockHierarchyRootClientId",(function(){return zo})),n.d(r,"getLowestCommonAncestorWithSelectedBlock",(function(){return Go})),n.d(r,"getAdjacentBlockClientId",(function(){return Uo})),n.d(r,"getPreviousBlockClientId",(function(){return Wo})),n.d(r,"getNextBlockClientId",(function(){return Ko})),n.d(r,"getSelectedBlocksInitialCaretPosition",(function(){return qo})),n.d(r,"getSelectedBlockClientIds",(function(){return $o})),n.d(r,"getMultiSelectedBlockClientIds",(function(){return Yo})),n.d(r,"getMultiSelectedBlocks",(function(){return Xo})),n.d(r,"getFirstMultiSelectedBlockClientId",(function(){return Qo})),n.d(r,"getLastMultiSelectedBlockClientId",(function(){return Zo})),n.d(r,"isFirstMultiSelectedBlock",(function(){return Jo})),n.d(r,"isBlockMultiSelected",(function(){return ec})),n.d(r,"isAncestorMultiSelected",(function(){return tc})),n.d(r,"getMultiSelectedBlocksStartClientId",(function(){return nc})),n.d(r,"getMultiSelectedBlocksEndClientId",(function(){return rc})),n.d(r,"getBlockOrder",(function(){return oc})),n.d(r,"getBlockIndex",(function(){return cc})),n.d(r,"isBlockSelected",(function(){return ic})),n.d(r,"hasSelectedInnerBlock",(function(){return lc})),n.d(r,"isBlockWithinSelection",(function(){return ac})),n.d(r,"hasMultiSelection",(function(){return sc})),n.d(r,"isMultiSelecting",(function(){return uc})),n.d(r,"isSelectionEnabled",(function(){return dc})),n.d(r,"getBlockMode",(function(){return bc})),n.d(r,"isTyping",(function(){return fc})),n.d(r,"isDraggingBlocks",(function(){return pc})),n.d(r,"getDraggedBlockClientIds",(function(){return mc})),n.d(r,"isBlockBeingDragged",(function(){return vc})),n.d(r,"isAncestorBeingDragged",(function(){return gc})),n.d(r,"isCaretWithinFormattedText",(function(){return Oc})),n.d(r,"getBlockInsertionPoint",(function(){return hc})),n.d(r,"isBlockInsertionPointVisible",(function(){return jc})),n.d(r,"isValidTemplate",(function(){return kc})),n.d(r,"getTemplate",(function(){return yc})),n.d(r,"getTemplateLock",(function(){return _c})),n.d(r,"canInsertBlockType",(function(){return Cc})),n.d(r,"canInsertBlocks",(function(){return wc})),n.d(r,"getInserterItems",(function(){return Tc})),n.d(r,"getBlockTransformItems",(function(){return Nc})),n.d(r,"hasInserterItems",(function(){return Dc})),n.d(r,"__experimentalGetAllowedBlocks",(function(){return Ac})),n.d(r,"getBlockListSettings",(function(){return Rc})),n.d(r,"getSettings",(function(){return Lc})),n.d(r,"isLastBlockChangePersistent",(function(){return Mc})),n.d(r,"__experimentalGetBlockListSettingsForBlocks",(function(){return Fc})),n.d(r,"__experimentalGetParsedReusableBlock",(function(){return Vc})),n.d(r,"__experimentalGetReusableBlockTitle",(function(){return Hc})),n.d(r,"__unstableIsLastBlockChangeIgnored",(function(){return zc})),n.d(r,"__experimentalGetLastBlockAttributeChanges",(function(){return Gc})),n.d(r,"isNavigationMode",(function(){return Wc})),n.d(r,"hasBlockMovingClientId",(function(){return Kc})),n.d(r,"didAutomaticChange",(function(){return qc})),n.d(r,"isBlockHighlighted",(function(){return $c})),n.d(r,"areInnerBlocksControlled",(function(){return Yc})),n.d(r,"__experimentalGetActiveBlockIdByBlockNames",(function(){return Xc}));var o={};n.r(o),n.d(o,"resetBlocks",(function(){return Ci})),n.d(o,"validateBlocksToTemplate",(function(){return wi})),n.d(o,"resetSelection",(function(){return Si})),n.d(o,"receiveBlocks",(function(){return Bi})),n.d(o,"updateBlockAttributes",(function(){return Ii})),n.d(o,"updateBlock",(function(){return xi})),n.d(o,"selectBlock",(function(){return Pi})),n.d(o,"selectPreviousBlock",(function(){return Ti})),n.d(o,"selectNextBlock",(function(){return Ni})),n.d(o,"startMultiSelect",(function(){return Di})),n.d(o,"stopMultiSelect",(function(){return Ai})),n.d(o,"multiSelect",(function(){return Ri})),n.d(o,"clearSelectedBlock",(function(){return Li})),n.d(o,"toggleSelection",(function(){return Mi})),n.d(o,"replaceBlocks",(function(){return Vi})),n.d(o,"replaceBlock",(function(){return Hi})),n.d(o,"moveBlocksDown",(function(){return Gi})),n.d(o,"moveBlocksUp",(function(){return Ui})),n.d(o,"moveBlocksToPosition",(function(){return Wi})),n.d(o,"moveBlockToPosition",(function(){return Ki})),n.d(o,"insertBlock",(function(){return qi})),n.d(o,"insertBlocks",(function(){return $i})),n.d(o,"__unstableSetInsertionPoint",(function(){return Yi})),n.d(o,"showInsertionPoint",(function(){return Xi})),n.d(o,"hideInsertionPoint",(function(){return Qi})),n.d(o,"setTemplateValidity",(function(){return Zi})),n.d(o,"synchronizeTemplate",(function(){return Ji})),n.d(o,"mergeBlocks",(function(){return el})),n.d(o,"removeBlocks",(function(){return tl})),n.d(o,"removeBlock",(function(){return nl})),n.d(o,"replaceInnerBlocks",(function(){return rl})),n.d(o,"toggleBlockMode",(function(){return ol})),n.d(o,"startTyping",(function(){return cl})),n.d(o,"stopTyping",(function(){return il})),n.d(o,"startDraggingBlocks",(function(){return ll})),n.d(o,"stopDraggingBlocks",(function(){return al})),n.d(o,"enterFormattedText",(function(){return sl})),n.d(o,"exitFormattedText",(function(){return ul})),n.d(o,"selectionChange",(function(){return dl})),n.d(o,"insertDefaultBlock",(function(){return bl})),n.d(o,"updateBlockListSettings",(function(){return fl})),n.d(o,"updateSettings",(function(){return pl})),n.d(o,"__unstableSaveReusableBlock",(function(){return ml})),n.d(o,"__unstableMarkLastChangeAsPersistent",(function(){return vl})),n.d(o,"__unstableMarkNextChangeAsNotPersistent",(function(){return gl})),n.d(o,"__unstableMarkAutomaticChange",(function(){return Ol})),n.d(o,"__unstableMarkAutomaticChangeFinal",(function(){return hl})),n.d(o,"setNavigationMode",(function(){return jl})),n.d(o,"setBlockMovingClientId",(function(){return kl})),n.d(o,"duplicateBlocks",(function(){return yl})),n.d(o,"insertBeforeBlock",(function(){return _l})),n.d(o,"insertAfterBlock",(function(){return El})),n.d(o,"toggleBlockHighlight",(function(){return Cl})),n.d(o,"flashBlock",(function(){return wl})),n.d(o,"setHasControlledInnerBlocks",(function(){return Sl}));var c=n(24),i=n(10),l=n(5),a=n(0),s=n(12),u=n.n(s),d=n(2),b=n(14),f=n(34),p=n(11),m=n(4),v=n(3),g=Object(a.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:d.noop,clientId:null}),O=g.Provider;function h(){return Object(a.useContext)(g)}function j(){var e=h(),t=e.isSelected,n=e.clientId,r=e.name,o=Object(m.useSelect)((function(e){if(!t){var o=e("core/block-editor"),c=o.getBlockName,i=o.isFirstMultiSelectedBlock,l=o.getMultiSelectedBlockClientIds;return!!i(n)&&l().every((function(e){return c(e)===r}))}}),[n,t,r]);return t||o}var k=Object(v.createSlotFill)("BlockControls"),y=k.Fill,_=k.Slot,E=function(e){var t=e.controls,n=e.children;return j()?Object(a.createElement)(y,null,(function(e){var r=Object(d.isEmpty)(e)?null:e;return Object(a.createElement)(v.__experimentalToolbarContext.Provider,{value:r},Object(a.createElement)(v.ToolbarGroup,{controls:t}),n)})):null};E.Slot=function(e){var t=Object(a.useContext)(v.__experimentalToolbarContext);return Object(a.createElement)(_,Object(i.a)({},e,{fillProps:t}))};var C=E,w=n(1),S=n(7),B=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),I=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),x=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),P=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),T=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),N={type:"default"},D=Object(a.createContext)(N),A=D.Provider;function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M={left:{icon:B,title:Object(w.__)("Align left")},center:{icon:I,title:Object(w.__)("Align center")},right:{icon:x,title:Object(w.__)("Align right")},wide:{icon:P,title:Object(w.__)("Wide width")},full:{icon:T,title:Object(w.__)("Full width")}},F=["left","center","right","wide","full"],V=["wide","full"],H={isAlternate:!0},z=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?F:r,c=e.isCollapsed,i=void 0===c||c,l=Object(m.useSelect)((function(e){return{wideControlsEnabled:(0,e("core/block-editor").getSettings)().alignWide}})).wideControlsEnabled,s=void 0!==l&&l,u=Object(a.useContext)(D);if("default"!==u.type)return null;var d=u.alignments,b=void 0===d?F:d,f=o.filter((function(e){return(s||!V.includes(e))&&b.includes(e)}));if(0===f.length)return null;var p=M[t],g=M.center;return Object(a.createElement)(v.ToolbarGroup,{popoverProps:H,isCollapsed:i,icon:p?p.icon:g.icon,label:Object(w.__)("Align"),toggleProps:{describedBy:Object(w.__)("Change alignment")},controls:f.map((function(e){return L(L({},M[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})};function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var W=["left","center","right","wide","full"],K=["wide","full"];function q(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?W.filter((function(t){return e.includes(t)})):!0===e?W:[],!r||!0===e&&!n?d.without.apply(void 0,[t].concat(K)):t}var $=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=q(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0));return[r.length>0&&t.isSelected&&Object(a.createElement)(C,{key:"align-controls"},Object(a.createElement)(z,{value:t.attributes.align,onChange:function(e){var n,r;e||(null===(n=Object(p.getBlockType)(t.name).attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e=""),t.setAttributes({align:e})},controls:r})),Object(a.createElement)(e,Object(i.a)({key:"edit"},t))]}}),"withToolbarControls"),Y=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=t.attributes.align,o=Object(m.useSelect)((function(e){return!!e("core/block-editor").getSettings().alignWide}),[]);if(void 0===r)return Object(a.createElement)(e,t);var c=q(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0),o),l=t.wrapperProps;return c.includes(r)&&(l=U(U({},l),{},{"data-align":r})),Object(a.createElement)(e,Object(i.a)({},t,{wrapperProps:l}))}}));Object(f.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(d.has)(e.attributes,["align","type"])||Object(p.hasBlockSupport)(e,"align")&&(e.attributes=U(U({},e.attributes),{},{align:{type:"string",enum:[].concat(W,[""])}})),e})),Object(f.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Y),Object(f.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",$),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){var r=n.align;return q(Object(p.getBlockSupport)(t,"align"),Object(p.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=u()("align".concat(r),e.className)),e}));var X=Object(v.createSlotFill)("InspectorAdvancedControls"),Q=X.Fill,Z=X.Slot;function J(e){var t=e.children;return h().isSelected?Object(a.createElement)(Q,null,t):null}J.slotName="InspectorAdvancedControls",J.Slot=Z;var ee=J,te=Object(v.createSlotFill)("InspectorControls"),ne=te.Fill,re=te.Slot;function oe(e){var t=e.children;return j()?Object(a.createElement)(ne,null,t):null}oe.Slot=re;var ce=oe;function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ae=/[\s#]/g,se=Object(b.createHigherOrderComponent)((function(e){return function(t){if(Object(p.hasBlockSupport)(t.name,"anchor")&&t.isSelected){var n="web"===a.Platform.OS,r=Object(a.createElement)(v.TextControl,{className:"html-anchor-control",label:Object(w.__)("HTML anchor"),help:Object(a.createElement)(a.Fragment,null,Object(w.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),Object(a.createElement)(v.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(w.__)("Learn more about anchors"))),value:t.attributes.anchor||"",valuePlaceholder:n?null:Object(w.__)("Add an anchor"),onChange:function(e){e=e.replace(ae,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(e,t),n&&Object(a.createElement)(ee,null,r),!n&&"core/heading"===t.name&&Object(a.createElement)(ce,null,Object(a.createElement)(v.PanelBody,{title:Object(w.__)("Heading settings")},r)))}return Object(a.createElement)(e,t)}}),"withInspectorControl");function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Object(f.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return Object(d.has)(e.attributes,["anchor","type"])||Object(p.hasBlockSupport)(e,"anchor")&&(e.attributes=le(le({},e.attributes),{},{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",se),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return Object(p.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));var be=Object(b.createHigherOrderComponent)((function(e){return function(t){return Object(p.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(a.createElement)(a.Fragment,null,Object(a.createElement)(e,t),Object(a.createElement)(ee,null,Object(a.createElement)(v.TextControl,{autoComplete:"off",label:Object(w.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})},help:Object(w.__)("Separate multiple classes with spaces.")}))):Object(a.createElement)(e,t)}}),"withInspectorControl");function fe(e){e="<div data-custom-class-name>".concat(e,"</div>");var t=Object(p.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(f.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Object(p.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=de(de({},e.attributes),{},{className:{type:"string"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",be),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Object(p.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=u()(e.className,n.className)),e})),Object(f.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",(function(e,t,n){if(Object(p.hasBlockSupport)(t,"customClassName",!0)){var r=Object(d.omit)(e,["className"]),o=Object(p.getSaveContent)(t,r),c=fe(o),i=fe(n),l=Object(d.difference)(i,c);l.length?e.className=l.join(" "):o&&delete e.className}return e}));var pe=n(15);Object(f.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Object(p.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(d.uniq)([Object(p.getBlockDefaultClassName)(t.name)].concat(Object(pe.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(p.getBlockDefaultClassName)(t.name)),e}));var me={"color.palette":function(e){return void 0===e.colors?void 0:e.colors},"color.gradients":function(e){return void 0===e.gradients?void 0:e.gradients},"color.custom":function(e){return void 0===e.disableCustomColors?void 0:!e.disableCustomColors},"color.customGradient":function(e){return void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients},"typography.fontSizes":function(e){return void 0===e.fontSizes?void 0:e.fontSizes},"typography.customFontSize":function(e){return void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes},"typography.customLineHeight":function(e){return e.enableCustomLineHeight},"spacing.units":function(e){if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw"]:e.enableCustomUnits},"spacing.customPadding":function(e){return e.enableCustomSpacing}};function ve(e,t){for(var n in t)if(t[n]!==e[n])return!1;return!0}function ge(e){var t=h(),n=t.name,r=t.clientId;return Object(m.useSelect)((function(t){var o,c=t("core/block-editor"),i=c.getBlockAttributes,l=(0,c.getSettings)(),a=t(p.store).getBlockType(n),s=n,u=Object(d.get)(a,["supports","__experimentalSelector"]);if(Object(d.isObject)(u)){var b=i(r)||{};for(var f in u)if(ve(b,u[f].attributes)){s=f;break}}var m="__experimentalFeatures.defaults.".concat(e),v="__experimentalFeatures.".concat(s,".").concat(e),g=null!==(o=Object(d.get)(l,v))&&void 0!==o?o:Object(d.get)(l,m);if(void 0!==g)return g;var O=me[e]?me[e](l):void 0;return void 0!==O?O:"typography.dropCap"===e||void 0}),[n,r,e])}var Oe=function e(t){if(!Object(d.isObject)(t))return t;var n=Object(d.pickBy)(Object(d.mapValues)(t,e),d.identity);return Object(d.isEqual)(n,{})?void 0:n};function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ke(e){var t,n=e.attributes.style,r=e.setAttributes;return _e(e)?null:Object(a.createElement)(v.RangeControl,{value:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,label:Object(w.__)("Border radius"),min:0,max:50,initialPosition:0,allowReset:!0,onChange:function(e){var t=je(je({},n),{},{border:je(je({},null==n?void 0:n.border),{},{radius:e})});r({style:Oe(t)})}})}function ye(e){var t=Object(p.getBlockSupport)(e,Ee);return!!(!0===t||null!=t&&t.radius)}function _e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!ge("border.customRadius");return!ye(t)||n}var Ee="__experimentalBorder";function Ce(e){var t=we(e),n=function(e){if("web"!==a.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,Ee);return!!(!0===t||null!=t&&t.radius)}(e.name);return t||!n?null:Object(a.createElement)(ce,null,Object(a.createElement)(v.PanelBody,{title:Object(w.__)("Border settings")},Object(a.createElement)(ke,e)))}var we=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[_e(e)];return t.every(Boolean)},Se=n(60),Be=n.n(Se),Ie=function(e,t,n){if(t){var r=Object(d.find)(e,{slug:t});if(r)return r}return{color:n}},xe=function(e,t){return Object(d.find)(e,{color:t})};function Pe(e,t){if(e&&t)return"has-".concat(Object(d.kebabCase)(t),"-").concat(e)}var Te=[];function Ne(e){if(e)return"has-".concat(e,"-gradient-background")}function De(e,t){var n=Object(d.find)(e,["slug",t]);return n&&n.gradient}function Ae(e,t){return Object(d.find)(e,["gradient",t])}function Re(e,t){var n=Ae(e,t);return n&&n.slug}function Le(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.gradientAttribute,n=void 0===t?"gradient":t,r=e.customGradientAttribute,o=void 0===r?"customGradient":r,c=h(),i=c.clientId,s=ge("color.gradients")||Te,u=Object(m.useSelect)((function(e){var t=(0,e("core/block-editor").getBlockAttributes)(i)||{};return{customGradient:t[o],gradient:t[n]}}),[i,n,o]),d=u.gradient,b=u.customGradient,f=Object(m.useDispatch)("core/block-editor"),p=f.updateBlockAttributes,v=Object(a.useCallback)((function(e){var t,r,c=Re(s,e);p(i,c?(r={},Object(l.a)(r,n,c),Object(l.a)(r,o,void 0),r):(t={},Object(l.a)(t,n,void 0),Object(l.a)(t,o,e),t))}),[s,i,p]),g=Ne(d);return{gradientClass:g,gradientValue:d?De(s,d):b,setGradient:v}}var Me=n(9),Fe=n(13);function Ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
|
2 |
// translators: first %s: the color name or value (e.g. red or #ff0000)
|
3 |
var ze=Object(w.__)("(Color: %s)"),Ge=Object(w.__)("(Gradient: %s)"),Ue=["colors","disableCustomColors","gradients","disableCustomGradients"];// translators: first %s: the gradient name or value (e.g. red to green or linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)
|
4 |
function We(e){var t,n,r=e.colors,o=e.gradients,c=e.label,i=e.currentTab,l=e.colorValue,s=e.gradientValue;if("color"===i){if(l){var u=xe(r,t=l),d=u&&u.name;n=Object(w.sprintf)(ze,d||t)}}else if("gradient"===i&&s){var b=Ae(o,t=s),f=b&&b.name;n=Object(w.sprintf)(Ge,f||t)}return Object(a.createElement)(a.Fragment,null,c,!!t&&Object(a.createElement)(v.ColorIndicator,{colorValue:t,"aria-label":n}))}function Ke(e){var t=e.colors,n=e.gradients,r=e.disableCustomColors,o=e.disableCustomGradients,c=e.className,l=e.label,s=e.onColorChange,b=e.onGradientChange,f=e.colorValue,p=e.gradientValue,m=e.clearable,g=s&&(!Object(d.isEmpty)(t)||!r),O=b&&(!Object(d.isEmpty)(n)||!o),h=Object(a.useState)(p?"gradient":!!g&&"color"),j=Object(Me.a)(h,2),k=j[0],y=j[1];return g||O?Object(a.createElement)(v.BaseControl,{className:u()("block-editor-color-gradient-control",c)},Object(a.createElement)("fieldset",null,Object(a.createElement)("legend",null,Object(a.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},Object(a.createElement)(v.BaseControl.VisualLabel,null,Object(a.createElement)(We,{currentTab:k,label:l,colorValue:f,gradientValue:p})))),g&&O&&Object(a.createElement)(v.ButtonGroup,{className:"block-editor-color-gradient-control__button-tabs"},Object(a.createElement)(v.Button,{isSmall:!0,isPressed:"color"===k,onClick:function(){return y("color")}},Object(w.__)("Solid")),Object(a.createElement)(v.Button,{isSmall:!0,isPressed:"gradient"===k,onClick:function(){return y("gradient")}},Object(w.__)("Gradient"))),("color"===k||!O)&&Object(a.createElement)(v.ColorPalette,Object(i.a)({value:f,onChange:O?function(e){s(e),b()}:s},{colors:t,disableCustomColors:r},{clearable:m})),("gradient"===k||!g)&&Object(a.createElement)(v.__experimentalGradientPicker,Object(i.a)({value:p,onChange:g?function(e){b(e),s()}:b},{gradients:n,disableCustomGradients:o},{clearable:m})))):null}function qe(e){var t={};return t.colors=ge("color.palette"),t.gradients=ge("color.gradients"),t.disableCustomColors=!ge("color.custom"),t.disableCustomGradients=!ge("color.customGradient"),Object(a.createElement)(Ke,He(He({},t),e))}var $e=function(e){return Object(d.every)(Ue,(function(t){return e.hasOwnProperty(t)}))?Object(a.createElement)(Ke,e):Object(a.createElement)(qe,e)};function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
|
5 |
// translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
|
6 |
var Qe=Object(w.__)("(%s: color %s)"),Ze=Object(w.__)("(%s: gradient %s)"),Je=["colors","disableCustomColors","gradients","disableCustomGradients"],et=function(e){var t=e.colors,n=e.gradients;return e.settings.map((function(e,r){var o,c=e.colorValue,i=e.gradientValue,l=e.label,s=e.colors,u=e.gradients;if(!c&&!i)return null;if(c){var d=xe(s||t,c);o=Object(w.sprintf)(Qe,l.toLowerCase(),d&&d.name||c)}else{var b=Ae(u||n,c);o=Object(w.sprintf)(Ze,l.toLowerCase(),b&&b.name||i)}return Object(a.createElement)(v.ColorIndicator,{key:r,colorValue:c||i,"aria-label":o})}))},tt=function(e){var t=e.className,n=e.colors,r=e.gradients,o=e.disableCustomColors,c=e.disableCustomGradients,l=e.children,s=e.settings,b=e.title,f=Object(Fe.a)(e,["className","colors","gradients","disableCustomColors","disableCustomGradients","children","settings","title"]);if(Object(d.isEmpty)(n)&&Object(d.isEmpty)(r)&&o&&c&&Object(d.every)(s,(function(e){return Object(d.isEmpty)(e.colors)&&Object(d.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)})))return null;var p=Object(a.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},b,Object(a.createElement)(et,{colors:n,gradients:r,settings:s}));return Object(a.createElement)(v.PanelBody,Object(i.a)({className:u()("block-editor-panel-color-gradient-settings",t),title:p},f),s.map((function(e,t){return Object(a.createElement)($e,Object(i.a)({key:t},Xe({colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:c},e)))})),l)},nt=function(e){var t={};return t.colors=ge("color.palette"),t.gradients=ge("color.gradients"),t.disableCustomColors=!ge("color.custom"),t.disableCustomGradients=!ge("color.customGradient"),Object(a.createElement)(tt,Xe(Xe({},t),e))},rt=function(e){return Object(d.every)(Je,(function(t){return e.hasOwnProperty(t)}))?Object(a.createElement)(tt,e):Object(a.createElement)(nt,e)},ot=n(54);// translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
|
7 |
+
function ct(e){var t=e.tinyBackgroundColor,n=e.tinyTextColor,r=e.backgroundColor,o=e.textColor,c=t.getBrightness()<n.getBrightness()?Object(w.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):Object(w.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return Object(a.useEffect)((function(){Object(ot.speak)(Object(w.__)("This color combination may be hard for people to read."))}),[r,o]),Object(a.createElement)("div",{className:"block-editor-contrast-checker"},Object(a.createElement)(v.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},c))}var it=function(e){var t=e.backgroundColor,n=e.fallbackBackgroundColor,r=e.fallbackTextColor,o=e.fontSize,c=e.isLargeText,i=e.textColor;if(!t&&!n||!i&&!r)return null;var l=Be()(t||n),s=Be()(i||r);return 1!==l.getAlpha()||1!==s.getAlpha()||Be.a.isReadable(l,s,{level:"AA",size:c||!1!==c&&o>=24?"large":"small"})?null:Object(a.createElement)(ct,{backgroundColor:t,textColor:i,tinyBackgroundColor:l,tinyTextColor:s})};function lt(e,t){return t.getElementById("block-"+e)}function at(e,t){return t.closest(".block-editor-block-list__block")===e}function st(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(e){var t=e.closest(".block-editor-block-list__block");if(t)return t.id.slice("block-".length)}}function ut(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function dt(e){var t=e.settings,n=e.clientId,r=e.enableContrastChecking,o=void 0===r||r,c=Object(a.useState)(),i=Object(Me.a)(c,2),l=i[0],s=i[1],u=Object(a.useState)(),d=Object(Me.a)(u,2),b=d[0],f=d[1];return Object(a.useEffect)((function(){if(o){var e=lt(n,document);if(e){f(ut(e).color);for(var t=e,r=ut(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===t.parentNode.ELEMENT_NODE;)r=ut(t=t.parentNode).backgroundColor;s(r)}}})),Object(a.createElement)(ce,null,Object(a.createElement)(rt,{title:Object(w.__)("Color settings"),initialOpen:!1,settings:t},o&&Object(a.createElement)(it,{backgroundColor:l,textColor:b})))}function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pt=[],mt=function(e){var t=Object(p.getBlockSupport)(e,"color");return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},vt=function(e){if("web"!==a.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,"color");return Object(d.isObject)(t)&&!!t.link},gt=function(e){if("web"!==a.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,"color");return Object(d.isObject)(t)&&!!t.gradients},Ot=function(e){var t=Object(p.getBlockSupport)(e,"color");return t&&!1!==t.text};function ht(e,t,n){var r,o,c,i,a,s;if(!mt(t))return e;var d=gt(t),b=n.backgroundColor,f=n.textColor,p=n.gradient,m=n.style,v=Pe("background-color",b),g=Ne(p),O=Pe("color",f),h=u()(e.className,O,g,(s={},Object(l.a)(s,v,!(d&&null!=m&&null!==(r=m.color)&&void 0!==r&&r.gradient||!v)),Object(l.a)(s,"has-text-color",f||(null==m||null===(o=m.color)||void 0===o?void 0:o.text)),Object(l.a)(s,"has-background",b||(null==m||null===(c=m.color)||void 0===c?void 0:c.background)||d&&(p||(null==m||null===(i=m.color)||void 0===i?void 0:i.gradient))),Object(l.a)(s,"has-link-color",null==m||null===(a=m.color)||void 0===a?void 0:a.link),s));return e.className=h||void 0,e}var jt=function(e,t){var n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?Ie(e,n[1]).color:t};function kt(e){var t,n,r,o,c,i,s=e.name,u=e.attributes,d=ge("color.link"),b=ge("color.palette")||pt,f=ge("color.gradients")||pt,m=Object(a.useRef)(u);if(Object(a.useEffect)((function(){m.current=u}),[u]),!mt(s)||"web"!==a.Platform.OS)return null;var v,g,O,h=(v=s,(g=Object(p.getBlockSupport)(v,"color"))&&!1!==g.background),j=gt(s),k=u.style,y=u.textColor,_=u.backgroundColor,E=u.gradient;if(j&&E)O=De(f,E);else if(j){var C;O=null==k||null===(C=k.color)||void 0===C?void 0:C.gradient}var S=function(t){return function(n){var r,o,c=xe(b,n),i=t+"Color",a=ft(ft({},m.current.style),{},{color:ft(ft({},null===(r=m.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color),{},Object(l.a)({},t,null!=c&&c.slug?void 0:n))}),s=null!=c&&c.slug?c.slug:void 0,u=Object(l.a)({style:Oe(a)},i,s);e.setAttributes(u),m.current=ft(ft({},m.current),u)}};return Object(a.createElement)(dt,{enableContrastChecking:!("web"!==a.Platform.OS||E||null!=k&&null!==(t=k.color)&&void 0!==t&&t.gradient),clientId:e.clientId,settings:[].concat(Object(pe.a)(Ot(s)?[{label:Object(w.__)("Text Color"),onColorChange:S("text"),colorValue:Ie(b,y,null==k||null===(n=k.color)||void 0===n?void 0:n.text).color}]:[]),Object(pe.a)(h||j?[{label:Object(w.__)("Background Color"),onColorChange:h?S("background"):void 0,colorValue:Ie(b,_,null==k||null===(r=k.color)||void 0===r?void 0:r.background).color,gradientValue:O,onGradientChange:j?function(t){var n,r=Re(f,t);if(r){var o,c,i,l=ft(ft({},null===(o=m.current)||void 0===o?void 0:o.style),{},{color:ft(ft({},null===(c=m.current)||void 0===c||null===(i=c.style)||void 0===i?void 0:i.color),{},{gradient:void 0})});n={style:Oe(l),gradient:r}}else{var a,s,u,d=ft(ft({},null===(a=m.current)||void 0===a?void 0:a.style),{},{color:ft(ft({},null===(s=m.current)||void 0===s||null===(u=s.style)||void 0===u?void 0:u.color),{},{gradient:t})});n={style:Oe(d),gradient:void 0}}e.setAttributes(n),m.current=ft(ft({},m.current),n)}:void 0}]:[]),Object(pe.a)(d&&vt(s)?[{label:Object(w.__)("Link Color"),onColorChange:function(t){var n,r=xe(b,t);e.setAttributes({style:ft(ft({},e.attributes.style),{},{color:ft(ft({},null===(n=e.attributes.style)||void 0===n?void 0:n.color),{},{link:null!=r&&r.slug?"var:preset|color|".concat(r.slug):t})})})},colorValue:jt(b,null==k||null===(o=k.color)||void 0===o?void 0:o.link),clearable:!(null===(c=e.attributes.style)||void 0===c||null===(i=c.color)||void 0===i||!i.link)}]:[]))})}var yt=Object(b.createHigherOrderComponent)((function(e){return function(t){var n,r,o,c=t.name,l=t.attributes,s=l.backgroundColor,u=l.textColor,d=ge("color.palette")||pt;if(!mt(c))return Object(a.createElement)(e,t);var b={color:u?null===(n=Ie(d,u))||void 0===n?void 0:n.color:void 0,backgroundColor:s?null===(r=Ie(d,s))||void 0===r?void 0:r.color:void 0},f=t.wrapperProps;return f=ft(ft({},t.wrapperProps),{},{style:ft(ft({},b),null===(o=t.wrapperProps)||void 0===o?void 0:o.style)}),Object(a.createElement)(e,Object(i.a)({},t,{wrapperProps:f}))}}));Object(f.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return mt(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),gt(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",ht),Object(f.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!mt(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),ht(r,e,n)},e})),Object(f.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",yt);var _t=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})),Et=n(375),Ct=[{name:Object(w.__)("Underline"),value:"underline",icon:_t},{name:Object(w.__)("Strikethrough"),value:"line-through",icon:Et.a}];function wt(e){var t=e.value,n=e.onChange;return Object(a.createElement)("fieldset",{className:"block-editor-text-decoration-control"},Object(a.createElement)("legend",null,Object(w.__)("Decoration")),Object(a.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},Ct.map((function(e){return Object(a.createElement)(v.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===t,onClick:function(){return n(e.value===t?void 0:e.value)},"aria-label":e.name})}))))}function St(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?St(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):St(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function It(e){var t,n=e.attributes.style,r=e.setAttributes;return xt(e)?null:Object(a.createElement)(wt,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){r({style:Oe(Bt(Bt({},n),{},{typography:Bt(Bt({},null==n?void 0:n.typography),{},{textDecoration:e})}))})}})}function xt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Object(p.hasBlockSupport)(t,"__experimentalTextDecoration"),r=ge("typography.customTextDecorations");return n||!r}var Pt=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})),Tt=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M10.8 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.1-.4-.3-.9-.4-1.6-.4-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.3 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.5.1-.7 0-.8-.1zM9.1 16c-.2.3-.5.6-.9.8-.4.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.5-3.9c-.3-.6-.7-1.1-1.2-1.5-.5-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1 0-.6-.2-1.3-.5-1.9zm-1.6 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.5-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})),Nt=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"})),Dt=[{name:Object(w.__)("Uppercase"),value:"uppercase",icon:Pt},{name:Object(w.__)("Lowercase"),value:"lowercase",icon:Tt},{name:Object(w.__)("Capitalize"),value:"capitalize",icon:Nt}];function At(e){var t=e.value,n=e.onChange;return Object(a.createElement)("fieldset",{className:"block-editor-text-transform-control"},Object(a.createElement)("legend",null,Object(w.__)("Letter case")),Object(a.createElement)("div",{className:"block-editor-text-transform-control__buttons"},Dt.map((function(e){return Object(a.createElement)(v.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:t===e.value,"aria-label":e.name,onClick:function(){return n(t===e.value?void 0:e.value)}})}))))}function Rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rt(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mt(e){var t,n=e.attributes.style,r=e.setAttributes;return Ft(e)?null:Object(a.createElement)(At,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){r({style:Oe(Lt(Lt({},n),{},{typography:Lt(Lt({},null==n?void 0:n.typography),{},{textTransform:e})}))})}})}function Ft(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Object(p.hasBlockSupport)(t,"__experimentalTextTransform"),r=ge("typography.customTextTransforms");return n||!r}function Vt(e){var t=!xt(e),n=!Ft(e);return t||n?Object(a.createElement)("div",{className:"block-editor-text-decoration-and-transform"},t&&Object(a.createElement)(It,e),n&&Object(a.createElement)(Mt,e)):null}var Ht=n(17);function zt(e){var t=e.value,n=e.onChange,r=function(e){return void 0!==e&&""!==e}(t),o=r?t:"";return Object(a.createElement)("div",{className:"block-editor-line-height-control"},Object(a.createElement)(v.TextControl,{autoComplete:"off",onKeyDown:function(e){e.keyCode!==Ht.ZERO||r||(e.preventDefault(),n("0"))},onChange:function(e){if(r)n(e);else{var t=e;switch(e){case"".concat(.1):t=1.6;break;case"0":t=1.4}n(t)}},label:Object(w.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:o,min:0}))}function Gt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gt(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Wt(e){var t,n=e.attributes.style;return Kt(e)?null:Object(a.createElement)(zt,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:function(t){var r=Ut(Ut({},n),{},{typography:Ut(Ut({},null==n?void 0:n.typography),{},{lineHeight:t})});e.setAttributes({style:Oe(r)})}})}function Kt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!ge("typography.customLineHeight");return!Object(p.hasBlockSupport)(t,"lineHeight")||n}var qt=[{name:Object(w.__)("Regular"),value:"normal"},{name:Object(w.__)("Italic"),value:"italic"}],$t=[{name:Object(w.__)("Thin"),value:"100"},{name:Object(w.__)("Extra Light"),value:"200"},{name:Object(w.__)("Light"),value:"300"},{name:Object(w.__)("Regular"),value:"400"},{name:Object(w.__)("Medium"),value:"500"},{name:Object(w.__)("Semi Bold"),value:"600"},{name:Object(w.__)("Bold"),value:"700"},{name:Object(w.__)("Extra Bold"),value:"800"},{name:Object(w.__)("Black"),value:"900"}];function Yt(e){var t=e.onChange,n=e.hasFontStyles,r=void 0===n||n,o=e.hasFontWeights,c=void 0===o||o,i=e.value,l=i.fontStyle,s=i.fontWeight,u=r||c,d={key:"default",name:Object(w.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},b=Object(a.useMemo)((function(){return r&&c?(e=[d],qt.forEach((function(t){var n=t.name,r=t.value;$t.forEach((function(t){var o=t.name,c=t.value,i="normal"===r?o:Object(w.sprintf)(
|
8 |
/* translators: 1: Font weight name. 2: Font style name. */
|
9 |
+
Object(w.__)("%1$s %2$s"),o,n);e.push({key:"".concat(r,"-").concat(c),name:i,style:{fontStyle:r,fontWeight:c}})}))})),e):r?function(){var e=[d];return qt.forEach((function(t){var n=t.name,r=t.value;e.push({key:r,name:n,style:{fontStyle:r,fontWeight:void 0}})})),e}():function(){var e=[d];return $t.forEach((function(t){var n=t.name,r=t.value;e.push({key:r,name:n,style:{fontStyle:void 0,fontWeight:r}})})),e}();var e}),[e.options]),f=b.find((function(e){return e.style.fontStyle===l&&e.style.fontWeight===s}));return Object(a.createElement)("fieldset",{className:"components-font-appearance-control"},u&&Object(a.createElement)(v.CustomSelectControl,{className:"components-font-appearance-control__select",label:r?c?Object(w.__)("Appearance"):Object(w.__)("Font style"):Object(w.__)("Font weight"),options:b,value:f,onChange:function(e){var n=e.selectedItem;return t(n.style)}}))}function Xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xt(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zt(e){var t,n,r=e.attributes.style,o=e.setAttributes,c=!Jt(e),i=!en(e);if(!c&&!i)return null;var l=null==r||null===(t=r.typography)||void 0===t?void 0:t.fontStyle,s=null==r||null===(n=r.typography)||void 0===n?void 0:n.fontWeight;return Object(a.createElement)(Yt,{onChange:function(e){o({style:Oe(Qt(Qt({},r),{},{typography:Qt(Qt({},null==r?void 0:r.typography),{},{fontStyle:e.fontStyle,fontWeight:e.fontWeight})}))})},hasFontStyles:c,hasFontWeights:i,value:{fontStyle:l,fontWeight:s}})}function Jt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(p.hasBlockSupport)(t,"__experimentalFontStyle"),r=ge("typography.customFontStyle");return!n||!r}function en(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(p.hasBlockSupport)(t,"__experimentalFontWeight"),r=ge("typography.customFontWeight");return!n||!r}function tn(e){var t=Jt(e),n=en(e);return t&&n}function nn(e){var t=e.value,n=void 0===t?"":t,r=e.onChange,o=e.fontFamilies,c=Object(Fe.a)(e,["value","onChange","fontFamilies"]),l=ge("typography.fontFamilies");if(o||(o=l),Object(d.isEmpty)(o))return null;var s=[{value:"",label:Object(w.__)("Default")}].concat(Object(pe.a)(o.map((function(e){var t=e.fontFamily;return{value:t,label:e.name||t}}))));return Object(a.createElement)(v.SelectControl,Object(i.a)({label:Object(w.__)("Font family"),options:s,value:n,onChange:r,labelPosition:"top"},c))}function rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function on(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rn(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cn(e){var t,n=e.name,r=e.setAttributes,o=e.attributes.style,c=void 0===o?{}:o,i=ge("typography.fontFamilies");if(ln({name:n}))return null;var l=function(e,t){var n=/var:preset\|font-family\|(.+)/.exec(t);if(n&&n[1]){var r=Object(d.find)(e,(function(e){return e.slug===n[1]}));if(r)return r.fontFamily}return t}(i,null===(t=c.typography)||void 0===t?void 0:t.fontFamily);return Object(a.createElement)(nn,{className:"block-editor-hooks-font-family-control",fontFamilies:i,value:l,onChange:function(e){var t=Object(d.find)(i,(function(t){return t.fontFamily===e}));r({style:Oe(on(on({},c),{},{typography:on(on({},c.typography||{}),{},{fontFamily:t?"var:preset|font-family|".concat(t.slug):e||void 0})}))})}})}function ln(e){var t=e.name,n=ge("typography.fontFamilies");return!n||0===n.length||!Object(p.hasBlockSupport)(t,"__experimentalFontFamily")}var an=n(169),sn=n.n(an),un=function(e,t,n){if(t){var r=Object(d.find)(e,{slug:t});if(r)return r}return{size:n}};function dn(e,t){return Object(d.find)(e,{size:t})||{size:t}}function bn(e){if(e)return"has-".concat(Object(d.kebabCase)(e),"-font-size")}var fn=function(e){var t=ge("typography.fontSizes"),n=!ge("typography.customFontSize");return Object(a.createElement)(v.FontSizePicker,Object(i.a)({},e,{fontSizes:t,disableCustomFontSizes:n}))};function pn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pn(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vn(e,t,n){if(!Object(p.hasBlockSupport)(t,"fontSize"))return e;var r=new sn.a(e.className);r.add(bn(n.fontSize));var o=r.value;return e.className=o||void 0,e}function gn(e){var t,n,r=e.attributes,o=r.fontSize,c=r.style,i=e.setAttributes,l=On(e),s=ge("typography.fontSizes");if(l)return null;var u=un(s,o,null==c||null===(t=c.typography)||void 0===t?void 0:t.fontSize),d=(null==u?void 0:u.size)||(null==c||null===(n=c.typography)||void 0===n?void 0:n.fontSize)||o;return Object(a.createElement)(fn,{onChange:function(e){var t=dn(s,e).slug;i({style:Oe(mn(mn({},c),{},{typography:mn(mn({},null==c?void 0:c.typography),{},{fontSize:t?void 0:e})})),fontSize:t})},value:d})}function On(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=ge("typography.fontSizes"),r=!(null==n||!n.length);return!Object(p.hasBlockSupport)(t,"fontSize")||!r}var hn=Object(b.createHigherOrderComponent)((function(e){return function(t){var n,r=ge("typography.fontSizes"),o=t.name,c=t.attributes,i=c.fontSize,l=c.style,s=t.wrapperProps,u=mn({},t);if(Object(p.hasBlockSupport)(o,"fontSize")&&i&&(null==l||null===(n=l.typography)||void 0===n||!n.fontSize)){var d,b=un(r,i,null==l||null===(d=l.typography)||void 0===d?void 0:d.fontSize).size;u.wrapperProps=mn(mn({},s),{},{style:mn({fontSize:b},null==s?void 0:s.style)})}return Object(a.createElement)(e,u)}}),"withFontSizeInlineStyles");Object(f.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return Object(p.hasBlockSupport)(e,"fontSize")?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",vn),Object(f.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!Object(p.hasBlockSupport)(e,"fontSize"))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),vn(r,e,n)},e})),Object(f.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",hn);var jn=["lineHeight","fontSize","__experimentalFontStyle","__experimentalFontWeight","__experimentalFontFamily","__experimentalTextDecoration","__experimentalTextTransform"];function kn(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[tn(e),On(e),Kt(e),ln(e),xt(e),Ft(e)];return t.filter(Boolean).length===t.length}(e),n=yn(e.name);return t||!n?null:Object(a.createElement)(ce,null,Object(a.createElement)(v.PanelBody,{title:Object(w.__)("Typography")},Object(a.createElement)(v.__unstableComponentSystemProvider,{__unstableNextInclude:["WPComponentsFontSizePicker"]},Object(a.createElement)(cn,e),Object(a.createElement)(gn,e),Object(a.createElement)(Zt,e),Object(a.createElement)(Wt,e),Object(a.createElement)(Vt,e))))}var yn=function(e){return"web"===a.Platform.OS&&jn.some((function(t){return Object(p.hasBlockSupport)(e,t)}))};function En(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?En(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):En(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wn(e){var t,n=e.name,r=e.attributes.style,o=e.setAttributes,c=ge("spacing.units"),i=null==c?void 0:c.map((function(e){return{value:e,label:e}}));return function(e){var t=Object(p.getBlockSupport)(e,"spacing");return t&&!1!==t.padding}(n)?a.Platform.select({web:Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:function(e){var t=Cn(Cn({},r),{},{spacing:{padding:e}});o({style:Oe(t)})},onChangeShowVisualizer:function(e){var t=Cn(Cn({},r),{},{visualizers:{padding:e}});o({style:Oe(t)})},label:Object(w.__)("Padding"),units:i})),native:null}):null}function Sn(e){var t=e.children,n=Object(Fe.a)(e,["children"]);return ge("spacing.customPadding")?Object(a.createElement)(ce,n,Object(a.createElement)(v.PanelBody,{title:Object(w.__)("Spacing")},t)):null}function Bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function In(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bn(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xn=[].concat(Object(pe.a)(jn),[Ee,"color","spacing"]),Pn=function(e){return xn.some((function(t){return Object(p.hasBlockSupport)(e,t)}))};function Tn(e){if(Object(d.startsWith)(e,"var:")){var t=e.slice("var:".length).split("|").join("--");return"var(--wp--".concat(t,")")}return e}function Nn(e,t,n){if(!Pn(t))return e;var r=n.style;return e.style=In(In({},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return Object.keys(p.__EXPERIMENTAL_STYLE_PROPERTY).forEach((function(n){var r=p.__EXPERIMENTAL_STYLE_PROPERTY[n].value,o=p.__EXPERIMENTAL_STYLE_PROPERTY[n].properties;Object(d.has)(e,r)&&(o?o.forEach((function(o){t[n+Object(d.capitalize)(o)]=Tn(Object(d.get)(e,[].concat(Object(pe.a)(r),[o])))})):t[n]=Tn(Object(d.get)(e,r)))})),t}(r)),e.style),e}var Dn=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=Object(p.hasBlockSupport)(n,"spacing");return[Object(a.createElement)(kn,Object(i.a)({key:"typography"},t)),Object(a.createElement)(Ce,Object(i.a)({key:"border"},t)),Object(a.createElement)(kt,Object(i.a)({key:"colors"},t)),Object(a.createElement)(e,Object(i.a)({key:"edit"},t)),r&&Object(a.createElement)(Sn,{key:"spacing"},Object(a.createElement)(wn,t))]}}),"withToolbarControls");Object(f.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Pn(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",Nn),Object(f.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!Pn(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),Nn(r,e,n)},e})),Object(f.addFilter)("editor.BlockEdit","core/style/with-block-controls",Dn);var An=n(27),Rn=n(28),Ln=n(19),Mn=n(30),Fn=n(32),Vn=n(22);function Hn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hn(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Gn=[],Un=function(e){return Object(b.createHigherOrderComponent)((function(t){return function(n){return Object(a.createElement)(t,Object(i.a)({},n,{colors:e}))}}),"withCustomColorPalette")},Wn=function(){return Object(b.createHigherOrderComponent)((function(e){return function(t){var n=ge("color.palette")||Gn;return Object(a.createElement)(e,Object(i.a)({},t,{colors:n}))}}),"withEditorColorPalette")};function Kn(e,t){var n=Object(d.reduce)(e,(function(e,t){return zn(zn({},e),Object(d.isString)(t)?Object(l.a)({},t,Object(d.kebabCase)(t)):t)}),{});return Object(b.compose)([t,function(e){return function(t){Object(Mn.a)(i,t);var r,o,c=(r=i,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(Vn.a)(r);if(o){var n=Object(Vn.a)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Object(Fn.a)(this,e)});function i(e){var t;return Object(An.a)(this,i),(t=c.call(this,e)).setters=t.createSetters(),t.colorUtils={getMostReadableColor:t.getMostReadableColor.bind(Object(Ln.a)(t))},t.state={},t}return Object(Rn.a)(i,[{key:"getMostReadableColor",value:function(e){return function(e,t){return Be.a.mostReadable(t,Object(d.map)(e,"color")).toHexString()}(this.props.colors,e)}},{key:"createSetters",value:function(){var e=this;return Object(d.reduce)(n,(function(t,n,r){var o=Object(d.upperFirst)(r),c="custom".concat(o);return t["set".concat(o)]=e.createSetColor(r,c),t}),{})}},{key:"createSetColor",value:function(e,t){var n=this;return function(r){var o,c=xe(n.props.colors,r);n.props.setAttributes((o={},Object(l.a)(o,e,c&&c.slug?c.slug:void 0),Object(l.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(a.createElement)(e,zn(zn(zn(zn({},this.props),{},{colors:void 0},this.state),this.setters),{},{colorUtils:this.colorUtils}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=e.attributes,o=e.colors;return Object(d.reduce)(n,(function(e,n,c){var i=Ie(o,r[c],r["custom".concat(Object(d.upperFirst)(c))]),l=t[c];return(null==l?void 0:l.color)===i.color&&l?e[c]=l:e[c]=zn(zn({},i),{},{class:Pe(n,i.slug)}),e}),{})}}]),i}(a.Component)}])}function qn(e){return function(){for(var t=Un(e),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Object(b.createHigherOrderComponent)(Kn(r,t),"withCustomColors")}}function $n(){for(var e=Wn(),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Object(b.createHigherOrderComponent)(Kn(n,e),"withColors")}var Yn=n(73),Xn=n.n(Yn);function Qn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qn(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Jn=function(e){var t=e.colorSettings,n=Object(Fe.a)(e,["colorSettings"]),r=t.map((function(e){var t=e.value,n=e.onChange;return Zn(Zn({},Object(Fe.a)(e,["value","onChange"])),{},{colorValue:t,onColorChange:n})}));return Object(a.createElement)(rt,Object(i.a)({settings:r,gradients:[],disableCustomGradients:!0},n))},er=function(e,t,n){return"function"==typeof e?e(t):!0===e?n:e};function tr(e){var t=e.title,n=e.colorSettings,r=e.colorPanelProps,o=e.contrastCheckers,c=e.detectedBackgroundColor,l=e.detectedColor,s=e.panelChildren,u=e.initialOpen;return Object(a.createElement)(Jn,Object(i.a)({title:t,initialOpen:u,colorSettings:Object.values(n)},r),o&&(Array.isArray(o)?o.map((function(e){var t=e.backgroundColor,r=e.textColor,o=Object(Fe.a)(e,["backgroundColor","textColor"]);return t=er(t,n,c),r=er(r,n,l),Object(a.createElement)(it,Object(i.a)({key:"".concat(t,"-").concat(r),backgroundColor:t,textColor:r},o))})):Object(d.map)(n,(function(e){var t=e.value,r=o.backgroundColor,s=o.textColor;return r=er(r||t,n,c),s=er(s||t,n,l),Object(a.createElement)(it,Object(i.a)({},o,{key:"".concat(r,"-").concat(s),backgroundColor:r,textColor:s}))}))),"function"==typeof s?s(n):s)}function nr(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return rr(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rr(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}function rr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function or(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?or(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):or(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ir(e){return e.ownerDocument.defaultView.getComputedStyle(e)}var lr=[],ar={textColor:Object(w.__)("Text Color"),backgroundColor:Object(w.__)("Background Color")},sr=function(e){return Object(a.createElement)(ce,null,Object(a.createElement)(tr,e))};function ur(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{panelTitle:Object(w.__)("Color settings")},n=t.panelTitle,r=void 0===n?Object(w.__)("Color settings"):n,o=t.colorPanelProps,c=t.contrastCheckers,i=t.panelChildren,s=t.colorDetector,b=(s=void 0===s?{}:s).targetRef,f=s.backgroundColorTargetRef,p=void 0===f?b:f,v=s.textColorTargetRef,g=void 0===v?b:v,O=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],j=h(),k=j.clientId,y=ge("color.palette")||lr,_=Object(m.useSelect)((function(e){return{attributes:(0,e("core/block-editor").getBlockAttributes)(k)}}),[k]),E=_.attributes,C=Object(m.useDispatch)("core/block-editor"),S=C.updateBlockAttributes,B=Object(a.useCallback)((function(e){return S(k,e)}),[S,k]),I=Object(a.useMemo)((function(){return Xn()((function(e,t,n,r,o,c){return function(i){var s,b=i.children,f=i.className,p=void 0===f?"":f,m=i.style,v=void 0===m?{}:m,g={};r?g=Object(l.a)({},t,o):c&&(g=Object(l.a)({},t,c));var O={className:u()(p,(s={},Object(l.a)(s,"has-".concat(Object(d.kebabCase)(r),"-").concat(Object(d.kebabCase)(t)),r),Object(l.a)(s,n||"has-".concat(Object(d.kebabCase)(e)),r||c),s)),style:cr(cr({},g),v)};return Object(d.isFunction)(b)?b(O):a.Children.map(b,(function(e){return Object(a.cloneElement)(e,{className:u()(e.props.className,O.className),style:cr(cr({},O.style),e.props.style||{})})}))}}),{maxSize:e.length})}),[e.length]),x=Object(a.useMemo)((function(){return Xn()((function(e,t){return function(n){var r=t.find((function(e){return e.color===n}));B(Object(l.a)({},r?Object(d.camelCase)("custom ".concat(e)):e,void 0)),B(Object(l.a)({},r?e:Object(d.camelCase)("custom ".concat(e)),r?r.slug:n))}}),{maxSize:e.length})}),[B,e.length]),P=Object(a.useState)(),T=Object(Me.a)(P,2),N=T[0],D=T[1],A=Object(a.useState)(),R=Object(Me.a)(A,2),L=R[0],M=R[1];return Object(a.useEffect)((function(){if(c){var e,t=!1,n=!1,r=nr(Object(d.castArray)(c));try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.backgroundColor,l=o.textColor;if(t||(t=!0===i),n||(n=!0===l),t&&n)break}}catch(e){r.e(e)}finally{r.f()}if(n&&M(ir(g.current).color),t){for(var a=p.current,s=ir(a).backgroundColor;"rgba(0, 0, 0, 0)"===s&&a.parentNode&&a.parentNode.nodeType===a.parentNode.ELEMENT_NODE;)s=ir(a=a.parentNode).backgroundColor;D(s)}}}),[e.reduce((function(e,t){return"".concat(e," | ").concat(E[t.name]," | ").concat(E[Object(d.camelCase)("custom ".concat(t.name))])}),"")].concat(Object(pe.a)(O))),Object(a.useMemo)((function(){var t={},n=e.reduce((function(e,n){"string"==typeof n&&(n={name:n});var r=cr(cr({},n),{},{color:E[n.name]}),o=r.name,c=r.property,i=void 0===c?o:c,l=r.className,a=r.panelLabel,s=void 0===a?n.label||ar[o]||Object(d.startCase)(o):a,u=r.componentName,b=void 0===u?Object(d.startCase)(o).replace(/\s/g,""):u,f=r.color,p=void 0===f?n.color:f,m=r.colors,v=void 0===m?y:m,g=E[Object(d.camelCase)("custom ".concat(o))],O=g?void 0:v.find((function(e){return e.slug===p}));return e[b]=I(o,i,l,p,O&&O.color,g),e[b].displayName=b,e[b].color=g||O&&O.color,e[b].slug=p,e[b].setColor=x(o,v),t[b]={value:O?O.color:E[Object(d.camelCase)("custom ".concat(o))],onChange:e[b].setColor,label:s,colors:v},v||delete t[b].colors,e}),{}),l={title:r,initialOpen:!1,colorSettings:t,colorPanelProps:o,contrastCheckers:c,detectedBackgroundColor:N,detectedColor:L,panelChildren:i};return cr(cr({},n),{},{ColorPanel:Object(a.createElement)(tr,l),InspectorControlsColorPanel:Object(a.createElement)(sr,l)})}),[E,B,L,N].concat(Object(pe.a)(O)))}function dr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function br(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dr(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Vn.a)(e);if(t){var o=Object(Vn.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Fn.a)(this,n)}}var pr=[],mr=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(d.reduce)(t,(function(e,t){return e[t]="custom".concat(Object(d.upperFirst)(t)),e}),{});return Object(b.createHigherOrderComponent)(Object(b.compose)([Object(b.createHigherOrderComponent)((function(e){return function(t){var n=ge("typography.fontSizes")||pr;return Object(a.createElement)(e,Object(i.a)({},t,{fontSizes:n}))}}),"withFontSizes"),function(e){return function(t){Object(Mn.a)(o,t);var n=fr(o);function o(e){var t;return Object(An.a)(this,o),(t=n.call(this,e)).setters=t.createSetters(),t.state={},t}return Object(Rn.a)(o,[{key:"createSetters",value:function(){var e=this;return Object(d.reduce)(r,(function(t,n,r){var o=Object(d.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,c=Object(d.find)(n.props.fontSizes,{size:Number(r)});n.props.setAttributes((o={},Object(l.a)(o,e,c&&c.slug?c.slug:void 0),Object(l.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(a.createElement)(e,br(br(br({},this.props),{},{fontSizes:void 0},this.state),this.setters))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.attributes,o=e.fontSizes,c=function(e,r){return!t[r]||(n[r]?n[r]!==t[r].slug:t[r].size!==n[e])};if(!Object(d.some)(r,c))return null;var i=Object(d.reduce)(Object(d.pickBy)(r,c),(function(e,t,r){var c=n[r],i=un(o,c,n[t]);return e[r]=br(br({},i),{},{class:bn(c)}),e}),{});return br(br({},t),i)}}]),o}(a.Component)}]),"withFontSizes")},vr=n(376),gr=n(377),Or=n(378);function hr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hr(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kr=[{icon:vr.a,title:Object(w.__)("Align text left"),align:"left"},{icon:gr.a,title:Object(w.__)("Align text center"),align:"center"},{icon:Or.a,title:Object(w.__)("Align text right"),align:"right"}],yr={position:"bottom right",isAlternate:!0},_r=function(e){var t=e.value,n=e.onChange,r=e.alignmentControls,o=void 0===r?kr:r,c=e.label,i=void 0===c?Object(w.__)("Align"):c,l=e.describedBy,s=void 0===l?Object(w.__)("Change text alignment"):l,u=e.isCollapsed,b=void 0===u||u;function f(e){return function(){return n(t===e?void 0:e)}}var p=Object(d.find)(o,(function(e){return e.align===t}));return Object(a.createElement)(v.ToolbarGroup,{isCollapsed:b,icon:p?p.icon:Object(w.isRTL)()?Or.a:vr.a,label:i,toggleProps:{describedBy:s},popoverProps:yr,controls:o.map((function(e){var n=e.align,r=t===n;return jr(jr({},e),{},{isActive:r,role:b?"menuitemradio":void 0,onClick:f(n)})}))})},Er=function(e){return e.name||""},Cr=function(e){return e.title},wr=function(e){return e.description||""},Sr=function(e){return e.keywords||[]},Br=function(e){return e.category},Ir=function(){return null};function xr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(e=(e=Object(d.deburr)(e)).replace(/^\//,"")).toLowerCase()}var Pr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(d.words)(xr(e))},Tr=function(e,t){return Object(d.differenceWith)(e,Pr(t),(function(e,t){return t.includes(e)}))},Nr=function(e,t,n,r){return 0===Pr(r).length?e:Dr(e,r,{getCategory:function(e){var n;return null===(n=Object(d.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:function(e){var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}})},Dr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Pr(t);if(0===r.length)return e;var o=e.map((function(e){return[e,Ar(e,t,n)]})).filter((function(e){return Object(Me.a)(e,2)[1]>0}));return o.sort((function(e,t){var n=Object(Me.a)(e,2)[1];return Object(Me.a)(t,2)[1]-n})),o.map((function(e){return Object(Me.a)(e,1)[0]}))};function Ar(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getName,o=void 0===r?Er:r,c=n.getTitle,i=void 0===c?Cr:c,l=n.getDescription,a=void 0===l?wr:l,s=n.getKeywords,u=void 0===s?Sr:s,b=n.getCategory,f=void 0===b?Br:b,p=n.getCollection,m=void 0===p?Ir:p,v=o(e),g=i(e),O=a(e),h=u(e),j=f(e),k=m(e),y=xr(t),_=xr(g),E=0;if(y===_)E+=30;else if(_.startsWith(y))E+=20;else{var C=[v,g,O].concat(Object(pe.a)(h),[j,k]).join(" "),w=Object(d.words)(y),S=Tr(w,C);0===S.length&&(E+=10)}return 0!==E&&v.startsWith("core/")&&E++,E}var Rr=function(e,t){var n=Object(m.useSelect)((function(t){var n=t("core/block-editor").getInserterItems,r=t(p.store),o=r.getCategories,c=r.getCollections;return{categories:o(),collections:c(),items:n(e)}}),[e]),r=n.categories,o=n.collections;return[n.items,r,o,Object(a.useCallback)((function(e){var n=e.name,r=e.initialAttributes,o=e.innerBlocks,c=Object(p.createBlock)(n,r,Object(p.createBlocksFromInnerBlocksTemplate)(o));t(c)}),[t])]},Lr=n(182);function Mr(e){var t,n=e.icon,r=e.showColors,o=void 0!==r&&r,c=e.className;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:Lr.a});var i=Object(a.createElement)(v.Icon,{icon:n&&n.src?n.src:n}),l=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return Object(a.createElement)("span",{style:l,className:u()("block-editor-block-icon",c,{"has-colors":o})},i)}var Fr={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems:function(e){var t=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getBlockName,o=t.getBlockInsertionPoint,c=n();return{selectedBlockName:c?r(c):null,rootClientId:o().rootClientId}}),[]),n=t.rootClientId,r=t.selectedBlockName,o=Rr(n,d.noop),c=Object(Me.a)(o,3),i=c[0],l=c[1],s=c[2],u=Object(a.useMemo)((function(){return(e.trim()?Nr(i,l,s,e):Object(d.orderBy)(i,["frecency"],["desc"])).filter((function(e){return e.name!==r})).slice(0,9)}),[e,r,i,l,s]);return[Object(a.useMemo)((function(){return u.map((function(e){var t=e.title,n=e.icon,r=e.isDisabled;return{key:"block-".concat(e.id),value:e,label:Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Mr,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))}),[u])]},allowContext:function(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion:function(e){var t=e.name,n=e.initialAttributes,r=e.innerBlocks;return{action:"replace",value:Object(p.createBlock)(t,n,Object(p.createBlocksFromInnerBlocksTemplate)(r))}}},Vr=[],Hr=function(e){var t=h().name,n=e.completers,r=void 0===n?Vr:n;return r=Object(a.useMemo)((function(){var e=r;return t===Object(p.getDefaultBlockName)()&&(e=e.concat([Fr])),Object(f.hasFilter)("editor.Autocomplete.completers")&&(e===r&&(e=e.map(d.clone)),e=Object(f.applyFilters)("editor.Autocomplete.completers",e,t)),e}),[r,t]),Object(a.createElement)(v.Autocomplete,Object(i.a)({},e,{completers:r}))},zr=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"})),Gr=function(e){var t=e.isActive,n=e.label,r=void 0===n?Object(w.__)("Toggle full height"):n,o=e.onToggle,c=e.isDisabled;return Object(a.createElement)(v.ToolbarGroup,null,Object(a.createElement)(v.ToolbarButton,{isActive:t,icon:zr,label:r,onClick:function(){return o(!t)},disabled:c}))},Ur=function(e){var t=e.label,n=void 0===t?Object(w.__)("Change matrix alignment"):t,r=e.onChange,o=void 0===r?d.noop:r,c=e.value,i=void 0===c?"center":c,l=e.isDisabled,s=Object(a.createElement)(v.__experimentalAlignmentMatrixControl.Icon,{value:i}),u="block-editor-block-alignment-matrix-toolbar",b="".concat(u,"__popover");return Object(a.createElement)(v.Dropdown,{position:"bottom right",className:u,popoverProps:{className:b,isAlternate:!0},renderToggle:function(e){var t=e.onToggle,r=e.isOpen;return Object(a.createElement)(v.ToolbarGroup,null,Object(a.createElement)(v.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":r,onKeyDown:function(e){r||e.keyCode!==Ht.DOWN||(e.preventDefault(),e.stopPropagation(),t())},label:n,icon:s,showTooltip:!0,disabled:l}))},renderContent:function(){return Object(a.createElement)(v.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:o,value:i})}})},Wr={insertUsage:{}},Kr={alignWide:!1,colors:[{name:Object(w.__)("Black"),slug:"black",color:"#000000"},{name:Object(w.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(w.__)("White"),slug:"white",color:"#ffffff"},{name:Object(w.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(w.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(w.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(w.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(w.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(w.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(w.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(w.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(w.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(w._x)("Small","font size name"),size:13,slug:"small"},{name:Object(w._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(w._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(w._x)("Large","font size name"),size:36,slug:"large"},{name:Object(w._x)("Huge","font size name"),size:42,slug:"huge"}],imageSizes:[{slug:"thumbnail",name:Object(w.__)("Thumbnail")},{slug:"medium",name:Object(w.__)("Medium")},{slug:"large",name:Object(w.__)("Large")},{slug:"full",name:Object(w.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,availableLegacyWidgets:{},__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],gradients:[{name:Object(w.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:Object(w.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:Object(w.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:Object(w.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:Object(w.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:Object(w.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:Object(w.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(w.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:Object(w.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:Object(w.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:Object(w.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(w.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function qr(e,t,n){return[].concat(Object(pe.a)(e.slice(0,n)),Object(pe.a)(Object(d.castArray)(t)),Object(pe.a)(e.slice(n)))}function $r(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(pe.a)(e);return o.splice(t,r),qr(o,e.slice(t,t+r),n)}function Yr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yr(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(l.a)({},t,[]);return e.forEach((function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,Qr(o,r))})),n}function Zr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce((function(e,n){return Object.assign(e,Object(l.a)({},n.clientId,t),Zr(n.innerBlocks,n.clientId))}),{})}function Jr(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.identity,n={},r=Object(pe.a)(e);r.length;){var o=r.shift(),c=o.innerBlocks,i=Object(Fe.a)(o,["innerBlocks"]);r.push.apply(r,Object(pe.a)(c)),n[i.clientId]=t(i)}return n}function eo(e){return Jr(e,(function(e){return Object(d.omit)(e,"attributes")}))}function to(e){return Jr(e,(function(e){return e.attributes}))}function no(e,t){return e===t?Xr({},e):t}function ro(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&Object(d.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,r=t.attributes,Object(d.isEqual)(Object(d.keys)(n),Object(d.keys)(r)));var n,r}var oo=function(e){return e.reduce((function(e,t){return e[t]={},e}),{})},co=Object(d.flow)(m.combineReducers,(function(e){return function(t,n){if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){var r=n.id,o=n.updatedId;if(r===o)return t;(t=Xr({},t)).attributes=Object(d.mapValues)(t.attributes,(function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?Xr(Xr({},e),{},{ref:o}):e}))}return e(t,n)}}),(function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=e(t,n);if(r===t)return t;r.cache=t.cache?t.cache:{};var o=function(e){return e.reduce((function(e,n){var r=n;do{e.push(r),r=t.parents[r]}while(r&&!t.controlledInnerBlocks[r]);return e}),[])};switch(n.type){case"RESET_BLOCKS":r.cache=Object(d.mapValues)(Jr(n.blocks),(function(){return{}}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":var c=Object(d.keys)(Jr(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&c.push(n.rootClientId),r.cache=Xr(Xr({},r.cache),oo(o(c)));break;case"UPDATE_BLOCK":r.cache=Xr(Xr({},r.cache),oo(o([n.clientId])));break;case"UPDATE_BLOCK_ATTRIBUTES":r.cache=Xr(Xr({},r.cache),oo(o(n.clientIds)));break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var i=oo(o(n.replacedClientIds));r.cache=Xr(Xr(Xr({},Object(d.omit)(r.cache,n.replacedClientIds)),Object(d.omit)(i,n.replacedClientIds)),oo(Object(d.keys)(Jr(n.blocks))));break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":r.cache=Xr(Xr({},Object(d.omit)(r.cache,n.removedClientIds)),oo(Object(d.difference)(o(n.clientIds),n.clientIds)));break;case"MOVE_BLOCKS_TO_POSITION":var l=Object(pe.a)(n.clientIds);n.fromRootClientId&&l.push(n.fromRootClientId),n.toRootClientId&&l.push(n.toRootClientId),r.cache=Xr(Xr({},r.cache),oo(o(l)));break;case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":var a=[];n.rootClientId&&a.push(n.rootClientId),r.cache=Xr(Xr({},r.cache),oo(o(a)));break;case"SAVE_REUSABLE_BLOCK_SUCCESS":var s=Object(d.keys)(Object(d.omitBy)(r.attributes,(function(e,t){return"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId})));r.cache=Xr(Xr({},r.cache),oo(o(s)))}return r}}),(function(e){return function(t,n){var r=function(e){for(var r=e,o=0;o<r.length;o++){var c;!t.order[r[o]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[r[o]]||(r===e&&(r=Object(pe.a)(r)),(c=r).push.apply(c,Object(pe.a)(t.order[r[o]])))}return r};if(t)switch(n.type){case"REMOVE_BLOCKS":n=Xr(Xr({},n),{},{type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(n.clientIds)});break;case"REPLACE_BLOCKS":n=Xr(Xr({},n),{},{type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:r(n.clientIds)})}return e(t,n)}}),(function(e){return function(t,n){if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);var r={};if(Object.keys(t.controlledInnerBlocks).length)for(var o=Object(pe.a)(n.blocks);o.length;){var c=o.shift(),i=c.innerBlocks,l=Object(Fe.a)(c,["innerBlocks"]);o.push.apply(o,Object(pe.a)(i)),t.controlledInnerBlocks[l.clientId]&&(r[l.clientId]=!0)}var a=t;t.order[n.rootClientId]&&(a=e(a,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order[n.rootClientId]}));var s=a;return n.blocks.length&&((s=e(s,Xr(Xr({},n),{},{type:"INSERT_BLOCKS",index:0}))).order=Xr(Xr({},s.order),Object(d.reduce)(r,(function(e,n,r){return t.order[r]&&(e[r]=t.order[r]),e}),{}))),s}}),(function(e){return function(t,n){if(t&&"RESET_BLOCKS"===n.type){var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(d.reduce)(t[n],(function(n,o){return r[o]?n:[].concat(Object(pe.a)(n),[o],Object(pe.a)(e(t,o)))}),[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(d.pickBy)(t.controlledInnerBlocks));return Xr(Xr({},t),{},{byClientId:Xr(Xr({},Object(d.omit)(t.byClientId,r)),eo(n.blocks)),attributes:Xr(Xr({},Object(d.omit)(t.attributes,r)),to(n.blocks)),order:Xr(Xr({},Object(d.omit)(t.order,r)),Object(d.omit)(Qr(n.blocks),o)),parents:Xr(Xr({},Object(d.omit)(t.parents,r)),Zr(n.blocks)),cache:Xr(Xr({},Object(d.omit)(t.cache,r)),Object(d.omit)(Object(d.mapValues)(Jr(n.blocks),(function(){return{}})),o))})}return e(t,n)}}),(function(e){var t,n=!1;return function(r,o){var c=e(r,o),i="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===c&&!i){var l;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;var a=null===(l=null==r?void 0:r.isPersistentChange)||void 0===l||l;return r.isPersistentChange===a?r:Xr(Xr({},c),{},{isPersistentChange:a})}return c=Xr(Xr({},c),{},{isPersistentChange:i?!n:!ro(o,t)}),t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,c}}),(function(e){var t=new Set(["RECEIVE_BLOCKS"]);return function(n,r){var o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}))({byClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return eo(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return Xr(Xr({},e),eo(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(d.omit)(t.updates,"attributes");return Object(d.isEmpty)(n)?e:Xr(Xr({},e),{},Object(l.a)({},t.clientId,Xr(Xr({},e[t.clientId]),n)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?Xr(Xr({},Object(d.omit)(e,t.replacedClientIds)),eo(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},attributes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return to(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return Xr(Xr({},e),to(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?Xr(Xr({},e),{},Object(l.a)({},t.clientId,Xr(Xr({},e[t.clientId]),t.updates.attributes))):e;case"UPDATE_BLOCK_ATTRIBUTES":if(t.clientIds.every((function(t){return!e[t]})))return e;var n=t.clientIds.reduce((function(n,r){return Xr(Xr({},n),{},Object(l.a)({},r,Object(d.reduce)(t.attributes,(function(t,n,o){return n!==t[o]&&((t=no(e[r],t))[o]=n),t}),e[r])))}),{});return t.clientIds.every((function(t){return n[t]===e[t]}))?e:Xr(Xr({},e),n);case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?Xr(Xr({},Object(d.omit)(e,t.replacedClientIds)),to(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},order:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return Qr(t.blocks);case"RECEIVE_BLOCKS":return Xr(Xr({},e),Object(d.omit)(Qr(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=e[r]||[],c=Qr(t.blocks,r),i=t.index,a=void 0===i?o.length:i;return Xr(Xr(Xr({},e),c),{},Object(l.a)({},r,qr(o,c[r],a)));case"MOVE_BLOCKS_TO_POSITION":var s,u=t.fromRootClientId,b=void 0===u?"":u,f=t.toRootClientId,p=void 0===f?"":f,m=t.clientIds,v=t.index,g=void 0===v?e[p].length:v;if(b===p){var O=e[p],h=O.indexOf(m[0]);return Xr(Xr({},e),{},Object(l.a)({},p,$r(e[p],h,g,m.length)))}return Xr(Xr({},e),{},(s={},Object(l.a)(s,b,d.without.apply(void 0,[e[b]].concat(Object(pe.a)(m)))),Object(l.a)(s,p,qr(e[p],m,g)),s));case"MOVE_BLOCKS_UP":var j=t.clientIds,k=t.rootClientId,y=void 0===k?"":k,_=Object(d.first)(j),E=e[y];if(!E.length||_===Object(d.first)(E))return e;var C=E.indexOf(_);return Xr(Xr({},e),{},Object(l.a)({},y,$r(E,C,C-1,j.length)));case"MOVE_BLOCKS_DOWN":var w=t.clientIds,S=t.rootClientId,B=void 0===S?"":S,I=Object(d.first)(w),x=Object(d.last)(w),P=e[B];if(!P.length||x===Object(d.last)(P))return e;var T=P.indexOf(I);return Xr(Xr({},e),{},Object(l.a)({},B,$r(P,T,T+1,w.length)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var N=t.clientIds;if(!t.blocks)return e;var D=Qr(t.blocks);return Object(d.flow)([function(e){return Object(d.omit)(e,t.replacedClientIds)},function(e){return Xr(Xr({},e),Object(d.omit)(D,""))},function(e){return Object(d.mapValues)(e,(function(e){return Object(d.reduce)(e,(function(e,t){return t===N[0]?[].concat(Object(pe.a)(e),Object(pe.a)(D[""])):(-1===N.indexOf(t)&&e.push(t),e)}),[])}))}])(e);case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.flow)([function(e){return Object(d.omit)(e,t.removedClientIds)},function(e){return Object(d.mapValues)(e,(function(e){return d.without.apply(void 0,[e].concat(Object(pe.a)(t.removedClientIds)))}))}])(e)}return e},parents:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return Zr(t.blocks);case"RECEIVE_BLOCKS":return Xr(Xr({},e),Zr(t.blocks));case"INSERT_BLOCKS":return Xr(Xr({},e),Zr(t.blocks,t.rootClientId||""));case"MOVE_BLOCKS_TO_POSITION":return Xr(Xr({},e),t.clientIds.reduce((function(e,n){return e[n]=t.toRootClientId||"",e}),{}));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Xr(Xr({},Object(d.omit)(e,t.replacedClientIds)),Zr(t.blocks,e[t.clientIds[0]]));case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.clientId,o=t.hasControlledInnerBlocks;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===n?Xr(Xr({},e),{},Object(l.a)({},r,o)):e}});function io(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":if(-1===t.clientIds.indexOf(e.clientId))return e;var n=t.indexToSelect||t.blocks.length-1,r=t.blocks[n];if(!r)return{};if(r.clientId===e.clientId)return e;var o={clientId:r.clientId};return"number"==typeof t.initialPosition&&(o.initialPosition=t.initialPosition),o}return e}function lo(e,t,n){switch(t.type){case"CLEAR_SELECTED_BLOCK":case"SELECT_BLOCK":case"SELECTION_CHANGE":case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":return n}return e}var ao=Object(m.combineReducers)({blocks:co,isTyping:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.startOffset},selectionEnd:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.endOffset}};case"RESET_SELECTION":var o=r.selectionStart,c=r.selectionEnd;return{selectionStart:o,selectionEnd:c};case"MULTI_SELECT":var i=r.start,l=r.end;return{selectionStart:{clientId:i},selectionEnd:{clientId:l}};case"RESET_BLOCKS":var a=null==n||null===(e=n.selectionStart)||void 0===e?void 0:e.clientId,s=null==n||null===(t=n.selectionEnd)||void 0===t?void 0:t.clientId;if(!a&&!s)return n;if(!r.blocks.some((function(e){return e.clientId===a})))return{selectionStart:{},selectionEnd:{}};if(!r.blocks.some((function(e){return e.clientId===s})))return Xr(Xr({},n),{},{selectionEnd:n.selectionStart})}return{selectionStart:io(n.selectionStart,r),selectionEnd:io(n.selectionEnd,r)}},isMultiSelecting:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(e,t){return"REPLACE_BLOCKS"===t.type&&"number"==typeof t.initialPosition||"SELECT_BLOCK"===t.type?t.initialPosition:"REMOVE_BLOCKS"===t.type||"START_TYPING"===t.type?e:void 0},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 Xr(Xr({},e),{},Object(l.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(d.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(d.isEqual)(e[n],t.settings)?e:Xr(Xr({},e),{},Object(l.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(d.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"SET_INSERTION_POINT":case"SHOW_INSERTION_POINT":var n=t.rootClientId,r=t.index;return{rootClientId:n,index:r}}return lo(e,t,null)},insertionPointVisibility:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":return!0;case"HIDE_INSERTION_POINT":return!1}return lo(e,t,!1)},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 Xr(Xr({},e),{},{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Kr,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return Xr(Xr({},e),t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wr,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(p.isReusableBlock)(n)&&(o.ref=n.attributes.ref,r+="/"+n.attributes.ref),Xr(Xr({},e),{},{insertUsage:Xr(Xr({},e.insertUsage),{},Object(l.a)({},r,{time:t.time,count:e.insertUsage[r]?e.insertUsage[r].count+1:1,insert:o}))})}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return Object(l.a)({},t.clientId,t.updates.attributes);case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((function(e,n){return Xr(Xr({},e),{},Object(l.a)({},n,t.attributes))}),{})}return null},isNavigationMode:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":var n=t.clientId;return t.isHighlighted?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e}}),so=n(43),uo=n(50);function bo(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return fo(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fo(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}function fo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function po(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?po(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):po(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vo=Object(a.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(v.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(a.createElement)(v.G,null,Object(a.createElement)(v.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"}))),go=[];function Oo(e,t){var n=e.blocks.byClientId[t];if("web"!==a.Platform.OS&&"core/social-link"===(null==n?void 0:n.name)){var r=e.blocks.attributes[t].service;return r?"".concat("core/social-link","-").concat(r):"core/social-link"}return n?n.name:null}function ho(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}function jo(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}var ko=Object(uo.a)((function(e,t){var n=e.blocks.byClientId[t];return n?mo(mo({},n),{},{attributes:jo(e,t),innerBlocks:Yc(e,t)?go:_o(e,t)}):null}),(function(e,t){return[e.blocks.cache[t]]})),yo=Object(uo.a)((function(e,t){var n=e.blocks.byClientId[t];return n?mo(mo({},n),{},{attributes:jo(e,t)}):null}),(function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t]]})),_o=Object(uo.a)((function(e,t){return Object(d.map)(oc(e,t),(function(t){return ko(e,t)}))}),(function(e,t){return Object(d.map)(e.blocks.order[t||""],(function(t){return e.blocks.cache[t]}))})),Eo=Object(uo.a)((function(e,t){var n=e.blocks.byClientId[t];return n?mo(mo({},n),{},{attributes:jo(e,t),innerBlocks:Co(e,t)}):null}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),Co=Object(uo.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(oc(e,t),(function(t){return Eo(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),wo=function e(t,n){return Object(d.flatMap)(n,(function(n){var r=oc(t,n);return[].concat(Object(pe.a)(r),Object(pe.a)(e(t,r)))}))},So=Object(uo.a)((function(e){var t=oc(e);return[].concat(Object(pe.a)(t),Object(pe.a)(wo(e,t)))}),(function(e){return[e.blocks.order]})),Bo=Object(uo.a)((function(e,t){var n=So(e);return t?Object(d.reduce)(n,(function(n,r){return e.blocks.byClientId[r].name===t?n+1:n}),0):n.length}),(function(e){return[e.blocks.order,e.blocks.byClientId]})),Io=Object(uo.a)((function(e,t){return Object(d.map)(Object(d.castArray)(t),(function(t){return ko(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function xo(e,t){return oc(e,t).length}function Po(e){return e.selection.selectionStart}function To(e){return e.selection.selectionEnd}function No(e){return e.selection.selectionStart.clientId}function Do(e){return e.selection.selectionEnd.clientId}function Ao(e){return Yo(e).length||(e.selection.selectionStart.clientId?1:0)}function Ro(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return!!n.clientId&&n.clientId===r.clientId}function Lo(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd,o=n.clientId;return o&&o===r.clientId?o:null}function Mo(e){var t=Lo(e);return t?ko(e,t):null}function Fo(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}var Vo=Object(uo.a)((function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[],o=t;e.blocks.parents[o];)o=e.blocks.parents[o],r.push(o);return n?r:r.reverse()}),(function(e){return[e.blocks.parents]})),Ho=Object(uo.a)((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Vo(e,t,r);return Object(d.map)(Object(d.filter)(Object(d.map)(o,(function(t){return{id:t,name:Oo(e,t)}})),(function(e){var t=e.name;return Array.isArray(n)?n.includes(t):t===n})),(function(e){return e.id}))}),(function(e){return[e.blocks.parents]}));function zo(e,t){var n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function Go(e,t){for(var n,r=Lo(e),o=[].concat(Object(pe.a)(Vo(e,t)),[t]),c=[].concat(Object(pe.a)(Vo(e,r)),[r]),i=Math.min(o.length,c.length),l=0;l<i&&o[l]===c[l];l++)n=o[l];return n}function Uo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Lo(e)),void 0===t&&(t=n<0?Qo(e):Zo(e)),!t)return null;var r=Fo(e,t);if(null===r)return null;var o=e.blocks.order,c=o[r],i=c.indexOf(t),l=i+1*n;return l<0||l===c.length?null:c[l]}function Wo(e,t){return Uo(e,t,-1)}function Ko(e,t){return Uo(e,t,1)}function qo(e){return e.initialPosition}var $o=Object(uo.a)((function(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;if(void 0===n.clientId||void 0===r.clientId)return go;if(n.clientId===r.clientId)return[n.clientId];var o=Fo(e,n.clientId);if(null===o)return go;var c=oc(e,o),i=c.indexOf(n.clientId),l=c.indexOf(r.clientId);return i>l?c.slice(l,i+1):c.slice(i,l+1)}),(function(e){return[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]}));function Yo(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?go:$o(e)}var Xo=Object(uo.a)((function(e){var t=Yo(e);return t.length?t.map((function(t){return ko(e,t)})):go}),(function(e){return[].concat(Object(pe.a)($o.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])}));function Qo(e){return Object(d.first)(Yo(e))||null}function Zo(e){return Object(d.last)(Yo(e))||null}function Jo(e,t){return Qo(e)===t}function ec(e,t){return-1!==Yo(e).indexOf(t)}var tc=Object(uo.a)((function(e,t){for(var n=t,r=!1;n&&!r;)r=ec(e,n=Fo(e,n));return r}),(function(e){return[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]}));function nc(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?null:n.clientId||null}function rc(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?null:r.clientId||null}function oc(e,t){return e.blocks.order[t||""]||go}function cc(e,t,n){return oc(e,n).indexOf(t)}function ic(e,t){var n=e.selection,r=n.selectionStart,o=n.selectionEnd;return r.clientId===o.clientId&&r.clientId===t}function lc(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(d.some)(oc(e,t),(function(t){return ic(e,t)||ec(e,t)||n&&lc(e,t,n)}))}function ac(e,t){if(!t)return!1;var n=Yo(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function sc(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId!==r.clientId}function uc(e){return e.isMultiSelecting}function dc(e){return e.isSelectionEnabled}function bc(e,t){return e.blocksMode[t]||"visual"}function fc(e){return e.isTyping}function pc(e){return!!e.draggedBlocks.length}function mc(e){return e.draggedBlocks}function vc(e,t){return e.draggedBlocks.includes(t)}function gc(e,t){if(!pc(e))return!1;var n=Vo(e,t);return Object(d.some)(n,(function(t){return vc(e,t)}))}function Oc(e){return e.isCaretWithinFormattedText}function hc(e){var t,n,r=e.insertionPoint,o=e.selection.selectionEnd;if(null!==r)return r;var c=o.clientId;return c?(t=Fo(e,c)||void 0,n=cc(e,o.clientId,t)+1):n=oc(e).length,{rootClientId:t,index:n}}function jc(e){return e.insertionPointVisibility}function kc(e){return e.template.isValid}function yc(e){return e.settings.template}function _c(e,t){if(!t)return e.settings.templateLock;var n=Rc(e,t);return n?n.templateLock:null}var Ec=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(d.isBoolean)(e)?e:Object(d.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n};if(t&&"object"===Object(so.a)(t)?t=(n=t).name:n=Object(p.getBlockType)(t),!n)return!1;var c=Lc(e),i=c.allowedBlockTypes,l=o(i,t,!0);if(!l)return!1;var a=!!_c(e,r);if(a)return!1;var s=Rc(e,r);if(r&&void 0===s)return!1;var u=null==s?void 0:s.allowedBlocks,b=o(u,t),f=n.parent,m=Oo(e,r),v=o(f,m);return null!==b&&null!==v?b||v:null!==b?b:null===v||v},Cc=Object(uo.a)(Ec,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function wc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((function(t){return Cc(e,Oo(e,t),n)}))}function Sc(e,t){var n,r;return null!==(n=null===(r=e.preferences.insertUsage)||void 0===r?void 0:r[t])&&void 0!==n?n:null}var Bc=function(e,t,n){return!!Object(p.hasBlockSupport)(t,"inserter",!0)&&Ec(e,t.name,n)},Ic=function(e){return function(t){return mo(mo({},e),{},{id:"".concat(e.id,"-").concat(t.name),icon:t.icon||e.icon,title:t.title||e.title,description:t.description||e.description,category:t.category||e.category,example:t.hasOwnProperty("example")?t.example:e.example,initialAttributes:mo(mo({},e.initialAttributes),t.attributes),innerBlocks:t.innerBlocks,keywords:t.keywords||e.keywords})}},xc=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}},Pc=function(e,t){var n=t.buildScope,r=void 0===n?"inserter":n;return function(t){var n=t.name,o=!1;Object(p.hasBlockSupport)(t.name,"multiple",!0)||(o=Object(d.some)(Io(e,So(e)),{name:t.name}));var c=Sc(e,n)||{},i=c.time,l=c.count,a=void 0===l?0:l,s={id:n,name:t.name,title:t.title,icon:t.icon,isDisabled:o,frecency:xc(i,a)};if("transform"===r)return s;var u=t.variations.filter((function(e){var t=e.scope;return!t||t.includes("inserter")}));return mo(mo({},s),{},{initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:u,example:t.example,utility:1})}},Tc=Object(uo.a)((function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=Pc(e,{buildScope:"inserter"}),o=function(t){var n,r="core/block/".concat(t.id),o=Vc(e,t.id);1===o.length&&(n=Object(p.getBlockType)(o[0].name));var c=Sc(e,r)||{},i=c.time,l=c.count,a=xc(i,void 0===l?0:l);return{id:r,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n?n.icon:vo,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:a}},c=Object(p.getBlockTypes)().filter((function(t){return Bc(e,t,n)})).map(r),i=Ec(e,"core/block",n)?Uc(e).map(o):[],l=c.filter((function(e){var t=e.variations;return!(void 0===t?[]:t).some((function(e){return e.isDefault}))})),a=[],s=bo(c);try{for(s.s();!(t=s.n()).done;){var u=t.value,d=u.variations,b=void 0===d?[]:d;if(b.length){var f=Ic(u);a.push.apply(a,Object(pe.a)(b.map(f)))}}}catch(e){s.e(e)}finally{s.f()}return[].concat(Object(pe.a)(l),a,Object(pe.a)(i))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Uc(e),Object(p.getBlockTypes)()]})),Nc=Object(uo.a)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=Pc(e,{buildScope:"transform"}),o=Object(p.getBlockTypes)().filter((function(t){return Bc(e,t,n)})).map(r),c=Object(d.mapKeys)(o,(function(e){return e.name})),i=Object(p.getPossibleBlockTransformations)(t).reduce((function(e,t){return c[null==t?void 0:t.name]&&e.push(c[t.name]),e}),[]),l=Object(d.orderBy)(i,(function(e){return c[e.name].frecency}),"desc");return l}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]})),Dc=Object(uo.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object(d.some)(Object(p.getBlockTypes)(),(function(n){return Bc(e,n,t)}));if(n)return!0;var r=Ec(e,"core/block",t)&&Uc(e).length>0;return r}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Uc(e),Object(p.getBlockTypes)()]})),Ac=Object(uo.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return Object(d.filter)(Object(p.getBlockTypes)(),(function(n){return Bc(e,n,t)}))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]}));function Rc(e,t){return e.blockListSettings[t]}function Lc(e){return e.settings}function Mc(e){return e.blocks.isPersistentChange}var Fc=Object(uo.a)((function(e,t){return Object(d.filter)(e.blockListSettings,(function(e,n){return t.includes(n)}))}),(function(e){return[e.blockListSettings]})),Vc=Object(uo.a)((function(e,t){var n=Object(d.find)(Uc(e),(function(e){return e.id===t}));return n?Object(p.parse)("string"==typeof n.content.raw?n.content.raw:n.content):null}),(function(e){return[Uc(e)]})),Hc=Object(uo.a)((function(e,t){var n,r=Object(d.find)(Uc(e),(function(e){return e.id===t}));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(function(e){return[Uc(e)]}));function zc(e){return e.blocks.isIgnoredChange}function Gc(e){return e.lastBlockAttributesChange}function Uc(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:go}function Wc(e){return e.isNavigationMode}function Kc(e){return e.hasBlockMovingClientId}function qc(e){return!!e.automaticChangeStatus}function $c(e,t){return e.highlightedBlock===t}function Yc(e,t){return!!e.blocks.controlledInnerBlocks[t]}var Xc=Object(uo.a)((function(e,t){if(!t.length)return null;var n=Lo(e);if(t.includes(Oo(e,n)))return n;var r=Yo(e),o=Ho(e,n||r[0],t);return o?Object(d.last)(o):null}),(function(e,t){return[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]})),Qc=n(16),Zc=n.n(Qc),Jc={SLEEP:function(e){var t=e.duration;return new Promise((function(e){setTimeout(e,t)}))},MARK_AUTOMATIC_CHANGE_FINAL_CONTROL:Object(m.createRegistryControl)((function(e){return function(){var t=window.requestIdleCallback;(void 0===t?function(e){return setTimeout(e,100)}:t)((function(){return e.dispatch("core/block-editor").__unstableMarkAutomaticChangeFinal()}))}}))};function ei(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ti(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ti(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}function ti(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ni(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ri(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ni(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ni(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oi=Zc.a.mark(Ei),ci=Zc.a.mark(Ci),ii=Zc.a.mark(wi),li=Zc.a.mark(Ti),ai=Zc.a.mark(Ni),si=Zc.a.mark(Ri),ui=Zc.a.mark(Vi),di=Zc.a.mark(Wi),bi=Zc.a.mark(Ki),fi=Zc.a.mark($i),pi=Zc.a.mark(Ji),mi=Zc.a.mark(el),vi=Zc.a.mark(tl),gi=Zc.a.mark(Ol),Oi=Zc.a.mark(jl),hi=Zc.a.mark(kl),ji=Zc.a.mark(yl),ki=Zc.a.mark(_l),yi=Zc.a.mark(El),_i=Zc.a.mark(wl);function Ei(){return Zc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m.controls.select("core/block-editor","getBlockCount");case 2:if(0!==e.sent){e.next=7;break}return e.next=6,bl();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),oi)}function Ci(e){return Zc.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,{type:"RESET_BLOCKS",blocks:e};case 2:return t.delegateYield(wi(e),"t0",3);case 3:return t.abrupt("return",t.t0);case 4:case"end":return t.stop()}}),ci)}function wi(e){var t,n,r,o;return Zc.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,m.controls.select("core/block-editor","getTemplate");case 2:return t=c.sent,c.next=5,m.controls.select("core/block-editor","getTemplateLock");case 5:return n=c.sent,r=!t||"all"!==n||Object(p.doBlocksMatchTemplate)(e,t),c.next=9,m.controls.select("core/block-editor","isValidTemplate");case 9:if(o=c.sent,r===o){c.next=14;break}return c.next=13,Zi(r);case 13:return c.abrupt("return",r);case 14:case"end":return c.stop()}}),ii)}function Si(e,t){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t}}function Bi(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function Ii(e,t){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Object(d.castArray)(e),attributes:t}}function xi(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Pi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function Ti(e){var t;return Zc.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,m.controls.select("core/block-editor","getPreviousBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,Pi(t,-1);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),li)}function Ni(e){var t;return Zc.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,m.controls.select("core/block-editor","getNextBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,Pi(t);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),ai)}function Di(){return{type:"START_MULTI_SELECT"}}function Ai(){return{type:"STOP_MULTI_SELECT"}}function Ri(e,t){var n;return Zc.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,{type:"MULTI_SELECT",start:e,end:t};case 2:return r.next=4,m.controls.select("core/block-editor","getSelectedBlockCount");case 4:n=r.sent,Object(ot.speak)(Object(w.sprintf)(
|
10 |
/* translators: %s: number of selected blocks */
|
11 |
+
Object(w._n)("%s block selected.","%s blocks selected.",n),n),"assertive");case 6:case"end":return r.stop()}}),si)}function Li(){return{type:"CLEAR_SELECTED_BLOCK"}}function Mi(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Fi(e,t){var n,r,o=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((function(e){var t,n=e.name;if(!Object(p.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!o[n])return e;var r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=r&&r.includes("is-style-"))return e;var c=e.attributes,i=void 0===c?{}:c,l=o[n];return ri(ri({},e),{},{attributes:ri(ri({},i),{},{className:"".concat(r||""," is-style-").concat(l).trim()})})}))}function Vi(e,t,n,r,o){var c,i,l;return Zc.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return e=Object(d.castArray)(e),a.t0=Fi,a.t1=Object(d.castArray)(t),a.next=5,m.controls.select("core/block-editor","getSettings");case 5:return a.t2=a.sent,t=(0,a.t0)(a.t1,a.t2),a.next=9,m.controls.select("core/block-editor","getBlockRootClientId",Object(d.first)(e));case 9:c=a.sent,i=0;case 11:if(!(i<t.length)){a.next=21;break}return l=t[i],a.next=15,m.controls.select("core/block-editor","canInsertBlockType",l.name,c);case 15:if(a.sent){a.next=18;break}return a.abrupt("return");case 18:i++,a.next=11;break;case 21:return a.next=23,{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:r,meta:o};case 23:return a.delegateYield(Ei(),"t3",24);case 24:case"end":return a.stop()}}),ui)}function Hi(e,t){return Vi(e,t)}function zi(e){return function(t,n){return{clientIds:Object(d.castArray)(t),type:e,rootClientId:n}}}var Gi=zi("MOVE_BLOCKS_DOWN"),Ui=zi("MOVE_BLOCKS_UP");function Wi(e){var t,n,r,o,c,i=arguments;return Zc.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=i.length>1&&void 0!==i[1]?i[1]:"",n=i.length>2&&void 0!==i[2]?i[2]:"",r=i.length>3?i[3]:void 0,l.next=5,m.controls.select("core/block-editor","getTemplateLock",t);case 5:if("all"!==(o=l.sent)){l.next=8;break}return l.abrupt("return");case 8:if(c={type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r},t!==n){l.next=13;break}return l.next=12,c;case 12:return l.abrupt("return");case 13:if("insert"!==o){l.next=15;break}return l.abrupt("return");case 15:return l.next=17,m.controls.select("core/block-editor","canInsertBlocks",e,n);case 17:if(!l.sent){l.next=21;break}return l.next=21,c;case 21:case"end":return l.stop()}}),di)}function Ki(e){var t,n,r,o=arguments;return Zc.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=o.length>1&&void 0!==o[1]?o[1]:"",n=o.length>2&&void 0!==o[2]?o[2]:"",r=o.length>3?o[3]:void 0,c.next=5,Wi([e],t,n,r);case 5:case"end":return c.stop()}}),bi)}function qi(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return $i([e],t,n,r)}function $i(e,t,n){var r,o,c,i,l,a,s=arguments;return Zc.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return r=!(s.length>3&&void 0!==s[3])||s[3],o=s.length>4?s[4]:void 0,u.t0=Fi,u.t1=Object(d.castArray)(e),u.next=6,m.controls.select("core/block-editor","getSettings");case 6:u.t2=u.sent,e=(0,u.t0)(u.t1,u.t2),c=[],i=ei(e),u.prev=10,i.s();case 12:if((l=i.n()).done){u.next=20;break}return a=l.value,u.next=16,m.controls.select("core/block-editor","canInsertBlockType",a.name,n);case 16:u.sent&&c.push(a);case 18:u.next=12;break;case 20:u.next=25;break;case 22:u.prev=22,u.t3=u.catch(10),i.e(u.t3);case 25:return u.prev=25,i.f(),u.finish(25);case 28:if(!c.length){u.next=30;break}return u.abrupt("return",{type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,meta:o});case 30:case"end":return u.stop()}}),fi,null,[[10,22,25,28]])}function Yi(e,t){return{type:"SET_INSERTION_POINT",rootClientId:e,index:t}}function Xi(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function Qi(){return{type:"HIDE_INSERTION_POINT"}}function Zi(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function Ji(){var e,t,n;return Zc.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,{type:"SYNCHRONIZE_TEMPLATE"};case 2:return r.next=4,m.controls.select("core/block-editor","getBlocks");case 4:return e=r.sent,r.next=7,m.controls.select("core/block-editor","getTemplate");case 7:return t=r.sent,n=Object(p.synchronizeBlocksWithTemplate)(e,t),r.next=11,Ci(n);case 11:return r.abrupt("return",r.sent);case 12:case"end":return r.stop()}}),pi)}function el(e,t){var n,r,o,i,l,a,s,u,b,f,v,g,O,h,j,k,y,_,E,C,w,S,B,I,x,P,T,N,D,A,R,L,M,F;return Zc.a.wrap((function(V){for(;;)switch(V.prev=V.next){case 0:return n=[e,t],V.next=3,{type:"MERGE_BLOCKS",blocks:n};case 3:return r=n[0],o=n[1],V.next=6,m.controls.select("core/block-editor","getBlock",r);case 6:if(i=V.sent,(l=Object(p.getBlockType)(i.name)).merge){V.next=12;break}return V.next=11,Pi(i.clientId);case 11:return V.abrupt("return");case 12:return V.next=14,m.controls.select("core/block-editor","getBlock",o);case 14:return a=V.sent,s=Object(p.getBlockType)(a.name),V.next=18,m.controls.select("core/block-editor","getSelectionStart");case 18:if(u=V.sent,b=u.clientId,f=u.attributeKey,v=u.offset,g=(b===r?l:s).attributes[f],O=(b===r||b===o)&&void 0!==f&&void 0!==v&&!!g,g||("number"==typeof f?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ".concat(Object(so.a)(f))):window.console.error("The RichText identifier prop does not match any attributes defined by the block.")),h="",j=Object(p.cloneBlock)(i),k=Object(p.cloneBlock)(a),O&&(_=(y=b===r?j:k).attributes[f],E=g.multiline,C=g.__unstableMultilineWrapperTags,w=g.__unstablePreserveWhiteSpace,S=Object(c.insert)(Object(c.create)({html:_,multilineTag:E,multilineWrapperTags:C,preserveWhiteSpace:w}),h,v,v),y.attributes[f]=Object(c.toHTMLString)({value:S,multilineTag:E,preserveWhiteSpace:w})),(B=i.name===a.name?[k]:Object(p.switchToBlockType)(k,i.name))&&B.length){V.next=33;break}return V.abrupt("return");case 33:if(I=l.merge(j.attributes,B[0].attributes),!O){V.next=45;break}return x=Object(d.findKey)(I,(function(e){return"string"==typeof e&&-1!==e.indexOf(h)})),P=I[x],T=l.attributes[x],N=T.multiline,D=T.__unstableMultilineWrapperTags,A=T.__unstablePreserveWhiteSpace,R=Object(c.create)({html:P,multilineTag:N,multilineWrapperTags:D,preserveWhiteSpace:A}),L=R.text.indexOf(h),M=Object(c.remove)(R,L,L+1),F=Object(c.toHTMLString)({value:M,multilineTag:N,preserveWhiteSpace:A}),I[x]=F,V.next=45,dl(i.clientId,x,L,L);case 45:return V.delegateYield(Vi([i.clientId,a.clientId],[ri(ri({},i),{},{attributes:ri(ri({},i.attributes),I)})].concat(Object(pe.a)(B.slice(1)))),"t0",46);case 46:case"end":return V.stop()}}),mi)}function tl(e){var t,n,r,o,c=arguments;return Zc.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t=!(c.length>1&&void 0!==c[1])||c[1],e&&e.length){i.next=3;break}return i.abrupt("return");case 3:return e=Object(d.castArray)(e),i.next=6,m.controls.select("core/block-editor","getBlockRootClientId",e[0]);case 6:return n=i.sent,i.next=9,m.controls.select("core/block-editor","getTemplateLock",n);case 9:if(!i.sent){i.next=12;break}return i.abrupt("return");case 12:if(!t){i.next=18;break}return i.next=15,Ti(e[0]);case 15:r=i.sent,i.next=21;break;case 18:return i.next=20,m.controls.select("core/block-editor","getPreviousBlockClientId",e[0]);case 20:r=i.sent;case 21:return i.next=23,{type:"REMOVE_BLOCKS",clientIds:e};case 23:return i.delegateYield(Ei(),"t0",24);case 24:return o=i.t0,i.abrupt("return",[r||o]);case 26:case"end":return i.stop()}}),vi)}function nl(e,t){return tl([e],t)}function rl(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,time:Date.now()}}function ol(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function cl(){return{type:"START_TYPING"}}function il(){return{type:"STOP_TYPING"}}function ll(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function al(){return{type:"STOP_DRAGGING_BLOCKS"}}function sl(){return{type:"ENTER_FORMATTED_TEXT"}}function ul(){return{type:"EXIT_FORMATTED_TEXT"}}function dl(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function bl(e,t,n){var r=Object(p.getDefaultBlockName)();if(r)return qi(Object(p.createBlock)(r,e),n,t)}function fl(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function pl(e){return{type:"UPDATE_SETTINGS",settings:e}}function ml(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function vl(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function gl(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function Ol(){return Zc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{type:"MARK_AUTOMATIC_CHANGE"};case 2:return e.next=4,{type:"MARK_AUTOMATIC_CHANGE_FINAL_CONTROL"};case 4:case"end":return e.stop()}}),gi)}function hl(){return{type:"MARK_AUTOMATIC_CHANGE_FINAL"}}function jl(){var e,t=arguments;return Zc.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=!(t.length>0&&void 0!==t[0])||t[0],n.next=3,{type:"SET_NAVIGATION_MODE",isNavigationMode:e};case 3:e?Object(ot.speak)(Object(w.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):Object(ot.speak)(Object(w.__)("You are currently in edit mode. To return to the navigation mode, press Escape."));case 4:case"end":return n.stop()}}),Oi)}function kl(){var e,t=arguments;return Zc.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=t.length>0&&void 0!==t[0]?t[0]:null,n.next=3,{type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e};case 3:e&&Object(ot.speak)(Object(w.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."));case 4:case"end":return n.stop()}}),hi)}function yl(e){var t,n,r,o,c,i,l=arguments;return Zc.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(t=!(l.length>1&&void 0!==l[1])||l[1],e||e.length){a.next=3;break}return a.abrupt("return");case 3:return a.next=5,m.controls.select("core/block-editor","getBlocksByClientId",e);case 5:return n=a.sent,a.next=8,m.controls.select("core/block-editor","getBlockRootClientId",e[0]);case 8:if(r=a.sent,!Object(d.some)(n,(function(e){return!e}))){a.next=11;break}return a.abrupt("return");case 11:if(o=n.map((function(e){return e.name})),!Object(d.some)(o,(function(e){return!Object(p.hasBlockSupport)(e,"multiple",!0)}))){a.next=14;break}return a.abrupt("return");case 14:return a.next=16,m.controls.select("core/block-editor","getBlockIndex",Object(d.last)(Object(d.castArray)(e)),r);case 16:return c=a.sent,i=n.map((function(e){return Object(p.cloneBlock)(e)})),a.next=20,$i(i,c+1,r,t);case 20:if(!(i.length>1&&t)){a.next=23;break}return a.next=23,Ri(Object(d.first)(i).clientId,Object(d.last)(i).clientId);case 23:return a.abrupt("return",i.map((function(e){return e.clientId})));case 24:case"end":return a.stop()}}),ji)}function _l(e){var t,n;return Zc.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,m.controls.select("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,m.controls.select("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,m.controls.select("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,bl({},t,n);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),ki)}function El(e){var t,n;return Zc.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,m.controls.select("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,m.controls.select("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,m.controls.select("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,bl({},t,n+1);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),yi)}function Cl(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function wl(e){return Zc.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Cl(e,!0);case 2:return t.next=4,{type:"SLEEP",duration:150};case 4:return t.next=6,Cl(e,!1);case 6:case"end":return t.stop()}}),_i)}function Sl(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function Bl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Il(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bl(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xl={reducer:ao,selectors:r,actions:o,controls:Jc},Pl=Object(m.createReduxStore)("core/block-editor",Il(Il({},xl),{},{persist:["preferences"]}));function Tl(e){return Object(m.useSelect)((function(t){if(!e)return null;var n=t(Pl),r=n.getBlockName,o=n.getBlockAttributes,c=t(p.store),i=c.getBlockType,l=c.getBlockVariations,a=r(e),s=i(a);if(!s)return null;var u=l(a),d={title:s.title,icon:s.icon,description:s.description};if(null==u||!u.length)return d;var b=o(e),f=u.find((function(e){var t;return null===(t=e.isActive)||void 0===t?void 0:t.call(e,b,e.attributes)}));return f?{title:f.title||s.title,icon:f.icon||s.icon,description:f.description||s.description}:d}),[e])}function Nl(e){var t=e.clientId,n=Object(m.useSelect)((function(e){if(!t)return{};var n=e("core/block-editor"),r=n.getBlockName,o=n.getBlockAttributes,c=n.__experimentalGetReusableBlockTitle,i=r(t);if(!i)return{};var l=Object(p.isReusableBlock)(Object(p.getBlockType)(i));return{attributes:o(t),name:i,reusableBlockTitle:l&&c(o(t).ref)}}),[t]),r=n.attributes,o=n.name,c=n.reusableBlockTitle,i=Tl(t);if(!o||!i)return null;var l=Object(p.getBlockType)(o),a=Object(p.__experimentalGetBlockLabel)(l,r);return a!==l.title?"".concat(l.title,": ").concat(Object(d.truncate)(a,{length:15})):c?Object(d.truncate)(c,{length:35}):i.title}Object(m.registerStore)("core/block-editor",Il(Il({},xl),{},{persist:["preferences"]}));var Dl=function(){var e=Object(m.useDispatch)("core/block-editor"),t=e.selectBlock,n=e.clearSelectedBlock,r=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectionStart,r=t.getSelectedBlockClientId,o=t.getBlockParents,c=r();return{parents:o(c),clientId:c,hasSelection:!!n().clientId}}),[]),o=r.clientId,c=r.parents,i=r.hasSelection;return Object(a.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":Object(w.__)("Block breadcrumb")},Object(a.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&Object(a.createElement)(v.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:n},Object(w.__)("Document")),!i&&Object(w.__)("Document")),c.map((function(e){return Object(a.createElement)("li",{key:e},Object(a.createElement)(v.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:function(){return t(e)}},Object(a.createElement)(Nl,{clientId:e})))})),!!o&&Object(a.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},Object(a.createElement)(Nl,{clientId:o})))};function Al(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Al(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Al(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ll=Object(a.createContext)({});function Ml(e){var t=e.value,n=e.children,r=Object(a.useContext)(Ll),o=Object(a.useMemo)((function(){return Rl(Rl({},r),t)}),[r,t]);return Object(a.createElement)(Ll.Provider,{value:o,children:n})}var Fl=Ll,Vl=function(){return Object(a.createElement)(v.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Object(a.createElement)(v.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"}))},Hl=function(e){var t=e.style,n=e.className;return Object(a.createElement)("div",{className:"block-library-colors-selector__icon-container"},Object(a.createElement)("div",{className:"".concat(n," block-library-colors-selector__state-selection"),style:t},Object(a.createElement)(Vl,null)))},zl=function(e){var t,n,r,o=e.children,c=Object(Fe.a)(e,["children"]);return Object(a.createElement)(v.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:(t=c,n=t.TextColor,r=t.BackgroundColor,function(e){var t=e.onToggle,o=e.isOpen;return Object(a.createElement)(v.ToolbarGroup,null,Object(a.createElement)(v.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:Object(w.__)("Open Colors Selector"),onClick:t,onKeyDown:function(e){o||e.keyCode!==Ht.DOWN||(e.preventDefault(),e.stopPropagation(),t())},icon:Object(a.createElement)(r,null,Object(a.createElement)(n,null,Object(a.createElement)(Hl,null)))}))}),renderContent:function(){return o}})},Gl={},Ul=Object(v.withFilters)("editor.BlockEdit")((function(e){var t=e.attributes,n=void 0===t?{}:t,r=e.name,o=Object(p.getBlockType)(r),c=Object(a.useContext)(Fl),l=Object(a.useMemo)((function(){return o&&o.usesContext?Object(d.pick)(c,o.usesContext):Gl}),[o,c]);if(!o)return null;var s=o.edit||o.save;if(o.apiVersion>1||Object(p.hasBlockSupport)(o,"lightBlockWrapper",!1))return Object(a.createElement)(s,Object(i.a)({},e,{context:l}));var b=Object(p.hasBlockSupport)(o,"className",!0)?Object(p.getBlockDefaultClassName)(r):null,f=u()(b,n.className);return Object(a.createElement)(s,Object(i.a)({},e,{context:l,className:f}))}));function Wl(e){var t={name:e.name,isSelected:e.isSelected,clientId:e.clientId,onFocus:e.onFocus,onCaretVerticalPositionChange:e.onCaretVerticalPositionChange};return Object(a.createElement)(O,{value:Object(a.useMemo)((function(){return t}),Object.values(t))},Object(a.createElement)(Ul,e))}var Kl=Object(v.createSlotFill)("BlockFormatControls"),ql=Kl.Fill,$l=Kl.Slot,Yl=function(e){return h().isSelected?Object(a.createElement)(ql,null,(function(t){var n=Object(d.isEmpty)(t)?null:t;return Object(a.createElement)(v.__experimentalToolbarContext.Provider,{value:n},e.children)})):null};Yl.Slot=function(e){var t=Object(a.useContext)(v.__experimentalToolbarContext);return Object(a.createElement)($l,Object(i.a)({},e,{fillProps:t}))};var Xl=Yl,Ql=n(44),Zl=n(46),Jl=n(262),ea=n(125),ta=n(33),na=function(e){return e+1},ra=function(e){return{top:e.offsetTop,left:e.offsetLeft}},oa=function(e,t,n,r,o){var c=Object(b.useReducedMotion)()||!r,i=Object(a.useReducer)(na,0),l=Object(Me.a)(i,2),s=l[0],u=l[1],d=Object(a.useReducer)(na,0),f=Object(Me.a)(d,2),p=f[0],m=f[1],v=Object(a.useState)({x:0,y:0}),g=Object(Me.a)(v,2),O=g[0],h=g[1],j=Object(a.useMemo)((function(){return e.current?ra(e.current):null}),[o]),k=Object(a.useMemo)((function(){if(!n||!e.current)return function(){};var t=Object(ta.getScrollContainer)(e.current);if(!t)return function(){};var r=e.current.getBoundingClientRect();return function(){var n=e.current.getBoundingClientRect().top-r.top;n&&(t.scrollTop+=n)}}),[o,n]);function y(n){var r=n.x,o=n.y;r=Math.round(r),o=Math.round(o),r===y.x&&o===y.y||(function(n){var r=n.x,o=n.y;if(e.current){var c=0===r&&0===o;e.current.style.transformOrigin=c?"":"center",e.current.style.transform=c?"":"translate3d(".concat(r,"px,").concat(o,"px,0)"),e.current.style.zIndex=!t||c?"":"1",k()}}({x:r,y:o}),y.x=r,y.y=o)}Object(a.useLayoutEffect)((function(){s&&m()}),[s]),Object(a.useLayoutEffect)((function(){if(j)if(c)k();else{e.current.style.transform="";var t=ra(e.current);u(),h({x:Math.round(j.left-t.left),y:Math.round(j.top-t.top)})}}),[o]),y.x=0,y.y=0,Object(ea.useSpring)({from:{x:O.x,y:O.y},to:{x:0,y:0},reset:s!==p,config:{mass:5,tension:2e3,friction:200},immediate:c,onFrame:y})},ca=Object(ea.animated)(v.__experimentalTreeGridRow);function ia(e){var t=e.isSelected,n=e.position,r=e.level,o=e.rowCount,c=e.children,l=e.className,s=e.path,d=Object(Fe.a)(e,["isSelected","position","level","rowCount","children","className","path"]),b=Object(a.useRef)(null),f=s.join("_"),p=oa(b,t,!1,!0,f);return Object(a.createElement)(ca,Object(i.a)({ref:b,style:p,className:u()("block-editor-block-navigation-leaf",l),level:r,positionInSet:n,setSize:o},d),c)}var la=n(259),aa=n(260),sa=n(261),ua=n(216);var da=function(e,t){return"up"===e?"horizontal"===t?Object(w.isRTL)()?la.a:aa.a:sa.a:"down"===e?"horizontal"===t?Object(w.isRTL)()?aa.a:la.a:ua.a:null},ba=function(e,t){return"up"===e?"horizontal"===t?Object(w.isRTL)()?Object(w.__)("Move right"):Object(w.__)("Move left"):Object(w.__)("Move up"):"down"===e?"horizontal"===t?Object(w.isRTL)()?Object(w.__)("Move left"):Object(w.__)("Move right"):Object(w.__)("Move down"):null},fa=Object(a.forwardRef)((function(e,t){var n=e.clientIds,r=e.direction,o=e.orientation,c=Object(Fe.a)(e,["clientIds","direction","orientation"]),l=Object(b.useInstanceId)(fa),s=Object(d.castArray)(n).length,f=Object(m.useSelect)((function(e){var t=e("core/block-editor"),c=t.getBlockIndex,i=t.getBlockRootClientId,l=t.getBlockOrder,a=t.getBlock,s=t.getBlockListSettings,u=Object(d.castArray)(n),b=Object(d.first)(u),f=i(b),m=c(b,f),v=c(Object(d.last)(u),f),g=l(f),O=a(b),h=0===m,j=v===g.length-1,k=(s(f)||{}).orientation;return{blockType:O?Object(p.getBlockType)(O.name):null,isDisabled:"up"===r?h:j,rootClientId:f,firstIndex:m,isFirst:h,isLast:j,orientation:o||k}}),[n,r]),g=f.blockType,O=f.isDisabled,h=f.rootClientId,j=f.isFirst,k=f.isLast,y=f.firstIndex,_=f.orientation,E=void 0===_?"vertical":_,C=Object(m.useDispatch)("core/block-editor"),S=C.moveBlocksDown,B=C.moveBlocksUp,I="up"===r?B:S,x="block-editor-block-mover-button__description-".concat(l);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.Button,Object(i.a)({ref:t,className:u()("block-editor-block-mover-button","is-".concat(r,"-button")),icon:da(r,E),label:ba(r,E),"aria-describedby":x},c,{onClick:O?null:function(e){I(n,h),c.onClick&&c.onClick(e)},"aria-disabled":O})),Object(a.createElement)("span",{id:x,className:"block-editor-block-mover-button__description"},function(e,t,n,r,o,c,i){var l=n+1,a=function(e){return"up"===e?"horizontal"===i?Object(w.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===i?Object(w.isRTL)()?"left":"right":"down":null};if(e>1)return function(e,t,n,r,o){var c=t+1;return o<0&&n?Object(w.__)("Blocks cannot be moved up as they are already at the top"):o>0&&r?Object(w.__)("Blocks cannot be moved down as they are already at the bottom"):o<0&&!n?Object(w.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
|
12 |
Object(w._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,c):o>0&&!r?Object(w.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
|
13 |
Object(w._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,c):void 0}(e,n,r,o,c);if(r&&o)return Object(w.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
|
14 |
Object(w.__)("Block %s is the only block, and cannot be moved"),t);if(c>0&&!o){var s=a("down");if("down"===s)return Object(w.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
23 |
Object(w.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l-1)}if(c<0&&r){var b=a("up");if("up"===b)return Object(w.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
24 |
Object(w.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===b)return Object(w.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
25 |
Object(w.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===b)return Object(w.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
26 |
+
Object(w.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(s,g&&g.title,y,j,k,"up"===r?-1:1,E)))})),pa=Object(a.forwardRef)((function(e,t){return Object(a.createElement)(fa,Object(i.a)({direction:"up",ref:t},e))})),ma=Object(a.forwardRef)((function(e,t){return Object(a.createElement)(fa,Object(i.a)({direction:"down",ref:t},e))})),va=Object(a.createContext)({__experimentalFeatures:!1}),ga=function(){return Object(a.useContext)(va)},Oa=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),ha=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(a.createElement)("div",{className:u()(t,"block-editor-warning")},Object(a.createElement)("div",{className:"block-editor-warning__contents"},Object(a.createElement)("p",{className:"block-editor-warning__message"},r),(a.Children.count(n)>0||o)&&Object(a.createElement)("div",{className:"block-editor-warning__actions"},a.Children.count(n)>0&&a.Children.map(n,(function(e,t){return Object(a.createElement)("span",{key:t,className:"block-editor-warning__action"},e)})),o&&Object(a.createElement)(v.DropdownMenu,{className:"block-editor-warning__secondary",icon:Oa,label:Object(w.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(function(){return Object(a.createElement)(v.MenuGroup,null,o.map((function(e,t){return Object(a.createElement)(v.MenuItem,{onClick:e.onClick,key:t},e.title)})))})))))},ja=n(334),ka=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,c=e.actionText,i=e.className;return Object(a.createElement)("div",{className:i},Object(a.createElement)("div",{className:"block-editor-block-compare__content"},Object(a.createElement)("h2",{className:"block-editor-block-compare__heading"},t),Object(a.createElement)("div",{className:"block-editor-block-compare__html"},n),Object(a.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},r)),Object(a.createElement)("div",{className:"block-editor-block-compare__action"},Object(a.createElement)(v.Button,{isSecondary:!0,tabIndex:"0",onClick:o},c)))},ya=function(e){var t,n,r,o,c=e.block,i=e.onKeep,l=e.onConvert,s=e.convertor,b=e.convertButtonText,f={rawContent:c.originalContent,renderedContent:Object(p.getSaveElement)(c.name,c.attributes)},m=(t=s(c),r=(n=Object(d.castArray)(t)).map((function(e){return Object(p.getSaveContent)(e.name,e.attributes,e.innerBlocks)})),o=n.map((function(e){return Object(p.getSaveElement)(e.name,e.attributes,e.innerBlocks)})),{rawContent:r.join(""),renderedContent:o}),v=function(e,t){return Object(ja.diffChars)(e,t).map((function(e,t){var n=u()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return Object(a.createElement)("span",{key:t,className:n},e.value)}))}(f.rawContent,m.rawContent);return Object(a.createElement)("div",{className:"block-editor-block-compare__wrapper"},Object(a.createElement)(ka,{title:Object(w.__)("Current"),className:"block-editor-block-compare__current",action:i,actionText:Object(w.__)("Convert to HTML"),rawContent:f.rawContent,renderedContent:f.renderedContent}),Object(a.createElement)(ka,{title:Object(w.__)("After Conversion"),className:"block-editor-block-compare__converted",action:l,actionText:b,rawContent:v,renderedContent:m.renderedContent}))},_a=function(e){return Object(p.rawHandler)({HTML:e.originalContent})},Ea=Object(b.compose)([Object(m.withSelect)((function(e,t){var n=t.clientId;return{block:e("core/block-editor").getBlock(n)}})),Object(m.withDispatch)((function(e,t){var n=t.block,r=e("core/block-editor").replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return Object(p.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return Object(p.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,_a(n))},attemptBlockRecovery:function(){var e,t,o,c;r(n.clientId,(t=(e=n).name,o=e.attributes,c=e.innerBlocks,Object(p.createBlock)(t,o,c)))}}}))])((function(e){var t=e.convertToHTML,n=e.convertToBlocks,r=e.convertToClassic,o=e.attemptBlockRecovery,c=e.block,i=!!Object(p.getBlockType)("core/html"),l=Object(a.useState)(!1),s=Object(Me.a)(l,2),u=s[0],d=s[1],b=Object(a.useCallback)((function(){return d(!0)}),[]),f=Object(a.useCallback)((function(){return d(!1)}),[]),m=Object(a.useMemo)((function(){return[{
|
27 |
// translators: Button to fix block content
|
28 |
title:Object(w._x)("Resolve","imperative verb"),onClick:b},i&&{title:Object(w.__)("Convert to HTML"),onClick:t},{title:Object(w.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)}),[b,t,r]);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(ha,{actions:[Object(a.createElement)(v.Button,{key:"recover",onClick:o,isPrimary:!0},Object(w.__)("Attempt Block Recovery"))],secondaryActions:m},Object(w.__)("This block contains unexpected or invalid content.")),u&&Object(a.createElement)(v.Modal,{title:// translators: Dialog title to fix block content
|
29 |
+
Object(w.__)("Resolve Block"),onRequestClose:f,className:"block-editor-block-compare"},Object(a.createElement)(ya,{block:c,onKeep:t,onConvert:n,convertor:_a,convertButtonText:Object(w.__)("Convert to Blocks")})))})),Ca=Object(a.createElement)(ha,{className:"block-editor-block-list__block-crash-warning"},Object(w.__)("This block has encountered an error and cannot be previewed.")),wa=function(){return Ca};var Sa=function(e){Object(Mn.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Vn.a)(t);if(n){var o=Object(Vn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Fn.a)(this,e)});function o(){var e;return Object(An.a)(this,o),(e=r.apply(this,arguments)).state={hasError:!1},e}return Object(Rn.a)(o,[{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}}]),o}(a.Component),Ba=n(100),Ia=n.n(Ba),xa=function(e){var t=e.clientId,n=Object(a.useState)(""),r=Object(Me.a)(n,2),o=r[0],c=r[1],i=Object(m.useSelect)((function(e){return e("core/block-editor").getBlock(t)}),[t]),l=Object(m.useDispatch)("core/block-editor").updateBlock;return Object(a.useEffect)((function(){c(Object(p.getBlockContent)(i))}),[i]),Object(a.createElement)(Ia.a,{className:"block-editor-block-list__block-html-textarea",value:o,onBlur:function(){var e=Object(p.getBlockType)(i.name),n=Object(p.getBlockAttributes)(e,o,i.attributes),r=o||Object(p.getSaveContent)(e,n),a=!o||Object(p.isValidBlockContent)(e,n,r);l(t,{attributes:n,originalContent:r,isValid:a}),o||c({content:r})},onChange:function(e){return c(e.target.value)}})},Pa=n(68),Ta=n(184),Na=[Object(a.createInterpolateElement)(Object(w.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:Object(a.createElement)("kbd",null)}),Object(a.createInterpolateElement)(Object(w.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:Object(a.createElement)("kbd",null)}),Object(a.createInterpolateElement)(Object(w.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:Object(a.createElement)("kbd",null)}),Object(w.__)("Drag files into the editor to automatically insert media blocks."),Object(w.__)("Change a block's type by pressing the block icon on the toolbar.")],Da=function(){var e=Object(a.useState)(Math.floor(Math.random()*Na.length)),t=Object(Me.a)(e,1)[0];return Object(a.createElement)(v.Tip,null,Na[t])},Aa=n(143),Ra=n(142),La=n(258),Ma=function e(t){var n=t.className,r=t.onChange,o=t.value,c=t.placeholder,i=Object(b.useInstanceId)(e),l=Object(a.useRef)();return Object(a.createElement)("div",{className:u()("block-editor-inserter__search",n)},Object(a.createElement)(v.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-".concat(i)},c),Object(a.createElement)("input",{ref:l,className:"block-editor-inserter__search-input",id:"block-editor-inserter__search-".concat(i),type:"search",placeholder:c,onChange:function(e){return r(e.target.value)},autoComplete:"off",value:o||""}),Object(a.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(a.createElement)(v.Button,{icon:Aa.a,label:Object(w.__)("Reset search"),onClick:function(){r(""),l.current.focus()}}),!o&&Object(a.createElement)(Ra.a,{icon:La.a})))},Fa=n(37),Va=n.n(Fa),Ha=function(e){var t=e.title,n=e.icon,r=e.description,o=e.blockType;return o&&(Va()("`blockType` property in `BlockCard component`",{alternative:"`title, icon and description` properties"}),t=o.title,n=o.icon,r=o.description),Object(a.createElement)("div",{className:"block-editor-block-card"},Object(a.createElement)(Mr,{icon:n,showColors:!0}),Object(a.createElement)("div",{className:"block-editor-block-card__content"},Object(a.createElement)("h2",{className:"block-editor-block-card__title"},t),Object(a.createElement)("span",{className:"block-editor-block-card__description"},r)))};function za(e){var t=e.clientId,n=void 0===t?null:t,r=e.value,o=e.selectionStart,c=e.selectionEnd,i=e.onChange,l=void 0===i?d.noop:i,s=e.onInput,u=void 0===s?d.noop:s,b=Object(m.useRegistry)(),f=b.dispatch("core/block-editor"),v=f.resetBlocks,g=f.resetSelection,O=f.replaceInnerBlocks,h=f.setHasControlledInnerBlocks,j=f.__unstableMarkNextChangeAsNotPersistent,k=b.select("core/block-editor"),y=k.getBlockName,_=k.getBlocks,E=Object(a.useRef)({incoming:null,outgoing:[]}),C=Object(a.useRef)(!1),w=Object(a.useRef)(u),S=Object(a.useRef)(l);Object(a.useEffect)((function(){w.current=u,S.current=l}),[u,l]),Object(a.useEffect)((function(){E.current.outgoing.includes(r)?Object(d.last)(E.current.outgoing)===r&&(E.current.outgoing=[]):_(n)!==r&&(E.current.outgoing=[],function(){if(r)if(j(),n){h(n,!0),j();var e=r.map((function(e){return Object(p.cloneBlock)(e)}));C.current&&(E.current.incoming=e),O(n,e)}else C.current&&(E.current.incoming=r),v(r)}(),o&&c&&g(o,c))}),[r,n]),Object(a.useEffect)((function(){var e=b.select("core/block-editor"),t=e.getSelectionStart,r=e.getSelectionEnd,o=e.isLastBlockChangePersistent,c=e.__unstableIsLastBlockChangeIgnored,i=_(n),l=o(),a=!1;C.current=!0;var s=b.subscribe((function(){if(null===n||null!==y(n)){var e=o(),s=_(n),u=s!==i;if(i=s,u&&(E.current.incoming||c()))return E.current.incoming=null,void(l=e);(u||a&&!u&&e&&!l)&&(l=e,E.current.outgoing.push(i),(l?S.current:w.current)(i,{selectionStart:t(),selectionEnd:r()})),a=u}}));return function(){return s()}}),[b,n])}var Ga,Ua=Object(b.createHigherOrderComponent)((function(e){return Object(m.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object(Fe.a)(t,["useSubRegistry","registry"]);if(!r)return Object(a.createElement)(e,Object(i.a)({registry:o},c));var l=Object(a.useState)(null),s=Object(Me.a)(l,2),u=s[0],d=s[1];return Object(a.useEffect)((function(){var e=Object(m.createRegistry)({},o);e.registerStore("core/block-editor",xl),d(e)}),[o]),u?Object(a.createElement)(m.RegistryProvider,{value:u},Object(a.createElement)(e,Object(i.a)({registry:u},c))):null}))}),"withRegistryProvider")((function(e){var t=e.children,n=e.settings,r=Object(m.useDispatch)("core/block-editor").updateSettings;return Object(a.useEffect)((function(){r(n)}),[n]),za(e),t}));function Wa(e){var t=e.onClick;return Object(a.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},Object(a.createElement)(v.Disabled,null,Object(a.createElement)(Ku,null)))}var Ka=function(e){var t=e.viewportWidth,n=e.__experimentalPadding,r=Object(b.useResizeObserver)(),o=Object(Me.a)(r,2),c=o[0],i=o[1].width,l=Object(b.useResizeObserver)(),s=Object(Me.a)(l,2),u=s[0],d=s[1].height;Ga=Ga||Object(b.pure)(Ku);var f=(i-2*n)/t;return Object(a.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:d*f+2*n}},c,Object(a.createElement)(v.Disabled,{style:{transform:"scale(".concat(f,")"),width:t,left:n,right:n,top:n},className:"block-editor-block-preview__content"},u,Object(a.createElement)(Ga,null)))},qa=Object(a.memo)((function(e){var t=e.blocks,n=e.__experimentalPadding,r=void 0===n?0:n,o=e.viewportWidth,c=void 0===o?1200:o,i=e.__experimentalLive,l=void 0!==i&&i,s=e.__experimentalOnClick,u=Object(m.useSelect)((function(e){return e("core/block-editor").getSettings()}),[]),b=Object(a.useMemo)((function(){return Object(d.castArray)(t)}),[t]);return t&&0!==t.length?Object(a.createElement)(Ua,{value:b,settings:u},l?Object(a.createElement)(Wa,{onClick:s}):Object(a.createElement)(Ka,{viewportWidth:c,__experimentalPadding:r})):null}));function $a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ya(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$a(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Xa=function(e){var t,n,r=e.item,o=r.name,c=r.title,i=r.icon,l=r.description,s=r.initialAttributes,u=Object(p.getBlockType)(o),d=Object(p.isReusableBlock)(r);return Object(a.createElement)("div",{className:"block-editor-inserter__preview-container"},Object(a.createElement)("div",{className:"block-editor-inserter__preview"},d||u.example?Object(a.createElement)("div",{className:"block-editor-inserter__preview-content"},Object(a.createElement)(qa,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=u.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:u.example?Object(p.getBlockFromExample)(r.name,{attributes:Ya(Ya({},u.example.attributes),s),innerBlocks:u.example.innerBlocks}):Object(p.createBlock)(o,s)})):Object(a.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},Object(w.__)("No Preview Available."))),!d&&Object(a.createElement)(Ha,{title:c,icon:i,description:l}))},Qa=Object(a.createElement)(S.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(a.createElement)(S.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function Za(e){var t=e.count,n=e.icon;return Object(a.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},Object(a.createElement)("div",{className:"block-editor-block-draggable-chip"},Object(a.createElement)(v.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},Object(a.createElement)(v.FlexItem,null,n?Object(a.createElement)(Mr,{icon:n}):Object(w.sprintf)(
|
30 |
/* translators: %d: Number of blocks. */
|
31 |
Object(w._n)("%d block","%d blocks",t),t)),Object(a.createElement)(v.FlexItem,null,Object(a.createElement)(Mr,{icon:Qa})))))}var Ja=function(e){var t=e.isEnabled,n=e.blocks,r=e.icon,o=e.children,c={type:"inserter",blocks:n};return Object(a.createElement)(v.Draggable,{transferData:c,__experimentalDragComponent:Object(a.createElement)(Za,{count:n.length,icon:r})},(function(e){var n=e.onDraggableStart,r=e.onDraggableEnd;return o({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?r:void 0})}))},es=Object(a.memo)((function(e){var t=e.className,n=e.composite,r=e.item,o=e.onSelect,c=e.onHover,l=e.isDraggable,s=Object(Fe.a)(e,["className","composite","item","onSelect","onHover","isDraggable"]),d=Object(a.useRef)(!1),b=r.icon?{backgroundColor:r.icon.background,color:r.icon.foreground}:{},f=Object(a.useMemo)((function(){return[Object(p.createBlock)(r.name,r.initialAttributes,Object(p.createBlocksFromInnerBlocksTemplate)(r.innerBlocks))]}),[r.name,r.initialAttributes,r.initialAttributes]);return Object(a.createElement)(Ja,{isEnabled:l&&!r.disabled,blocks:f,icon:r.icon},(function(e){var l=e.draggable,f=e.onDragStart,p=e.onDragEnd;return Object(a.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:l,onDragStart:function(e){d.current=!0,f&&(c(null),f(e))},onDragEnd:function(e){d.current=!1,p&&p(e)}},Object(a.createElement)(v.__unstableCompositeItem,Object(i.a)({role:"option",as:v.Button},n,{className:u()("block-editor-block-types-list__item",t),disabled:r.isDisabled,onClick:function(e){e.preventDefault(),o(r),c(null)},onFocus:function(){d.current||c(r)},onMouseEnter:function(){d.current||c(r)},onMouseLeave:function(){return c(null)},onBlur:function(){return c(null)},focusable:!0},s),Object(a.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:b},Object(a.createElement)(Mr,{icon:r.icon,showColors:!0})),Object(a.createElement)("span",{className:"block-editor-block-types-list__item-title"},r.title)))}))})),ts=function(e){var t=e.items,n=void 0===t?[]:t,r=e.onSelect,o=e.onHover,c=void 0===o?function(){}:o,l=e.children,s=e.label,u=e.isDraggable,d=void 0===u||u,b=Object(v.__unstableUseCompositeState)();return Object(a.createElement)(v.__unstableComposite,Object(i.a)({},b,{role:"listbox",className:"block-editor-block-types-list","aria-label":s}),n.map((function(e){return Object(a.createElement)(es,{key:e.id,item:e,className:Object(p.getBlockMenuDefaultClassName)(e.id),onSelect:r,onHover:c,composite:b,isDraggable:d})})),l)},ns=function(e){var t=e.title,n=e.icon,r=e.children;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"block-editor-inserter__panel-header"},Object(a.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),Object(a.createElement)(v.Icon,{icon:n})),Object(a.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};function rs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var os=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.showMostUsedBlocks,c=Rr(t,n),i=Object(Me.a)(c,4),s=i[0],u=i[1],b=i[2],f=i[3],p=Object(a.useMemo)((function(){return Object(d.orderBy)(s,["frecency"],["desc"]).slice(0,6)}),[s]),m=Object(a.useMemo)((function(){return s.filter((function(e){return!e.category}))}),[s]),v=Object(a.useMemo)((function(){var e=function(e){return Object(d.findIndex)(u,(function(t){return t.slug===e.category}))};return Object(d.flow)((function(e){return e.filter((function(e){return e.category&&"reusable"!==e.category}))}),(function(t){return Object(d.sortBy)(t,e)}),(function(e){return Object(d.groupBy)(e,"category")}))(s)}),[s,u]),g=Object(a.useMemo)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rs(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},b);return Object.keys(b).forEach((function(t){e[t]=s.filter((function(e){return function(e){return e.name.split("/")[0]}(e)===t})),0===e[t].length&&delete e[t]})),e}),[s,b]);return Object(a.useEffect)((function(){return function(){return r(null)}}),[]),Object(a.createElement)("div",null,o&&!!p.length&&Object(a.createElement)(ns,{title:Object(w._x)("Most used","blocks")},Object(a.createElement)(ts,{items:p,onSelect:f,onHover:r,label:Object(w._x)("Most used","blocks")})),Object(d.map)(u,(function(e){var t=v[e.slug];return t&&t.length?Object(a.createElement)(ns,{key:e.slug,title:e.title,icon:e.icon},Object(a.createElement)(ts,{items:t,onSelect:f,onHover:r,label:e.title})):null})),!m.length&&Object(a.createElement)(ns,{className:"block-editor-inserter__uncategorized-blocks-panel",title:Object(w.__)("Uncategorized")},Object(a.createElement)(ts,{items:m,onSelect:f,onHover:r,label:Object(w.__)("Uncategorized")})),Object(d.map)(b,(function(e,t){var n=g[t];return n&&n.length?Object(a.createElement)(ns,{key:t,title:e.title,icon:e.icon},Object(a.createElement)(ts,{items:n,onSelect:f,onHover:r,label:e.title})):null})))},cs=function(e){var t,n=e.selectedCategory,r=e.patternCategories,o=e.onClickCategory,c=e.children;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:u()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns")},Object(a.createElement)(v.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:Object(w.__)("Filter patterns"),hideLabelFromVision:!0,value:n.name,onChange:function(e){o(r.find((function(t){return e===t.name})))},options:(t=[],r.map((function(e){return t.push({value:e.name,label:e.label})})),t)})),Object(a.createElement)("div",{className:"block-editor-inserter__panel-content"},c))},is=n(51),ls=function(e){var t=Object(m.useSelect)((function(e){var t=e("core/block-editor").getSettings();return{patterns:t.__experimentalBlockPatterns,patternCategories:t.__experimentalBlockPatternCategories}}),[]),n=t.patternCategories,r=t.patterns,o=Object(m.useDispatch)(is.store).createSuccessNotice;return[r,n,Object(a.useCallback)((function(t,n){e(Object(d.map)(n,(function(e){return Object(p.cloneBlock)(e)})),t.name),o(Object(w.sprintf)(
|
32 |
/* translators: %s: block pattern title. */
|
58 |
Object(w.__)("Block %1$d of %2$d, Level %3$d"),e,t,n)},hd=Object(a.forwardRef)((function e(t,n){var r=t.className,o=t.block.clientId,c=t.isSelected,i=t.onClick,l=t.position,s=t.siblingBlockCount,d=t.level,f=t.tabIndex,p=t.onFocus,m=t.onDragStart,g=t.onDragEnd,O=t.draggable,h=Tl(o),j=Object(b.useInstanceId)(e),k="block-navigation-block-select-button__".concat(j),y=Od(l,s,d);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.Button,{className:u()("block-editor-block-navigation-block-select-button",r),onClick:i,"aria-describedby":k,ref:n,tabIndex:f,onFocus:p,onDragStart:m,onDragEnd:g,draggable:O},Object(a.createElement)(gd,{level:d}),Object(a.createElement)(Mr,{icon:null==h?void 0:h.icon,showColors:!0}),Object(a.createElement)(Nl,{clientId:o}),c&&Object(a.createElement)(v.VisuallyHidden,null,Object(w.__)("(selected block)"))),Object(a.createElement)("div",{className:"block-editor-block-navigation-block-select-button__description",id:k},y))}));function jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jd(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yd=function(e){return"BlockNavigationBlock-".concat(e)},_d=Object(a.forwardRef)((function e(t,n){var r=Object(b.useInstanceId)(e),o=t.block.clientId;return Object(a.createElement)(v.Slot,{name:yd(o)},(function(e){if(!e.length)return Object(a.createElement)(hd,Object(i.a)({ref:n},t));var o=t.className,c=t.block,l=t.isSelected,s=t.position,d=t.siblingBlockCount,b=t.level,f=t.tabIndex,m=t.onFocus,g=c.name,O=Object(p.getBlockType)(g),h="block-navigation-block-slot__".concat(r),j=Od(s,d,b),k={tabIndex:f,onFocus:m,ref:n,"aria-describedby":h};return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:u()("block-editor-block-navigation-block-slot",o)},Object(a.createElement)(Mr,{icon:O.icon,showColors:!0}),a.Children.map(e,(function(e){return Object(a.cloneElement)(e,kd(kd({},e.props),k))})),l&&Object(a.createElement)(v.VisuallyHidden,null,Object(w.__)("(selected block)")),Object(a.createElement)("div",{className:"block-editor-block-navigation-block-slot__description",id:h},j)))}))})),Ed=function(e){var t=Object(a.useContext)(bd).clientId;return Object(a.createElement)(v.Fill,Object(i.a)({},e,{name:yd(t)}))},Cd=Object(a.forwardRef)((function(e,t){var n=e.onClick,r=e.block,o=e.isSelected,c=e.position,l=e.siblingBlockCount,s=e.level,d=Object(Fe.a)(e,["onClick","block","isSelected","position","siblingBlockCount","level"]),b=ga(),f=b.__experimentalFeatures,p=b.blockDropTarget,v=void 0===p?{}:p,g=r.clientId,O=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockRootClientId,r=t.hasBlockMovingClientId,o=t.getSelectedBlockClientId;return{rootClientId:n(g)||"",blockMovingClientId:r(),selectedBlockInBlockEditor:o()}}),[g]),h=O.rootClientId,j=O.blockMovingClientId,k=O.selectedBlockInBlockEditor,y=j&&k===g,_=v.rootClientId,E=v.clientId,C=v.dropPosition,w=_===h&&E===g&&"top"===C,S=_===h&&E===g&&"bottom"===C,B=_===g&&"inside"===C,I=u()("block-editor-block-navigation-block-contents",{"is-dropping-before":w||y,"is-dropping-after":S,"is-dropping-to-inner-blocks":B});return Object(a.createElement)(Ys,{clientIds:[r.clientId],elementId:"block-navigation-block-".concat(r.clientId)},(function(e){var u=e.draggable,b=e.onDragStart,p=e.onDragEnd;return f?Object(a.createElement)(_d,Object(i.a)({ref:t,className:I,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:l,level:s,draggable:u&&f,onDragStart:b,onDragEnd:p},d)):Object(a.createElement)(hd,Object(i.a)({ref:t,className:I,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:l,level:s,draggable:u&&f,onDragStart:b,onDragEnd:p},d))}))}));function wd(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Sd(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sd(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}function Sd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bd(e){var t=e.block,n=e.isSelected,r=e.onClick,o=e.position,c=e.level,i=e.rowCount,l=e.siblingBlockCount,s=e.showBlockMovers,d=e.path,b=Object(a.useRef)(null),f=Object(a.useState)(!1),p=Object(Me.a)(f,2),g=p[0],O=p[1],h=Object(a.useState)(!1),j=Object(Me.a)(h,2),k=j[0],y=j[1],_=t.clientId,E=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.isBlockBeingDragged,r=t.isAncestorBeingDragged,o=t.getBlockParents;return{isDragging:n(_)||r(_),blockParents:o(_)}}),[_]),C=E.isDragging,S=E.blockParents,B=Object(m.useDispatch)("core/block-editor").selectBlock,I=s&&l>0,x=g||k,P=u()("block-editor-block-navigation-block__mover-cell",{"is-visible":x}),T=ga().__experimentalFeatures,N=u()("block-editor-block-navigation-block__menu-cell",{"is-visible":x});return Object(a.useEffect)((function(){T&&n&&b.current.focus()}),[T,n]),Object(a.createElement)(ia,{className:u()({"is-selected":n,"is-dragging":C}),onMouseEnter:function(){return O(!0)},onMouseLeave:function(){return O(!1)},onFocus:function(){return y(!0)},onBlur:function(){return y(!1)},level:c,position:o,rowCount:i,path:d,id:"block-navigation-block-".concat(_),"data-block":_},Object(a.createElement)(v.__experimentalTreeGridCell,{className:"block-editor-block-navigation-block__contents-cell",colSpan:I?void 0:2,ref:b},(function(e){var i=e.ref,s=e.tabIndex,u=e.onFocus;return Object(a.createElement)("div",{className:"block-editor-block-navigation-block__contents-container"},Object(a.createElement)(Cd,{block:t,onClick:function(){return r(t.clientId)},isSelected:n,position:o,siblingBlockCount:l,level:c,ref:i,tabIndex:s,onFocus:u}))})),I&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.__experimentalTreeGridCell,{className:P,withoutGridItem:!0},Object(a.createElement)(v.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(a.createElement)(pa,{orientation:"vertical",clientIds:[_],ref:t,tabIndex:n,onFocus:r})})),Object(a.createElement)(v.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(a.createElement)(ma,{orientation:"vertical",clientIds:[_],ref:t,tabIndex:n,onFocus:r})})))),T&&Object(a.createElement)(v.__experimentalTreeGridCell,{className:N},(function(e){var t=e.ref,n=e.tabIndex,o=e.onFocus;return Object(a.createElement)(Tu,{clientIds:[_],icon:Jl.a,toggleProps:{ref:t,tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:r},(function(e){var t=e.onClose;return Object(a.createElement)(v.MenuGroup,null,Object(a.createElement)(v.MenuItem,{onClick:Object(Zl.a)(Zc.a.mark((function e(){var n,r,o;return Zc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!S.length){e.next=20;break}n=wd(S),e.prev=2,n.s();case 4:if((r=n.n()).done){e.next=10;break}return o=r.value,e.next=8,B(o);case 8:e.next=4;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:e.next=22;break;case 20:return e.next=22,B(null);case 22:return e.next=24,B(_);case 24:t();case 25:case"end":return e.stop()}}),e,null,[[2,12,15,18]])})))},Object(w.__)("Go to block")))}))})))}function Id(e){var t=e.parentBlockClientId,n=e.position,r=e.level,o=e.rowCount,c=e.path,i=Object(m.useSelect)((function(e){var n=e("core/block-editor"),r=n.isBlockBeingDragged,o=n.isAncestorBeingDragged;return r(t)||o(t)}),[t]),l=Object(b.useInstanceId)(Id),s="block-navigation-appender-row__description_".concat(l),d=Object(w.sprintf)(
|
59 |
/* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
|
60 |
Object(w.__)("Add block at position %1$d, Level %2$d"),n,r);return Object(a.createElement)(ia,{className:u()({"is-dragging":i}),level:r,position:n,rowCount:o,path:c},Object(a.createElement)(v.__experimentalTreeGridCell,{className:"block-editor-block-navigation-appender__cell",colSpan:"3"},(function(e){var n=e.ref,o=e.tabIndex,c=e.onFocus;return Object(a.createElement)("div",{className:"block-editor-block-navigation-appender__container"},Object(a.createElement)(gd,{level:r}),Object(a.createElement)(Ps,{rootClientId:t,__experimentalIsQuick:!0,__experimentalSelectBlockOnInsert:!1,"aria-describedby":s,toggleProps:{ref:n,tabIndex:o,onFocus:c}}),Object(a.createElement)("div",{className:"block-editor-block-navigation-appender__description",id:s},d))})))}function xd(e){var t=e.blocks,n=e.selectBlock,r=e.selectedBlockClientId,o=e.showAppender,c=e.showBlockMovers,i=e.showNestedBlocks,l=e.parentBlockClientId,s=e.level,u=void 0===s?1:s,b=e.terminatedLevels,f=void 0===b?[]:b,p=e.path,m=void 0===p?[]:p,v=!l,g=Object(d.compact)(t),O=function(e){return o&&!v&&r===e},h=O(l),j=g.length,k=h?j+1:j,y=k;return Object(a.createElement)(a.Fragment,null,Object(d.map)(g,(function(e,t){var l=e.clientId,s=e.innerBlocks,d=t+1,b=k===d?[].concat(Object(pe.a)(f),[u]):f,p=[].concat(Object(pe.a)(m),[d]),v=i&&!!s&&!!s.length,g=O(l);return Object(a.createElement)(a.Fragment,{key:l},Object(a.createElement)(Bd,{block:e,onClick:n,isSelected:r===l,level:u,position:d,rowCount:k,siblingBlockCount:j,showBlockMovers:c,terminatedLevels:f,path:p}),(v||g)&&Object(a.createElement)(xd,{blocks:s,selectedBlockClientId:r,selectBlock:n,showAppender:o,showBlockMovers:c,showNestedBlocks:i,parentBlockClientId:l,level:u+1,terminatedLevels:b,path:p}))})),h&&Object(a.createElement)(Id,{parentBlockClientId:l,position:k,rowCount:y,level:u,terminatedLevels:f,path:[].concat(Object(pe.a)(m),[y])}))}function Pd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Td(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nd(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}xd.defaultProps={selectBlock:function(){}};var Dd=["top","bottom"];function Ad(e){var t=Object(a.useState)(),n=Object(Me.a)(t,2),r=n[0],o=void 0===r?{}:r,c=n[1],i=Fs(o.rootClientId,o.blockIndex),s=Object(v.__unstableUseDropZone)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pd(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({element:e,withPosition:!0},i)),u=s.position,d=s.type,b=function(e,t,n){var r=Object(m.useSelect)((function(e){var t=e("core/block-editor");return{canInsertBlocks:t.canInsertBlocks,getBlockRootClientId:t.getBlockRootClientId,getBlockIndex:t.getBlockIndex,getBlockCount:t.getBlockCount,getDraggedBlockClientIds:t.getDraggedBlockClientIds}}),[]),o=r.getBlockRootClientId,c=r.getBlockIndex,i=r.getBlockCount,l=r.getDraggedBlockClientIds,s=r.canInsertBlocks,u=Object(a.useRef)(),d=!!t;return Object(a.useEffect)((function(){if(e.current&&d){var t="default"===n,r=t?l():void 0,a=Array.from(e.current.querySelectorAll("[data-block]"));u.current=a.map((function(e){var n=e.dataset.block,l=o(n);return{clientId:n,rootClientId:l,blockIndex:c(n,l),element:e,isDraggedBlock:!!t&&r.includes(n),innerBlockCount:i(n),canInsertDraggedBlocksAsSibling:!t||s(r,l),canInsertDraggedBlocksAsChild:!t||s(r,n)}}))}}),[e,d,n,s,i,c,o,l]),u}(e,u,d);if(Object(a.useEffect)((function(){if(u){var e=function(e,t){var n,r,o,c,i,l=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Td(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Td(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}(e);try{for(l.s();!(i=l.n()).done;){var a=i.value;if(!a.isDraggedBlock){var s=a.element.getBoundingClientRect(),u=Hs(t,s,Dd),d=Object(Me.a)(u,2),b=d[0],f=d[1],p=Nd(t,s);if(void 0===o||b<o||p){o=b;var m=e.indexOf(a),v=e[m-1];if("top"===f&&v&&v.rootClientId===a.rootClientId&&!v.isDraggedBlock?(r=v,n="bottom",c=v.element.getBoundingClientRect()):(r=a,n=f,c=s),p)break}}}}catch(e){l.e(e)}finally{l.f()}if(r){var g="bottom"===n;if(g&&r.canInsertDraggedBlocksAsChild&&(r.innerBlockCount>0||function(e,t){var n=t.left+t.width/2;return e.x>n}(t,c)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(r.canInsertDraggedBlocksAsSibling){var O=g?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+O,dropPosition:n}}}}(b.current,u);e&&c(e)}}),[b,u]),u)return o}function Rd(e){var t=e.__experimentalFeatures,n=Object(Fe.a)(e,["__experimentalFeatures"]),r=Object(a.useRef)(),o=Ad(r);t||(o=void 0);var c=Object(a.useMemo)((function(){return{__experimentalFeatures:t,blockDropTarget:o}}),[t,o]);return Object(a.createElement)(v.__experimentalTreeGrid,{className:"block-editor-block-navigation-tree","aria-label":Object(w.__)("Block navigation structure"),ref:r},Object(a.createElement)(va.Provider,{value:c},Object(a.createElement)(xd,n)))}var Ld=Object(b.compose)(Object(m.withSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getBlockHierarchyRootClientId,o=t.__unstableGetBlockWithBlockTree,c=t.__unstableGetBlockTree,i=n();return{rootBlocks:c(),rootBlock:i?o(r(i)):null,selectedBlockClientId:i}})),Object(m.withDispatch)((function(e,t){var n=t.onSelect,r=void 0===n?d.noop:n;return{selectBlock:function(t){e("core/block-editor").selectBlock(t),r(t)}}})))((function(e){var t=e.rootBlock,n=e.rootBlocks,r=e.selectedBlockClientId,o=e.selectBlock,c=e.__experimentalFeatures;if(!n||0===n.length)return null;var i=t&&(t.clientId!==r||t.innerBlocks&&0!==t.innerBlocks.length);return Object(a.createElement)("div",{className:"block-editor-block-navigation__container"},Object(a.createElement)("p",{className:"block-editor-block-navigation__label"},Object(w.__)("List view")),Object(a.createElement)(Rd,{blocks:i?[t]:n,selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c,showNestedBlocks:!0}))})),Md=Object(a.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},Object(a.createElement)(v.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));function Fd(e){var t=e.isEnabled,n=e.onToggle,r=e.isOpen,o=e.innerRef,c=Object(Fe.a)(e,["isEnabled","onToggle","isOpen","innerRef"]);Object(Ql.useShortcut)("core/edit-post/toggle-block-navigation",Object(a.useCallback)(n,[n]),{bindGlobal:!0,isDisabled:!t});var l=Object(m.useSelect)((function(e){return e(Ql.store).getShortcutRepresentation("core/edit-post/toggle-block-navigation")}),[]);return Object(a.createElement)(v.Button,Object(i.a)({},c,{ref:o,icon:Md,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0
|
61 |
+
/* translators: button label text should, if possible, be under 16 characters. */,label:Object(w.__)("Outline"),className:"block-editor-block-navigation",shortcut:l,"aria-disabled":!t}))}var Vd=Object(a.forwardRef)((function(e,t){var n=e.isDisabled,r=e.__experimentalFeatures,o=Object(Fe.a)(e,["isDisabled","__experimentalFeatures"]),c=Object(m.useSelect)((function(e){return!!e("core/block-editor").getBlockCount()}),[])&&!n;return Object(a.createElement)(v.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(a.createElement)(Fd,Object(i.a)({},o,{innerRef:t,isOpen:n,onToggle:r,isEnabled:c}))},renderContent:function(e){var t=e.onClose;return Object(a.createElement)(Ld,{onSelect:t,__experimentalFeatures:r})}})})),Hd=n(140),zd=[Ht.rawShortcut.primary("z"),Ht.rawShortcut.primaryShift("z"),Ht.rawShortcut.primary("y")],Gd=Object(a.createElement)(v.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(d.fromPairs)(zd.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),Ud=function(){return Gd};function Wd(e){return e.filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)})).map((function(e){return'<img src="'.concat(Object(fu.createBlobURL)(e),'">')})).join("")}var Kd={position:"bottom right",isAlternate:!0},qd=function(){return Object(a.createElement)("div",{className:"block-editor-format-toolbar"},Object(a.createElement)(v.ToolbarGroup,null,["bold","italic","link","text-color"].map((function(e){return Object(a.createElement)(v.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object(a.createElement)(v.Slot,{name:"RichText.ToolbarControls"},(function(e){return 0!==e.length&&Object(a.createElement)(v.ToolbarItem,null,(function(t){return Object(a.createElement)(v.DropdownMenu,{icon:ua.a
|
62 |
+
/* translators: button label text should, if possible, be under 16 characters. */,label:Object(w.__)("More"),toggleProps:t,controls:Object(d.orderBy)(e.map((function(e){return Object(Me.a)(e,1)[0].props})),"title"),popoverProps:Kd})}))}))))},$d=function(e){var t=e.inline,n=e.anchorRef;return t?Object(a.createElement)(v.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},Object(a.createElement)(qd,null)):Object(a.createElement)(Xl,null,Object(a.createElement)(qd,null))};function Yd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yd(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qd(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function Zd(e){var t=e.allowedFormats,n=e.formattingControls;return e.disableFormats?Zd.EMPTY_ARRAY:t||n?t||(Va()("wp.blockEditor.RichText formattingControls prop",{alternative:"allowedFormats"}),n.map((function(e){return"core/".concat(e)}))):void 0}Zd.EMPTY_ARRAY=[];var Jd=Object(a.forwardRef)((function e(t,n){var r=t.children,o=t.tagName,l=t.value,s=t.onChange,d=t.isSelected,f=t.multiline,v=t.inlineToolbar,g=t.wrapperClassName,O=t.autocompleters,j=t.onReplace,k=t.placeholder,y=t.keepPlaceholderOnFocus,_=t.allowedFormats,E=t.formattingControls,C=t.withoutInteractiveFormatting,w=t.onRemove,S=t.onMerge,B=t.onSplit,I=t.__unstableOnSplitAtEnd,x=t.__unstableOnSplitMiddle,P=t.identifier,T=t.preserveWhiteSpace,N=t.__unstablePastePlainText,D=t.__unstableEmbedURLOnPaste,A=t.__unstableDisableFormats,R=t.disableLineBreaks,L=t.unstableOnFocus,M=t.__unstableAllowPrefixTransformations,F=t.__unstableMultilineRootTag,V=t.__unstableMobileNoFocusOnMount,H=t.deleteEnter,z=t.placeholderTextColor,G=t.textAlign,U=t.selectionColor,W=t.tagsToEliminate,K=t.rootTagsToEliminate,q=t.disableEditingMenu,$=t.fontSize,Y=t.fontFamily,X=t.fontWeight,Q=t.fontStyle,Z=t.minWidth,J=t.maxWidth,ee=t.onBlur,te=t.setRef,ne=Object(Fe.a)(t,["children","tagName","value","onChange","isSelected","multiline","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","keepPlaceholderOnFocus","allowedFormats","formattingControls","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","__unstableOnSplitMiddle","identifier","preserveWhiteSpace","__unstablePastePlainText","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableMultilineRootTag","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","setRef"]),re=Object(b.useInstanceId)(e);P=P||re;var oe=Object(a.useRef)(),ce=n||oe,ie=h(),le=ie.clientId,ae=ie.onCaretVerticalPositionChange,se=ie.isSelected,ue=Object(m.useSelect)((function(e){var t,n=e("core/block-editor"),r=n.isCaretWithinFormattedText,o=n.getSelectionStart,c=n.getSelectionEnd,i=n.getSettings,l=n.didAutomaticChange,s=n.__unstableGetBlockWithoutInnerBlocks,u=n.isMultiSelecting,b=n.hasMultiSelection,f=o(),m=c(),v=i().__experimentalUndo;void 0===d?t=f.clientId===le&&f.attributeKey===P:d&&(t=f.clientId===le);var g={};if("native"===a.Platform.OS){var O=le&&s(le);g={shouldBlurOnUnmount:O&&t&&Object(p.isUnmodifiedDefaultBlock)(O)}}return Xd({isCaretWithinFormattedText:r(),selectionStart:t?f.offset:void 0,selectionEnd:t?m.offset:void 0,isSelected:t,didAutomaticChange:l(),disabled:u()||b(),undo:v},g)})),de=ue.isCaretWithinFormattedText,be=ue.selectionStart,fe=ue.selectionEnd,me=ue.isSelected,ve=ue.didAutomaticChange,ge=ue.disabled,Oe=ue.undo,he=ue.shouldBlurOnUnmount,je=Object(m.useDispatch)("core/block-editor"),ke=je.__unstableMarkLastChangeAsPersistent,ye=je.enterFormattedText,_e=je.exitFormattedText,Ee=je.selectionChange,Ce=je.__unstableMarkAutomaticChange,we=Qd(f),Se=Zd({allowedFormats:_,formattingControls:E,disableFormats:A}),Be=!Se||Se.length>0,Ie=l,xe=s;Array.isArray(l)&&(Ie=p.children.toHTML(l),xe=function(e){return s(p.children.fromDOM(Object(c.__unstableCreateElement)(document,e).childNodes))});var Pe=Object(a.useCallback)((function(e,t){Ee(le,P,e,t)}),[le,P]),Te=Object(a.useCallback)((function(e){var t=e.value,n=e.isReverse;S&&S(!n),w&&Object(c.isEmpty)(t)&&n&&w(!n)}),[S,w]),Ne=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(j&&B){var n=[],r=Object(c.split)(e),o=Object(Me.a)(r,2),i=o[0],l=o[1],a=t.length>0,s=-1;a&&Object(c.isEmpty)(i)||(n.push(B(Object(c.toHTMLString)({value:i,multilineTag:we}))),s+=1),a?(n.push.apply(n,Object(pe.a)(t)),s+=t.length):x&&n.push(x()),(a||x)&&Object(c.isEmpty)(l)||n.push(B(Object(c.toHTMLString)({value:l,multilineTag:we})));var u=a?s:1,d=a?-1:null;j(n,u,d)}}),[j,B,we,x]),De=Object(a.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.shiftKey,o=j&&B;if(j){var i=Object(p.getBlockTransforms)("from").filter((function(e){return"enter"===e.type})),l=Object(p.findTransform)(i,(function(e){return e.regExp.test(t.text)}));l&&(j([l.transform({content:t.text})]),Ce())}if(f)r?R||n(Object(c.insert)(t,"\n")):o&&Object(c.__unstableIsEmptyLine)(t)?Ne(t):n(Object(c.__unstableInsertLineSeparator)(t));else{var a=t.text,s=t.start,u=t.end,d=I&&s===u&&u===a.length;r||!o&&!d?R||n(Object(c.insert)(t,"\n")):!o&&d?I():o&&Ne(t)}}),[j,B,Ce,f,Ne,I]),Ae=Object(a.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.html,i=e.plainText,l=e.files,a=e.activeFormats;if(N)n(Object(c.insert)(t,Object(c.create)({text:i})));else{if(l&&l.length&&!r){var s=Object(p.pasteHandler)({HTML:Wd(l),mode:"BLOCKS",tagName:o,preserveWhiteSpace:T});return window.console.log("Received items:\n\n",l),void(j&&Object(c.isEmpty)(t)?j(s):Ne(t,s))}var u,d=j&&B?"AUTO":"INLINE";"AUTO"===d&&Object(c.isEmpty)(t)&&(u=i,Object(Hd.regexp)(".*").test(u))&&(d="BLOCKS"),D&&Object(c.isEmpty)(t)&&Object(fs.isURL)(i.trim())&&(d="BLOCKS");var b=Object(p.pasteHandler)({HTML:r,plainText:i,mode:d,tagName:o,preserveWhiteSpace:T});if("string"==typeof b){var m=Object(c.create)({html:b});if(a.length)for(var v=m.formats.length;v--;)m.formats[v]=[].concat(Object(pe.a)(a),Object(pe.a)(m.formats[v]||[]));f&&(m=Object(c.replace)(m,/\n+/g,c.__UNSTABLE_LINE_SEPARATOR)),n(Object(c.insert)(t,m))}else b.length>0&&(j&&Object(c.isEmpty)(t)?j(b,b.length-1,-1):Ne(t,b))}}),[o,j,B,Ne,D,f,T,N]),Re=Object(a.useCallback)((function(e,t){if(j){var n=e.start,r=e.text;if(" "===r.slice(n-1,n)){var o=r.slice(0,n).trim(),i=Object(p.getBlockTransforms)("from").filter((function(e){return"prefix"===e.type})),l=Object(p.findTransform)(i,(function(e){var t=e.prefix;return o===t}));if(l){var a=t(Object(c.slice)(e,n,r.length)),s=l.transform(a);j([s]),Ce()}}}}),[j,Ce]),Le=Object(a.createElement)(c.__experimentalRichText,{clientId:le,identifier:P,ref:ce,value:Ie,onChange:xe,selectionStart:be,selectionEnd:fe,onSelectionChange:Pe,tagName:o,placeholder:k,allowedFormats:Se,withoutInteractiveFormatting:C,onEnter:De,onDelete:Te,onPaste:Ae,__unstableIsSelected:me,__unstableInputRule:Re,__unstableMultilineTag:we,__unstableIsCaretWithinFormattedText:de,__unstableOnEnterFormattedText:ye,__unstableOnExitFormattedText:_e,__unstableOnCreateUndoLevel:ke,__unstableMarkAutomaticChange:Ce,__unstableDidAutomaticChange:ve,__unstableUndo:Oe,__unstableDisableFormats:A,preserveWhiteSpace:T,disabled:ge,unstableOnFocus:L,__unstableAllowPrefixTransformations:M,__unstableMultilineRootTag:F,onCaretVerticalPositionChange:ae,blockIsSelected:void 0!==d?d:se,shouldBlurOnUnmount:he,__unstableMobileNoFocusOnMount:V,deleteEnter:H,placeholderTextColor:z,textAlign:G,selectionColor:U,tagsToEliminate:W,rootTagsToEliminate:K,disableEditingMenu:q,fontSize:$,fontFamily:Y,fontWeight:X,fontStyle:Q,minWidth:Z,maxWidth:J,onBlur:ee,setRef:te,id:ne.id,style:ne.style},(function(e){var t=e.isSelected,n=e.value,o=e.onChange,c=e.onFocus,l=e.editableProps,s=e.editableTagName;return Object(a.createElement)(a.Fragment,null,r&&r({value:n,onChange:o,onFocus:c}),t&&Be&&Object(a.createElement)($d,{inline:v,anchorRef:ce.current}),t&&Object(a.createElement)(Ud,null),Object(a.createElement)(Hr,{onReplace:j,completers:O,record:n,onChange:o,isSelected:t,contentRef:ce},(function(e){var t=e.listBoxId,n=e.activeId,r=e.onKeyDown;return Object(a.createElement)(s,Object(i.a)({},l,ne,{style:ne.style?Xd(Xd({},ne.style),l.style):l.style,className:u()("block-editor-rich-text__editable",ne.className,l.className,{"keep-placeholder-on-focus":y}),"aria-autocomplete":t?"list":void 0,"aria-owns":t,"aria-activedescendant":n,onKeyDown:function(e){r(e),l.onKeyDown(e)}}))})))}));return g?(Va()("wp.blockEditor.RichText wrapperClassName prop",{alternative:"className prop or create your own wrapper div"}),Object(a.createElement)("div",{className:u()("block-editor-rich-text",g)},Le)):Le}));Jd.Content=function(e){var t=e.value,n=e.tagName,r=e.multiline,o=Object(Fe.a)(e,["value","tagName","multiline"]);Array.isArray(t)&&(t=p.children.toHTML(t));var c=Qd(r);!t&&c&&(t="<".concat(c,"></").concat(c,">"));var i=Object(a.createElement)(a.RawHTML,null,t);return n?Object(a.createElement)(n,Object(d.omit)(o,["format"]),i):i},Jd.isEmpty=function(e){return!e||0===e.length},Jd.Content.defaultProps={format:"string",value:""};var eb=Jd;function tb(e){var t=e.value,n=e.onChange;return Object(a.createElement)(Ed,null,Object(a.createElement)(eb,{value:t,onChange:n,placeholder:Object(w.__)("Navigation item"),keepPlaceholderOnFocus:!0,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var nb=n(380),rb=function(e){var t=e.icon,n=void 0===t?nb.a:t,r=e.label,o=void 0===r?Object(w.__)("Choose variation"):r,c=e.instructions,i=void 0===c?Object(w.__)("Select a variation to start with."):c,l=e.variations,s=e.onSelect,d=e.allowSkip,b=u()("block-editor-block-variation-picker",{"has-many-variations":l.length>4});return Object(a.createElement)(v.Placeholder,{icon:n,label:o,instructions:i,className:b},Object(a.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(w.__)("Block variations")},l.map((function(e){return Object(a.createElement)("li",{key:e.name},Object(a.createElement)(v.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:function(){return s(e)},className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(a.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))}))),d&&Object(a.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(a.createElement)(v.Button,{isLink:!0,onClick:function(){return s()}},Object(w.__)("Skip"))))},ob=function(e,t){if(t&&e){var n=t.filter((function(t){var n=t.attributes;return!(!n||!Object.keys(n).length)&&Object(d.isMatch)(e,n)}));if(1===n.length)return n[0]}};function cb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ib=function(e){var t=e.blockClientId,n=Object(a.useState)(),r=Object(Me.a)(n,2),o=r[0],c=r[1],i=Object(m.useDispatch)("core/block-editor").updateBlockAttributes,s=Object(m.useSelect)((function(e){var n=e(p.store).getBlockVariations,r=e("core/block-editor"),o=r.getBlockName,c=r.getBlockAttributes,i=t&&o(t);return{variations:i&&n(i,"transform"),blockAttributes:c(t)}}),[t]),u=s.variations,d=s.blockAttributes;if(Object(a.useEffect)((function(){var e;c(null===(e=ob(d,u))||void 0===e?void 0:e.name)}),[d,u]),null==u||!u.length)return null;var b=u.map((function(e){return{value:e.name,label:e.title,info:e.description}})),f=function(e){i(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cb(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},u.find((function(t){return t.name===e})).attributes))},g="block-editor-block-variation-transforms";return Object(a.createElement)(v.DropdownMenu,{className:g,label:Object(w.__)("Transform to variation"),text:Object(w.__)("Transform to variation"),popoverProps:{position:"bottom center",className:"".concat(g,"__popover")},icon:ua.a,toggleProps:{iconPosition:"right"}},(function(){return Object(a.createElement)("div",{className:"".concat(g,"__container")},Object(a.createElement)(v.MenuGroup,null,Object(a.createElement)(v.MenuItemsChoice,{choices:b,value:o,onSelect:f})))}))},lb=Object(a.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(v.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),ab=Object(a.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(v.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"}));function sb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ub(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sb(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var db={top:{icon:Object(a.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(v.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(w._x)("Align top","Block vertical alignment setting")},center:{icon:ab,title:Object(w._x)("Align middle","Block vertical alignment setting")},bottom:{icon:lb,title:Object(w._x)("Align bottom","Block vertical alignment setting")}},bb=["top","center","bottom"],fb={isAlternate:!0},pb=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?bb:r,c=e.isCollapsed,i=void 0===c||c,l=db[t],s=db.top;return Object(a.createElement)(v.ToolbarGroup,{popoverProps:fb,isCollapsed:i,icon:l?l.icon:s.icon,label:Object(w._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((function(e){return ub(ub({},db[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})};function mb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mb(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gb=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=ge("color.palette"),r=!ge("color.custom"),o=void 0===t.colors?n:t.colors,c=void 0===t.disableCustomColors?r:t.disableCustomColors,i=!Object(d.isEmpty)(o)||!c;return Object(a.createElement)(e,vb(vb({},t),{},{colors:o,disableCustomColors:c,hasColorsToChoose:i}))}}),"withColorContext"),Ob=gb(v.ColorPalette);function hb(e){var t=e.onChange,n=e.value,r=Object(Fe.a)(e,["onChange","value"]);return Object(a.createElement)($e,Object(i.a)({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var jb=[];function kb(e){var t=ge("color.gradients")||jb,n=!ge("color.customGradient");return Object(a.createElement)(v.__experimentalGradientPicker,Object(i.a)({gradients:void 0!==e.gradients?e.gradient:t,disableCustomGradients:void 0!==e.disableCustomGradients?e.disableCustomGradients:n},e))}var yb=function(e){var t=void 0!==e.gradients&&void 0!==e.disableCustomGradients?v.__experimentalGradientPicker:kb;return Object(a.createElement)(t,e)};function _b(e){var t=e.className,n=e.value,r=e.onChange,o=e.label,c=void 0===o?Object(w.__)("Gradient Presets"):o,l=Object(Fe.a)(e,["className","value","onChange","label"]),s=ge("color.gradients"),b=!ge("color.customGradient");return Object(d.isEmpty)(s)&&b?null:Object(a.createElement)(v.BaseControl,{className:u()("block-editor-gradient-picker-control",t)},Object(a.createElement)(v.BaseControl.VisualLabel,null,c),Object(a.createElement)(yb,Object(i.a)({value:n,onChange:r,className:"block-editor-gradient-picker-control__gradient-picker-presets",gradients:s,disableCustomGradients:b},l)))}function Eb(e){var t=ge("color.gradients");return Object(d.isEmpty)(t)?null:Object(a.createElement)(v.PanelBody,{title:Object(w.__)("Gradient")},Object(a.createElement)(_b,e))}var Cb=[25,50,75,100];function wb(e){var t,n,r=e.imageWidth,o=e.imageHeight,c=e.imageSizeOptions,i=void 0===c?[]:c,l=e.isResizable,s=void 0===l||l,u=e.slug,b=e.width,f=e.height,p=e.onChange,m=e.onChangeImage,g=void 0===m?d.noop:m;function O(e,t){return function(){p({width:e,height:t})}}return Object(a.createElement)(a.Fragment,null,!Object(d.isEmpty)(i)&&Object(a.createElement)(v.SelectControl,{label:Object(w.__)("Image size"),value:u,options:i,onChange:g}),s&&Object(a.createElement)("div",{className:"block-editor-image-size-control"},Object(a.createElement)("p",{className:"block-editor-image-size-control__row"},Object(w.__)("Image dimensions")),Object(a.createElement)("div",{className:"block-editor-image-size-control__row"},Object(a.createElement)(v.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:Object(w.__)("Width"),value:null!==(t=null!=b?b:r)&&void 0!==t?t:"",min:1,onChange:function(e){return p({width:parseInt(e,10)})}}),Object(a.createElement)(v.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:Object(w.__)("Height"),value:null!==(n=null!=f?f:o)&&void 0!==n?n:"",min:1,onChange:function(e){return p({height:parseInt(e,10)})}})),Object(a.createElement)("div",{className:"block-editor-image-size-control__row"},Object(a.createElement)(v.ButtonGroup,{"aria-label":Object(w.__)("Image size presets")},Cb.map((function(e){var t=Math.round(r*(e/100)),n=Math.round(o*(e/100)),c=b===t&&f===n;return Object(a.createElement)(v.Button,{key:e,isSmall:!0,isPrimary:c,isPressed:c,onClick:O(t,n)},e,"%")}))),Object(a.createElement)(v.Button,{isSmall:!0,onClick:O()},Object(w.__)("Reset")))))}var Sb=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=h().clientId;return Object(a.createElement)(e,Object(i.a)({},t,{clientId:n}))}}),"withClientId"),Bb=Sb((function(e){var t=e.clientId,n=e.showSeparator,r=e.isFloating,o=e.onAddBlock;return Object(a.createElement)(Ns,{rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})})),Ib=Object(b.compose)([Sb,Object(m.withSelect)((function(e,t){var n=t.clientId,r=(0,e("core/block-editor").getBlockOrder)(n);return{lastBlockClientId:Object(d.last)(r)}}))])((function(e){var t=e.clientId,n=e.lastBlockClientId;return Object(a.createElement)(Ts,{rootClientId:t,lastBlockClientId:n})})),xb=n(69),Pb=n.n(xb),Tb=new WeakMap;function Nb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Db(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nb(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ab(e){var t=e.clientId,n=e.allowedBlocks,r=e.template,o=e.templateLock,c=e.wrapperRef,i=e.templateInsertUpdatesSelection,l=e.__experimentalCaptureToolbars,s=e.__experimentalAppenderTagName,u=e.renderAppender,b=e.orientation,f=e.placeholder,v=e.__experimentalLayout,g=void 0===v?N:v;!function(e,t,n,r,o){var c=Object(m.useDispatch)("core/block-editor").updateBlockListSettings,i=Object(m.useSelect)((function(t){var n=t("core/block-editor").getBlockRootClientId(e);return{blockListSettings:t("core/block-editor").getBlockListSettings(e),parentLock:t("core/block-editor").getTemplateLock(n)}}),[e]),l=i.blockListSettings,s=i.parentLock;Object(a.useLayoutEffect)((function(){var i={allowedBlocks:t,templateLock:void 0===n?s:n};void 0!==r&&(i.__experimentalCaptureToolbars=r),void 0!==o&&(i.orientation=o),Pb()(l,i)||c(e,i)}),[e,l,t,n,s,r,o,c])}(t,n,o,l,b),function(e,t,n,r){var o=Object(m.useDispatch)("core/block-editor").replaceInnerBlocks,c=Object(m.useSelect)((function(t){return t("core/block-editor").getBlocks(e)}),[e]),i=Object(a.useRef)(null);Object(a.useLayoutEffect)((function(){if((0===c.length||"all"===n)&&!Object(d.isEqual)(t,i.current)){i.current=t;var l=Object(p.synchronizeBlocksWithTemplate)(c,t);Object(d.isEqual)(l,c)||o(e,l,0===c.length&&r&&0!==l.length)}}),[c,t,n,e])}(t,r,o,i);var O=Object(m.useSelect)((function(e){var n=e("core/block-editor").getBlock(t),r=Object(p.getBlockType)(n.name);if(r&&r.providesContext)return function(e,t){Tb.has(t)||Tb.set(t,new WeakMap);var n=Tb.get(t);if(!n.has(e)){var r=Object(d.mapValues)(t.providesContext,(function(t){return e[t]}));n.set(e,r)}return n.get(e)}(n.attributes,r)}),[t]);return Object(a.createElement)(A,{value:g},Object(a.createElement)(Ml,{value:O},Object(a.createElement)($u,{rootClientId:t,renderAppender:u,__experimentalAppenderTagName:s,wrapperRef:c,placeholder:f})))}function Rb(e){return za(e),Object(a.createElement)(Ab,e)}var Lb=Object(a.forwardRef)((function(e,t){var n=Mb({ref:t},e);return Object(a.createElement)("div",{className:"block-editor-inner-blocks"},Object(a.createElement)("div",n))}));function Mb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(a.useRef)(),r=h(),o=r.clientId,c=Object(b.useViewportMatch)("medium","<"),l=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.isBlockSelected,i=t.hasSelectedInnerBlock,l=(0,t.isNavigationMode)()||c;return"core/template"!==n(o)&&!r(o)&&!i(o,!0)&&l}),[o,c]),s=e.ref||n,d=t.value&&t.onChange?Rb:Ab;return Db(Db({},e),{},{ref:s,className:u()(e.className,"block-editor-block-list__layout",{"has-overlay":l}),children:Object(a.createElement)(d,Object(i.a)({},t,{clientId:o,wrapperRef:s}))})}Lb.DefaultBlockAppender=Ib,Lb.ButtonBlockAppender=Bb,Lb.Content=Object(p.withBlockContentContext)((function(e){var t=e.BlockContent;return Object(a.createElement)(t,null)}));var Fb=Lb,Vb=n(263);function Hb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hb(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Gb=[{id:"opensInNewTab",title:Object(w.__)("Open in new tab")}],Ub=function(e){var t=e.value,n=e.onChange,r=void 0===n?d.noop:n,o=e.settings,c=void 0===o?Gb:o;if(!c||!c.length)return null;var i=function(e){return function(n){r(zb(zb({},t),{},Object(l.a)({},e.id,n)))}},s=c.map((function(e){return Object(a.createElement)(v.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:i(e),checked:!!t&&!!t[e.id]})}));return Object(a.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(a.createElement)(v.VisuallyHidden,{as:"legend"},Object(w.__)("Currently selected link settings")),s)},Wb=n(136),Kb=n.n(Wb);var qb=function(e){Object(Mn.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Vn.a)(t);if(n){var o=Object(Vn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Fn.a)(this,e)});function o(e){var t;return Object(An.a)(this,o),(t=r.call(this,e)).onChange=t.onChange.bind(Object(Ln.a)(t)),t.onFocus=t.onFocus.bind(Object(Ln.a)(t)),t.onKeyDown=t.onKeyDown.bind(Object(Ln.a)(t)),t.selectLink=t.selectLink.bind(Object(Ln.a)(t)),t.handleOnClick=t.handleOnClick.bind(Object(Ln.a)(t)),t.bindSuggestionNode=t.bindSuggestionNode.bind(Object(Ln.a)(t)),t.autocompleteRef=e.autocompleteRef||Object(a.createRef)(),t.inputRef=Object(a.createRef)(),t.updateSuggestions=Object(d.debounce)(t.updateSuggestions.bind(Object(Ln.a)(t)),200),t.suggestionNodes=[],t.isUpdatingSuggestions=!1,t.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""},t}return Object(Rn.a)(o,[{key:"componentDidUpdate",value:function(e){var t=this,n=this.state,r=n.showSuggestions,o=n.selectedSuggestion,c=this.props.value;r&&null!==o&&this.suggestionNodes[o]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,Kb()(this.suggestionNodes[o],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((function(){t.scrollingIntoView=!1}),100)),e.value!==c&&this.shouldShowInitialSuggestions()&&this.updateSuggestions()}},{key:"componentDidMount",value:function(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest}},{key:"bindSuggestionNode",value:function(e){var t=this;return function(n){t.suggestionNodes[e]=n}}},{key:"shouldShowInitialSuggestions",value:function(){var e=this.state.suggestions,t=this.props,n=t.__experimentalShowInitialSuggestions,r=void 0!==n&&n,o=t.value;return!this.isUpdatingSuggestions&&r&&!(o&&o.length)&&!(e&&e.length)}},{key:"updateSuggestions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=this.props,r=n.__experimentalFetchLinkSuggestions,o=n.__experimentalHandleURLSuggestions;if(r){var c=!(t&&t.length);if(c||!(t.length<2||!o&&Object(fs.isURL)(t))){this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});var i=r(t,{isInitialSuggestions:c});i.then((function(t){e.suggestionsRequest===i&&(e.setState({suggestions:t,loading:!1,showSuggestions:!!t.length}),t.length?e.props.debouncedSpeak(Object(w.sprintf)(
|
63 |
/* translators: %s: number of results. */
|
64 |
Object(w._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):e.props.debouncedSpeak(Object(w.__)("No results."),"assertive"),e.isUpdatingSuggestions=!1)})).catch((function(){e.suggestionsRequest===i&&(e.setState({loading:!1}),e.isUpdatingSuggestions=!1)})),this.suggestionsRequest=i}else this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1})}}},{key:"onChange",value:function(e){var t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t.trim())}},{key:"onFocus",value:function(){var e=this.state.suggestions,t=this.props,n=t.disableSuggestions,r=t.value;!r||n||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(r.trim())}},{key:"onKeyDown",value:function(e){var t=this.state,n=t.showSuggestions,r=t.selectedSuggestion,o=t.suggestions,c=t.loading;if(n&&o.length&&!c){var i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Ht.UP:e.stopPropagation(),e.preventDefault();var l=r?r-1:o.length-1;this.setState({selectedSuggestion:l});break;case Ht.DOWN:e.stopPropagation(),e.preventDefault();var a=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:a});break;case Ht.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak(Object(w.__)("Link selected.")));break;case Ht.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(i))}}else switch(e.keyCode){case Ht.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case Ht.DOWN:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}}},{key:"selectLink",value:function(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}},{key:"handleOnClick",value:function(e){this.selectLink(e),this.inputRef.current.focus()}},{key:"render",value:function(){return Object(a.createElement)(a.Fragment,null,this.renderControl(),this.renderSuggestions())}},{key:"renderControl",value:function(){var e=this.props,t=e.label,n=e.className,r=e.isFullWidth,o=e.instanceId,c=e.placeholder,i=void 0===c?Object(w.__)("Paste URL or type to search"):c,l=e.__experimentalRenderControl,s=e.value,d=void 0===s?"":s,b=this.state,f=b.loading,p=b.showSuggestions,m=b.selectedSuggestion,g=b.suggestionsListboxId,O=b.suggestionOptionIdPrefix,h={id:"url-input-control-".concat(o),label:t,className:u()("block-editor-url-input",n,{"is-full-width":r})},j={value:d,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:i,onKeyDown:this.onKeyDown,role:"combobox","aria-label":Object(w.__)("URL"),"aria-expanded":p,"aria-autocomplete":"list","aria-owns":g,"aria-activedescendant":null!==m?"".concat(O,"-").concat(m):void 0,ref:this.inputRef};return l?l(h,j,f):Object(a.createElement)(v.BaseControl,h,Object(a.createElement)("input",j),f&&Object(a.createElement)(v.Spinner,null))}},{key:"renderSuggestions",value:function(){var e=this,t=this.props,n=t.className,r=t.__experimentalRenderSuggestions,o=t.value,c=void 0===o?"":o,l=t.__experimentalShowInitialSuggestions,s=void 0!==l&&l,b=this.state,f=b.showSuggestions,p=b.suggestions,m=b.selectedSuggestion,g=b.suggestionsListboxId,O=b.suggestionOptionIdPrefix,h=b.loading,j={id:g,ref:this.autocompleteRef,role:"listbox"},k=function(t,n){return{role:"option",tabIndex:"-1",id:"".concat(O,"-").concat(n),ref:e.bindSuggestionNode(n),"aria-selected":n===m}};return Object(d.isFunction)(r)&&f&&p.length?r({suggestions:p,selectedSuggestion:m,suggestionsListProps:j,buildSuggestionItemProps:k,isLoading:h,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:s&&!(c&&c.length)}):!Object(d.isFunction)(r)&&f&&p.length?Object(a.createElement)(v.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(a.createElement)("div",Object(i.a)({},j,{className:u()("block-editor-url-input__suggestions","".concat(n,"__suggestions"))}),p.map((function(t,n){return Object(a.createElement)(v.Button,Object(i.a)({},k(0,n),{key:t.id,className:u()("block-editor-url-input__suggestion",{"is-selected":n===m}),onClick:function(){return e.handleOnClick(t)}}),t.title)})))):null}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.value,r=e.instanceId,o=e.disableSuggestions,c=e.__experimentalShowInitialSuggestions,i=void 0!==c&&c,l=t.showSuggestions,a=n&&n.length;return i||a||(l=!1),!0===o&&(l=!1),{showSuggestions:l,suggestionsListboxId:"block-editor-url-input-suggestions-".concat(r),suggestionOptionIdPrefix:"block-editor-url-input-suggestion-".concat(r)}}}]),o}(a.Component),$b=Object(b.compose)(b.withSafeTimeout,v.withSpokenMessages,b.withInstanceId,Object(m.withSelect)((function(e,t){if(!Object(d.isFunction)(t.__experimentalFetchLinkSuggestions))return{__experimentalFetchLinkSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}})))(qb),Yb=function(e){var t,n=e.searchTerm,r=e.onClick,o=e.itemProps,c=e.isSelected,l=e.buttonText;return n?(t=l?Object(d.isFunction)(l)?l(n):l:Object(a.createInterpolateElement)(Object(w.sprintf)(
|
65 |
/* translators: %s: search term. */
|
66 |
Object(w.__)("Create: <mark>%s</mark>"),n),{mark:Object(a.createElement)("mark",null)}),Object(a.createElement)(v.Button,Object(i.a)({},o,{className:u()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":c}),onClick:r}),Object(a.createElement)(Ra.a,{className:"block-editor-link-control__search-item-icon",icon:Ta.a}),Object(a.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(a.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null},Xb=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(a.createElement)(S.Path,{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"})),Qb=function(e){var t=e.itemProps,n=e.suggestion,r=e.isSelected,o=void 0!==r&&r,c=e.onClick,l=e.isURL,s=void 0!==l&&l,d=e.searchTerm,b=void 0===d?"":d,f=e.shouldShowType,p=void 0!==f&&f;return Object(a.createElement)(v.Button,Object(i.a)({},t,{onClick:c,className:u()("block-editor-link-control__search-item",{"is-selected":o,"is-url":s,"is-entity":!s})}),s&&Object(a.createElement)(Ra.a,{className:"block-editor-link-control__search-item-icon",icon:Xb}),Object(a.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(a.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(a.createElement)(v.TextHighlight,{text:n.title,highlight:b})),Object(a.createElement)("span",{"aria-hidden":!s,className:"block-editor-link-control__search-item-info"},!s&&(Object(fs.filterURLForDisplay)(Object(fs.safeDecodeURI)(n.url))||""),s&&Object(w.__)("Press ENTER to add this link"))),p&&n.type&&Object(a.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===n.type?"tag":n.type))};function Zb(e){var t=e.instanceId,n=e.withCreateSuggestion,r=e.currentInputValue,o=e.handleSuggestionClick,c=e.suggestionsListProps,l=e.buildSuggestionItemProps,s=e.suggestions,d=e.selectedSuggestion,b=e.isLoading,f=e.isInitialSuggestions,p=e.createSuggestionButtonText,m=e.suggestionsQuery,g=u()("block-editor-link-control__search-results",{"is-loading":b}),O=["url","mailto","tel","internal"],h=1===s.length&&O.includes(s[0].type.toLowerCase()),j=n&&!h&&!f,k=!(null!=m&&m.type),y="block-editor-link-control-search-results-label-".concat(t),_=f?Object(w.__)("Recently updated"):Object(w.sprintf)(
|
67 |
/* translators: %s: search term. */
|
68 |
+
Object(w.__)('Search results for "%s"'),r),E=Object(a.createElement)(f?a.Fragment:v.VisuallyHidden,{},Object(a.createElement)("span",{className:"block-editor-link-control__search-results-label",id:y},_));return Object(a.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},E,Object(a.createElement)("div",Object(i.a)({},c,{className:g,"aria-labelledby":y}),s.map((function(e,t){return j&&"__CREATE__"===e.type?Object(a.createElement)(Yb,{searchTerm:r,buttonText:p,onClick:function(){return o(e)},key:e.type,itemProps:l(e,t),isSelected:t===d}):"__CREATE__"===e.type?null:Object(a.createElement)(Qb,{key:"".concat(e.id,"-").concat(e.type),itemProps:l(e,t),suggestion:e,index:t,onClick:function(){o(e)},isSelected:t===d,isURL:O.includes(e.type.toLowerCase()),searchTerm:r,shouldShowType:k})}))))}function Jb(e){var t=Object(d.startsWith)(e,"#");return Object(fs.isURL)(e)||e&&e.includes("www.")||t}function ef(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ef(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ef(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nf=function(){return Promise.resolve([])},rf=function(e){var t="URL",n=Object(fs.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),Object(d.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?Object(fs.prependHTTP)(e):e,type:t}])},of=function(){var e=Object(Zl.a)(Zc.a.mark((function e(t,n,r,o,c,i){var l,a,s;return Zc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=n.isInitialSuggestions,e.next=3,Promise.all([r(t,n),o(t)]);case 3:if(a=e.sent,s=!t.includes(" "),a=s&&i&&!l?a[0].concat(a[1]):a[0],!l){e.next=8;break}return e.abrupt("return",a);case 8:return e.abrupt("return",Jb(t)||!c?a:a.concat({title:t,url:t,type:"__CREATE__"}));case 9:case"end":return e.stop()}}),e)})));return function(_x,t,n,r,o,c){return e.apply(this,arguments)}}();function cf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cf(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var af=Promise.resolve([]),sf=Object(a.forwardRef)((function(e,t){var n=e.value,r=e.children,o=e.currentLink,c=void 0===o?{}:o,i=e.className,l=void 0===i?null:i,s=e.placeholder,u=void 0===s?null:s,f=e.withCreateSuggestion,p=void 0!==f&&f,v=e.onCreateSuggestion,g=void 0===v?d.noop:v,O=e.onChange,h=void 0===O?d.noop:O,j=e.onSelect,k=void 0===j?d.noop:j,y=e.showSuggestions,_=void 0===y||y,E=e.renderSuggestions,C=void 0===E?function(e){return Object(a.createElement)(Zb,e)}:E,S=e.fetchSuggestions,B=void 0===S?null:S,I=e.allowDirectEntry,x=void 0===I||I,P=e.showInitialSuggestions,T=void 0!==P&&P,N=e.suggestionsQuery,D=void 0===N?{}:N,A=e.withURLSuggestion,R=void 0===A||A,L=e.createSuggestionButtonText,M=function(e,t,n,r){var o=Object(m.useSelect)((function(e){return{fetchSearchSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}}),[]).fetchSearchSuggestions,c=t?rf:nf;return Object(a.useCallback)((function(t,i){var l=i.isInitialSuggestions;return Jb(t)?c(t,{isInitialSuggestions:l}):of(t,tf(tf({},e),{},{isInitialSuggestions:l}),o,c,n,r)}),[c,o,n])}(D,x,p,R),F=_?B||M:af,V=Object(b.useInstanceId)(sf),H=Object(a.useState)(),z=Object(Me.a)(H,2),G=z[0],U=z[1],W=function(){var e=Object(Zl.a)(Zc.a.mark((function e(t){var n,r;return Zc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t,"__CREATE__"!==t.type){e.next=12;break}return e.prev=2,e.next=5,g(t.title);case 5:n=e.sent,null!==(r=n)&&void 0!==r&&r.url&&k(n),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(2);case 11:return e.abrupt("return");case 12:(x||n&&Object.keys(n).length>=1)&&k(lf(lf({},Object(d.omit)(c,"id","url")),n),n);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(_x){return e.apply(this,arguments)}}();return Object(a.createElement)("form",{onSubmit:function(e){e.preventDefault(),W(G||{url:n})}},Object(a.createElement)($b,{className:l,value:n,onChange:function(e,t){h(e),U(t)},placeholder:null!=u?u:Object(w.__)("Search or type url"),__experimentalRenderSuggestions:_?function(e){return C(lf(lf({},e),{},{instanceId:V,withCreateSuggestion:p,currentInputValue:n,createSuggestionButtonText:L,suggestionsQuery:D,handleSuggestionClick:function(t){e.handleSuggestionClick&&e.handleSuggestionClick(t),W(t)}}))}:null,__experimentalFetchLinkSuggestions:F,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:T,ref:t}),r)})),uf=sf,df=Object(v.createSlotFill)("BlockEditorLinkControlViewer"),bf=df.Slot,ff=df.Fill;function pf(e){var t=e.value,n=e.onEditClick,r=t&&Object(fs.filterURLForDisplay)(Object(fs.safeDecodeURI)(t.url),16)||"";return Object(a.createElement)("div",{"aria-label":Object(w.__)("Currently selected"),"aria-selected":"true",className:u()("block-editor-link-control__search-item",{"is-current":!0})},Object(a.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(a.createElement)(v.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},t&&t.title||r),t&&t.title&&Object(a.createElement)("span",{className:"block-editor-link-control__search-item-info"},r)),Object(a.createElement)(v.Button,{isSecondary:!0,onClick:function(){return n()},className:"block-editor-link-control__search-item-action"},Object(w.__)("Edit")),Object(a.createElement)(bf,{fillProps:t}))}var mf=function(e){var t=!1;return{promise:new Promise((function(n,r){e.then((function(e){return t?r({isCanceled:!0}):n(e)}),(function(e){return r(t?{isCanceled:!0}:e)}))})),cancel:function(){t=!0}}};function vf(e){var t=e.searchInputPlaceholder,n=e.value,r=e.settings,o=e.onChange,c=void 0===o?d.noop:o,i=e.noDirectEntry,l=void 0!==i&&i,s=e.showSuggestions,u=void 0===s||s,b=e.showInitialSuggestions,f=e.forceIsEditingLink,p=e.createSuggestion,m=e.withCreateSuggestion,g=e.inputValue,O=void 0===g?"":g,h=e.suggestionsQuery,j=void 0===h?{}:h,k=e.noURLSuggestion,y=void 0!==k&&k,_=e.createSuggestionButtonText;void 0===m&&p&&(m=!0);var E=Object(a.useRef)(!0),C=Object(a.useRef)(),S=Object(a.useState)(n&&n.url||""),B=Object(Me.a)(S,2),I=B[0],x=B[1],P=O||I,T=Object(a.useState)(void 0!==f?f:!n||!n.url),N=Object(Me.a)(T,2),D=N[0],A=N[1],R=Object(a.useRef)(!1);Object(a.useEffect)((function(){void 0!==f&&f!==D&&A(f)}),[f]),Object(a.useEffect)((function(){E.current?E.current=!1:(C.current.contains(C.current.ownerDocument.activeElement)||(ta.focus.focusable.find(C.current)[0]||C.current).focus(),R.current=!1)}),[D]);var L=function(e){var t=Object(a.useRef)(),n=Object(a.useState)(!1),r=Object(Me.a)(n,2),o=r[0],c=r[1],i=Object(a.useState)(null),l=Object(Me.a)(i,2),s=l[0],u=l[1],d=function(){var n=Object(Zl.a)(Zc.a.mark((function n(r){return Zc.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!0),u(null),n.prev=2,t.current=mf(Promise.resolve(e(r))),n.next=6,t.current.promise;case 6:return n.abrupt("return",n.sent);case 9:if(n.prev=9,n.t0=n.catch(2),!n.t0||!n.t0.isCanceled){n.next=13;break}return n.abrupt("return");case 13:throw u(n.t0.message||Object(w.__)("An unknown error occurred during creation. Please try again.")),n.t0;case 15:return n.prev=15,c(!1),n.finish(15);case 18:case"end":return n.stop()}}),n,null,[[2,9,15,18]])})));return function(_x){return n.apply(this,arguments)}}();return Object(a.useEffect)((function(){return function(){t.current&&t.current.cancel()}}),[]),{createPage:d,isCreatingPage:o,errorMessage:s}}(p),M=L.createPage,F=L.isCreatingPage,V=L.errorMessage;return Object(a.createElement)("div",{tabIndex:-1,ref:C,className:"block-editor-link-control"},F&&Object(a.createElement)("div",{className:"block-editor-link-control__loading"},Object(a.createElement)(v.Spinner,null)," ",Object(w.__)("Creating"),"…"),(D||!n)&&!F&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(a.createElement)(uf,{currentLink:n,className:"block-editor-link-control__search-input",placeholder:t,value:P,withCreateSuggestion:m,onCreateSuggestion:M,onChange:x,onSelect:function(e){var t;c(e),R.current=!(null===(t=C.current)||void 0===t||!t.contains(C.current.ownerDocument.activeElement)),A(!1)},showInitialSuggestions:b,allowDirectEntry:!l,showSuggestions:u,suggestionsQuery:j,withURLSuggestion:!y,createSuggestionButtonText:_},Object(a.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(a.createElement)(v.Button,{type:"submit",label:Object(w.__)("Submit"),icon:Vb.a,className:"block-editor-link-control__search-submit"})))),V&&Object(a.createElement)(v.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},V)),n&&!D&&!F&&Object(a.createElement)(pf,{value:n,onEditClick:function(){return A(!0)}}),Object(a.createElement)(Ub,{value:n,settings:r,onChange:c}))}vf.ViewerFill=ff;var gf=vf,Of=n(381),hf=n(264),jf=Object(v.withFilters)("editor.MediaUpload")((function(){return null})),kf=function(e){var t=e.fallback,n=void 0===t?null:t,r=e.children;return Object(m.useSelect)((function(e){return!!(0,e("core/block-editor").getSettings)().mediaUpload}),[])?r:n},yf=Object(b.compose)([Object(m.withDispatch)((function(e){var t=e(is.store);return{createNotice:t.createNotice,removeNotice:t.removeNotice}})),Object(v.withFilters)("editor.MediaReplaceFlow")])((function(e){var t=e.mediaURL,n=e.mediaId,r=e.allowedTypes,o=e.accept,c=e.onSelect,i=e.onSelectURL,l=e.onFilesUpload,s=void 0===l?d.noop:l,u=e.name,b=void 0===u?Object(w.__)("Replace"):u,f=e.createNotice,p=e.removeNotice,g=Object(a.useState)(t),O=Object(Me.a)(g,2),h=O[0],j=O[1],k=Object(m.useSelect)((function(e){return e("core/block-editor").getSettings().mediaUpload}),[]),y=Object(a.createRef)(),_=Object(d.uniqueId)("block-editor/media-replace-flow/error-notice/"),E=function(e){var t=document.createElement("div");t.innerHTML=Object(a.renderToString)(e);var n=t.textContent||t.innerText||"";setTimeout((function(){f("error",n,{speak:!0,id:_,isDismissible:!0})}),1e3)},C=function(e){c(e),j(e.url),Object(ot.speak)(Object(w.__)("The media file has been replaced")),p(_)},S=function(e){e.keyCode===Ht.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(a.createElement)(v.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(a.createElement)(v.ToolbarGroup,{className:"media-replace-flow"},Object(a.createElement)(v.ToolbarButton,{ref:y,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:S},b))},renderContent:function(e){return e.onClose,Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(a.createElement)(jf,{value:n,onSelect:function(e){return C(e)},allowedTypes:r,render:function(e){var t=e.open;return Object(a.createElement)(v.MenuItem,{icon:Of.a,onClick:t},Object(w.__)("Open Media Library"))}}),Object(a.createElement)(kf,null,Object(a.createElement)(v.FormFileUpload,{onChange:function(e){!function(e){var t=e.target.files;s(t),k({allowedTypes:r,filesList:t,onFileChange:function(e){var t=Object(Me.a)(e,1)[0];C(t)},onError:E})}(e)},accept:o,render:function(e){var t=e.openFileDialog;return Object(a.createElement)(v.MenuItem,{icon:hf.a,onClick:function(){t()}},Object(w.__)("Upload"))}}))),i&&Object(a.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:function(e){[Ht.TAB,Ht.ESCAPE].includes(e.keyCode)||e.stopPropagation()},onKeyPress:function(e){[Ht.TAB,Ht.ESCAPE].includes(e.keyCode)||e.stopPropagation()}},Object(a.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(w.__)("Current media URL:")),Object(a.createElement)(gf,{value:{url:h},settings:[],showSuggestions:!1,onChange:function(e){var t=e.url;j(t),i(t),y.current.focus()}})))}})})),_f=n(239);function Ef(e){var t=e.url,n=e.urlLabel,r=e.className,o=u()(r,"block-editor-url-popover__link-viewer-url");return t?Object(a.createElement)(v.ExternalLink,{className:o,href:t},n||Object(fs.filterURLForDisplay)(Object(fs.safeDecodeURI)(t))):Object(a.createElement)("span",{className:o})}function Cf(e){var t=e.additionalControls,n=e.children,r=e.renderSettings,o=e.position,c=void 0===o?"bottom center":o,l=e.focusOnMount,s=void 0===l?"firstElement":l,u=Object(Fe.a)(e,["additionalControls","children","renderSettings","position","focusOnMount"]),d=Object(a.useState)(!1),b=Object(Me.a)(d,2),f=b[0],p=b[1],m=!!r&&f;return Object(a.createElement)(v.Popover,Object(i.a)({className:"block-editor-url-popover",focusOnMount:s,position:c},u),Object(a.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(a.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&Object(a.createElement)(v.Button,{className:"block-editor-url-popover__settings-toggle",icon:ua.a,label:Object(w.__)("Link settings"),onClick:function(){p(!f)},"aria-expanded":f})),m&&Object(a.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!m&&Object(a.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}Cf.LinkEditor=function(e){var t=e.autocompleteRef,n=e.className,r=e.onChangeInputValue,o=e.value,c=Object(Fe.a)(e,["autocompleteRef","className","onChangeInputValue","value"]);return Object(a.createElement)("form",Object(i.a)({className:u()("block-editor-url-popover__link-editor",n)},c),Object(a.createElement)($b,{value:o,onChange:r,autocompleteRef:t}),Object(a.createElement)(v.Button,{icon:Vb.a,label:Object(w.__)("Apply"),type:"submit"}))},Cf.LinkViewer=function(e){var t=e.className,n=e.linkClassName,r=e.onEditLinkClick,o=e.url,c=e.urlLabel,l=Object(Fe.a)(e,["className","linkClassName","onEditLinkClick","url","urlLabel"]);return Object(a.createElement)("div",Object(i.a)({className:u()("block-editor-url-popover__link-viewer",t)},l),Object(a.createElement)(Ef,{url:o,urlLabel:c,className:n}),r&&Object(a.createElement)(v.Button,{icon:_f.a,label:Object(w.__)("Edit"),onClick:r}))};var wf=Cf,Sf=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(a.createElement)(wf,{onClose:o},Object(a.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},Object(a.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(w.__)("URL"),placeholder:Object(w.__)("Paste or type URL"),onChange:n,value:t}),Object(a.createElement)(v.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Vb.a,label:Object(w.__)("Apply"),type:"submit"})))},Bf=Object(v.withFilters)("editor.MediaPlaceholder")((function(e){var t=e.value,n=void 0===t?{}:t,r=e.allowedTypes,o=e.className,c=e.icon,i=e.labels,l=void 0===i?{}:i,s=e.mediaPreview,b=e.notices,f=e.isAppender,p=e.accept,g=e.addToGallery,O=e.multiple,h=void 0!==O&&O,j=e.dropZoneUIOnly,k=e.disableDropZone,y=e.disableMediaButtons,_=e.onError,E=e.onSelect,C=e.onCancel,S=e.onSelectURL,B=e.onDoubleClick,I=e.onFilesPreUpload,x=void 0===I?d.noop:I,P=e.onHTMLDrop,T=void 0===P?d.noop:P,N=e.children,D=Object(m.useSelect)((function(e){return(0,e("core/block-editor").getSettings)().mediaUpload}),[]),A=Object(a.useState)(""),R=Object(Me.a)(A,2),L=R[0],M=R[1],F=Object(a.useState)(!1),V=Object(Me.a)(F,2),H=V[0],z=V[1];Object(a.useEffect)((function(){var e;M(null!==(e=null==n?void 0:n.src)&&void 0!==e?e:"")}),[null==n?void 0:n.src]);var G=function(e){M(e.target.value)},U=function(){z(!0)},W=function(){z(!1)},K=function(e){e.preventDefault(),L&&S&&(S(L),W())},q=function(e){var t;if(x(e),h)if(g){var o=[];t=function(e){var t=(null!=n?n:[]).filter((function(e){return e.id?!o.some((function(t){var n=t.id;return Number(n)===Number(e.id)})):!o.some((function(t){var n=t.urlSlug;return e.url.includes(n)}))}));E(t.concat(e)),o=e.map((function(e){var t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else t=E;else t=function(e){var t=Object(Me.a)(e,1)[0];return E(t)};D({allowedTypes:r,filesList:e,onFileChange:t,onError:_})},$=function(e){q(e.target.files)},Y=function(e,t){var n=l.instructions,i=l.title;if(D||S||(n=Object(w.__)("To edit this block, you need permission to upload media.")),void 0===n||void 0===i){var d=null!=r?r:[],p=Object(Me.a)(d,1)[0],m=1===d.length,g=m&&"audio"===p,O=m&&"image"===p,h=m&&"video"===p;void 0===n&&D&&(n=Object(w.__)("Upload a media file or pick one from your media library."),g?n=Object(w.__)("Upload an audio file, pick one from your media library, or add one with a URL."):O?n=Object(w.__)("Upload an image file, pick one from your media library, or add one with a URL."):h&&(n=Object(w.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===i&&(i=Object(w.__)("Media"),g?i=Object(w.__)("Audio"):O?i=Object(w.__)("Image"):h&&(i=Object(w.__)("Video")))}var j=u()("block-editor-media-placeholder",o,{"is-appender":f});return Object(a.createElement)(v.Placeholder,{icon:c,label:i,instructions:n,className:j,notices:b,onClick:t,onDoubleClick:B,preview:s},e,N)},X=function(){return k?null:Object(a.createElement)(v.DropZone,{onFilesDrop:q,onHTMLDrop:T})},Q=function(){return C&&Object(a.createElement)(v.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(w.__)("Cancel"),isLink:!0,onClick:C},Object(w.__)("Cancel"))},Z=function(){return S&&Object(a.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(a.createElement)(v.Button,{className:"block-editor-media-placeholder__button",onClick:U,isPressed:H,isTertiary:!0},Object(w.__)("Insert from URL")),H&&Object(a.createElement)(Sf,{src:L,onChange:G,onSubmit:K,onClose:W}))};return j||y?(j&&Va()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{alternative:"disableMediaButtons"}),Object(a.createElement)(kf,null,X())):Object(a.createElement)(kf,{fallback:Y(Z())},function(){var e=Object(a.createElement)(jf,{addToGallery:g,gallery:h&&!(!r||0===r.length)&&r.every((function(e){return"image"===e||e.startsWith("image/")})),multiple:h,onSelect:E,allowedTypes:r,value:Array.isArray(n)?n.map((function(e){return e.id})):n.id,render:function(e){var t=e.open;return Object(a.createElement)(v.Button,{isTertiary:!0,onClick:function(e){e.stopPropagation(),t()}},Object(w.__)("Media Library"))}});if(D&&f)return Object(a.createElement)(a.Fragment,null,X(),Object(a.createElement)(v.FormFileUpload,{onChange:$,accept:p,multiple:h,render:function(t){var n=t.openFileDialog,r=Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.Button,{isPrimary:!0,className:u()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(w.__)("Upload")),e,Z(),Q());return Y(r,n)}}));if(D){var t=Object(a.createElement)(a.Fragment,null,X(),Object(a.createElement)(v.FormFileUpload,{isPrimary:!0,className:u()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:$,accept:p,multiple:h},Object(w.__)("Upload")),e,Z(),Q());return Y(t)}return Y(e)}())})),If=Object(a.forwardRef)((function(e,t){return Object(a.createElement)(eb,Object(i.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))}));If.Content=function(e){var t=e.value,n=void 0===t?"":t,r=e.tagName,o=void 0===r?"div":r,c=Object(Fe.a)(e,["value","tagName"]);return Object(a.createElement)(o,c,n)};var xf=If,Pf=Object(a.forwardRef)((function(e,t){var n=e.__experimentalVersion,r=Object(Fe.a)(e,["__experimentalVersion"]);if(2===n)return Object(a.createElement)(xf,Object(i.a)({ref:t},r));var o=r.className,c=r.onChange,l=Object(Fe.a)(r,["className","onChange"]);return Object(a.createElement)(Ia.a,Object(i.a)({ref:t,className:u()("block-editor-plain-text",o),onChange:function(e){return c(e.target.value)}},l))}));function Tf(e){var t=e.property,n=e.viewport,r=e.desc,o=Object(b.useInstanceId)(Tf),c=r||Object(w.sprintf)(
|
69 |
/* translators: 1: property name. 2: viewport name. */
|
70 |
Object(w._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),t,n.label);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("span",{"aria-describedby":"rbc-desc-".concat(o)},n.label),Object(a.createElement)(v.VisuallyHidden,{as:"span",id:"rbc-desc-".concat(o)},c))}var Nf=function(e){var t=e.title,n=e.property,r=e.toggleLabel,o=e.onIsResponsiveChange,c=e.renderDefaultControl,i=e.renderResponsiveControls,l=e.isResponsive,s=void 0!==l&&l,d=e.defaultLabel,b=void 0===d?{id:"all",
|
71 |
/* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
|
73 |
/* translators: 'Toggle control label. Should the property be the same across all screen sizes or unique per screen size.'. %s property value for the control (eg: margin, padding...etc) */
|
74 |
Object(w.__)("Use the same %s on all screensizes."),n),g=Object(w.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),O=c(Object(a.createElement)(Tf,{property:n,viewport:b}),b);
|
75 |
/* translators: 'Help text for the responsive mode toggle control.' */return Object(a.createElement)("fieldset",{className:"block-editor-responsive-block-control"},Object(a.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),Object(a.createElement)("div",{className:"block-editor-responsive-block-control__inner"},Object(a.createElement)(v.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:m,checked:!s,onChange:o,help:g}),Object(a.createElement)("div",{className:u()("block-editor-responsive-block-control__group",{"is-responsive":s})},!s&&O,s&&(i?i(p):p.map((function(e){return Object(a.createElement)(a.Fragment,{key:e.id},c(Object(a.createElement)(Tf,{property:n,viewport:e}),e))}))))))};function Df(e){var t=e.character,n=e.type,r=e.onUse;return Object(b.useKeyboardShortcut)(Ht.rawShortcut[n](t),(function(){return r(),!1}),{bindGlobal:!0}),null}function Af(e){var t,n=e.name,r=e.shortcutType,o=e.shortcutCharacter,c=Object(Fe.a)(e,["name","shortcutType","shortcutCharacter"]),l="RichText.ToolbarControls";return n&&(l+=".".concat(n)),r&&o&&(t=Ht.displayShortcut[r](o)),Object(a.createElement)(v.Fill,{name:l},Object(a.createElement)(v.ToolbarButton,Object(i.a)({},c,{shortcut:t})))}var Rf=function(e){Object(Mn.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Vn.a)(t);if(n){var o=Object(Vn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Fn.a)(this,e)});function o(){var e;return Object(An.a)(this,o),(e=r.apply(this,arguments)).onInput=e.onInput.bind(Object(Ln.a)(e)),e}return Object(Rn.a)(o,[{key:"onInput",value:function(e){e.inputType===this.props.inputType&&this.props.onInput()}},{key:"componentDidMount",value:function(){document.addEventListener("input",this.onInput,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("input",this.onInput,!0)}},{key:"render",value:function(){return null}}]),o}(a.Component),Lf=Object(a.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(a.createElement)(v.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"})),Mf=Object(a.forwardRef)((function(e,t){var n=Object(m.useSelect)((function(e){return e("core/block-editor").isNavigationMode()}),[]),r=Object(m.useDispatch)("core/block-editor").setNavigationMode,o=function(e){r("edit"!==e)};return Object(a.createElement)(v.Dropdown,{renderToggle:function(r){var o=r.isOpen,c=r.onToggle;return Object(a.createElement)(v.Button,Object(i.a)({},e,{ref:t,icon:n?Lf:_f.a,"aria-expanded":o,"aria-haspopup":"true",onClick:c
|
76 |
+
/* translators: button label text should, if possible, be under 16 characters. */,label:Object(w.__)("Modes")}))},position:"bottom right",renderContent:function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.NavigableMenu,{role:"menu","aria-label":Object(w.__)("Modes")},Object(a.createElement)(v.MenuItemsChoice,{value:n?"select":"edit",onSelect:o,choices:[{value:"edit",label:Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Ra.a,{icon:_f.a}),Object(w.__)("Edit"))},{value:"select",label:Object(a.createElement)(a.Fragment,null,Lf,Object(w.__)("Select"))}]})),Object(a.createElement)("div",{className:"block-editor-tool-selector__help"},Object(w.__)("Tools offer different interactions for block selection & editing. To select, press Escape, to go back to editing, press Enter.")))}})}));function Ff(e){var t=e.units,n=Object(Fe.a)(e,["units"]),r=function(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.filter((function(t){return e.includes(t.value)}))}(ge("spacing.units")||[],e);return 0!==t.length&&t}(t);return Object(a.createElement)(v.__experimentalUnitControl,Object(i.a)({units:r},n))}var Vf=n(223),Hf=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M9.737 18.011L3.98 12.255l5.734-6.28 1.107 1.012-4.103 4.494h13.3v1.5H6.828l3.97 3.97-1.06 1.06z"}));var zf=function(e){Object(Mn.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Vn.a)(t);if(n){var o=Object(Vn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Fn.a)(this,e)});function o(){var e;return Object(An.a)(this,o),(e=r.apply(this,arguments)).toggle=e.toggle.bind(Object(Ln.a)(e)),e.submitLink=e.submitLink.bind(Object(Ln.a)(e)),e.state={expanded:!1},e}return Object(Rn.a)(o,[{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(w.__)("Edit link"):Object(w.__)("Insert link");return Object(a.createElement)("div",{className:"block-editor-url-input__button"},Object(a.createElement)(v.Button,{icon:Vf.a,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!t}),r&&Object(a.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},Object(a.createElement)("div",{className:"block-editor-url-input__button-modal-line"},Object(a.createElement)(v.Button,{className:"block-editor-url-input__back",icon:Hf,label:Object(w.__)("Close"),onClick:this.toggle}),Object(a.createElement)($b,{value:t||"",onChange:n}),Object(a.createElement)(v.Button,{icon:Vb.a,label:Object(w.__)("Submit"),type:"submit"}))))}}]),o}(a.Component),Gf=n(144),Uf=["noreferrer","noopener"],Wf=Object(a.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(v.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(a.createElement)(v.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),Object(a.createElement)(v.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),Kf=function(e){var t=e.linkDestination,n=e.onChangeUrl,r=e.url,o=e.mediaType,c=void 0===o?"image":o,i=e.mediaUrl,l=e.mediaLink,s=e.linkTarget,u=e.linkClass,b=e.rel,f=Object(a.useState)(!1),p=Object(Me.a)(f,2),m=p[0],g=p[1],O=Object(a.useCallback)((function(){g(!0)})),h=Object(a.useState)(!1),j=Object(Me.a)(h,2),k=j[0],y=j[1],_=Object(a.useState)(null),E=Object(Me.a)(_,2),C=E[0],S=E[1],B=Object(a.useRef)(null),I=Object(a.useCallback)((function(){"media"!==t&&"attachment"!==t||S(""),y(!0)})),x=Object(a.useCallback)((function(){y(!1)})),P=Object(a.useCallback)((function(){S(null),x(),g(!1)})),T=function(e){var t=e;return void 0===e||Object(d.isEmpty)(t)||Object(d.isEmpty)(t)||(Object(d.each)(Uf,(function(e){var n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),Object(d.isEmpty)(t)&&(t=void 0)),t},N=Object(a.useCallback)((function(){return function(e){var t=B.current;t&&t.contains(e.target)||(g(!1),S(null),x())}})),D=Object(a.useCallback)((function(){return function(e){if(C){var t,r=(null===(t=R().find((function(e){return e.url===C})))||void 0===t?void 0:t.linkDestination)||"custom";n({href:C,linkDestination:r})}x(),S(null),e.preventDefault()}})),A=Object(a.useCallback)((function(){n({linkDestination:"none",href:""})})),R=function(){var e=[{linkDestination:"media",title:Object(w.__)("Media File"),url:"image"===c?i:void 0,icon:Wf}];return"image"===c&&l&&e.push({linkDestination:"attachment",title:Object(w.__)("Attachment Page"),url:"image"===c?l:void 0,icon:Object(a.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(v.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(a.createElement)(v.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},L=Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.ToggleControl,{label:Object(w.__)("Open in new tab"),onChange:function(e){var t=function(e){var t=e?"_blank":void 0;return{linkTarget:t,rel:t||b?T(b):void 0}}(e);n(t)},checked:"_blank"===s}),Object(a.createElement)(v.TextControl,{label:Object(w.__)("Link Rel"),value:T(b)||"",onChange:function(e){n({rel:e})}}),Object(a.createElement)(v.TextControl,{label:Object(w.__)("Link CSS Class"),value:u||"",onChange:function(e){n({linkClass:e})}})),M=null!==C?C:r,F=(Object(d.find)(R(),["linkDestination",t])||{}).title;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.ToolbarButton,{icon:Vf.a,className:"components-toolbar__control",label:r?Object(w.__)("Edit link"):Object(w.__)("Insert link"),"aria-expanded":m,onClick:O}),m&&Object(a.createElement)(wf,{onFocusOutside:N(),onClose:P,renderSettings:function(){return L},additionalControls:!M&&Object(a.createElement)(v.NavigableMenu,null,Object(d.map)(R(),(function(e){return Object(a.createElement)(v.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:function(){var t,r,o;S(null),t=e.url,o=R(),r=t?(Object(d.find)(o,(function(e){return e.url===t}))||{linkDestination:"custom"}).linkDestination:"none",n({linkDestination:r,href:t}),x()}},e.title)})))},(!r||k)&&Object(a.createElement)(wf.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:M,onChangeInputValue:S,onSubmit:D(),autocompleteRef:B}),r&&!k&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(wf.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:r,onEditLinkClick:I,urlLabel:F}),Object(a.createElement)(v.Button,{icon:Gf.a,label:Object(w.__)("Remove link"),onClick:A}))))},qf=n(145);function $f(e){var t=e.children,n=e.className,r=e.isEnabled,o=void 0===r||r,c=e.deviceType,i=e.setDeviceType;if(Object(b.useViewportMatch)("small","<"))return null;var l={className:u()(n,"block-editor-post-preview__dropdown-content"),position:"bottom left"},s={isTertiary:!0,className:"block-editor-post-preview__button-toggle",disabled:!o,
|
77 |
/* translators: button label text should, if possible, be under 16 characters. */
|
78 |
+
children:Object(w.__)("Preview")};return Object(a.createElement)(v.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:l,toggleProps:s,icon:null},(function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.MenuGroup,null,Object(a.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Desktop")},icon:"Desktop"===c&&qf.a},Object(w.__)("Desktop")),Object(a.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Tablet")},icon:"Tablet"===c&&qf.a},Object(w.__)("Tablet")),Object(a.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Mobile")},icon:"Mobile"===c&&qf.a},Object(w.__)("Mobile"))),t)}))}var Yf=n(335),Xf=/\((min|max)-width:[^\(]*?\)/g;function Qf(e){return!!e.media&&!!e.media.mediaText.match(Xf)}function Zf(e,t,n){e.deleteRule(n),e.insertRule(t,n)}function Jf(e,t){return e.replace(Xf,(function(e){return Object(Yf.match)(e,{type:"screen",width:t})?"(min-width:0px)":"(min-width:999999px)"}))}function ep(e,t){Object(a.useEffect)((function(){if(t){var n,r,o,c="undefined"==typeof window?[]:Object(d.filter)(null!==(n=null===(r=window)||void 0===r||null===(o=r.document)||void 0===o?void 0:o.styleSheets)&&void 0!==n?n:[],(function(e){return!!e.href&&Object(fs.getProtocol)(e.href)===window.location.protocol&&Object(fs.getAuthority)(e.href)===window.location.host})),i=[];return c.forEach((function(n,r){for(var o=!1,c=0;c<n.cssRules.length;++c){var l=n.cssRules[c];if((l.type===window.CSSRule.STYLE_RULE||l.type===window.CSSRule.MEDIA_RULE)&&(!o&&l.cssText.match(new RegExp("#start-".concat(e)))&&(o=!0),o&&l.cssText.match(new RegExp("#end-".concat(e)))&&(o=!1),o&&Qf(l))){var a=l.cssText;i[r]||(i[r]=[]),i[r][c]=a,Zf(n,Jf(a,t),c)}}})),function(){i.forEach((function(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];r&&Zf(c[t],r,n)}}))}}}),[t])}function tp(e,t){var n=Object(a.useState)(window.innerWidth),r=Object(Me.a)(n,2),o=r[0],c=r[1];Object(a.useEffect)((function(){if("Desktop"!==e){var t=function(){return c(window.innerWidth)};return window.addEventListener("resize",t),function(){window.removeEventListener("resize",t)}}}),[e]);var i=function(e){var t;switch(e){case"Tablet":t=780;break;case"Mobile":t=360;break;default:return null}return t<o?t:o};return ep("resizable-editor-section",t?null:i(e)),function(e){var t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:i(e),margin:(window.innerHeight<800?36:72)+"px auto",flexGrow:0,height:t,minHeight:t,maxHeight:t,overflowY:"auto"};default:return null}}(e)}var np=Object(m.withSelect)((function(e){return{selectedBlockClientId:e("core/block-editor").getBlockSelectionStart()}}))((function(e){var t=e.selectedBlockClientId;return t&&Object(a.createElement)(v.Button,{isSecondary:!0,className:"block-editor-skip-to-selected-block",onClick:function(){lt(t,document).focus()}},Object(w.__)("Skip to the selected block"))})),rp=n(137),op=Object(m.withSelect)((function(e){return{blocks:(0,e("core/block-editor").getMultiSelectedBlocks)()}}))((function(e){var t=e.blocks,n=Object(rp.count)(Object(p.serialize)(t),"words");return Object(a.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},Object(a.createElement)(Mr,{icon:Zs,showColors:!0}),Object(a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},Object(a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},Object(w.sprintf)(
|
79 |
/* translators: %d: number of blocks */
|
80 |
Object(w._n)("%d block","%d blocks",t.length),t.length)),Object(a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},Object(w.sprintf)(
|
81 |
/* translators: %d: number of words */
|
82 |
+
Object(w._n)("%d word","%d words",n),n))))}));function cp(e){var t=e.blockName,n=Object(m.useSelect)((function(e){var n,r,o=e("core/block-editor").getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==o||null===(n=o.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(r=null==o?void 0:o.onChange)&&void 0!==r?r:null,styles:e(p.store).getBlockStyles(t)}}),[t]),r=n.preferredStyle,o=n.onUpdatePreferredStyleVariations,c=n.styles,i=Object(a.useMemo)((function(){return[{label:Object(w.__)("Not set"),value:""}].concat(Object(pe.a)(c.map((function(e){return{label:e.label,value:e.name}}))))}),[c]),l=Object(a.useCallback)((function(e){o(t,e)}),[t,o]);return o&&Object(a.createElement)(v.SelectControl,{options:i,value:r||"",label:Object(w.__)("Default Style"),onChange:l})}var ip=function(e){var t=e.clientId,n=e.blockName,r=e.hasBlockStyles,o=e.bubblesVirtually,c=Tl(t);return Object(a.createElement)("div",{className:"block-editor-block-inspector"},Object(a.createElement)(Ha,c),Object(a.createElement)(ib,{blockClientId:t}),r&&Object(a.createElement)("div",null,Object(a.createElement)(v.PanelBody,{title:Object(w.__)("Styles")},Object(a.createElement)(cu,{clientId:t}),Object(p.hasBlockSupport)(n,"defaultStylePicker",!0)&&Object(a.createElement)(cp,{blockName:n}))),Object(a.createElement)(ce.Slot,{bubblesVirtually:o}),Object(a.createElement)("div",null,Object(a.createElement)(lp,{slotName:ee.slotName,bubblesVirtually:o})),Object(a.createElement)(np,{key:"back"}))},lp=function(e){var t=e.slotName,n=e.bubblesVirtually,r=Object(v.__experimentalUseSlot)(t);return Boolean(r.fills&&r.fills.length)?Object(a.createElement)(v.PanelBody,{className:"block-editor-block-inspector__advanced",title:Object(w.__)("Advanced"),initialOpen:!1},Object(a.createElement)(ee.Slot,{bubblesVirtually:n})):null},ap=Object(m.withSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getSelectedBlockCount,o=t.getBlockName,c=e(p.store).getBlockStyles,i=n(),l=i&&o(i),a=i&&Object(p.getBlockType)(l),s=i&&c(l);return{count:r(),hasBlockStyles:s&&s.length>0,selectedBlockName:l,selectedBlockClientId:i,blockType:a}}))((function(e){var t=e.blockType,n=e.count,r=e.hasBlockStyles,o=e.selectedBlockClientId,c=e.selectedBlockName,i=e.showNoBlockSelectedMessage,l=void 0===i||i,s=e.bubblesVirtually,u=void 0===s||s;if(n>1)return Object(a.createElement)("div",{className:"block-editor-block-inspector"},Object(a.createElement)(op,null),Object(a.createElement)(ce.Slot,{bubblesVirtually:u}));var d=c===Object(p.getUnregisteredTypeHandlerName)();return t&&o&&!d?Object(a.createElement)(ip,{clientId:o,blockName:t.name,hasBlockStyles:r,bubblesVirtually:u}):l?Object(a.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},Object(w.__)("No block selected.")):null}));function sp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function up(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sp(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dp=Object(a.forwardRef)((function(e,t){var n=e.children,r=e.tagName,o=void 0===r?"div":r,c=Object(Fe.a)(e,["children","tagName"]);Va()("wp.blockEditor.__experimentalBlock",{alternative:"wp.blockEditor.useBlockProps"});var i=sd(up(up({},c),{},{ref:t}));return Object(a.createElement)(o,i,n)})),bp=["p","div","h1","h2","h3","h4","h5","h6","ol","ul","li","figure","nav","pre","header","section","aside","footer","main"].reduce((function(e,t){return e[t]=Object(a.forwardRef)((function(e,n){return Object(a.createElement)(dp,Object(i.a)({},e,{ref:n,tagName:t}))})),e}),dp);function fp(e){var t=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.hasSelectedBlock,r=t.hasMultiSelection;return n()||r()})),n=Object(m.useDispatch)("core/block-editor").clearSelectedBlock;Object(a.useEffect)((function(){if(t)return e.current.addEventListener("mousedown",r),function(){e.current.removeEventListener("mousedown",r)};function r(e){e.target.closest(".wp-block")||n()}}),[t,n])}function pp(e){var t=Object(a.useRef)();return fp(t),Object(a.createElement)("div",Object(i.a)({ref:t},e))}var mp=n(336),vp=n.n(mp),gp=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Op(e){return e?e.replace(/^\s+|\s+$/g,""):""}var hp=n(199),jp=n.n(hp),kp=yp;function yp(e){this.options=e||{}}yp.prototype.emit=function(e){return e},yp.prototype.visit=function(e){return this[e.type](e)},yp.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 _p=Ep;function Ep(e){kp.call(this,e)}jp()(Ep,kp),Ep.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Ep.prototype.comment=function(e){return this.emit("",e.position)},Ep.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Ep.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Ep.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("}")},Ep.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Ep.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Ep.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Ep.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Ep.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Ep.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("}")},Ep.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Ep.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Ep.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Ep.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("}"):""},Ep.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Cp=wp;function wp(e){e=e||{},kp.call(this,e),this.indentation=e.indent}jp()(wp,kp),wp.prototype.compile=function(e){return this.stylesheet(e)},wp.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},wp.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},wp.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},wp.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}")},wp.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}")},wp.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},wp.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},wp.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}")},wp.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)+"}")},wp.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")},wp.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}")},wp.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}")},wp.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}")},wp.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},wp.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()+"}"):""},wp.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},wp.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var Sp=function(e,t){try{var n=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 c(){var e={line:n,column:r};return function(t){return t.position=new i(e),f(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}i.prototype.content=e;var l=[];function a(o){var c=new Error(t.source+":"+n+":"+r+": "+o);if(c.reason=o,c.filename=t.source,c.line=n,c.column=r,c.source=e,!t.silent)throw c;l.push(c)}function s(){return b(/^{\s*/)}function u(){return b(/^}/)}function d(){var t,n,r,o=[];for(f(),p(o);e.length&&"}"!==e.charAt(0)&&(t=C()||(n=void 0,r=void 0,n=c(),(r=v())?(p(),n({type:"rule",selectors:r,declarations:O()})):a("selector missing")));)!1!==t&&(o.push(t),p(o));return o}function b(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function f(){b(/^\s*/)}function p(e){var t;for(e=e||[];t=m();)!1!==t&&e.push(t);return e}function m(){var t=c();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 a("End of comment missing");var i=e.slice(2,n-2);return r+=2,o(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function v(){var e=b(/^([^{]+)/);if(e)return Op(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 g(){var e=c(),t=b(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=Op(t[0]),!b(/^:\s*/))return a("property missing ':'");var n=b(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(gp,""),value:n?Op(n[0]).replace(gp,""):""});return b(/^[;\s]*/),r}}function O(){var e,t=[];if(!s())return a("missing '{'");for(p(t);e=g();)!1!==e&&(t.push(e),p(t));return u()?t:a("missing '}'")}function h(){for(var e,t=[],n=c();e=b(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),b(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:O()})}var j,k=E("import"),y=E("charset"),_=E("namespace");function E(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=c(),r=b(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function C(){if("@"===e[0])return function(){var e=c(),t=b(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=b(/^([-\w]+)\s*/)))return a("@keyframes missing name");var r,o=t[1];if(!s())return a("@keyframes missing '{'");for(var i=p();r=h();)i.push(r),i=i.concat(p());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):a("@keyframes missing '}'")}}()||function(){var e=c(),t=b(/^@media *([^{]+)/);if(t){var n=Op(t[1]);if(!s())return a("@media missing '{'");var r=p().concat(d());return u()?e({type:"media",media:n,rules:r}):a("@media missing '}'")}}()||function(){var e=c(),t=b(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Op(t[1]),media:Op(t[2])})}()||function(){var e=c(),t=b(/^@supports *([^{]+)/);if(t){var n=Op(t[1]);if(!s())return a("@supports missing '{'");var r=p().concat(d());return u()?e({type:"supports",supports:n,rules:r}):a("@supports missing '}'")}}()||k()||y()||_()||function(){var e=c(),t=b(/^@([-\w]+)?document *([^{]+)/);if(t){var n=Op(t[1]),r=Op(t[2]);if(!s())return a("@document missing '{'");var o=p().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):a("@document missing '}'")}}()||function(){var e=c();if(b(/^@page */)){var t=v()||[];if(!s())return a("@page missing '{'");for(var n,r=p();n=g();)r.push(n),r=r.concat(p());return u()?e({type:"page",selectors:t,declarations:r}):a("@page missing '}'")}}()||function(){var e=c();if(b(/^@host\s*/)){if(!s())return a("@host missing '{'");var t=p().concat(d());return u()?e({type:"host",rules:t}):a("@host missing '}'")}}()||function(){var e=c();if(b(/^@font-face\s*/)){if(!s())return a("@font-face missing '{'");for(var t,n=p();t=g();)n.push(t),n=n.concat(p());return u()?e({type:"font-face",declarations:n}):a("@font-face missing '}'")}}()}return function e(t,n){var r=t&&"string"==typeof t.type,o=r?t:n;for(var c in t){var i=t[c];Array.isArray(i)?i.forEach((function(t){e(t,o)})):i&&"object"===Object(so.a)(i)&&e(i,o)}return r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null}),t}((j=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:j,parsingErrors:l}}))}(e);return r=vp.a.map(n,(function(e){if(!e)return e;var n=t(e);return this.update(n)})),((o=o||{}).compress?new _p(o):new Cp(o)).compile(r)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var r,o};function Bp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ip(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bp(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xp(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 Pp(e,t){return new URL(e,t).toString()}var Tp=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]};xp(o)&&r.push(o)}return r}(t.value).map((c=e,function(e){return Ip(Ip({},e),{},{newUrl:"url("+e.before+e.quote+Pp(e.value,c)+e.quote+e.after+")"})}));return Ip(Ip({},t),{},{value:(r=t.value,o=n,o.forEach((function(e){r=r.replace(e.source,e.newUrl)})),r)})}var r,o,c;return t}};function Np(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Np(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Np(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ap=/^(body|html|:root).*$/,Rp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?Dp(Dp({},n),{},{selectors:n.selectors.map((function(n){return t.includes(n.trim())?n:n.match(Ap)?n.replace(/^(body|html|:root)/,e):e+" "+n}))}):n}},Lp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(e,(function(e){var n=e.css,r=e.baseURL,o=e.__experimentalNoWrapper,c=[];return t&&!(void 0!==o&&o)&&c.push(Rp(t)),r&&c.push(Tp(r)),c.length?Sp(n,Object(b.compose)(c)):n}))};function Mp(e){return Object(a.useCallback)((function(e){if(e){var t=e.ownerDocument,n=t.defaultView,r=t.body,o=t.querySelector(".editor-styles-wrapper"),c=n.getComputedStyle(o,null).getPropertyValue("background-color");Be()(c).getLuminance()>.5?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}}),[e])}function Fp(e){var t=e.styles;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("style",{ref:Mp(t)}),Lp(t,".editor-styles-wrapper").map((function(e,t){return Object(a.createElement)("style",{key:t},e)})))}var Vp=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.showInserterHelpPanel,c=e.showMostUsedBlocks,i=void 0!==c&&c,l=e.__experimentalSelectBlockOnInsert,s=e.__experimentalInsertionIndex,u=e.onSelect,b=void 0===u?d.noop:u,f=Object(m.useSelect)((function(e){var r=e("core/block-editor").getBlockRootClientId;return t||r(n)||void 0}),[n,t]);return Object(a.createElement)(Ss,{onSelect:b,rootClientId:f,clientId:n,isAppender:r,showInserterHelpPanel:o,showMostUsedBlocks:i,__experimentalSelectBlockOnInsert:l,__experimentalInsertionIndex:s})};function Hp(){var e=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientIds,r=t.getBlockOrder,o=t.getBlockRootClientId,c=n(),i=Object(Me.a)(c,1)[0];return{clientIds:c,rootBlocksClientIds:r(),rootClientId:o(i)}}),[]),t=e.clientIds,n=e.rootBlocksClientIds,r=e.rootClientId,o=Object(m.useDispatch)("core/block-editor"),c=o.duplicateBlocks,i=o.removeBlocks,l=o.insertAfterBlock,s=o.insertBeforeBlock,u=o.multiSelect,b=o.clearSelectedBlock,f=o.moveBlocksUp,p=o.moveBlocksDown;return Object(Ql.useShortcut)("core/block-editor/move-up",Object(a.useCallback)((function(e){e.preventDefault(),f(t,r)}),[t,f]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Ql.useShortcut)("core/block-editor/move-down",Object(a.useCallback)((function(e){e.preventDefault(),p(t,r)}),[t,p]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Ql.useShortcut)("core/block-editor/duplicate",Object(a.useCallback)((function(e){e.preventDefault(),c(t)}),[t,c]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Ql.useShortcut)("core/block-editor/remove",Object(a.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Ql.useShortcut)("core/block-editor/insert-after",Object(a.useCallback)((function(e){e.preventDefault(),l(Object(d.last)(t))}),[t,l]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Ql.useShortcut)("core/block-editor/insert-before",Object(a.useCallback)((function(e){e.preventDefault(),s(Object(d.first)(t))}),[t,s]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Ql.useShortcut)("core/block-editor/delete-multi-selection",Object(a.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{isDisabled:t.length<2}),Object(Ql.useShortcut)("core/block-editor/select-all",Object(a.useCallback)((function(e){e.preventDefault(),u(Object(d.first)(n),Object(d.last)(n))}),[n,u])),Object(Ql.useShortcut)("core/block-editor/unselect",Object(a.useCallback)((function(e){e.preventDefault(),b(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges()}),[t,b]),{isDisabled:t.length<2}),null}Hp.Register=function(){var e=Object(m.useDispatch)(Ql.store).registerShortcut;return Object(a.useEffect)((function(){e({name:"core/block-editor/duplicate",category:"block",description:Object(w.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:Object(w.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:Object(w.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:Object(w.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:Object(w.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:Object(w.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:Object(w.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:Object(w.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:Object(w.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:Object(w.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var zp=Hp;function Gp(e){var t=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockSelectionEnd,r=t.hasMultiSelection,o=t.isMultiSelecting,c=n();if(c&&!o()&&r())return c}),[]);Object(a.useEffect)((function(){if(t){var n=e.current.ownerDocument,r=lt(t,n);if(r){var o=Object(ta.getScrollContainer)(r);o&&Kb()(r,o,{onlyScrollIfNeeded:!0})}}}),[t])}function Up(){var e=Object(a.useRef)();return Gp(e),Object(a.createElement)("div",{ref:e})}var Wp=new Set([Ht.UP,Ht.RIGHT,Ht.DOWN,Ht.LEFT,Ht.ENTER,Ht.BACKSPACE]);function Kp(e){var t=Object(m.useSelect)((function(e){return e("core/block-editor").isTyping()})),n=Object(m.useDispatch)("core/block-editor").stopTyping;Object(a.useEffect)((function(){if(t){var r,o,c=e.current.ownerDocument;return c.addEventListener("mousemove",i),function(){c.removeEventListener("mousemove",i)}}function i(e){var t=e.clientX,c=e.clientY;r&&o&&(r!==t||o!==c)&&n(),r=t,o=c}}),[t,n])}function qp(e){var t=Object(m.useSelect)((function(e){return e("core/block-editor").isTyping()})),n=Object(m.useDispatch)("core/block-editor"),r=n.startTyping,o=n.stopTyping;Kp(e),Object(a.useEffect)((function(){var n=e.current,c=n.ownerDocument,i=c.defaultView;if(t){var l;function a(e){var t=e.target;l=i.setTimeout((function(){Object(ta.isTextField)(t)||o()}))}function s(e){var t=e.keyCode;t!==Ht.ESCAPE&&t!==Ht.TAB||o()}function u(){var e=i.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||o()}return n.addEventListener("focus",a),n.addEventListener("keydown",s),c.addEventListener("selectionchange",u),function(){i.clearTimeout(l),n.removeEventListener("focus",a),n.removeEventListener("keydown",s),c.removeEventListener("selectionchange",u)}}function d(e){var t=e.type,o=e.target;Object(ta.isTextField)(o)&&n.contains(o)&&("keydown"!==t||function(e){var t=e.keyCode;return!e.shiftKey&&Wp.has(t)}(e))&&r()}return n.addEventListener("keypress",d),n.addEventListener("keydown",d),function(){n.removeEventListener("keypress",d),n.removeEventListener("keydown",d)}}),[t,r,o])}var $p=function(e){var t=e.children,n=Object(a.useRef)();return qp(n),Object(a.createElement)("div",{ref:n},t)};function Yp(){return Va()("PreserveScrollInReorder component",{hint:"This behavior is now built-in the block list"}),null}var Xp=-1!==window.navigator.userAgent.indexOf("Trident"),Qp=new Set([Ht.UP,Ht.DOWN,Ht.LEFT,Ht.RIGHT]);function Zp(e){var t=Object(m.useSelect)((function(e){return e("core/block-editor").hasSelectedBlock()}));Object(a.useEffect)((function(){if(t){var n,r,o,c=e.current.ownerDocument,i=c.defaultView;return i.addEventListener("scroll",l,!0),i.addEventListener("resize",l,!0),e.current.addEventListener("keydown",a),e.current.addEventListener("keyup",s),e.current.addEventListener("mousedown",u),e.current.addEventListener("touchstart",u),function(){i.removeEventListener("scroll",l,!0),i.removeEventListener("resize",l,!0),e.current.removeEventListener("keydown",a),e.current.removeEventListener("keyup",s),e.current.removeEventListener("mousedown",u),e.current.removeEventListener("touchstart",u),c.removeEventListener("selectionchange",d),i.cancelAnimationFrame(n),i.cancelAnimationFrame(r)}}function l(){n||(n=i.requestAnimationFrame((function(){b(),n=null})))}function a(e){r&&i.cancelAnimationFrame(r),r=i.requestAnimationFrame((function(){s(e),r=null}))}function s(t){var n=t.keyCode;if(f()){var r=Object(ta.computeCaretRect)(i);if(r)if(o)if(Qp.has(n))o=r;else{var l=r.top-o.top;if(0!==l){var a=Object(ta.getScrollContainer)(e.current);if(a){var s=a===c.body,u=s?i.scrollY:a.scrollTop,d=s?0:a.getBoundingClientRect().top,b=s?o.top/i.innerHeight:(o.top-d)/(i.innerHeight-d);if(0===u&&b<.75&&(p=e.current.querySelectorAll('[contenteditable="true"]'))[p.length-1]===c.activeElement)o=r;else{var p,m=s?i.innerHeight:a.clientHeight;o.top+o.height>d+m||o.top<d?o=r:s?i.scrollBy(0,l):a.scrollTop+=l}}}}else o=r}}function u(){c.addEventListener("selectionchange",d)}function d(){c.removeEventListener("selectionchange",d),b()}function b(){f()&&(o=Object(ta.computeCaretRect)(i))}function f(){return e.current.contains(c.activeElement)&&c.activeElement.isContentEditable}}),[t])}var Jp=Xp?function(e){return e.children}:function(e){var t=e.children,n=Object(a.useRef)();return Zp(n),Object(a.createElement)("div",{ref:n,className:"block-editor__typewriter"},t)},em=Object(d.overEvery)([ta.isTextField,ta.focus.tabbable.isTabbableIndex]);function tm(e){Object(a.useEffect)((function(){function t(t){if(t.target===e.current){var n=ta.focus.focusable.find(e.current),r=Object(d.findLast)(n,em);r&&(Object(ta.placeCaretAtHorizontalEdge)(r,!0),t.preventDefault())}}return e.current.addEventListener("mousedown",t),function(){e.current.addEventListener("mousedown",t)}}),[])}function nm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rm(e){e.dir=document.dir,e.body.className="editor-styles-wrapper";var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return nm(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nm(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}(document.body.classList);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.startsWith("admin-color-")&&e.body.classList.add(r)}}catch(e){n.e(e)}finally{n.f()}}var om=Object(a.forwardRef)((function(e,t){var n=e.contentRef,r=e.children,o=e.head,c=e.headHTML,l=Object(Fe.a)(e,["contentRef","children","head","headHTML"]),s=Object(a.useState)(),u=Object(Me.a)(s,2),d=u[0],f=u[1],p=Object(a.useCallback)((function(e){function t(){var t,r=e.contentDocument,o=r.readyState,i=r.body;return("interactive"===o||"complete"===o)&&("function"==typeof n?n(i):n&&(n.current=i),function(e,t){e.head.innerHTML="<style>body{margin:0}</style>"+t}(r,c),rm(r),t=r,Array.from(document.styleSheets).forEach((function(e){try{e.cssRules}catch(e){return}var n=e.ownerNode,r=e.cssRules;r&&Array.from(r).find((function(e){var t=e.selectorText;return t&&(t.includes(".".concat("editor-styles-wrapper"))||t.includes(".".concat("wp-block")))}))&&!t.getElementById(n.id)&&t.head.appendChild(n.cloneNode(!0))})),function(e){var t=e.defaultView,n=t.frameElement;function r(e){var r=Object.getPrototypeOf(e).constructor.name,o=window[r],c={};for(var i in e)c[i]=e[i];if(e instanceof t.MouseEvent){var l=n.getBoundingClientRect();c.clientX+=l.left,c.clientY+=l.top}var a=new o(e.type,c);!n.dispatchEvent(a)&&e.preventDefault()}for(var o=0,c=["keydown","keypress","dragover"];o<c.length;o++){var i=c[o];e.addEventListener(i,r)}}(r),rm(r),f(r),!0)}e&&(t()||e.addEventListener("load",(function(){t()})))}),[]);return Object(a.createElement)("iframe",Object(i.a)({},l,{ref:Object(b.useMergeRefs)([t,p]),tabIndex:"0",title:Object(w.__)("Editor canvas"),name:"editor-canvas"}),d&&Object(a.createPortal)(r,d.body),d&&Object(a.createPortal)(o,d.head))})),cm=Object(a.createContext)(new Set);function im(e){var t=Object(a.useContext)(cm),n=t.has(e),r=Object(a.useMemo)((function(){return n=e,(r=new Set(t)).add(n),r;var n,r}),[e,t]);return[n,Object(a.useCallback)((function(e){var t=e.children;return Object(a.createElement)(cm.Provider,{value:r},t)}),[r])]}function lm(e){if(void 0===e)e=Kr.colors;else{var t=e.filter((function(e){return e.color}));0===t.length?e=Kr.colors:t.length<e.length&&(e=t)}return e}function am(e){if(void 0===e)e=Kr.gradients;else{var t=e.filter((function(e){return e.gradient}));0===t.length?e=Kr.gradients:t.length<e.length&&(e=t)}return e}},51:function(e,t){e.exports=window.wp.notices},52:function(e,t){e.exports=window.wp.blob},54:function(e,t){e.exports=window.wp.a11y},57:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},60:function(e,t,n){var r;!function(o){var c=/^\s+/,i=/\s+$/,l=0,a=o.round,s=o.min,u=o.max,d=o.random;function b(e,t){if(t=t||{},(e=e||"")instanceof b)return e;if(!(this instanceof b))return new b(e,t);var n=function(e){var t,n,r,l={r:0,g:0,b:0},a=1,d=null,b=null,f=null,p=!1,m=!1;return"string"==typeof e&&(e=function(e){e=e.replace(c,"").replace(i,"").toLowerCase();var t,n=!1;if(x[e])e=x[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=G.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=G.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=G.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=G.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=G.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=G.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=G.hex8.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),a:F(t[4]),format:n?"name":"hex8"}:(t=G.hex6.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),format:n?"name":"hex"}:(t=G.hex4.exec(e))?{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=G.hex3.exec(e))&&{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(t=e.r,n=e.g,r=e.b,l={r:255*N(t,255),g:255*N(n,255),b:255*N(r,255)},p=!0,m="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(d=L(e.s),b=L(e.v),l=function(e,t,n){e=6*N(e,360),t=N(t,100),n=N(n,100);var r=o.floor(e),c=e-r,i=n*(1-t),l=n*(1-c*t),a=n*(1-(1-c)*t),s=r%6;return{r:255*[n,l,i,i,a,n][s],g:255*[a,n,n,l,i,i][s],b:255*[i,i,a,n,n,l][s]}}(e.h,d,b),p=!0,m="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(d=L(e.s),f=L(e.l),l=function(e,t,n){var r,o,c;function i(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=N(e,360),t=N(t,100),n=N(n,100),0===t)r=o=c=n;else{var l=n<.5?n*(1+t):n+t-n*t,a=2*n-l;r=i(a,l,e+1/3),o=i(a,l,e),c=i(a,l,e-1/3)}return{r:255*r,g:255*o,b:255*c}}(e.h,d,f),p=!0,m="hsl"),e.hasOwnProperty("a")&&(a=e.a)),a=T(a),{ok:p,format:e.format||m,r:s(255,u(l.r,0)),g:s(255,u(l.g,0)),b:s(255,u(l.b,0)),a:a}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=a(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=n.ok,this._tc_id=l++}function f(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=u(e,t,n),i=s(e,t,n),l=(c+i)/2;if(c==i)r=o=0;else{var a=c-i;switch(o=l>.5?a/(2-c-i):a/(c+i),c){case e:r=(t-n)/a+(t<n?6:0);break;case t:r=(n-e)/a+2;break;case n:r=(e-t)/a+4}r/=6}return{h:r,s:o,l:l}}function p(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=u(e,t,n),i=s(e,t,n),l=c,a=c-i;if(o=0===c?0:a/c,c==i)r=0;else{switch(c){case e:r=(t-n)/a+(t<n?6:0);break;case t:r=(n-e)/a+2;break;case n:r=(e-t)/a+4}r/=6}return{h:r,s:o,v:l}}function m(e,t,n,r){var o=[R(a(e).toString(16)),R(a(t).toString(16)),R(a(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 v(e,t,n,r){return[R(M(r)),R(a(e).toString(16)),R(a(t).toString(16)),R(a(n).toString(16))].join("")}function g(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s-=t/100,n.s=D(n.s),b(n)}function O(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s+=t/100,n.s=D(n.s),b(n)}function h(e){return b(e).desaturate(100)}function j(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l+=t/100,n.l=D(n.l),b(n)}function k(e,t){t=0===t?0:t||10;var n=b(e).toRgb();return n.r=u(0,s(255,n.r-a(-t/100*255))),n.g=u(0,s(255,n.g-a(-t/100*255))),n.b=u(0,s(255,n.b-a(-t/100*255))),b(n)}function y(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l-=t/100,n.l=D(n.l),b(n)}function _(e,t){var n=b(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,b(n)}function E(e){var t=b(e).toHsl();return t.h=(t.h+180)%360,b(t)}function C(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+120)%360,s:t.s,l:t.l}),b({h:(n+240)%360,s:t.s,l:t.l})]}function w(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+90)%360,s:t.s,l:t.l}),b({h:(n+180)%360,s:t.s,l:t.l}),b({h:(n+270)%360,s:t.s,l:t.l})]}function S(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+72)%360,s:t.s,l:t.l}),b({h:(n+216)%360,s:t.s,l:t.l})]}function B(e,t,n){t=t||6,n=n||30;var r=b(e).toHsl(),o=360/n,c=[b(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,c.push(b(r));return c}function I(e,t){t=t||6;for(var n=b(e).toHsv(),r=n.h,o=n.s,c=n.v,i=[],l=1/t;t--;)i.push(b({h:r,s:o,v:c})),c=(c+l)%1;return i}b.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,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=T(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),r=a(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),r=a(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(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 c=[R(a(e).toString(16)),R(a(t).toString(16)),R(a(n).toString(16)),R(M(r))];return o&&c[0].charAt(0)==c[0].charAt(1)&&c[1].charAt(0)==c[1].charAt(1)&&c[2].charAt(0)==c[2].charAt(1)&&c[3].charAt(0)==c[3].charAt(1)?c[0].charAt(0)+c[1].charAt(0)+c[2].charAt(0)+c[3].charAt(0):c.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*N(this._r,255))+"%",g:a(100*N(this._g,255))+"%",b:a(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*N(this._r,255))+"%, "+a(100*N(this._g,255))+"%, "+a(100*N(this._b,255))+"%)":"rgba("+a(100*N(this._r,255))+"%, "+a(100*N(this._g,255))+"%, "+a(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=b(e);n="#"+v(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 b(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(j,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(O,arguments)},greyscale:function(){return this._applyModification(h,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(B,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},b.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return b(e,t)},b.equals=function(e,t){return!(!e||!t)&&b(e).toRgbString()==b(t).toRgbString()},b.random=function(){return b.fromRatio({r:d(),g:d(),b:d()})},b.mix=function(e,t,n){n=0===n?0:n||50;var r=b(e).toRgb(),o=b(t).toRgb(),c=n/100;return b({r:(o.r-r.r)*c+r.r,g:(o.g-r.g)*c+r.g,b:(o.b-r.b)*c+r.b,a:(o.a-r.a)*c+r.a})},b.readability=function(e,t){var n=b(e),r=b(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},b.isReadable=function(e,t,n){var r,o,c,i,l,a=b.readability(e,t);switch(o=!1,(c=n,"AA"!==(i=((c=c||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(l=(c.size||"small").toLowerCase())&&"large"!==l&&(l="small"),r={level:i,size:l}).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},b.mostReadable=function(e,t,n){var r,o,c,i,l=null,a=0;o=(n=n||{}).includeFallbackColors,c=n.level,i=n.size;for(var s=0;s<t.length;s++)(r=b.readability(e,t[s]))>a&&(a=r,l=b(t[s]));return b.isReadable(e,l,{level:c,size:i})||!o?l:(n.includeFallbackColors=!1,b.mostReadable(e,["#fff","#000"],n))};var x=b.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=b.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(x);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=s(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function D(e){return s(1,u(0,e))}function A(e){return parseInt(e,16)}function R(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function M(e){return o.round(255*parseFloat(e)).toString(16)}function F(e){return A(e)/255}var V,H,z,G=(H="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",z="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+z),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 U(e){return!!G.CSS_UNIT.exec(e)}e.exports?e.exports=b:void 0===(r=function(){return b}.call(t,n,t,e))||(e.exports=r)}(Math)},68:function(e,t){e.exports=window.wp.htmlEntities},69:function(e,t){e.exports=window.wp.isShallowEqual},7:function(e,t){e.exports=window.wp.primitives},73:function(e,t,n){e.exports=function(e,t){var n,r,o=0;function c(){var c,i,l=n,a=arguments.length;e:for(;l;){if(l.args.length===arguments.length){for(i=0;i<a;i++)if(l.args[i]!==arguments[i]){l=l.next;continue e}return l!==n&&(l===r&&(r=l.prev),l.prev.next=l.next,l.next&&(l.next.prev=l.prev),l.next=n,l.prev=null,n.prev=l,n=l),l.val}l=l.next}for(c=new Array(a),i=0;i<a;i++)c[i]=arguments[i];return l={args:c,val:e.apply(null,c)},n?(n.prev=l,l.next=n):r=l,o===t.maxSize?(r=r.prev).next=null:o++,n=l,l.val}return t=t||{},c.clear=function(){n=null,r=null,o=0},c}},8:function(e,t){e.exports=window.React},9:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(40),o=n(31),c=n(41);function i(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],_n=!0,r=!1,o=void 0;try{for(var c,i=e[Symbol.iterator]();!(_n=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{_n||null==i.return||i.return()}finally{if(r)throw o}}return n}}(e,t)||Object(o.a)(e,t)||Object(c.a)()}}});
|
build/block-library/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '9fea52b9fae58fce07c7a28038354ffa');
|
build/block-library/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
window.wp=window.wp||{},window.wp.blockLibrary=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=508)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,"a",(function(){return n}))},11:function(e,t){e.exports=window.wp.blocks},12:function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var c=typeof n;if("string"===c||"number"===c)e.push(n);else if(Array.isArray(n))e.push(o.apply(null,n));else if("object"===c)for(var a in n)r.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}e.exports?e.exports=o:void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},124:function(e,t){e.exports=window.wp.reusableBlocks},127:function(e,t){e.exports=window.wp.autop},129:function(e,t,r){var n;!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var r=t.length,n=0;n<r;++n)o(e,t[n])}e.prototype=Object.create(null);var r={}.hasOwnProperty,n=/\s+/;function o(e,o){if(o){var c=typeof o;"string"===c?function(e,t){for(var r=t.split(n),o=r.length,c=0;c<o;++c)e[r[c]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===c?function(e,t){for(var n in t)r.call(t,n)&&(e[n]=!!t[n])}(e,o):"number"===c&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];var c=new e;t(c,n);var a=[];for(var i in c)c[i]&&a.push(i);return a.join(" ")}}();e.exports?e.exports=r:void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},13:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(48);function o(e,t){if(null==e)return{};var r,o,c=Object(n.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},14:function(e,t){e.exports=window.wp.compose},143:function(e,t,r){"use strict";var n=r(5),o=r(13),c=r(0);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}t.a=function(e){var t=e.icon,r=e.size,i=void 0===r?24:r,l=Object(o.a)(e,["icon","size"]);return Object(c.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:i,height:i},l))}},144:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"}));t.a=c},146:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=c},15:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(25),o=r(39),c=r(31);function a(e){return function(e){if(Array.isArray(e))return Object(n.a)(e)}(e)||Object(o.a)(e)||Object(c.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},16:function(e,t){e.exports=window.regeneratorRuntime},17:function(e,t){e.exports=window.wp.keycodes},183:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=c},19:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,"a",(function(){return n}))},2:function(e,t){e.exports=window.lodash},217:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(o.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=c},22:function(e,t,r){"use strict";function n(e){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}r.d(t,"a",(function(){return n}))},224:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));t.a=c},24:function(e,t){e.exports=window.wp.richText},240:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.a=c},25:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r.d(t,"a",(function(){return n}))},259:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));t.a=c},260:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=c},261:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=c},262:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(o.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));t.a=c},264:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(n.createElement)(o.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));t.a=c},265:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.a=c},266:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(n.createElement)(o.Path,{d:"M13.23 15h1.9L11 4H9L5 15h1.88l1.07-3h4.18zm-1.53-4.54H8.51L10 5.6z"}));t.a=c},267:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));t.a=c},27:function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.d(t,"a",(function(){return n}))},28:function(e,t,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}r.d(t,"a",(function(){return o}))},29:function(e,t){e.exports=window.wp.url},3:function(e,t){e.exports=window.wp.components},30:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(57);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&&Object(n.a)(e,t)}},31:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(25);function o(e,t){if(e){if("string"==typeof e)return Object(n.a)(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Object(n.a)(e,t):void 0}}},32:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(43),o=r(19);function c(e,t){return!t||"object"!==Object(n.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},33:function(e,t){e.exports=window.wp.dom},338:function(e,t,r){e.exports=function(){"use strict";function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}var r,n;return r=t,(n=[{key:"getColorAsync",value:function(e,t,r){e.complete?t.call(e,this.getColor(e,r),r&&r.data):this._bindImageEvents(e,t,r)}},{key:"getColor",value:function(e,t){t=t||{};var r=this._getDefaultColor(t),n=this._getOriginalSize(e),o=this._prepareSizeAndPosition(n,t),c=null,a=r;if(!(o.srcWidth&&o.srcHeight&&o.destWidth&&o.destHeight))return this._prepareResult(r,new Error("FastAverageColor: Incorrect sizes."));if(!this._ctx&&(this._canvas=this._makeCanvas(),this._ctx=this._canvas.getContext&&this._canvas.getContext("2d"),!this._ctx))return this._prepareResult(r,new Error("FastAverageColor: Canvas Context 2D is not supported in this browser."));this._canvas.width=o.destWidth,this._canvas.height=o.destHeight;try{this._ctx.clearRect(0,0,o.destWidth,o.destHeight),this._ctx.drawImage(e,o.srcLeft,o.srcTop,o.srcWidth,o.srcHeight,0,0,o.destWidth,o.destHeight);var i=this._ctx.getImageData(0,0,o.destWidth,o.destHeight).data;a=this.getColorFromArray4(i,t)}catch(e){c=e}return this._prepareResult(a,c)}},{key:"getColorFromArray4",value:function(e,t){t=t||{};var r=e.length;if(r<4)return this._getDefaultColor(t);var n=r-r%4,o=4*(t.step||1),c="_"+(t.algorithm||"sqrt")+"Algorithm";if("function"!=typeof this[c])throw new Error("FastAverageColor: ".concat(t.algorithm," is unknown algorithm."));return this[c](e,n,o)}},{key:"destroy",value:function(){delete this._canvas,delete this._ctx}},{key:"_getDefaultColor",value:function(e){return this._getOption(e,"defaultColor",[255,255,255,255])}},{key:"_getOption",value:function(e,t,r){return void 0===e[t]?r:e[t]}},{key:"_prepareSizeAndPosition",value:function(e,t){var r,n=this._getOption(t,"left",0),o=this._getOption(t,"top",0),c=this._getOption(t,"width",e.width),a=this._getOption(t,"height",e.height),i=c,l=a;return"precision"===t.mode||(c>a?(r=c/a,i=100,l=Math.round(i/r)):(r=a/c,l=100,i=Math.round(l/r)),(i>c||l>a||i<10||l<10)&&(i=c,l=a)),{srcLeft:n,srcTop:o,srcWidth:c,srcHeight:a,destWidth:i,destHeight:l}}},{key:"_simpleAlgorithm",value:function(e,t,r){for(var n=0,o=0,c=0,a=0,i=0,l=0;l<t;l+=r){var s=e[l+3];n+=e[l]*s,o+=e[l+1]*s,c+=e[l+2]*s,a+=s,i++}return a?[Math.round(n/a),Math.round(o/a),Math.round(c/a),Math.round(a/i)]:[0,0,0,0]}},{key:"_sqrtAlgorithm",value:function(e,t,r){for(var n=0,o=0,c=0,a=0,i=0,l=0;l<t;l+=r){var s=e[l],u=e[l+1],b=e[l+2],m=e[l+3];n+=s*s*m,o+=u*u*m,c+=b*b*m,a+=m,i++}return a?[Math.round(Math.sqrt(n/a)),Math.round(Math.sqrt(o/a)),Math.round(Math.sqrt(c/a)),Math.round(a/i)]:[0,0,0,0]}},{key:"_dominantAlgorithm",value:function(e,t,r){for(var n={},o=0;o<t;o+=r){var c=e[o],a=e[o+1],i=e[o+2],l=e[o+3],s=Math.round(c/24)+","+Math.round(a/24)+","+Math.round(i/24);n[s]?n[s]=[n[s][0]+c*l,n[s][1]+a*l,n[s][2]+i*l,n[s][3]+l,n[s][4]+1]:n[s]=[c*l,a*l,i*l,l,1]}var u=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],_n=!0,n=!1,o=void 0;try{for(var c,a=e[Symbol.iterator]();!(_n=(c=a.next()).done)&&(r.push(c.value),!t||r.length!==t);_n=!0);}catch(e){n=!0,o=e}finally{try{_n||null==a.return||a.return()}finally{if(n)throw o}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(Object.keys(n).map((function(e){return n[e]})).sort((function(e,t){var r=e[4],n=t[4];return r>n?-1:r===n?0:1}))[0],5),b=u[0],m=u[1],d=u[2],p=u[3],g=u[4];return p?[Math.round(b/p),Math.round(m/p),Math.round(d/p),Math.round(p/g)]:[0,0,0,0]}},{key:"_bindImageEvents",value:function(e,t,r){var n=this,o=(r=r||{})&&r.data,c=this._getDefaultColor(r),a=function(){s(),t.call(e,n.getColor(e,r),o)},i=function(){s(),t.call(e,n._prepareResult(c,new Error("Image error")),o)},l=function(){s(),t.call(e,n._prepareResult(c,new Error("Image abort")),o)},s=function(){e.removeEventListener("load",a),e.removeEventListener("error",i),e.removeEventListener("abort",l)};e.addEventListener("load",a),e.addEventListener("error",i),e.addEventListener("abort",l)}},{key:"_prepareResult",value:function(e,t){var r=e.slice(0,3),n=[].concat(r,e[3]/255),o=this._isDark(e);return{error:t,value:e,rgb:"rgb("+r.join(",")+")",rgba:"rgba("+n.join(",")+")",hex:this._arrayToHex(r),hexa:this._arrayToHex(e),isDark:o,isLight:!o}}},{key:"_getOriginalSize",value:function(e){return e instanceof HTMLImageElement?{width:e.naturalWidth,height:e.naturalHeight}:e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.width,height:e.height}}},{key:"_toHex",value:function(e){var t=e.toString(16);return 1===t.length?"0"+t:t}},{key:"_arrayToHex",value:function(e){return"#"+e.map(this._toHex).join("")}},{key:"_isDark",value:function(e){return(299*e[0]+587*e[1]+114*e[2])/1e3<128}},{key:"_makeCanvas",value:function(){return"undefined"==typeof window?new OffscreenCanvas(1,1):document.createElement("canvas")}}])&&e(r.prototype,n),t}()}()},34:function(e,t){e.exports=window.wp.hooks},37:function(e,t){e.exports=window.wp.deprecated},377:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));t.a=c},378:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));t.a=c},379:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));t.a=c},382:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));t.a=c},383:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(o.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"}));t.a=c},384:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(o.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));t.a=c},385:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));t.a=c},39:function(e,t,r){"use strict";function n(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}r.d(t,"a",(function(){return n}))},4:function(e,t){e.exports=window.wp.data},40:function(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,"a",(function(){return n}))},41:function(e,t,r){"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,"a",(function(){return n}))},42:function(e,t){e.exports=window.wp.coreData},43:function(e,t,r){"use strict";function n(e){return(n="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)}r.d(t,"a",(function(){return n}))},46:function(e,t,r){"use strict";function n(e,t,r,n,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,c){var a=e.apply(t,r);function i(e){n(a,o,c,i,l,"next",e)}function l(e){n(a,o,c,i,l,"throw",e)}i(void 0)}))}}r.d(t,"a",(function(){return o}))},47:function(e,t){e.exports=window.wp.apiFetch},48:function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}r.d(t,"a",(function(){return n}))},5:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},508:function(e,t,r){"use strict";r.r(t),r.d(t,"__experimentalGetCoreBlocks",(function(){return sg})),r.d(t,"registerCoreBlocks",(function(){return ug})),r.d(t,"__experimentalRegisterExperimentalCoreBlocks",(function(){return bg}));var n={};r.r(n),r.d(n,"metadata",(function(){return We})),r.d(n,"name",(function(){return Ze})),r.d(n,"settings",(function(){return Je}));var o={};r.r(o),r.d(o,"metadata",(function(){return gr})),r.d(o,"name",(function(){return hr})),r.d(o,"settings",(function(){return Or}));var c={};r.r(c),r.d(c,"metadata",(function(){return Ir})),r.d(c,"name",(function(){return Rr})),r.d(c,"settings",(function(){return Hr}));var a={};r.r(a),r.d(a,"metadata",(function(){return Yr})),r.d(a,"name",(function(){return Xr})),r.d(a,"settings",(function(){return en}));var i={};r.r(i),r.d(i,"metadata",(function(){return Mn})),r.d(i,"name",(function(){return Vn})),r.d(i,"settings",(function(){return In}));var l={};r.r(l),r.d(l,"metadata",(function(){return Ln})),r.d(l,"name",(function(){return Dn})),r.d(l,"settings",(function(){return Fn}));var s={};r.r(s),r.d(s,"metadata",(function(){return Jn})),r.d(s,"name",(function(){return Qn})),r.d(s,"settings",(function(){return $n}));var u={};r.r(u),r.d(u,"metadata",(function(){return Po})),r.d(u,"name",(function(){return Bo})),r.d(u,"settings",(function(){return To}));var b={};r.r(b),r.d(b,"metadata",(function(){return Uo})),r.d(b,"name",(function(){return qo})),r.d(b,"settings",(function(){return Wo}));var m={};r.r(m),r.d(m,"metadata",(function(){return Xo})),r.d(m,"name",(function(){return ec})),r.d(m,"settings",(function(){return tc}));var d={};r.r(d),r.d(d,"metadata",(function(){return oc})),r.d(d,"name",(function(){return cc})),r.d(d,"settings",(function(){return ac}));var p={};r.r(p),r.d(p,"metadata",(function(){return bc})),r.d(p,"name",(function(){return mc})),r.d(p,"settings",(function(){return dc}));var g={};r.r(g),r.d(g,"metadata",(function(){return Vc})),r.d(g,"name",(function(){return Ic})),r.d(g,"settings",(function(){return Rc}));var h={};r.r(h),r.d(h,"metadata",(function(){return Fc})),r.d(h,"name",(function(){return Gc})),r.d(h,"settings",(function(){return Uc}));var O={};r.r(O),r.d(O,"metadata",(function(){return ya})),r.d(O,"name",(function(){return _a})),r.d(O,"settings",(function(){return wa}));var f={};r.r(f),r.d(f,"metadata",(function(){return Xa})),r.d(f,"name",(function(){return ei})),r.d(f,"settings",(function(){return ti}));var v={};r.r(v),r.d(v,"metadata",(function(){return ii})),r.d(v,"name",(function(){return li})),r.d(v,"settings",(function(){return si}));var j={};r.r(j),r.d(j,"metadata",(function(){return mi})),r.d(j,"name",(function(){return di})),r.d(j,"settings",(function(){return pi}));var y={};r.r(y),r.d(y,"metadata",(function(){return Mi})),r.d(y,"name",(function(){return Vi})),r.d(y,"settings",(function(){return Ii}));var _={};r.r(_),r.d(_,"metadata",(function(){return rl})),r.d(_,"name",(function(){return nl})),r.d(_,"settings",(function(){return ol}));var w={};r.r(w),r.d(w,"metadata",(function(){return jl})),r.d(w,"name",(function(){return yl})),r.d(w,"settings",(function(){return _l}));var k={};r.r(k),r.d(k,"metadata",(function(){return kl})),r.d(k,"name",(function(){return El})),r.d(k,"settings",(function(){return Cl}));var E={};r.r(E),r.d(E,"metadata",(function(){return Hl})),r.d(E,"name",(function(){return Al})),r.d(E,"settings",(function(){return Ll}));var C={};r.r(C),r.d(C,"metadata",(function(){return os})),r.d(C,"name",(function(){return cs})),r.d(C,"settings",(function(){return as}));var x={};r.r(x),r.d(x,"metadata",(function(){return ls})),r.d(x,"name",(function(){return ss})),r.d(x,"settings",(function(){return us}));var S={};r.r(S),r.d(S,"metadata",(function(){return ps})),r.d(S,"name",(function(){return gs})),r.d(S,"settings",(function(){return hs}));var P={};r.r(P),r.d(P,"metadata",(function(){return vs})),r.d(P,"name",(function(){return js})),r.d(P,"settings",(function(){return ys}));var B={};r.r(B),r.d(B,"metadata",(function(){return ks})),r.d(B,"name",(function(){return Es})),r.d(B,"settings",(function(){return Cs}));var T={};r.r(T),r.d(T,"metadata",(function(){return Ls})),r.d(T,"name",(function(){return Ds})),r.d(T,"settings",(function(){return Fs}));var z={};r.r(z),r.d(z,"metadata",(function(){return qs})),r.d(z,"name",(function(){return Ws})),r.d(z,"settings",(function(){return Zs}));var N={};r.r(N),r.d(N,"metadata",(function(){return Qs})),r.d(N,"name",(function(){return $s})),r.d(N,"settings",(function(){return Ks}));var M={};r.r(M),r.d(M,"metadata",(function(){return au})),r.d(M,"name",(function(){return iu})),r.d(M,"settings",(function(){return lu}));var V={};r.r(V),r.d(V,"metadata",(function(){return gu})),r.d(V,"name",(function(){return hu})),r.d(V,"settings",(function(){return Ou}));var I={};r.r(I),r.d(I,"metadata",(function(){return _u})),r.d(I,"name",(function(){return wu})),r.d(I,"settings",(function(){return ku}));var R={};r.r(R),r.d(R,"metadata",(function(){return Su})),r.d(R,"name",(function(){return Pu})),r.d(R,"settings",(function(){return Bu}));var H={};r.r(H),r.d(H,"metadata",(function(){return Nu})),r.d(H,"name",(function(){return Mu})),r.d(H,"settings",(function(){return Vu}));var A={};r.r(A),r.d(A,"metadata",(function(){return Au})),r.d(A,"name",(function(){return Lu})),r.d(A,"settings",(function(){return Du}));var L={};r.r(L),r.d(L,"metadata",(function(){return jb})),r.d(L,"name",(function(){return yb})),r.d(L,"settings",(function(){return _b}));var D={};r.r(D),r.d(D,"metadata",(function(){return kb})),r.d(D,"name",(function(){return Eb})),r.d(D,"settings",(function(){return Cb}));var F={};r.r(F),r.d(F,"metadata",(function(){return Bb})),r.d(F,"name",(function(){return Tb})),r.d(F,"settings",(function(){return zb}));var G={};r.r(G),r.d(G,"metadata",(function(){return $b})),r.d(G,"name",(function(){return Kb})),r.d(G,"settings",(function(){return Yb}));var U={};r.r(U),r.d(U,"metadata",(function(){return em})),r.d(U,"name",(function(){return tm})),r.d(U,"settings",(function(){return rm}));var q={};r.r(q),r.d(q,"metadata",(function(){return lm})),r.d(q,"name",(function(){return sm})),r.d(q,"settings",(function(){return um}));var W={};r.r(W),r.d(W,"metadata",(function(){return gm})),r.d(W,"name",(function(){return hm})),r.d(W,"settings",(function(){return Om}));var Z={};r.r(Z),r.d(Z,"metadata",(function(){return _m})),r.d(Z,"name",(function(){return wm})),r.d(Z,"settings",(function(){return km}));var J={};r.r(J),r.d(J,"metadata",(function(){return Bm})),r.d(J,"name",(function(){return Tm})),r.d(J,"settings",(function(){return zm}));var Q={};r.r(Q),r.d(Q,"metadata",(function(){return Mm})),r.d(Q,"name",(function(){return Vm})),r.d(Q,"settings",(function(){return Im}));var $={};r.r($),r.d($,"metadata",(function(){return Am})),r.d($,"name",(function(){return Lm})),r.d($,"settings",(function(){return Dm}));var K={};r.r(K),r.d(K,"metadata",(function(){return rd})),r.d(K,"name",(function(){return nd})),r.d(K,"settings",(function(){return od}));var Y={};r.r(Y),r.d(Y,"metadata",(function(){return Sd})),r.d(Y,"name",(function(){return Pd})),r.d(Y,"settings",(function(){return Bd})),r.d(Y,"useQueryContext",(function(){return md}));var X={};r.r(X),r.d(X,"metadata",(function(){return zd})),r.d(X,"name",(function(){return Nd})),r.d(X,"settings",(function(){return Md}));var ee={};r.r(ee),r.d(ee,"metadata",(function(){return Rd})),r.d(ee,"name",(function(){return Hd})),r.d(ee,"settings",(function(){return Ad}));var te={};r.r(te),r.d(te,"metadata",(function(){return Dd})),r.d(te,"name",(function(){return Fd})),r.d(te,"settings",(function(){return Gd}));var re={};r.r(re),r.d(re,"metadata",(function(){return Wd})),r.d(re,"name",(function(){return Zd})),r.d(re,"settings",(function(){return Jd}));var ne={};r.r(ne),r.d(ne,"metadata",(function(){return $d})),r.d(ne,"name",(function(){return Kd})),r.d(ne,"settings",(function(){return Yd}));var oe={};r.r(oe),r.d(oe,"metadata",(function(){return Xd})),r.d(oe,"name",(function(){return ep})),r.d(oe,"settings",(function(){return tp}));var ce={};r.r(ce),r.d(ce,"metadata",(function(){return op})),r.d(ce,"name",(function(){return cp})),r.d(ce,"settings",(function(){return ap}));var ae={};r.r(ae),r.d(ae,"metadata",(function(){return lp})),r.d(ae,"name",(function(){return sp})),r.d(ae,"settings",(function(){return up}));var ie={};r.r(ie),r.d(ie,"metadata",(function(){return mp})),r.d(ie,"name",(function(){return dp})),r.d(ie,"settings",(function(){return pp}));var le={};r.r(le),r.d(le,"metadata",(function(){return hp})),r.d(le,"name",(function(){return Op})),r.d(le,"settings",(function(){return fp}));var se={};r.r(se),r.d(se,"metadata",(function(){return vp})),r.d(se,"name",(function(){return jp})),r.d(se,"settings",(function(){return yp}));var ue={};r.r(ue),r.d(ue,"metadata",(function(){return kp})),r.d(ue,"name",(function(){return Ep})),r.d(ue,"settings",(function(){return Cp}));var be={};r.r(be),r.d(be,"metadata",(function(){return Pp})),r.d(be,"name",(function(){return Bp})),r.d(be,"settings",(function(){return Tp}));var me={};r.r(me),r.d(me,"metadata",(function(){return Np})),r.d(me,"name",(function(){return Mp})),r.d(me,"settings",(function(){return Vp}));var de={};r.r(de),r.d(de,"metadata",(function(){return Rp})),r.d(de,"name",(function(){return Hp})),r.d(de,"settings",(function(){return Ap}));var pe={};r.r(pe),r.d(pe,"metadata",(function(){return Lp})),r.d(pe,"name",(function(){return Dp})),r.d(pe,"settings",(function(){return Fp}));var ge={};r.r(ge),r.d(ge,"metadata",(function(){return qp})),r.d(ge,"name",(function(){return Wp})),r.d(ge,"settings",(function(){return Zp}));var he={};r.r(he),r.d(he,"metadata",(function(){return Yp})),r.d(he,"name",(function(){return Xp})),r.d(he,"settings",(function(){return eg}));var Oe={};r.r(Oe),r.d(Oe,"metadata",(function(){return rg})),r.d(Oe,"name",(function(){return ng})),r.d(Oe,"settings",(function(){return og}));var fe={};r.r(fe),r.d(fe,"metadata",(function(){return cg})),r.d(fe,"name",(function(){return ag})),r.d(fe,"settings",(function(){return ig}));var ve=r(15),je=r(5),ye=r(42),_e=r(6),we=r(11),ke=r(2),Ee=r(1),Ce=r(0),xe=r(7),Se=Object(Ce.createElement)(xe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Ce.createElement)(xe.Path,{d:"M18.3 4H9.9v-.1l-.9.2c-2.3.4-4 2.4-4 4.8s1.7 4.4 4 4.8l.7.1V20h1.5V5.5h2.9V20h1.5V5.5h2.7V4z"})),Pe=r(12),Be=r.n(Pe);function Te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ze(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ne={className:!1},Me={align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:""},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},fontSize:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]},style:{type:"object"}},Ve=function(e){if(!e.customTextColor&&!e.customBackgroundColor&&!e.customFontSize)return e;var t={};return(e.customTextColor||e.customBackgroundColor)&&(t.color={}),e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customFontSize&&(t.typography={fontSize:e.customFontSize}),ze(ze({},Object(ke.omit)(e,["customTextColor","customBackgroundColor","customFontSize"])),{},{style:t})},Ie=[{supports:Ne,attributes:ze(ze({},Object(ke.omit)(Me,["style"])),{},{customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}}),migrate:Ve,save:function(e){var t,r=e.attributes,n=r.align,o=r.content,c=r.dropCap,a=r.backgroundColor,i=r.textColor,l=r.customBackgroundColor,s=r.customTextColor,u=r.fontSize,b=r.customFontSize,m=r.direction,d=Object(_e.getColorClassName)("color",i),p=Object(_e.getColorClassName)("background-color",a),g=Object(_e.getFontSizeClass)(u),h=Be()((t={"has-text-color":i||s,"has-background":a||l,"has-drop-cap":c},Object(je.a)(t,"has-text-align-".concat(n),n),Object(je.a)(t,g,g),Object(je.a)(t,d,d),Object(je.a)(t,p,p),t)),O={backgroundColor:p?void 0:l,color:d?void 0:s,fontSize:g?void 0:b};return Object(Ce.createElement)(_e.RichText.Content,{tagName:"p",style:O,className:h||void 0,value:o,dir:m})}},{supports:Ne,attributes:ze(ze({},Object(ke.omit)(Me,["style"])),{},{customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}}),migrate:Ve,save:function(e){var t,r=e.attributes,n=r.align,o=r.content,c=r.dropCap,a=r.backgroundColor,i=r.textColor,l=r.customBackgroundColor,s=r.customTextColor,u=r.fontSize,b=r.customFontSize,m=r.direction,d=Object(_e.getColorClassName)("color",i),p=Object(_e.getColorClassName)("background-color",a),g=Object(_e.getFontSizeClass)(u),h=Be()((t={"has-text-color":i||s,"has-background":a||l,"has-drop-cap":c},Object(je.a)(t,g,g),Object(je.a)(t,d,d),Object(je.a)(t,p,p),t)),O={backgroundColor:p?void 0:l,color:d?void 0:s,fontSize:g?void 0:b,textAlign:n};return Object(Ce.createElement)(_e.RichText.Content,{tagName:"p",style:O,className:h||void 0,value:o,dir:m})}},{supports:Ne,attributes:ze(ze({},Object(ke.omit)(Me,["style"])),{},{customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"},width:{type:"string"}}),migrate:Ve,save:function(e){var t,r=e.attributes,n=r.width,o=r.align,c=r.content,a=r.dropCap,i=r.backgroundColor,l=r.textColor,s=r.customBackgroundColor,u=r.customTextColor,b=r.fontSize,m=r.customFontSize,d=Object(_e.getColorClassName)("color",l),p=Object(_e.getColorClassName)("background-color",i),g=b&&"is-".concat(b,"-text"),h=Be()((t={},Object(je.a)(t,"align".concat(n),n),Object(je.a)(t,"has-background",i||s),Object(je.a)(t,"has-drop-cap",a),Object(je.a)(t,g,g),Object(je.a)(t,d,d),Object(je.a)(t,p,p),t)),O={backgroundColor:p?void 0:s,color:d?void 0:u,fontSize:g?void 0:m,textAlign:o};return Object(Ce.createElement)(_e.RichText.Content,{tagName:"p",style:O,className:h||void 0,value:c})}},{supports:Ne,attributes:Object(ke.omit)(ze(ze({},Me),{},{fontSize:{type:"number"}}),["style"]),save:function(e){var t,r=e.attributes,n=r.width,o=r.align,c=r.content,a=r.dropCap,i=r.backgroundColor,l=r.textColor,s=r.fontSize,u=Be()((t={},Object(je.a)(t,"align".concat(n),n),Object(je.a)(t,"has-background",i),Object(je.a)(t,"has-drop-cap",a),t)),b={backgroundColor:i,color:l,fontSize:s,textAlign:o};return Object(Ce.createElement)("p",{style:b,className:u||void 0},c)},migrate:function(e){return Ve(Object(ke.omit)(ze(ze({},e),{},{customFontSize:Object(ke.isFinite)(e.fontSize)?e.fontSize:void 0,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.backgroundColor&&"#"===e.backgroundColor[0]?e.backgroundColor:void 0})))}},{supports:Ne,attributes:ze(ze({},Me),{},{content:{type:"string",source:"html",default:""}}),save:function(e){var t=e.attributes;return Object(Ce.createElement)(Ce.RawHTML,null,t.content)},migrate:function(e){return e}}],Re=r(10),He=r(9),Ae=r(3),Le=r(4),De=Object(Ce.createElement)(xe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(Ce.createElement)(xe.Path,{d:"M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z"}));function Fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ge(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ue(e){var t=e.direction,r=e.setDirection;return Object(Ee.isRTL)()&&Object(Ce.createElement)(Ae.ToolbarGroup,{controls:[{icon:De,title:Object(Ee._x)("Left to right","editor button"),isActive:"ltr"===t,onClick:function(){r("ltr"===t?void 0:"ltr")}}]})}var qe={from:[{type:"raw",priority:20,selector:"p",schema:function(e){return{p:{children:e.phrasingContentSchema,attributes:e.isPaste?[]:["style","id"]}}},transform:function(e){var t=Object(we.getBlockAttributes)("core/paragraph",e.outerHTML),r=(e.style||{}).textAlign;return"left"!==r&&"center"!==r&&"right"!==r||(t.align=r),Object(we.createBlock)("core/paragraph",t)}}]},We={apiVersion:2,name:"core/paragraph",category:"text",attributes:{align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:""},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{anchor:!0,className:!1,color:{link:!0},fontSize:!0,lineHeight:!0,__experimentalSelector:"p",__unstablePasteTextInline:!0},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"},Ze=We.name,Je={title:Object(Ee._x)("Paragraph","block title"),description:Object(Ee.__)("Start with the building block of all narrative."),icon:Se,keywords:[Object(Ee.__)("text")],example:{attributes:{content:Object(Ee.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."),style:{typography:{fontSize:28}},dropCap:!0}},__experimentalLabel:function(e,t){if("accessibility"===t.context){var r=e.content;return Object(ke.isEmpty)(r)?Object(Ee.__)("Empty"):r}},transforms:qe,deprecated:Ie,merge:function(e,t){return{content:(e.content||"")+(t.content||"")}},edit:function(e){var t=e.attributes,r=e.mergeBlocks,n=e.onReplace,o=e.onRemove,c=e.setAttributes,a=t.align,i=t.content,l=t.direction,s=t.dropCap,u=t.placeholder,b=t.fontSize,m=t.style,d=Object(_e.__experimentalUseEditorFeature)("typography.dropCap"),p=Object(Ce.useRef)(),g=null==m?void 0:m.fontSize,h=Object(Le.useSelect)((function(e){var t=e("core/block-editor").getSettings().fontSizes;return Object(_e.getFontSize)(t,b,g).size}),[b,g]),O=function(e,t,r){var n=Object(Ce.useState)(),o=Object(He.a)(n,2),c=o[0],a=o[1];return Object(Ce.useEffect)((function(){var r;t?a():a((r=e.current,"first-letter",r.ownerDocument.defaultView.getComputedStyle(r,"first-letter")).lineHeight)}),[t].concat(Object(ve.a)(r))),c}(p,!(d&&s),[h]),f=Object(_e.useBlockProps)({ref:p,className:Be()(Object(je.a)({"has-drop-cap":s},"has-text-align-".concat(a),a)),style:{direction:l,minHeight:O}});return Object(Ce.createElement)(Ce.Fragment,null,Object(Ce.createElement)(_e.BlockControls,null,Object(Ce.createElement)(_e.AlignmentToolbar,{value:a,onChange:function(e){return c({align:e})}}),Object(Ce.createElement)(Ue,{direction:l,setDirection:function(e){return c({direction:e})}})),d&&Object(Ce.createElement)(_e.InspectorControls,null,Object(Ce.createElement)(Ae.PanelBody,{title:Object(Ee.__)("Text settings")},Object(Ce.createElement)(Ae.ToggleControl,{label:Object(Ee.__)("Drop cap"),checked:!!s,onChange:function(){return c({dropCap:!s})},help:s?Object(Ee.__)("Showing large initial letter."):Object(Ee.__)("Toggle to show a large initial letter.")}))),Object(Ce.createElement)(_e.RichText,Object(Re.a)({identifier:"content",tagName:"p"},f,{value:i,onChange:function(e){return c({content:e})},onSplit:function(e){return e?Object(we.createBlock)("core/paragraph",Ge(Ge({},t),{},{content:e})):Object(we.createBlock)("core/paragraph")},onMerge:r,onReplace:n,onRemove:o,"aria-label":i?Object(Ee.__)("Paragraph block"):Object(Ee.__)("Empty block; start writing or type forward slash to choose a block"),placeholder:u||Object(Ee.__)("Start writing or type / to choose a block"),__unstableEmbedURLOnPaste:!0,__unstableAllowPrefixTransformations:!0})))},save:function(e){var t=e.attributes,r=t.align,n=t.content,o=t.dropCap,c=t.direction,a=Be()(Object(je.a)({"has-drop-cap":o},"has-text-align-".concat(r),r));return Object(Ce.createElement)("p",_e.useBlockProps.save({className:a,dir:c}),Object(Ce.createElement)(_e.RichText.Content,{value:n}))}},Qe=Object(Ce.createElement)(xe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Ce.createElement)(xe.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),$e={align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},Ke=[{attributes:$e,save:function(e){var t,r=e.attributes,n=r.url,o=r.alt,c=r.caption,a=r.align,i=r.href,l=r.width,s=r.height,u=r.id,b=Be()((t={},Object(je.a)(t,"align".concat(a),a),Object(je.a)(t,"is-resized",l||s),t)),m=Object(Ce.createElement)("img",{src:n,alt:o,className:u?"wp-image-".concat(u):null,width:l,height:s});return Object(Ce.createElement)("figure",{className:b},i?Object(Ce.createElement)("a",{href:i},m):m,!_e.RichText.isEmpty(c)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",value:c}))}},{attributes:$e,save:function(e){var t=e.attributes,r=t.url,n=t.alt,o=t.caption,c=t.align,a=t.href,i=t.width,l=t.height,s=t.id,u=Object(Ce.createElement)("img",{src:r,alt:n,className:s?"wp-image-".concat(s):null,width:i,height:l});return Object(Ce.createElement)("figure",{className:c?"align".concat(c):null},a?Object(Ce.createElement)("a",{href:a},u):u,!_e.RichText.isEmpty(o)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",value:o}))}},{attributes:$e,save:function(e){var t=e.attributes,r=t.url,n=t.alt,o=t.caption,c=t.align,a=t.href,i=t.width,l=t.height,s=i||l?{width:i,height:l}:{},u=Object(Ce.createElement)("img",Object(Re.a)({src:r,alt:n},s)),b={};return i?b={width:i}:"left"!==c&&"right"!==c||(b={maxWidth:"50%"}),Object(Ce.createElement)("figure",{className:c?"align".concat(c):null,style:b},a?Object(Ce.createElement)("a",{href:a},u):u,!_e.RichText.isEmpty(o)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",value:o}))}}],Ye=r(52),Xe=r(14),et=r(29),tt=Object(Ce.createElement)(xe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Ce.createElement)(xe.Path,{d:"M17.5 7v8H19V7c0-1.1-.9-2-2-2H9v1.5h8c.3 0 .5.2.5.5zM7 17.5c-.3 0-.5-.2-.5-.5V1H5v4H1v1.5h4V17c0 1.1.9 2 2 2h10.5v4H19v-4h4v-1.5H7z"})),rt=r(265),nt=r(266),ot=r(51),ct=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.78",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],at=r(129),it=r.n(at),lt=r(72),st=r.n(lt);function ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function bt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var mt=function(e){var t;return null===(t=Object(we.getBlockVariations)("core/embed"))||void 0===t?void 0:t.find((function(t){var r=t.patterns;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.some((function(t){return e.match(t)}))}(e,r)}))},dt=function(e){return e&&e.includes('class="wp-embedded-content"')},pt=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.preview,o=e.attributes,c=(o=void 0===o?{}:o).url,a=o.providerNameSlug,i=o.type;if(c&&Object(we.getBlockType)("core/embed")){var l=mt(c),s="wordpress"===a||"wp-embed"===i,u=!s&&l&&(l.attributes.providerNameSlug!==a||!a);if(u)return Object(we.createBlock)("core/embed",bt({url:c},l.attributes));var b=null===(t=Object(we.getBlockVariations)("core/embed"))||void 0===t?void 0:t.find((function(e){return"wordpress"===e.name}));if(b&&n&&dt(n.html)&&!s)return Object(we.createBlock)("core/embed",bt(bt({url:c},b.attributes),r))}},gt=function(e){var t=ct.reduce((function(e,t){return e[t.className]=!1,e}),{"wp-has-aspect-ratio":!1});return it()(e,t)};function ht(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!r)return gt(t);var n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;var o=n.body.querySelector("iframe");if(o&&o.height&&o.width)for(var c=(o.width/o.height).toFixed(2),a=0;a<ct.length;a++){var i=ct[a];if(c>=i.ratio)return it()(gt(t),i.className,"wp-has-aspect-ratio")}return t}var Ot=st()((function(e,t,r,n){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(!e)return{};var c={},a=e.type,i=void 0===a?"rich":a,l=e.html,s=e.provider_name,u=Object(ke.kebabCase)((s||t).toLowerCase());return dt(l)&&(i="wp-embed"),(l||"photo"===i)&&(c.type=i,c.providerNameSlug=u),c.className=ht(l,r,n&&o),c}));function ft(e,t){var r=Object(Ce.useState)(),n=Object(He.a)(r,2),o=n[0],c=n[1];function a(){c(e.current.clientWidth)}return Object(Ce.useEffect)(a,t),Object(Ce.useEffect)((function(){var t=e.current.ownerDocument.defaultView;return t.addEventListener("resize",a),function(){t.removeEventListener("resize",a)}}),[]),o}var vt=function(e,t){return(vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},jt=function(){return(jt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},yt=r(8),_t=r.n(yt);function wt(e,t,r,n){void 0===n&&(n=0);var o=Mt(e,t,n),c=o.width,a=o.height;return e>=t*r&&c>t*r?{width:t*r,height:t}:c>t*r?{width:e,height:e/r}:c>a*r?{width:a*r,height:a}:{width:c,height:c/r}}function kt(e,t,r,n,o){void 0===o&&(o=0);var c=Mt(t.width,t.height,o),a=c.width,i=c.height;return{x:Et(e.x,a,r.width,n),y:Et(e.y,i,r.height,n)}}function Et(e,t,r,n){var o=t*n/2-r/2;return Math.min(o,Math.max(e,-o))}function Ct(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function xt(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function St(e,t,r,n,o,c,a){void 0===c&&(c=0),void 0===a&&(a=!0);var i=a&&0===c?Pt:Bt,l={x:i(100,((t.width-r.width/o)/2-e.x/o)/t.width*100),y:i(100,((t.height-r.height/o)/2-e.y/o)/t.height*100),width:i(100,r.width/t.width*100/o),height:i(100,r.height/t.height*100/o)},s=Math.round(i(t.naturalWidth,l.width*t.naturalWidth/100)),u=Math.round(i(t.naturalHeight,l.height*t.naturalHeight/100)),b=t.naturalWidth>=t.naturalHeight*n?{width:Math.round(u*n),height:u}:{width:s,height:Math.round(s/n)};return{croppedAreaPercentages:l,croppedAreaPixels:jt(jt({},b),{x:Math.round(i(t.naturalWidth-b.width,l.x*t.naturalWidth/100)),y:Math.round(i(t.naturalHeight-b.height,l.y*t.naturalHeight/100))})}}function Pt(e,t){return Math.min(e,Math.max(0,t))}function Bt(e,t){return t}function Tt(e,t,r){var n=t.width/t.naturalWidth,o=function(e,t,r){var n=t.width/t.naturalWidth;if(r)return r.height>r.width?r.height/n/e.height:r.width/n/e.width;var o=e.width/e.height;return t.naturalWidth>=t.naturalHeight*o?t.naturalHeight/e.height:t.naturalWidth/e.width}(e,t,r),c=n*o;return{crop:{x:((t.naturalWidth-e.width)/2-e.x)*c,y:((t.naturalHeight-e.height)/2-e.y)*c},zoom:o}}function zt(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function Nt(e,t,r,n,o){var c=Math.cos,a=Math.sin,i=o*Math.PI/180;return[(e-r)*c(i)-(t-n)*a(i)+r,(e-r)*a(i)+(t-n)*c(i)+n]}function Mt(e,t,r){var n=e/2,o=t/2,c=[Nt(0,0,n,o,r),Nt(e,0,n,o,r),Nt(e,t,n,o,r),Nt(0,t,n,o,r)],a=Math.min.apply(Math,c.map((function(e){return e[0]}))),i=Math.max.apply(Math,c.map((function(e){return e[0]}))),l=Math.min.apply(Math,c.map((function(e){return e[1]})));return{width:i-a,height:Math.max.apply(Math,c.map((function(e){return e[1]})))-l}}function Vt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var It=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.imageRef=null,r.videoRef=null,r.containerRef=null,r.styleRef=null,r.containerRect=null,r.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},r.dragStartPosition={x:0,y:0},r.dragStartCrop={x:0,y:0},r.lastPinchDistance=0,r.lastPinchRotation=0,r.rafDragTimeout=null,r.rafPinchTimeout=null,r.wheelTimer=null,r.state={cropSize:null,hasWheelJustStarted:!1},r.preventZoomSafari=function(e){return e.preventDefault()},r.cleanEvents=function(){document.removeEventListener("mousemove",r.onMouseMove),document.removeEventListener("mouseup",r.onDragStopped),document.removeEventListener("touchmove",r.onTouchMove),document.removeEventListener("touchend",r.onDragStopped)},r.clearScrollEvent=function(){r.containerRef&&r.containerRef.removeEventListener("wheel",r.onWheel),r.wheelTimer&&clearTimeout(r.wheelTimer)},r.onMediaLoad=function(){r.computeSizes(),r.emitCropData(),r.setInitialCrop(),r.props.onMediaLoaded&&r.props.onMediaLoaded(r.mediaSize)},r.setInitialCrop=function(){var e=r.props,t=e.initialCroppedAreaPixels,n=e.cropSize;if(t){var o=Tt(t,r.mediaSize,n),c=o.crop,a=o.zoom;r.props.onCropChange(c),r.props.onZoomChange&&r.props.onZoomChange(a)}},r.computeSizes=function(){var e,t,n,o,c=r.imageRef||r.videoRef;if(c){r.mediaSize={width:c.offsetWidth,height:c.offsetHeight,naturalWidth:(null===(e=r.imageRef)||void 0===e?void 0:e.naturalWidth)||(null===(t=r.videoRef)||void 0===t?void 0:t.videoWidth)||0,naturalHeight:(null===(n=r.imageRef)||void 0===n?void 0:n.naturalHeight)||(null===(o=r.videoRef)||void 0===o?void 0:o.videoHeight)||0};var a=r.props.cropSize?r.props.cropSize:wt(c.offsetWidth,c.offsetHeight,r.props.aspect,r.props.rotation);r.setState({cropSize:a},r.recomputeCropPosition)}r.containerRef&&(r.containerRect=r.containerRef.getBoundingClientRect())},r.onMouseDown=function(e){e.preventDefault(),document.addEventListener("mousemove",r.onMouseMove),document.addEventListener("mouseup",r.onDragStopped),r.onDragStart(t.getMousePoint(e))},r.onMouseMove=function(e){return r.onDrag(t.getMousePoint(e))},r.onTouchStart=function(e){e.preventDefault(),document.addEventListener("touchmove",r.onTouchMove,{passive:!1}),document.addEventListener("touchend",r.onDragStopped),2===e.touches.length?r.onPinchStart(e):1===e.touches.length&&r.onDragStart(t.getTouchPoint(e.touches[0]))},r.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?r.onPinchMove(e):1===e.touches.length&&r.onDrag(t.getTouchPoint(e.touches[0]))},r.onDragStart=function(e){var t,n,o=e.x,c=e.y;r.dragStartPosition={x:o,y:c},r.dragStartCrop=jt({},r.props.crop),null===(n=(t=r.props).onInteractionStart)||void 0===n||n.call(t)},r.onDrag=function(e){var t=e.x,n=e.y;r.rafDragTimeout&&window.cancelAnimationFrame(r.rafDragTimeout),r.rafDragTimeout=window.requestAnimationFrame((function(){if(r.state.cropSize&&void 0!==t&&void 0!==n){var e=t-r.dragStartPosition.x,o=n-r.dragStartPosition.y,c={x:r.dragStartCrop.x+e,y:r.dragStartCrop.y+o},a=r.props.restrictPosition?kt(c,r.mediaSize,r.state.cropSize,r.props.zoom,r.props.rotation):c;r.props.onCropChange(a)}}))},r.onDragStopped=function(){var e,t;r.cleanEvents(),r.emitCropData(),null===(t=(e=r.props).onInteractionEnd)||void 0===t||t.call(e)},r.onWheel=function(e){e.preventDefault();var n=t.getMousePoint(e),o=r.props.zoom-e.deltaY*r.props.zoomSpeed/200;r.setNewZoom(o,n),r.state.hasWheelJustStarted||r.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=r.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),r.wheelTimer&&clearTimeout(r.wheelTimer),r.wheelTimer=window.setTimeout((function(){return r.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=r.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)},r.getPointOnContainer=function(e){var t=e.x,n=e.y;if(!r.containerRect)throw new Error("The Cropper is not mounted");return{x:r.containerRect.width/2-(t-r.containerRect.left),y:r.containerRect.height/2-(n-r.containerRect.top)}},r.getPointOnMedia=function(e){var t=e.x,n=e.y,o=r.props,c=o.crop,a=o.zoom;return{x:(t+c.x)/a,y:(n+c.y)/a}},r.setNewZoom=function(e,t){if(r.state.cropSize&&r.props.onZoomChange){var n=r.getPointOnContainer(t),o=r.getPointOnMedia(n),c=Math.min(r.props.maxZoom,Math.max(e,r.props.minZoom)),a={x:o.x*c-n.x,y:o.y*c-n.y},i=r.props.restrictPosition?kt(a,r.mediaSize,r.state.cropSize,c,r.props.rotation):a;r.props.onCropChange(i),r.props.onZoomChange(c)}},r.emitCropData=function(){if(r.state.cropSize){var e=St(r.props.restrictPosition?kt(r.props.crop,r.mediaSize,r.state.cropSize,r.props.zoom,r.props.rotation):r.props.crop,r.mediaSize,r.state.cropSize,r.getAspect(),r.props.zoom,r.props.rotation,r.props.restrictPosition),t=e.croppedAreaPercentages,n=e.croppedAreaPixels;r.props.onCropComplete&&r.props.onCropComplete(t,n)}},r.recomputeCropPosition=function(){if(r.state.cropSize){var e=r.props.restrictPosition?kt(r.props.crop,r.mediaSize,r.state.cropSize,r.props.zoom,r.props.rotation):r.props.crop;r.props.onCropChange(e),r.emitCropData()}},r}return function(e,t){function __(){this.constructor=e}vt(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.computeSizes),this.containerRef&&(this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.preventZoomSafari),this.containerRef.addEventListener("gesturechange",this.preventZoomSafari)),this.props.disableAutomaticStylesInjection||(this.styleRef=document.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",document.head.appendChild(this.styleRef)),this.imageRef&&this.imageRef.complete&&this.onMediaLoad()},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.computeSizes),this.containerRef&&(this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.containerRef.removeEventListener("gesturechange",this.preventZoomSafari)),this.styleRef&&this.styleRef.remove(),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():e.cropSize!==this.props.cropSize&&this.computeSizes(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,r=e.aspect;return t?t.width/t.height:r},t.prototype.onPinchStart=function(e){var r=t.getTouchPoint(e.touches[0]),n=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=Ct(r,n),this.lastPinchRotation=xt(r,n),this.onDragStart(zt(r,n))},t.prototype.onPinchMove=function(e){var r=this,n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),c=zt(n,o);this.onDrag(c),this.rafPinchTimeout&&window.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=window.requestAnimationFrame((function(){var e=Ct(n,o),t=r.props.zoom*(e/r.lastPinchDistance);r.setNewZoom(t,c),r.lastPinchDistance=e;var a=xt(n,o),i=r.props.rotation+(a-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(i),r.lastPinchRotation=a}))},t.prototype.render=function(){var e=this,t=this.props,r=t.image,n=t.video,o=t.mediaProps,c=t.crop,a=c.x,i=c.y,l=t.rotation,s=t.zoom,u=t.cropShape,b=t.showGrid,m=t.style,d=m.containerStyle,p=m.cropAreaStyle,g=m.mediaStyle,h=t.classes,O=h.containerClassName,f=h.cropAreaClassName,v=h.mediaClassName;return _t.a.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:d,className:Vt("reactEasyCrop_Container",O)},r?_t.a.createElement("img",jt({alt:"",className:Vt("reactEasyCrop_Image",v)},o,{src:r,ref:function(t){return e.imageRef=t},style:jt(jt({},g),{transform:"translate("+a+"px, "+i+"px) rotate("+l+"deg) scale("+s+")"}),onLoad:this.onMediaLoad})):n&&_t.a.createElement("video",jt({autoPlay:!0,loop:!0,muted:!0,className:Vt("reactEasyCrop_Video",v)},o,{src:n,ref:function(t){return e.videoRef=t},onLoadedMetadata:this.onMediaLoad,style:jt(jt({},g),{transform:"translate("+a+"px, "+i+"px) rotate("+l+"deg) scale("+s+")"}),controls:!1})),this.state.cropSize&&_t.a.createElement("div",{style:jt(jt({},p),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Vt("reactEasyCrop_CropArea","round"===u&&"reactEasyCrop_CropAreaRound",b&&"reactEasyCrop_CropAreaGrid",f)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(_t.a.Component),Rt={position:"bottom right",isAlternate:!0},Ht=r(47),At=r.n(Ht),Lt=r(34);function Dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Dt(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Gt=Object(Ce.createContext)({}),Ut=function(){return Object(Ce.useContext)(Gt)};function qt(e){var t=e.id,r=e.url,n=e.naturalWidth,o=e.naturalHeight,c=e.isEditing,a=e.onFinishEditing,i=e.onSaveImage,l=e.children,s=function(e,t){var r=function(e){var t=e.url,r=e.naturalWidth,n=e.naturalHeight,o=Object(Ce.useState)(),c=Object(He.a)(o,2),a=c[0],i=c[1],l=Object(Ce.useState)(),s=Object(He.a)(l,2),u=s[0],b=s[1],m=Object(Ce.useState)({x:0,y:0}),d=Object(He.a)(m,2),p=d[0],g=d[1],h=Object(Ce.useState)(),O=Object(He.a)(h,2),f=O[0],v=O[1],j=Object(Ce.useState)(),y=Object(He.a)(j,2),_=y[0],w=y[1],k=Object(Ce.useState)(),E=Object(He.a)(k,2),C=E[0],x=E[1],S=Object(Ce.useState)(),P=Object(He.a)(S,2),B=P[0],T=P[1],z=Object(Ce.useCallback)((function(){g({x:0,y:0}),v(100),w(0),x(r/n),T(r/n)}),[r,n,g,v,w,x,T]),N=Object(Ce.useCallback)((function(){var e=(_+90)%360,o=r/n;if(_%180==90&&(o=n/r),0===e)return i(),w(e),x(1/C),void g({x:-p.y*o,y:p.x*o});var c=new window.Image;c.src=t,c.onload=function(t){var r=document.createElement("canvas"),n=0,c=0;e%180?(r.width=t.target.height,r.height=t.target.width):(r.width=t.target.width,r.height=t.target.height),90!==e&&180!==e||(n=r.width),270!==e&&180!==e||(c=r.height);var a=r.getContext("2d");a.translate(n,c),a.rotate(e*Math.PI/180),a.drawImage(t.target,0,0),r.toBlob((function(t){i(URL.createObjectURL(t)),w(e),x(1/C),g({x:-p.y*o,y:p.x*o})}))};var a=Object(Lt.applyFilters)("media.crossOrigin",void 0,t);"string"==typeof a&&(c.crossOrigin=a)}),[_,r,n,i,w,x,g]);return Object(Ce.useMemo)((function(){return{editedUrl:a,setEditedUrl:i,crop:u,setCrop:b,position:p,setPosition:g,zoom:f,setZoom:v,rotation:_,setRotation:w,rotateClockwise:N,aspect:C,setAspect:x,defaultAspect:B,initializeTransformValues:z}}),[a,i,u,b,p,g,f,v,_,w,N,C,x,B,z])}(e),n=r.initializeTransformValues;return Object(Ce.useEffect)((function(){t&&n()}),[t,n]),r}({url:r,naturalWidth:n,naturalHeight:o},c),u=function(e){var t=e.crop,r=e.rotation,n=e.height,o=e.width,c=e.aspect,a=e.url,i=e.id,l=e.onSaveImage,s=e.onFinishEditing,u=Object(Le.useDispatch)(ot.store).createErrorNotice,b=Object(Ce.useState)(!1),m=Object(He.a)(b,2),d=m[0],p=m[1],g=Object(Ce.useCallback)((function(){p(!1),s()}),[p,s]),h=Object(Ce.useCallback)((function(){p(!0);var e={};(t.width<99.9||t.height<99.9)&&(e=t),r>0&&(e.rotation=r),e.src=a,At()({path:"/wp/v2/media/".concat(i,"/edit"),method:"POST",data:e}).then((function(e){l({id:e.id,url:e.source_url,height:n&&o?o/c:void 0})})).catch((function(e){u(Object(Ee.sprintf)(
|
2 |
/* translators: 1. Error message */
|
3 |
-
Object(Ee.__)("Could not edit image. %s"),e.message),{id:"image-editing-error",type:"snackbar"})})).finally((function(){p(!1),s()}))}),[p,t,r,n,o,c,a,l,u,p,s]);return Object(Ce.useMemo)((function(){return{isInProgress:d,apply:h,cancel:g}}),[d,h,g])}(Ft({id:t,url:r,onSaveImage:i,onFinishEditing:a},s)),b=Object(Ce.useMemo)((function(){return Ft(Ft({},s),u)}),[s,u]);return Object(Ce.createElement)(Gt.Provider,{value:b},l)}function Wt(e){var t=e.url,r=e.width,n=e.height,o=e.clientWidth,c=e.naturalHeight,a=e.naturalWidth,i=Ut(),l=i.isInProgress,s=i.editedUrl,u=i.position,b=i.zoom,m=i.aspect,d=i.setPosition,p=i.setCrop,g=i.setZoom,h=n||o*c/a;return i.rotation%180==90&&(h=o*a/c),Object(Ce.createElement)("div",{className:Be()("wp-block-image__crop-area",{"is-applying":l}),style:{width:r||o,height:h}},Object(Ce.createElement)(It,{image:s||t,disabled:l,minZoom:1,maxZoom:3,crop:u,zoom:b/100,aspect:m,onCropChange:d,onCropComplete:function(e){p(e)},onZoomChange:function(e){g(100*e)}}),l&&Object(Ce.createElement)(Ae.Spinner,null))}var Zt=r(
|
4 |
/* translators: %s: file name */
|
5 |
Object(Ee.__)("This image has an empty alt attribute; its file name is %s"),Oe):Object(Ee.__)("This image has an empty alt attribute"));var fe,ve,je=Object(Ce.createElement)(Ce.Fragment,null,Object(Ce.createElement)("img",{src:n,alt:de,onClick:function(){W&&Z(!1)},onError:function(){var e;void 0!==(e=pt({attributes:{url:n}}))&&j(e)},onLoad:function(e){ee(Object(ke.pick)(e.target,["naturalWidth","naturalHeight"]))}}),Object(Ye.isBlobURL)(n)&&Object(Ce.createElement)(Ae.Spinner,null));if(se&&Y&&X){var ye=Y>se;fe=ye?se:Y,ve=ye?se*(X/Y):X}if(pe&&ne)je=Object(Ce.createElement)(rr,{url:n,width:d,height:p,clientWidth:se,naturalHeight:X,naturalWidth:Y});else if(ue&&fe){var xe=d||fe,Se=p||ve,Pe=Y/X,Be=Y<X?20:20*Pe,Te=X<Y?20:20/Pe,ze=2.5*V,Ne=!1,Me=!1;"center"===a?(Ne=!0,Me=!0):Object(Ee.isRTL)()?"left"===a?Ne=!0:Me=!0:"right"===a?Me=!0:Ne=!0,je=Object(Ce.createElement)(Ae.ResizableBox,{size:{width:d,height:p},showHandle:f,minWidth:Be,maxWidth:ze,minHeight:Te,maxHeight:ze/Pe,lockAspectRatio:!0,enable:{top:!1,right:Ne,bottom:!0,left:Me},onResizeStart:function(){A(!1)},onResizeStop:function(e,t,r,n){A(!0),O({width:parseInt(xe+n.width,10),height:parseInt(Se+n.height,10)})}},je)}else je=Object(Ce.createElement)("div",{style:{width:d,height:p}},je);return Object(Ce.createElement)(qt,{id:i,url:n,naturalWidth:Y,naturalHeight:X,clientWidth:se,onSaveImage:function(e){return O(e)},isEditing:ne,onFinishEditing:function(){return oe(!1)}},he,je,(!_e.RichText.isEmpty(c)||f)&&Object(Ce.createElement)(_e.RichText,{ref:E,tagName:"figcaption","aria-label":Object(Ee.__)("Image caption text"),placeholder:Object(Ee.__)("Write caption…"),value:c,unstableOnFocus:function(){W||Z(!0)},onChange:function(e){return O({caption:e})},isSelected:W,inlineToolbar:!0,__unstableOnSplitAtEnd:function(){return v(Object(we.createBlock)("core/paragraph"))}}))}function cr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ar(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cr(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ir=function(e,t){return!e&&Object(Ye.isBlobURL)(t)},lr=function(e,t){return t&&!e&&!Object(Ye.isBlobURL)(t)},sr=Object(Ae.withNotices)((function(e){var t=e.attributes,r=e.setAttributes,n=e.isSelected,o=e.className,c=e.noticeUI,a=e.insertBlocksAfter,i=e.noticeOperations,l=e.onReplace,s=t.url,u=void 0===s?"":s,b=t.alt,m=t.caption,d=t.align,p=t.id,g=t.width,h=t.height,O=t.sizeSlug,f=Object(Ce.useRef)();Object(Ce.useEffect)((function(){f.current=b}),[b]);var v=Object(Ce.useRef)();Object(Ce.useEffect)((function(){v.current=m}),[m]);var j=Object(Ce.useRef)(),y=Object(Le.useSelect)((function(e){return(0,e("core/block-editor").getSettings)().mediaUpload}));function _(e){i.removeAllNotices(),i.createErrorNotice(e)}function w(e){var n,o,c,a,i;if(e&&e.url){var l,s,b,m=(l=e,(s=Object(ke.pick)(l,["alt","id","link","caption"])).url=Object(ke.get)(l,["sizes","large","url"])||Object(ke.get)(l,["media_details","sizes","large","source_url"])||l.url,s);ir(p,u)&&f.current&&(m=Object(ke.omit)(m,["alt"])),v.current&&!Object(ke.get)(m,["caption"])&&(m=Object(ke.omit)(m,["caption"])),b=e.id&&e.id===p?{url:u}:{width:void 0,height:void 0,sizeSlug:"large"};var d,g=t.linkDestination;if(!g)switch((null===(n=wp)||void 0===n||null===(o=n.media)||void 0===o||null===(c=o.view)||void 0===c||null===(a=c.settings)||void 0===a||null===(i=a.defaultProps)||void 0===i?void 0:i.link)||"none"){case"file":case"media":g="media";break;case"post":case"attachment":g="attachment";break;case"custom":g="custom";break;case"none":g="none"}switch(g){case"media":d=e.url;break;case"attachment":d=e.link}m.href=d,r(ar(ar(ar({},m),b),{},{linkDestination:g}))}else r({url:void 0,alt:void 0,id:void 0,title:void 0,caption:void 0})}function k(e){e!==u&&r({url:e,id:void 0,sizeSlug:"large"})}var E=ir(p,u);Object(Ce.useEffect)((function(){if(E){var e=Object(Ye.getBlobByURL)(u);e&&y({filesList:[e],onFileChange:function(e){w(Object(He.a)(e,1)[0])},allowedTypes:nr,onError:function(e){i.createErrorNotice(e),r({src:void 0,id:void 0,url:void 0})}})}}),[]),Object(Ce.useEffect)((function(){if(E)return function(){Object(Ye.revokeBlobURL)(u)}}),[E]);var C=lr(p,u),x=Object(Ce.createElement)(_e.BlockControls,null,Object(Ce.createElement)(_e.BlockAlignmentToolbar,{value:d,onChange:function(e){var t=["wide","full"].includes(e)?{width:void 0,height:void 0}:{};r(ar(ar({},t),{},{align:e}))}})),S=C?u:void 0,P=!!u&&Object(Ce.createElement)("img",{alt:Object(Ee.__)("Edit image"),title:Object(Ee.__)("Edit image"),className:"edit-image-preview",src:u}),B=Object(Ce.createElement)(_e.MediaPlaceholder,{icon:Object(Ce.createElement)(_e.BlockIcon,{icon:Qe}),onSelect:w,onSelectURL:k,notices:c,onError:_,accept:"image/*",allowedTypes:nr,value:{id:p,src:S},mediaPreview:P,disableMediaButtons:u}),T=Be()(o,Object(je.a)({"is-transient":Object(Ye.isBlobURL)(u),"is-resized":!!g||!!h,"is-focused":n},"size-".concat(O),O)),z=Object(_e.useBlockProps)({ref:j,className:T});return Object(Ce.createElement)(Ce.Fragment,null,x,Object(Ce.createElement)("figure",z,u&&Object(Ce.createElement)(or,{attributes:t,setAttributes:r,isSelected:n,insertBlocksAfter:a,onReplace:l,onSelectImage:w,onSelectURL:k,onUploadError:_,containerRef:j}),B))}));function ur(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function br(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ur(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function mr(e,t){var r=document.implementation.createHTMLDocument("").body;r.innerHTML=e;var n=r.firstElementChild;if(n&&"A"===n.nodeName)return n.getAttribute(t)||void 0}var dr={img:{attributes:["src","alt","title"],classes:["alignleft","aligncenter","alignright","alignnone",/^wp-image-\d+$/]}},pr={from:[{type:"raw",isMatch:function(e){return"FIGURE"===e.nodeName&&!!e.querySelector("img")},schema:function(e){var t=e.phrasingContentSchema;return{figure:{require:["img"],children:br(br({},dr),{},{a:{attributes:["href","rel","target"],children:dr},figcaption:{children:t}})}}},transform:function(e){var t=e.className+" "+e.querySelector("img").className,r=/(?:^|\s)align(left|center|right)(?:$|\s)/.exec(t),n=""===e.id?void 0:e.id,o=r?r[1]:void 0,c=/(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(t),a=c?Number(c[1]):void 0,i=e.querySelector("a"),l=i&&i.href?"custom":void 0,s=i&&i.href?i.href:void 0,u=i&&i.rel?i.rel:void 0,b=i&&i.className?i.className:void 0,m=Object(we.getBlockAttributes)("core/image",e.outerHTML,{align:o,id:a,linkDestination:l,href:s,rel:u,linkClass:b,anchor:n});return Object(we.createBlock)("core/image",m)}},{type:"files",isMatch:function(e){return 1===e.length&&0===e[0].type.indexOf("image/")},transform:function(e){var t=e[0];return Object(we.createBlock)("core/image",{url:Object(Ye.createBlobURL)(t)})}},{type:"shortcode",tag:"caption",attributes:{url:{type:"string",source:"attribute",attribute:"src",selector:"img"},alt:{type:"string",source:"attribute",attribute:"alt",selector:"img"},caption:{shortcode:function(e,t){var r=t.shortcode,n=document.implementation.createHTMLDocument("").body;n.innerHTML=r.content;for(var o=n.querySelector("img");o&&o.parentNode&&o.parentNode!==n;)o=o.parentNode;return o&&o.parentNode.removeChild(o),n.innerHTML.trim()}},href:{shortcode:function(e,t){return mr(t.shortcode.content,"href")}},rel:{shortcode:function(e,t){return mr(t.shortcode.content,"rel")}},linkClass:{shortcode:function(e,t){return mr(t.shortcode.content,"class")}},id:{type:"number",shortcode:function(e){var t=e.named.id;if(t)return parseInt(t.replace("attachment_",""),10)}},align:{type:"string",shortcode:function(e){var t=e.named.align;return(void 0===t?"alignnone":t).replace("align","")}}}}]},gr={apiVersion:2,name:"core/image",category:"media",attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,__experimentalBorder:{radius:!0}},editorStyle:"wp-block-image-editor",style:"wp-block-image"},hr=gr.name,Or={title:Object(Ee._x)("Image","block title"),description:Object(Ee.__)("Insert an image to make a visual statement."),icon:Qe,keywords:["img",Object(Ee.__)("photo"),Object(Ee.__)("picture")],example:{attributes:{sizeSlug:"large",url:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",
|
6 |
// translators: Caption accompanying an image of the Mont Blanc, which serves as an example for the Image block.
|
@@ -11,9 +11,9 @@ Object(Ee.__)("Level %s. Empty."),n):Object(Ee.sprintf)(
|
|
11 |
/* translators: accessibility text. 1: heading level. 2: heading content. */
|
12 |
Object(Ee.__)("Level %1$s. %2$s"),n,r)}},transforms:Vr,deprecated:xr,merge:function(e,t){return{content:(e.content||"")+(t.content||"")}},edit:function(e){var t=e.attributes,r=e.setAttributes,n=e.mergeBlocks,o=e.onReplace,c=e.mergedStyle,a=t.textAlign,i=t.content,l=t.level,s=t.placeholder,u="h"+l,b=Object(_e.useBlockProps)({className:Be()(Object(je.a)({},"has-text-align-".concat(a),a)),style:c});return Object(Ce.createElement)(Ce.Fragment,null,Object(Ce.createElement)(_e.BlockControls,null,Object(Ce.createElement)(Ae.ToolbarGroup,null,Object(Ce.createElement)(zr,{selectedLevel:l,onChange:function(e){return r({level:e})}})),Object(Ce.createElement)(_e.AlignmentToolbar,{value:a,onChange:function(e){r({textAlign:e})}})),Object(Ce.createElement)(_e.RichText,Object(Re.a)({identifier:"content",tagName:u,value:i,onChange:function(e){return r({content:e})},onMerge:n,onSplit:function(e){return e?Object(we.createBlock)("core/heading",Mr(Mr({},t),{},{content:e})):Object(we.createBlock)("core/paragraph")},onReplace:o,onRemove:function(){return o([])},"aria-label":Object(Ee.__)("Heading text"),placeholder:s||Object(Ee.__)("Write heading…"),textAlign:a},b)))},save:function(e){var t=e.attributes,r=t.textAlign,n=t.content,o="h"+t.level,c=Be()(Object(je.a)({},"has-text-align-".concat(r),r));return Object(Ce.createElement)(o,_e.useBlockProps.save({className:c}),Object(Ce.createElement)(_e.RichText.Content,{value:n}))}},Ar=Object(Ce.createElement)(xe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Ce.createElement)(xe.Path,{d:"M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z"}));function Lr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Dr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Lr(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Fr={value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"}},Gr=[{attributes:Fr,save:function(e){var t=e.attributes,r=t.align,n=t.value,o=t.citation;return Object(Ce.createElement)("blockquote",{style:{textAlign:r||null}},Object(Ce.createElement)(_e.RichText.Content,{multiline:!0,value:n}),!_e.RichText.isEmpty(o)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"cite",value:o}))}},{attributes:Dr(Dr({},Fr),{},{style:{type:"number",default:1}}),migrate:function(e){return 2===e.style?Dr(Dr({},Object(ke.omit)(e,["style"])),{},{className:e.className?e.className+" is-style-large":"is-style-large"}):e},save:function(e){var t=e.attributes,r=t.align,n=t.value,o=t.citation,c=t.style;return Object(Ce.createElement)("blockquote",{className:2===c?"is-large":"",style:{textAlign:r||null}},Object(Ce.createElement)(_e.RichText.Content,{multiline:!0,value:n}),!_e.RichText.isEmpty(o)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"cite",value:o}))}},{attributes:Dr(Dr({},Fr),{},{citation:{type:"string",source:"html",selector:"footer",default:""},style:{type:"number",default:1}}),save:function(e){var t=e.attributes,r=t.align,n=t.value,o=t.citation,c=t.style;return Object(Ce.createElement)("blockquote",{className:"blocks-quote-style-".concat(c),style:{textAlign:r||null}},Object(Ce.createElement)(_e.RichText.Content,{multiline:!0,value:n}),!_e.RichText.isEmpty(o)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"footer",value:o}))}}];function Ur(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ur(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ur(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Wr=r(24);function Zr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Jr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zr(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Qr={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:function(e){return Object(we.createBlock)("core/quote",{value:Object(Wr.toHTMLString)({value:Object(Wr.join)(e.map((function(e){var t=e.content;return Object(Wr.create)({html:t})})),"\u2028"),multilineTag:"p"}),anchor:e.anchor})}},{type:"block",blocks:["core/heading"],transform:function(e){var t=e.content,r=e.anchor;return Object(we.createBlock)("core/quote",{value:"<p>".concat(t,"</p>"),anchor:r})}},{type:"block",blocks:["core/pullquote"],transform:function(e){var t=e.value,r=e.citation,n=e.anchor;return Object(we.createBlock)("core/quote",{value:t,citation:r,anchor:n})}},{type:"prefix",prefix:">",transform:function(e){return Object(we.createBlock)("core/quote",{value:"<p>".concat(e,"</p>")})}},{type:"raw",isMatch:function(e){var t,r=(t=!1,function(e){return"P"===e.nodeName||(t||"CITE"!==e.nodeName?void 0:(t=!0,!0))});return"BLOCKQUOTE"===e.nodeName&&Array.from(e.childNodes).every(r)},schema:function(e){var t=e.phrasingContentSchema;return{blockquote:{children:{p:{children:t},cite:{children:t}}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.value,r=e.citation,n=[];return t&&"<p></p>"!==t&&n.push.apply(n,Object(ve.a)(Object(Wr.split)(Object(Wr.create)({html:t,multilineTag:"p"}),"\u2028").map((function(e){return Object(we.createBlock)("core/paragraph",{content:Object(Wr.toHTMLString)({value:e})})})))),r&&"<p></p>"!==r&&n.push(Object(we.createBlock)("core/paragraph",{content:r})),0===n.length?Object(we.createBlock)("core/paragraph",{content:""}):n}},{type:"block",blocks:["core/heading"],transform:function(e){var t=e.value,r=e.citation,n=Object(vr.a)(e,["value","citation"]);if("<p></p>"===t)return Object(we.createBlock)("core/heading",{content:r});var o=Object(Wr.split)(Object(Wr.create)({html:t,multilineTag:"p"}),"\u2028"),c=Object(we.createBlock)("core/heading",{content:Object(Wr.toHTMLString)({value:o[0]})});if(!r&&1===o.length)return c;var a=o.slice(1);return[c,Object(we.createBlock)("core/quote",Jr(Jr({},n),{},{citation:r,value:Object(Wr.toHTMLString)({value:a.length?Object(Wr.join)(o.slice(1),"\u2028"):Object(Wr.create)(),multilineTag:"p"})}))]}},{type:"block",blocks:["core/pullquote"],transform:function(e){var t=e.value,r=e.citation,n=e.anchor;return Object(we.createBlock)("core/pullquote",{value:t,citation:r,anchor:n})}}]};function $r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Kr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$r(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$r(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Yr={apiVersion:2,name:"core/quote",category:"text",attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"}},supports:{anchor:!0},editorStyle:"wp-block-quote-editor",style:"wp-block-quote"},Xr=Yr.name,en={title:Object(Ee._x)("Quote","block title"),description:Object(Ee.__)('Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Julio Cortázar'),icon:Ar,keywords:[Object(Ee.__)("blockquote"),Object(Ee.__)("cite")],example:{attributes:{value:"<p>"+Object(Ee.__)("In quoting others, we cite ourselves.")+"</p>",citation:"Julio Cortázar",className:"is-style-large"}},styles:[{name:"default",label:Object(Ee._x)("Default","block style"),isDefault:!0},{name:"large",label:Object(Ee._x)("Large","block style")}],transforms:Qr,edit:function(e){var t=e.attributes,r=e.setAttributes,n=e.isSelected,o=e.mergeBlocks,c=e.onReplace,a=e.className,i=e.insertBlocksAfter,l=e.mergedStyle,s=t.align,u=t.value,b=t.citation,m=Object(_e.useBlockProps)({className:Be()(a,Object(je.a)({},"has-text-align-".concat(s),s)),style:l});return Object(Ce.createElement)(Ce.Fragment,null,Object(Ce.createElement)(_e.BlockControls,null,Object(Ce.createElement)(_e.AlignmentToolbar,{value:s,onChange:function(e){r({align:e})}})),Object(Ce.createElement)(Ae.BlockQuotation,m,Object(Ce.createElement)(_e.RichText,{identifier:"value",multiline:!0,value:u,onChange:function(e){return r({value:e})},onMerge:o,onRemove:function(e){var t=!b||0===b.length;!e&&t&&c([])},"aria-label":Object(Ee.__)("Quote text"),placeholder:// translators: placeholder text used for the quote
|
13 |
Object(Ee.__)("Write quote…"),onReplace:c,onSplit:function(e){return Object(we.createBlock)("core/quote",qr(qr({},t),{},{value:e}))},__unstableOnSplitMiddle:function(){return Object(we.createBlock)("core/paragraph")},textAlign:s}),(!_e.RichText.isEmpty(b)||n)&&Object(Ce.createElement)(_e.RichText,{identifier:"citation",value:b,onChange:function(e){return r({citation:e})},__unstableMobileNoFocusOnMount:!0,"aria-label":Object(Ee.__)("Quote citation text"),placeholder:// translators: placeholder text used for the citation
|
14 |
-
Object(Ee.__)("Write citation…"),className:"wp-block-quote__citation",textAlign:s,__unstableOnSplitAtEnd:function(){return i(Object(we.createBlock)("core/paragraph"))}})))},save:function(e){var t=e.attributes,r=t.align,n=t.value,o=t.citation,c=Be()(Object(je.a)({},"has-text-align-".concat(r),r));return Object(Ce.createElement)("blockquote",_e.useBlockProps.save({className:c}),Object(Ce.createElement)(_e.RichText.Content,{multiline:!0,value:n}),!_e.RichText.isEmpty(o)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"cite",value:o}))},merge:function(e,t){var r=t.value,n=t.citation;return n||(n=e.citation),Kr(Kr({},e),{},r&&"<p></p>"!==r?{value:e.value+r,citation:n}:{citation:n})},deprecated:Gr},tn=Object(Ce.createElement)(xe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Ce.createElement)(xe.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8h-1.5zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zM4.5 4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1V12l-2.3-1.7c-.3-.2-.6-.2-.9 0l-2.9 2.1L8 11.3c-.2-.1-.5-.1-.7 0l-2.9 1.5V4.6zm0 11.8v-1.8l3.2-1.7 2.4 1.2c.2.1.5.1.8-.1l2.8-2 2.8 2v2.5c0 .1-.1.1-.1.1H4.6c0-.1-.1-.2-.1-.2z"}));function rn(e){return Math.min(3,e.images.length)}var nn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"large",r=Object(ke.pick)(e,["alt","id","link","caption"]);r.url=Object(ke.get)(e,["sizes",t,"url"])||Object(ke.get)(e,["media_details","sizes",t,"source_url"])||e.url;var n=Object(ke.get)(e,["sizes","full","url"])||Object(ke.get)(e,["media_details","sizes","full","source_url"]);return n&&(r.fullUrl=n),r};function on(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function cn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?on(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):on(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var an=[{attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},sizeSlug:{type:"string",default:"large"}},supports:{align:!0},isEligible:function(e){var t=e.linkTo;return!t||"attachment"===t||"media"===t},migrate:function(e){var t=e.linkTo;return e.linkTo?"attachment"===e.linkTo?t="post":"media"===e.linkTo&&(t="file"):t="none",cn(cn({},e),{},{linkTo:t})},save:function(e){var t=e.attributes,r=t.images,n=t.columns,o=void 0===n?rn(t):n,c=t.imageCrop,a=t.caption,i=t.linkTo;return Object(Ce.createElement)("figure",{className:"columns-".concat(o," ").concat(c?"is-cropped":"")},Object(Ce.createElement)("ul",{className:"blocks-gallery-grid"},r.map((function(e){var t;switch(i){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}var r=Object(Ce.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object(Ce.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(Ce.createElement)("figure",null,t?Object(Ce.createElement)("a",{href:t},r):r,!_e.RichText.isEmpty(e.caption)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!_e.RichText.isEmpty(a)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:a}))}},{attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},link:{source:"attribute",selector:"img",attribute:"data-link"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",default:[]},columns:{type:"number"},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},isEligible:function(e){var t=e.ids;return t&&t.some((function(e){return"string"==typeof e}))},migrate:function(e){return cn(cn({},e),{},{ids:Object(ke.map)(e.ids,(function(e){var t=parseInt(e,10);return Number.isInteger(t)?t:null}))})},save:function(e){var t=e.attributes,r=t.images,n=t.columns,o=void 0===n?rn(t):n,c=t.imageCrop,a=t.caption,i=t.linkTo;return Object(Ce.createElement)("figure",{className:"columns-".concat(o," ").concat(c?"is-cropped":"")},Object(Ce.createElement)("ul",{className:"blocks-gallery-grid"},r.map((function(e){var t;switch(i){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}var r=Object(Ce.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object(Ce.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(Ce.createElement)("figure",null,t?Object(Ce.createElement)("a",{href:t},r):r,!_e.RichText.isEmpty(e.caption)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!_e.RichText.isEmpty(a)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:a}))}},{attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"array",source:"children",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},save:function(e){var t=e.attributes,r=t.images,n=t.columns,o=void 0===n?rn(t):n,c=t.imageCrop,a=t.linkTo;return Object(Ce.createElement)("ul",{className:"columns-".concat(o," ").concat(c?"is-cropped":"")},r.map((function(e){var t;switch(a){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}var r=Object(Ce.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object(Ce.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(Ce.createElement)("figure",null,t?Object(Ce.createElement)("a",{href:t},r):r,e.caption&&e.caption.length>0&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",value:e.caption})))})))}},{attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"array",source:"children",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},isEligible:function(e){var t=e.images,r=e.ids;return t&&t.length>0&&(!r&&t||r&&t&&r.length!==t.length||Object(ke.some)(t,(function(e,t){return!e&&null!==r[t]||parseInt(e,10)!==r[t]})))},migrate:function(e){return cn(cn({},e),{},{ids:Object(ke.map)(e.images,(function(e){var t=e.id;return t?parseInt(t,10):null}))})},supports:{align:!0},save:function(e){var t=e.attributes,r=t.images,n=t.columns,o=void 0===n?rn(t):n,c=t.imageCrop,a=t.linkTo;return Object(Ce.createElement)("ul",{className:"columns-".concat(o," ").concat(c?"is-cropped":"")},r.map((function(e){var t;switch(a){case"media":t=e.url;break;case"attachment":t=e.link}var r=Object(Ce.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object(Ce.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(Ce.createElement)("figure",null,t?Object(Ce.createElement)("a",{href:t},r):r,e.caption&&e.caption.length>0&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",value:e.caption})))})))}},{attributes:{images:{type:"array",default:[],source:"query",selector:"div.wp-block-gallery figure.blocks-gallery-image img",query:{url:{source:"attribute",attribute:"src"},alt:{source:"attribute",attribute:"alt",default:""},id:{source:"attribute",attribute:"data-id"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},align:{type:"string",default:"none"}},supports:{align:!0},save:function(e){var t=e.attributes,r=t.images,n=t.columns,o=void 0===n?rn(t):n,c=t.align,a=t.imageCrop,i=t.linkTo,l=Be()("columns-".concat(o),{alignnone:"none"===c,"is-cropped":a});return Object(Ce.createElement)("div",{className:l},r.map((function(e){var t;switch(i){case"media":t=e.url;break;case"attachment":t=e.link}var r=Object(Ce.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id});return Object(Ce.createElement)("figure",{key:e.id||e.url,className:"blocks-gallery-image"},t?Object(Ce.createElement)("a",{href:t},r):r)})))}}],ln=r(80),sn=Object(Ce.createElement)(_e.BlockIcon,{icon:tn}),un=r(27),bn=r(28),mn=r(19),dn=r(30),pn=r(32),gn=r(22),hn=r(261),On=r(260),fn=r(240),vn=r(144);var jn=function(e){Object(dn.a)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=Object(gn.a)(t);if(r){var o=Object(gn.a)(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return Object(pn.a)(this,e)});function o(){var e;return Object(un.a)(this,o),(e=n.apply(this,arguments)).onSelectImage=e.onSelectImage.bind(Object(mn.a)(e)),e.onSelectCaption=e.onSelectCaption.bind(Object(mn.a)(e)),e.onRemoveImage=e.onRemoveImage.bind(Object(mn.a)(e)),e.bindContainer=e.bindContainer.bind(Object(mn.a)(e)),e.onEdit=e.onEdit.bind(Object(mn.a)(e)),e.onSelectImageFromLibrary=e.onSelectImageFromLibrary.bind(Object(mn.a)(e)),e.onSelectCustomURL=e.onSelectCustomURL.bind(Object(mn.a)(e)),e.state={captionSelected:!1,isEditing:!1},e}return Object(bn.a)(o,[{key:"bindContainer",value:function(e){this.container=e}},{key:"onSelectCaption",value:function(){this.state.captionSelected||this.setState({captionSelected:!0}),this.props.isSelected||this.props.onSelect()}},{key:"onSelectImage",value:function(){this.props.isSelected||this.props.onSelect(),this.state.captionSelected&&this.setState({captionSelected:!1})}},{key:"onRemoveImage",value:function(e){this.container===this.container.ownerDocument.activeElement&&this.props.isSelected&&-1!==[Sr.BACKSPACE,Sr.DELETE].indexOf(e.keyCode)&&(e.stopPropagation(),e.preventDefault(),this.props.onRemove())}},{key:"onEdit",value:function(){this.setState({isEditing:!0})}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.isSelected,n=t.image,o=t.url,c=t.__unstableMarkNextChangeAsNotPersistent;n&&!o&&(c(),this.props.setAttributes({url:n.source_url,alt:n.alt_text})),this.state.captionSelected&&!r&&e.isSelected&&this.setState({captionSelected:!1})}},{key:"deselectOnBlur",value:function(){this.props.onDeselect()}},{key:"onSelectImageFromLibrary",value:function(e){var t=this.props,r=t.setAttributes,n=t.id,o=t.url,c=t.alt,a=t.caption,i=t.sizeSlug;if(e&&e.url){var l=nn(e,i);(function(e,t){return!e&&Object(Ye.isBlobURL)(t)})(n,o)&&c&&(l=Object(ke.omit)(l,["alt"])),a&&!Object(ke.get)(l,["caption"])&&(l=Object(ke.omit)(l,["caption"])),r(l),this.setState({isEditing:!1})}}},{key:"onSelectCustomURL",value:function(e){var t=this.props,r=t.setAttributes;e!==t.url&&(r({url:e,id:void 0}),this.setState({isEditing:!1}))}},{key:"render",value:function(){var e,t=this.props,r=t.url,n=t.alt,o=t.id,c=t.linkTo,a=t.link,i=t.isFirstItem,l=t.isLastItem,s=t.isSelected,u=t.caption,b=t.onRemove,m=t.onMoveForward,d=t.onMoveBackward,p=t.setAttributes,g=t["aria-label"],h=this.state.isEditing;switch(c){case"file":e=r;break;case"post":e=a}var O=Object(Ce.createElement)(Ce.Fragment,null,Object(Ce.createElement)("img",{src:r,alt:n,"data-id":o,onClick:this.onSelectImage,onFocus:this.onSelectImage,onKeyDown:this.onRemoveImage,tabIndex:"0","aria-label":g,ref:this.bindContainer}),Object(Ye.isBlobURL)(r)&&Object(Ce.createElement)(Ae.Spinner,null)),f=Be()({"is-selected":s,"is-transient":Object(Ye.isBlobURL)(r)});return Object(Ce.createElement)("figure",{className:f},!h&&(e?Object(Ce.createElement)("a",{href:e},O):O),h&&Object(Ce.createElement)(_e.MediaPlaceholder,{labels:{title:Object(Ee.__)("Edit gallery image")},icon:Qe,onSelect:this.onSelectImageFromLibrary,onSelectURL:this.onSelectCustomURL,accept:"image/*",allowedTypes:["image"],value:{id:o,src:r}}),Object(Ce.createElement)(Ae.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-left"},Object(Ce.createElement)(Ae.Button,{icon:hn.a,onClick:i?void 0:d,label:Object(Ee.__)("Move image backward"),"aria-disabled":i,disabled:!s}),Object(Ce.createElement)(Ae.Button,{icon:On.a,onClick:l?void 0:m,label:Object(Ee.__)("Move image forward"),"aria-disabled":l,disabled:!s})),Object(Ce.createElement)(Ae.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-right"},Object(Ce.createElement)(Ae.Button,{icon:fn.a,onClick:this.onEdit,label:Object(Ee.__)("Replace image"),disabled:!s}),Object(Ce.createElement)(Ae.Button,{icon:vn.a,onClick:b,label:Object(Ee.__)("Remove image"),disabled:!s})),!h&&(s||u)&&Object(Ce.createElement)(_e.RichText,{tagName:"figcaption","aria-label":Object(Ee.__)("Image caption text"),placeholder:s?Object(Ee.__)("Write caption…"):null,value:u,isSelected:this.state.captionSelected,onChange:function(e){return p({caption:e})},unstableOnFocus:this.onSelectCaption,inlineToolbar:!0}))}}]),o}(Ce.Component),yn=Object(Xe.compose)([Object(Le.withSelect)((function(e,t){var r=e("core").getMedia,n=t.id;return{image:n?r(parseInt(n,10)):null}})),Object(Le.withDispatch)((function(e){return{__unstableMarkNextChangeAsNotPersistent:e("core/block-editor").__unstableMarkNextChangeAsNotPersistent}}))])(jn);function wn(e){var t=e.isHidden,r=Object(vr.a)(e,["isHidden"]);return t?Object(Ce.createElement)(Ae.VisuallyHidden,Object(Re.a)({as:_e.RichText},r)):Object(Ce.createElement)(_e.RichText,r)}var kn=function(e){var t,r=e.attributes,n=e.isSelected,o=e.setAttributes,c=e.selectedImage,a=e.mediaPlaceholder,i=e.onMoveBackward,l=e.onMoveForward,s=e.onRemoveImage,u=e.onSelectImage,b=e.onDeselectImage,m=e.onSetImageAttributes,d=e.onFocusGalleryCaption,p=e.insertBlocksAfter,g=e.blockProps,h=r.align,O=r.columns,f=void 0===O?rn(r):O,v=r.caption,j=r.imageCrop,y=r.images;return Object(Ce.createElement)("figure",Object(Re.a)({},g,{className:Be()(g.className,(t={},Object(je.a)(t,"align".concat(h),h),Object(je.a)(t,"columns-".concat(f),f),Object(je.a)(t,"is-cropped",j),t))}),Object(Ce.createElement)("ul",{className:"blocks-gallery-grid"},y.map((function(e,t){var o=Object(Ee.sprintf)(
|
15 |
/* translators: 1: the order number of the image. 2: the total number of images. */
|
16 |
-
Object(Ee.__)("image %1$d of %2$d in gallery"),t+1,y.length);return Object(Ce.createElement)("li",{className:"blocks-gallery-item",key:e.id||e.url},Object(Ce.createElement)(yn,{url:e.url,alt:e.alt,id:e.id,isFirstItem:0===t,isLastItem:t+1===y.length,isSelected:n&&c===t,onMoveBackward:i(t),onMoveForward:l(t),onRemove:s(t),onSelect:u(t),onDeselect:b(t),setAttributes:function(e){return m(t,e)},caption:e.caption,"aria-label":o,sizeSlug:r.sizeSlug}))}))),a,Object(Ce.createElement)(wn,{isHidden:!n&&_e.RichText.isEmpty(v),tagName:"figcaption",className:"blocks-gallery-caption","aria-label":Object(Ee.__)("Gallery caption text"),placeholder:Object(Ee.__)("Write gallery caption…"),value:v,unstableOnFocus:d,onChange:function(e){return o({caption:e})},inlineToolbar:!0,__unstableOnSplitAtEnd:function(){return p(Object(we.createBlock)("core/paragraph"))}}))};function En(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Cn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?En(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):En(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xn=[{value:"post",label:Object(Ee.__)("Attachment Page")},{value:"file",label:Object(Ee.__)("Media File")},{value:"none",label:Object(Ee.__)("None")}],Sn=["image"],Pn=Ce.Platform.select({web:Object(Ee.__)("Drag images, upload new ones or select files from your library."),native:Object(Ee.__)("ADD MEDIA")}),Bn=Ce.Platform.select({web:{},native:{type:"stepper"}}),Tn=Object(Xe.compose)([Object(Le.withSelect)((function(e,t){var r=t.attributes.ids,n=t.isSelected,o=e("core").getMedia,c=(0,e("core/block-editor").getSettings)(),a=c.imageSizes,i=c.mediaUpload,l=Object(Ce.useMemo)((function(){return n?Object(ke.reduce)(r,(function(e,t){if(!t)return e;var r=o(t),n=Object(ke.reduce)(a,(function(e,t){var n=Object(ke.get)(r,["sizes",t.slug,"url"]),o=Object(ke.get)(r,["media_details","sizes",t.slug,"source_url"]);return Cn(Cn({},e),{},Object(je.a)({},t.slug,n||o))}),{});return Cn(Cn({},e),{},Object(je.a)({},parseInt(t,10),n))}),{}):{}}),[n,r,a]);return{imageSizes:a,mediaUpload:i,resizedImages:l}})),Ae.withNotices,Object(ln.withViewportMatch)({isNarrow:"< small"})])((function(e){var t=e.attributes,r=e.isSelected,n=e.noticeUI,o=e.noticeOperations,c=e.mediaUpload,a=e.imageSizes,i=e.resizedImages,l=e.onFocus,s=t.columns,u=void 0===s?rn(t):s,b=t.imageCrop,m=t.images,d=t.linkTo,p=t.sizeSlug,g=Object(Ce.useState)(),h=Object(He.a)(g,2),O=h[0],f=h[1],v=Object(Ce.useState)(),j=Object(He.a)(v,2),y=j[0],_=j[1],w=Object(Le.useDispatch)("core/block-editor").__unstableMarkNextChang
|
1 |
+
window.wp=window.wp||{},window.wp.blockLibrary=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=507)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,"a",(function(){return n}))},11:function(e,t){e.exports=window.wp.blocks},12:function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var c=typeof n;if("string"===c||"number"===c)e.push(n);else if(Array.isArray(n))e.push(o.apply(null,n));else if("object"===c)for(var a in n)r.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}e.exports?e.exports=o:void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},123:function(e,t){e.exports=window.wp.reusableBlocks},126:function(e,t){e.exports=window.wp.autop},128:function(e,t,r){var n;!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var r=t.length,n=0;n<r;++n)o(e,t[n])}e.prototype=Object.create(null);var r={}.hasOwnProperty,n=/\s+/;function o(e,o){if(o){var c=typeof o;"string"===c?function(e,t){for(var r=t.split(n),o=r.length,c=0;c<o;++c)e[r[c]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===c?function(e,t){for(var n in t)r.call(t,n)&&(e[n]=!!t[n])}(e,o):"number"===c&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];var c=new e;t(c,n);var a=[];for(var i in c)c[i]&&a.push(i);return a.join(" ")}}();e.exports?e.exports=r:void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},13:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(48);function o(e,t){if(null==e)return{};var r,o,c=Object(n.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},14:function(e,t){e.exports=window.wp.compose},142:function(e,t,r){"use strict";var n=r(5),o=r(13),c=r(0);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}t.a=function(e){var t=e.icon,r=e.size,i=void 0===r?24:r,l=Object(o.a)(e,["icon","size"]);return Object(c.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:i,height:i},l))}},143:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"}));t.a=c},145:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=c},15:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(25),o=r(39),c=r(31);function a(e){return function(e){if(Array.isArray(e))return Object(n.a)(e)}(e)||Object(o.a)(e)||Object(c.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},16:function(e,t){e.exports=window.regeneratorRuntime},17:function(e,t){e.exports=window.wp.keycodes},182:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=c},19:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,"a",(function(){return n}))},2:function(e,t){e.exports=window.lodash},216:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(o.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=c},22:function(e,t,r){"use strict";function n(e){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}r.d(t,"a",(function(){return n}))},223:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));t.a=c},239:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.a=c},24:function(e,t){e.exports=window.wp.richText},25:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r.d(t,"a",(function(){return n}))},258:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));t.a=c},259:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=c},260:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=c},261:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(o.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));t.a=c},263:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(n.createElement)(o.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));t.a=c},264:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.a=c},265:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(n.createElement)(o.Path,{d:"M13.23 15h1.9L11 4H9L5 15h1.88l1.07-3h4.18zm-1.53-4.54H8.51L10 5.6z"}));t.a=c},266:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));t.a=c},27:function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.d(t,"a",(function(){return n}))},28:function(e,t,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}r.d(t,"a",(function(){return o}))},29:function(e,t){e.exports=window.wp.url},3:function(e,t){e.exports=window.wp.components},30:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(57);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&&Object(n.a)(e,t)}},31:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(25);function o(e,t){if(e){if("string"==typeof e)return Object(n.a)(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Object(n.a)(e,t):void 0}}},32:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(43),o=r(19);function c(e,t){return!t||"object"!==Object(n.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},33:function(e,t){e.exports=window.wp.dom},337:function(e,t,r){e.exports=function(){"use strict";function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}var r,n;return r=t,(n=[{key:"getColorAsync",value:function(e,t,r){e.complete?t.call(e,this.getColor(e,r),r&&r.data):this._bindImageEvents(e,t,r)}},{key:"getColor",value:function(e,t){t=t||{};var r=this._getDefaultColor(t),n=this._getOriginalSize(e),o=this._prepareSizeAndPosition(n,t),c=null,a=r;if(!(o.srcWidth&&o.srcHeight&&o.destWidth&&o.destHeight))return this._prepareResult(r,new Error("FastAverageColor: Incorrect sizes."));if(!this._ctx&&(this._canvas=this._makeCanvas(),this._ctx=this._canvas.getContext&&this._canvas.getContext("2d"),!this._ctx))return this._prepareResult(r,new Error("FastAverageColor: Canvas Context 2D is not supported in this browser."));this._canvas.width=o.destWidth,this._canvas.height=o.destHeight;try{this._ctx.clearRect(0,0,o.destWidth,o.destHeight),this._ctx.drawImage(e,o.srcLeft,o.srcTop,o.srcWidth,o.srcHeight,0,0,o.destWidth,o.destHeight);var i=this._ctx.getImageData(0,0,o.destWidth,o.destHeight).data;a=this.getColorFromArray4(i,t)}catch(e){c=e}return this._prepareResult(a,c)}},{key:"getColorFromArray4",value:function(e,t){t=t||{};var r=e.length;if(r<4)return this._getDefaultColor(t);var n=r-r%4,o=4*(t.step||1),c="_"+(t.algorithm||"sqrt")+"Algorithm";if("function"!=typeof this[c])throw new Error("FastAverageColor: ".concat(t.algorithm," is unknown algorithm."));return this[c](e,n,o)}},{key:"destroy",value:function(){delete this._canvas,delete this._ctx}},{key:"_getDefaultColor",value:function(e){return this._getOption(e,"defaultColor",[255,255,255,255])}},{key:"_getOption",value:function(e,t,r){return void 0===e[t]?r:e[t]}},{key:"_prepareSizeAndPosition",value:function(e,t){var r,n=this._getOption(t,"left",0),o=this._getOption(t,"top",0),c=this._getOption(t,"width",e.width),a=this._getOption(t,"height",e.height),i=c,l=a;return"precision"===t.mode||(c>a?(r=c/a,i=100,l=Math.round(i/r)):(r=a/c,l=100,i=Math.round(l/r)),(i>c||l>a||i<10||l<10)&&(i=c,l=a)),{srcLeft:n,srcTop:o,srcWidth:c,srcHeight:a,destWidth:i,destHeight:l}}},{key:"_simpleAlgorithm",value:function(e,t,r){for(var n=0,o=0,c=0,a=0,i=0,l=0;l<t;l+=r){var s=e[l+3];n+=e[l]*s,o+=e[l+1]*s,c+=e[l+2]*s,a+=s,i++}return a?[Math.round(n/a),Math.round(o/a),Math.round(c/a),Math.round(a/i)]:[0,0,0,0]}},{key:"_sqrtAlgorithm",value:function(e,t,r){for(var n=0,o=0,c=0,a=0,i=0,l=0;l<t;l+=r){var s=e[l],u=e[l+1],b=e[l+2],m=e[l+3];n+=s*s*m,o+=u*u*m,c+=b*b*m,a+=m,i++}return a?[Math.round(Math.sqrt(n/a)),Math.round(Math.sqrt(o/a)),Math.round(Math.sqrt(c/a)),Math.round(a/i)]:[0,0,0,0]}},{key:"_dominantAlgorithm",value:function(e,t,r){for(var n={},o=0;o<t;o+=r){var c=e[o],a=e[o+1],i=e[o+2],l=e[o+3],s=Math.round(c/24)+","+Math.round(a/24)+","+Math.round(i/24);n[s]?n[s]=[n[s][0]+c*l,n[s][1]+a*l,n[s][2]+i*l,n[s][3]+l,n[s][4]+1]:n[s]=[c*l,a*l,i*l,l,1]}var u=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],_n=!0,n=!1,o=void 0;try{for(var c,a=e[Symbol.iterator]();!(_n=(c=a.next()).done)&&(r.push(c.value),!t||r.length!==t);_n=!0);}catch(e){n=!0,o=e}finally{try{_n||null==a.return||a.return()}finally{if(n)throw o}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(Object.keys(n).map((function(e){return n[e]})).sort((function(e,t){var r=e[4],n=t[4];return r>n?-1:r===n?0:1}))[0],5),b=u[0],m=u[1],d=u[2],p=u[3],g=u[4];return p?[Math.round(b/p),Math.round(m/p),Math.round(d/p),Math.round(p/g)]:[0,0,0,0]}},{key:"_bindImageEvents",value:function(e,t,r){var n=this,o=(r=r||{})&&r.data,c=this._getDefaultColor(r),a=function(){s(),t.call(e,n.getColor(e,r),o)},i=function(){s(),t.call(e,n._prepareResult(c,new Error("Image error")),o)},l=function(){s(),t.call(e,n._prepareResult(c,new Error("Image abort")),o)},s=function(){e.removeEventListener("load",a),e.removeEventListener("error",i),e.removeEventListener("abort",l)};e.addEventListener("load",a),e.addEventListener("error",i),e.addEventListener("abort",l)}},{key:"_prepareResult",value:function(e,t){var r=e.slice(0,3),n=[].concat(r,e[3]/255),o=this._isDark(e);return{error:t,value:e,rgb:"rgb("+r.join(",")+")",rgba:"rgba("+n.join(",")+")",hex:this._arrayToHex(r),hexa:this._arrayToHex(e),isDark:o,isLight:!o}}},{key:"_getOriginalSize",value:function(e){return e instanceof HTMLImageElement?{width:e.naturalWidth,height:e.naturalHeight}:e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.width,height:e.height}}},{key:"_toHex",value:function(e){var t=e.toString(16);return 1===t.length?"0"+t:t}},{key:"_arrayToHex",value:function(e){return"#"+e.map(this._toHex).join("")}},{key:"_isDark",value:function(e){return(299*e[0]+587*e[1]+114*e[2])/1e3<128}},{key:"_makeCanvas",value:function(){return"undefined"==typeof window?new OffscreenCanvas(1,1):document.createElement("canvas")}}])&&e(r.prototype,n),t}()}()},34:function(e,t){e.exports=window.wp.hooks},37:function(e,t){e.exports=window.wp.deprecated},376:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));t.a=c},377:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));t.a=c},378:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));t.a=c},381:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));t.a=c},382:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(o.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"}));t.a=c},383:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(o.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));t.a=c},384:function(e,t,r){"use strict";var n=r(0),o=r(7),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));t.a=c},39:function(e,t,r){"use strict";function n(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}r.d(t,"a",(function(){return n}))},4:function(e,t){e.exports=window.wp.data},40:function(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,"a",(function(){return n}))},41:function(e,t,r){"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,"a",(function(){return n}))},42:function(e,t){e.exports=window.wp.coreData},43:function(e,t,r){"use strict";function n(e){return(n="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)}r.d(t,"a",(function(){return n}))},46:function(e,t,r){"use strict";function n(e,t,r,n,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,c){var a=e.apply(t,r);function i(e){n(a,o,c,i,l,"next",e)}function l(e){n(a,o,c,i,l,"throw",e)}i(void 0)}))}}r.d(t,"a",(function(){return o}))},47:function(e,t){e.exports=window.wp.apiFetch},48:function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}r.d(t,"a",(function(){return n}))},5:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},507:function(e,t,r){"use strict";r.r(t),r.d(t,"__experimentalGetCoreBlocks",(function(){return sg})),r.d(t,"registerCoreBlocks",(function(){return ug})),r.d(t,"__experimentalRegisterExperimentalCoreBlocks",(function(){return bg}));var n={};r.r(n),r.d(n,"metadata",(function(){return We})),r.d(n,"name",(function(){return Ze})),r.d(n,"settings",(function(){return Je}));var o={};r.r(o),r.d(o,"metadata",(function(){return gr})),r.d(o,"name",(function(){return hr})),r.d(o,"settings",(function(){return Or}));var c={};r.r(c),r.d(c,"metadata",(function(){return Ir})),r.d(c,"name",(function(){return Rr})),r.d(c,"settings",(function(){return Hr}));var a={};r.r(a),r.d(a,"metadata",(function(){return Yr})),r.d(a,"name",(function(){return Xr})),r.d(a,"settings",(function(){return en}));var i={};r.r(i),r.d(i,"metadata",(function(){return Mn})),r.d(i,"name",(function(){return Vn})),r.d(i,"settings",(function(){return In}));var l={};r.r(l),r.d(l,"metadata",(function(){return Ln})),r.d(l,"name",(function(){return Dn})),r.d(l,"settings",(function(){return Fn}));var s={};r.r(s),r.d(s,"metadata",(function(){return Jn})),r.d(s,"name",(function(){return Qn})),r.d(s,"settings",(function(){return $n}));var u={};r.r(u),r.d(u,"metadata",(function(){return Po})),r.d(u,"name",(function(){return Bo})),r.d(u,"settings",(function(){return To}));var b={};r.r(b),r.d(b,"metadata",(function(){return Uo})),r.d(b,"name",(function(){return qo})),r.d(b,"settings",(function(){return Wo}));var m={};r.r(m),r.d(m,"metadata",(function(){return Xo})),r.d(m,"name",(function(){return ec})),r.d(m,"settings",(function(){return tc}));var d={};r.r(d),r.d(d,"metadata",(function(){return oc})),r.d(d,"name",(function(){return cc})),r.d(d,"settings",(function(){return ac}));var p={};r.r(p),r.d(p,"metadata",(function(){return bc})),r.d(p,"name",(function(){return mc})),r.d(p,"settings",(function(){return dc}));var g={};r.r(g),r.d(g,"metadata",(function(){return Vc})),r.d(g,"name",(function(){return Ic})),r.d(g,"settings",(function(){return Rc}));var h={};r.r(h),r.d(h,"metadata",(function(){return Fc})),r.d(h,"name",(function(){return Gc})),r.d(h,"settings",(function(){return Uc}));var O={};r.r(O),r.d(O,"metadata",(function(){return ya})),r.d(O,"name",(function(){return _a})),r.d(O,"settings",(function(){return wa}));var f={};r.r(f),r.d(f,"metadata",(function(){return Xa})),r.d(f,"name",(function(){return ei})),r.d(f,"settings",(function(){return ti}));var v={};r.r(v),r.d(v,"metadata",(function(){return ii})),r.d(v,"name",(function(){return li})),r.d(v,"settings",(function(){return si}));var j={};r.r(j),r.d(j,"metadata",(function(){return mi})),r.d(j,"name",(function(){return di})),r.d(j,"settings",(function(){return pi}));var y={};r.r(y),r.d(y,"metadata",(function(){return Mi})),r.d(y,"name",(function(){return Vi})),r.d(y,"settings",(function(){return Ii}));var _={};r.r(_),r.d(_,"metadata",(function(){return rl})),r.d(_,"name",(function(){return nl})),r.d(_,"settings",(function(){return ol}));var w={};r.r(w),r.d(w,"metadata",(function(){return jl})),r.d(w,"name",(function(){return yl})),r.d(w,"settings",(function(){return _l}));var k={};r.r(k),r.d(k,"metadata",(function(){return kl})),r.d(k,"name",(function(){return El})),r.d(k,"settings",(function(){return Cl}));var E={};r.r(E),r.d(E,"metadata",(function(){return Hl})),r.d(E,"name",(function(){return Al})),r.d(E,"settings",(function(){return Ll}));var C={};r.r(C),r.d(C,"metadata",(function(){return os})),r.d(C,"name",(function(){return cs})),r.d(C,"settings",(function(){return as}));var x={};r.r(x),r.d(x,"metadata",(function(){return ls})),r.d(x,"name",(function(){return ss})),r.d(x,"settings",(function(){return us}));var S={};r.r(S),r.d(S,"metadata",(function(){return ps})),r.d(S,"name",(function(){return gs})),r.d(S,"settings",(function(){return hs}));var P={};r.r(P),r.d(P,"metadata",(function(){return vs})),r.d(P,"name",(function(){return js})),r.d(P,"settings",(function(){return ys}));var B={};r.r(B),r.d(B,"metadata",(function(){return ks})),r.d(B,"name",(function(){return Es})),r.d(B,"settings",(function(){return Cs}));var T={};r.r(T),r.d(T,"metadata",(function(){return Ls})),r.d(T,"name",(function(){return Ds})),r.d(T,"settings",(function(){return Fs}));var z={};r.r(z),r.d(z,"metadata",(function(){return qs})),r.d(z,"name",(function(){return Ws})),r.d(z,"settings",(function(){return Zs}));var N={};r.r(N),r.d(N,"metadata",(function(){return Qs})),r.d(N,"name",(function(){return $s})),r.d(N,"settings",(function(){return Ks}));var M={};r.r(M),r.d(M,"metadata",(function(){return au})),r.d(M,"name",(function(){return iu})),r.d(M,"settings",(function(){return lu}));var V={};r.r(V),r.d(V,"metadata",(function(){return gu})),r.d(V,"name",(function(){return hu})),r.d(V,"settings",(function(){return Ou}));var I={};r.r(I),r.d(I,"metadata",(function(){return _u})),r.d(I,"name",(function(){return wu})),r.d(I,"settings",(function(){return ku}));var R={};r.r(R),r.d(R,"metadata",(function(){return Su})),r.d(R,"name",(function(){return Pu})),r.d(R,"settings",(function(){return Bu}));var H={};r.r(H),r.d(H,"metadata",(function(){return Nu})),r.d(H,"name",(function(){return Mu})),r.d(H,"settings",(function(){return Vu}));var A={};r.r(A),r.d(A,"metadata",(function(){return Au})),r.d(A,"name",(function(){return Lu})),r.d(A,"settings",(function(){return Du}));var L={};r.r(L),r.d(L,"metadata",(function(){return jb})),r.d(L,"name",(function(){return yb})),r.d(L,"settings",(function(){return _b}));var D={};r.r(D),r.d(D,"metadata",(function(){return kb})),r.d(D,"name",(function(){return Eb})),r.d(D,"settings",(function(){return Cb}));var F={};r.r(F),r.d(F,"metadata",(function(){return Bb})),r.d(F,"name",(function(){return Tb})),r.d(F,"settings",(function(){return zb}));var G={};r.r(G),r.d(G,"metadata",(function(){return $b})),r.d(G,"name",(function(){return Kb})),r.d(G,"settings",(function(){return Yb}));var U={};r.r(U),r.d(U,"metadata",(function(){return em})),r.d(U,"name",(function(){return tm})),r.d(U,"settings",(function(){return rm}));var q={};r.r(q),r.d(q,"metadata",(function(){return lm})),r.d(q,"name",(function(){return sm})),r.d(q,"settings",(function(){return um}));var W={};r.r(W),r.d(W,"metadata",(function(){return gm})),r.d(W,"name",(function(){return hm})),r.d(W,"settings",(function(){return Om}));var Z={};r.r(Z),r.d(Z,"metadata",(function(){return _m})),r.d(Z,"name",(function(){return wm})),r.d(Z,"settings",(function(){return km}));var J={};r.r(J),r.d(J,"metadata",(function(){return Bm})),r.d(J,"name",(function(){return Tm})),r.d(J,"settings",(function(){return zm}));var Q={};r.r(Q),r.d(Q,"metadata",(function(){return Mm})),r.d(Q,"name",(function(){return Vm})),r.d(Q,"settings",(function(){return Im}));var $={};r.r($),r.d($,"metadata",(function(){return Am})),r.d($,"name",(function(){return Lm})),r.d($,"settings",(function(){return Dm}));var K={};r.r(K),r.d(K,"metadata",(function(){return rd})),r.d(K,"name",(function(){return nd})),r.d(K,"settings",(function(){return od}));var Y={};r.r(Y),r.d(Y,"metadata",(function(){return Sd})),r.d(Y,"name",(function(){return Pd})),r.d(Y,"settings",(function(){return Bd})),r.d(Y,"useQueryContext",(function(){return md}));var X={};r.r(X),r.d(X,"metadata",(function(){return zd})),r.d(X,"name",(function(){return Nd})),r.d(X,"settings",(function(){return Md}));var ee={};r.r(ee),r.d(ee,"metadata",(function(){return Rd})),r.d(ee,"name",(function(){return Hd})),r.d(ee,"settings",(function(){return Ad}));var te={};r.r(te),r.d(te,"metadata",(function(){return Dd})),r.d(te,"name",(function(){return Fd})),r.d(te,"settings",(function(){return Gd}));var re={};r.r(re),r.d(re,"metadata",(function(){return Wd})),r.d(re,"name",(function(){return Zd})),r.d(re,"settings",(function(){return Jd}));var ne={};r.r(ne),r.d(ne,"metadata",(function(){return $d})),r.d(ne,"name",(function(){return Kd})),r.d(ne,"settings",(function(){return Yd}));var oe={};r.r(oe),r.d(oe,"metadata",(function(){return Xd})),r.d(oe,"name",(function(){return ep})),r.d(oe,"settings",(function(){return tp}));var ce={};r.r(ce),r.d(ce,"metadata",(function(){return op})),r.d(ce,"name",(function(){return cp})),r.d(ce,"settings",(function(){return ap}));var ae={};r.r(ae),r.d(ae,"metadata",(function(){return lp})),r.d(ae,"name",(function(){return sp})),r.d(ae,"settings",(function(){return up}));var ie={};r.r(ie),r.d(ie,"metadata",(function(){return mp})),r.d(ie,"name",(function(){return dp})),r.d(ie,"settings",(function(){return pp}));var le={};r.r(le),r.d(le,"metadata",(function(){return hp})),r.d(le,"name",(function(){return Op})),r.d(le,"settings",(function(){return fp}));var se={};r.r(se),r.d(se,"metadata",(function(){return vp})),r.d(se,"name",(function(){return jp})),r.d(se,"settings",(function(){return yp}));var ue={};r.r(ue),r.d(ue,"metadata",(function(){return kp})),r.d(ue,"name",(function(){return Ep})),r.d(ue,"settings",(function(){return Cp}));var be={};r.r(be),r.d(be,"metadata",(function(){return Pp})),r.d(be,"name",(function(){return Bp})),r.d(be,"settings",(function(){return Tp}));var me={};r.r(me),r.d(me,"metadata",(function(){return Np})),r.d(me,"name",(function(){return Mp})),r.d(me,"settings",(function(){return Vp}));var de={};r.r(de),r.d(de,"metadata",(function(){return Rp})),r.d(de,"name",(function(){return Hp})),r.d(de,"settings",(function(){return Ap}));var pe={};r.r(pe),r.d(pe,"metadata",(function(){return Lp})),r.d(pe,"name",(function(){return Dp})),r.d(pe,"settings",(function(){return Fp}));var ge={};r.r(ge),r.d(ge,"metadata",(function(){return qp})),r.d(ge,"name",(function(){return Wp})),r.d(ge,"settings",(function(){return Zp}));var he={};r.r(he),r.d(he,"metadata",(function(){return Yp})),r.d(he,"name",(function(){return Xp})),r.d(he,"settings",(function(){return eg}));var Oe={};r.r(Oe),r.d(Oe,"metadata",(function(){return rg})),r.d(Oe,"name",(function(){return ng})),r.d(Oe,"settings",(function(){return og}));var fe={};r.r(fe),r.d(fe,"metadata",(function(){return cg})),r.d(fe,"name",(function(){return ag})),r.d(fe,"settings",(function(){return ig}));var ve=r(15),je=r(5),ye=r(42),_e=r(6),we=r(11),ke=r(2),Ee=r(1),Ce=r(0),xe=r(7),Se=Object(Ce.createElement)(xe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Ce.createElement)(xe.Path,{d:"M18.3 4H9.9v-.1l-.9.2c-2.3.4-4 2.4-4 4.8s1.7 4.4 4 4.8l.7.1V20h1.5V5.5h2.9V20h1.5V5.5h2.7V4z"})),Pe=r(12),Be=r.n(Pe);function Te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ze(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ne={className:!1},Me={align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:""},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},fontSize:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]},style:{type:"object"}},Ve=function(e){if(!e.customTextColor&&!e.customBackgroundColor&&!e.customFontSize)return e;var t={};return(e.customTextColor||e.customBackgroundColor)&&(t.color={}),e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customFontSize&&(t.typography={fontSize:e.customFontSize}),ze(ze({},Object(ke.omit)(e,["customTextColor","customBackgroundColor","customFontSize"])),{},{style:t})},Ie=[{supports:Ne,attributes:ze(ze({},Object(ke.omit)(Me,["style"])),{},{customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}}),migrate:Ve,save:function(e){var t,r=e.attributes,n=r.align,o=r.content,c=r.dropCap,a=r.backgroundColor,i=r.textColor,l=r.customBackgroundColor,s=r.customTextColor,u=r.fontSize,b=r.customFontSize,m=r.direction,d=Object(_e.getColorClassName)("color",i),p=Object(_e.getColorClassName)("background-color",a),g=Object(_e.getFontSizeClass)(u),h=Be()((t={"has-text-color":i||s,"has-background":a||l,"has-drop-cap":c},Object(je.a)(t,"has-text-align-".concat(n),n),Object(je.a)(t,g,g),Object(je.a)(t,d,d),Object(je.a)(t,p,p),t)),O={backgroundColor:p?void 0:l,color:d?void 0:s,fontSize:g?void 0:b};return Object(Ce.createElement)(_e.RichText.Content,{tagName:"p",style:O,className:h||void 0,value:o,dir:m})}},{supports:Ne,attributes:ze(ze({},Object(ke.omit)(Me,["style"])),{},{customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}}),migrate:Ve,save:function(e){var t,r=e.attributes,n=r.align,o=r.content,c=r.dropCap,a=r.backgroundColor,i=r.textColor,l=r.customBackgroundColor,s=r.customTextColor,u=r.fontSize,b=r.customFontSize,m=r.direction,d=Object(_e.getColorClassName)("color",i),p=Object(_e.getColorClassName)("background-color",a),g=Object(_e.getFontSizeClass)(u),h=Be()((t={"has-text-color":i||s,"has-background":a||l,"has-drop-cap":c},Object(je.a)(t,g,g),Object(je.a)(t,d,d),Object(je.a)(t,p,p),t)),O={backgroundColor:p?void 0:l,color:d?void 0:s,fontSize:g?void 0:b,textAlign:n};return Object(Ce.createElement)(_e.RichText.Content,{tagName:"p",style:O,className:h||void 0,value:o,dir:m})}},{supports:Ne,attributes:ze(ze({},Object(ke.omit)(Me,["style"])),{},{customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"},width:{type:"string"}}),migrate:Ve,save:function(e){var t,r=e.attributes,n=r.width,o=r.align,c=r.content,a=r.dropCap,i=r.backgroundColor,l=r.textColor,s=r.customBackgroundColor,u=r.customTextColor,b=r.fontSize,m=r.customFontSize,d=Object(_e.getColorClassName)("color",l),p=Object(_e.getColorClassName)("background-color",i),g=b&&"is-".concat(b,"-text"),h=Be()((t={},Object(je.a)(t,"align".concat(n),n),Object(je.a)(t,"has-background",i||s),Object(je.a)(t,"has-drop-cap",a),Object(je.a)(t,g,g),Object(je.a)(t,d,d),Object(je.a)(t,p,p),t)),O={backgroundColor:p?void 0:s,color:d?void 0:u,fontSize:g?void 0:m,textAlign:o};return Object(Ce.createElement)(_e.RichText.Content,{tagName:"p",style:O,className:h||void 0,value:c})}},{supports:Ne,attributes:Object(ke.omit)(ze(ze({},Me),{},{fontSize:{type:"number"}}),["style"]),save:function(e){var t,r=e.attributes,n=r.width,o=r.align,c=r.content,a=r.dropCap,i=r.backgroundColor,l=r.textColor,s=r.fontSize,u=Be()((t={},Object(je.a)(t,"align".concat(n),n),Object(je.a)(t,"has-background",i),Object(je.a)(t,"has-drop-cap",a),t)),b={backgroundColor:i,color:l,fontSize:s,textAlign:o};return Object(Ce.createElement)("p",{style:b,className:u||void 0},c)},migrate:function(e){return Ve(Object(ke.omit)(ze(ze({},e),{},{customFontSize:Object(ke.isFinite)(e.fontSize)?e.fontSize:void 0,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.backgroundColor&&"#"===e.backgroundColor[0]?e.backgroundColor:void 0})))}},{supports:Ne,attributes:ze(ze({},Me),{},{content:{type:"string",source:"html",default:""}}),save:function(e){var t=e.attributes;return Object(Ce.createElement)(Ce.RawHTML,null,t.content)},migrate:function(e){return e}}],Re=r(10),He=r(9),Ae=r(3),Le=r(4),De=Object(Ce.createElement)(xe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(Ce.createElement)(xe.Path,{d:"M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z"}));function Fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ge(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ue(e){var t=e.direction,r=e.setDirection;return Object(Ee.isRTL)()&&Object(Ce.createElement)(Ae.ToolbarGroup,{controls:[{icon:De,title:Object(Ee._x)("Left to right","editor button"),isActive:"ltr"===t,onClick:function(){r("ltr"===t?void 0:"ltr")}}]})}var qe={from:[{type:"raw",priority:20,selector:"p",schema:function(e){return{p:{children:e.phrasingContentSchema,attributes:e.isPaste?[]:["style","id"]}}},transform:function(e){var t=Object(we.getBlockAttributes)("core/paragraph",e.outerHTML),r=(e.style||{}).textAlign;return"left"!==r&&"center"!==r&&"right"!==r||(t.align=r),Object(we.createBlock)("core/paragraph",t)}}]},We={apiVersion:2,name:"core/paragraph",category:"text",attributes:{align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:""},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{anchor:!0,className:!1,color:{link:!0},fontSize:!0,lineHeight:!0,__experimentalSelector:"p",__unstablePasteTextInline:!0},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"},Ze=We.name,Je={title:Object(Ee._x)("Paragraph","block title"),description:Object(Ee.__)("Start with the building block of all narrative."),icon:Se,keywords:[Object(Ee.__)("text")],example:{attributes:{content:Object(Ee.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."),style:{typography:{fontSize:28}},dropCap:!0}},__experimentalLabel:function(e,t){if("accessibility"===t.context){var r=e.content;return Object(ke.isEmpty)(r)?Object(Ee.__)("Empty"):r}},transforms:qe,deprecated:Ie,merge:function(e,t){return{content:(e.content||"")+(t.content||"")}},edit:function(e){var t=e.attributes,r=e.mergeBlocks,n=e.onReplace,o=e.onRemove,c=e.setAttributes,a=t.align,i=t.content,l=t.direction,s=t.dropCap,u=t.placeholder,b=t.fontSize,m=t.style,d=Object(_e.__experimentalUseEditorFeature)("typography.dropCap"),p=Object(Ce.useRef)(),g=null==m?void 0:m.fontSize,h=Object(Le.useSelect)((function(e){var t=e("core/block-editor").getSettings().fontSizes;return Object(_e.getFontSize)(t,b,g).size}),[b,g]),O=function(e,t,r){var n=Object(Ce.useState)(),o=Object(He.a)(n,2),c=o[0],a=o[1];return Object(Ce.useEffect)((function(){var r;t?a():a((r=e.current,"first-letter",r.ownerDocument.defaultView.getComputedStyle(r,"first-letter")).lineHeight)}),[t].concat(Object(ve.a)(r))),c}(p,!(d&&s),[h]),f=Object(_e.useBlockProps)({ref:p,className:Be()(Object(je.a)({"has-drop-cap":s},"has-text-align-".concat(a),a)),style:{direction:l,minHeight:O}});return Object(Ce.createElement)(Ce.Fragment,null,Object(Ce.createElement)(_e.BlockControls,null,Object(Ce.createElement)(_e.AlignmentToolbar,{value:a,onChange:function(e){return c({align:e})}}),Object(Ce.createElement)(Ue,{direction:l,setDirection:function(e){return c({direction:e})}})),d&&Object(Ce.createElement)(_e.InspectorControls,null,Object(Ce.createElement)(Ae.PanelBody,{title:Object(Ee.__)("Text settings")},Object(Ce.createElement)(Ae.ToggleControl,{label:Object(Ee.__)("Drop cap"),checked:!!s,onChange:function(){return c({dropCap:!s})},help:s?Object(Ee.__)("Showing large initial letter."):Object(Ee.__)("Toggle to show a large initial letter.")}))),Object(Ce.createElement)(_e.RichText,Object(Re.a)({identifier:"content",tagName:"p"},f,{value:i,onChange:function(e){return c({content:e})},onSplit:function(e){return e?Object(we.createBlock)("core/paragraph",Ge(Ge({},t),{},{content:e})):Object(we.createBlock)("core/paragraph")},onMerge:r,onReplace:n,onRemove:o,"aria-label":i?Object(Ee.__)("Paragraph block"):Object(Ee.__)("Empty block; start writing or type forward slash to choose a block"),placeholder:u||Object(Ee.__)("Start writing or type / to choose a block"),__unstableEmbedURLOnPaste:!0,__unstableAllowPrefixTransformations:!0})))},save:function(e){var t=e.attributes,r=t.align,n=t.content,o=t.dropCap,c=t.direction,a=Be()(Object(je.a)({"has-drop-cap":o},"has-text-align-".concat(r),r));return Object(Ce.createElement)("p",_e.useBlockProps.save({className:a,dir:c}),Object(Ce.createElement)(_e.RichText.Content,{value:n}))}},Qe=Object(Ce.createElement)(xe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Ce.createElement)(xe.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),$e={align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},Ke=[{attributes:$e,save:function(e){var t,r=e.attributes,n=r.url,o=r.alt,c=r.caption,a=r.align,i=r.href,l=r.width,s=r.height,u=r.id,b=Be()((t={},Object(je.a)(t,"align".concat(a),a),Object(je.a)(t,"is-resized",l||s),t)),m=Object(Ce.createElement)("img",{src:n,alt:o,className:u?"wp-image-".concat(u):null,width:l,height:s});return Object(Ce.createElement)("figure",{className:b},i?Object(Ce.createElement)("a",{href:i},m):m,!_e.RichText.isEmpty(c)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",value:c}))}},{attributes:$e,save:function(e){var t=e.attributes,r=t.url,n=t.alt,o=t.caption,c=t.align,a=t.href,i=t.width,l=t.height,s=t.id,u=Object(Ce.createElement)("img",{src:r,alt:n,className:s?"wp-image-".concat(s):null,width:i,height:l});return Object(Ce.createElement)("figure",{className:c?"align".concat(c):null},a?Object(Ce.createElement)("a",{href:a},u):u,!_e.RichText.isEmpty(o)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",value:o}))}},{attributes:$e,save:function(e){var t=e.attributes,r=t.url,n=t.alt,o=t.caption,c=t.align,a=t.href,i=t.width,l=t.height,s=i||l?{width:i,height:l}:{},u=Object(Ce.createElement)("img",Object(Re.a)({src:r,alt:n},s)),b={};return i?b={width:i}:"left"!==c&&"right"!==c||(b={maxWidth:"50%"}),Object(Ce.createElement)("figure",{className:c?"align".concat(c):null,style:b},a?Object(Ce.createElement)("a",{href:a},u):u,!_e.RichText.isEmpty(o)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",value:o}))}}],Ye=r(52),Xe=r(14),et=r(29),tt=Object(Ce.createElement)(xe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Ce.createElement)(xe.Path,{d:"M17.5 7v8H19V7c0-1.1-.9-2-2-2H9v1.5h8c.3 0 .5.2.5.5zM7 17.5c-.3 0-.5-.2-.5-.5V1H5v4H1v1.5h4V17c0 1.1.9 2 2 2h10.5v4H19v-4h4v-1.5H7z"})),rt=r(264),nt=r(265),ot=r(51),ct=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.78",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],at=r(128),it=r.n(at),lt=r(73),st=r.n(lt);function ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function bt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var mt=function(e){var t;return null===(t=Object(we.getBlockVariations)("core/embed"))||void 0===t?void 0:t.find((function(t){var r=t.patterns;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.some((function(t){return e.match(t)}))}(e,r)}))},dt=function(e){return e&&e.includes('class="wp-embedded-content"')},pt=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.preview,o=e.attributes,c=(o=void 0===o?{}:o).url,a=o.providerNameSlug,i=o.type;if(c&&Object(we.getBlockType)("core/embed")){var l=mt(c),s="wordpress"===a||"wp-embed"===i,u=!s&&l&&(l.attributes.providerNameSlug!==a||!a);if(u)return Object(we.createBlock)("core/embed",bt({url:c},l.attributes));var b=null===(t=Object(we.getBlockVariations)("core/embed"))||void 0===t?void 0:t.find((function(e){return"wordpress"===e.name}));if(b&&n&&dt(n.html)&&!s)return Object(we.createBlock)("core/embed",bt(bt({url:c},b.attributes),r))}},gt=function(e){var t=ct.reduce((function(e,t){return e[t.className]=!1,e}),{"wp-has-aspect-ratio":!1});return it()(e,t)};function ht(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!r)return gt(t);var n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;var o=n.body.querySelector("iframe");if(o&&o.height&&o.width)for(var c=(o.width/o.height).toFixed(2),a=0;a<ct.length;a++){var i=ct[a];if(c>=i.ratio)return it()(gt(t),i.className,"wp-has-aspect-ratio")}return t}var Ot=st()((function(e,t,r,n){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(!e)return{};var c={},a=e.type,i=void 0===a?"rich":a,l=e.html,s=e.provider_name,u=Object(ke.kebabCase)((s||t).toLowerCase());return dt(l)&&(i="wp-embed"),(l||"photo"===i)&&(c.type=i,c.providerNameSlug=u),c.className=ht(l,r,n&&o),c}));function ft(e,t){var r=Object(Ce.useState)(),n=Object(He.a)(r,2),o=n[0],c=n[1];function a(){c(e.current.clientWidth)}return Object(Ce.useEffect)(a,t),Object(Ce.useEffect)((function(){var t=e.current.ownerDocument.defaultView;return t.addEventListener("resize",a),function(){t.removeEventListener("resize",a)}}),[]),o}var vt=function(e,t){return(vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},jt=function(){return(jt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},yt=r(8),_t=r.n(yt);function wt(e,t,r,n){void 0===n&&(n=0);var o=Mt(e,t,n),c=o.width,a=o.height;return e>=t*r&&c>t*r?{width:t*r,height:t}:c>t*r?{width:e,height:e/r}:c>a*r?{width:a*r,height:a}:{width:c,height:c/r}}function kt(e,t,r,n,o){void 0===o&&(o=0);var c=Mt(t.width,t.height,o),a=c.width,i=c.height;return{x:Et(e.x,a,r.width,n),y:Et(e.y,i,r.height,n)}}function Et(e,t,r,n){var o=t*n/2-r/2;return Math.min(o,Math.max(e,-o))}function Ct(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function xt(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function St(e,t,r,n,o,c,a){void 0===c&&(c=0),void 0===a&&(a=!0);var i=a&&0===c?Pt:Bt,l={x:i(100,((t.width-r.width/o)/2-e.x/o)/t.width*100),y:i(100,((t.height-r.height/o)/2-e.y/o)/t.height*100),width:i(100,r.width/t.width*100/o),height:i(100,r.height/t.height*100/o)},s=Math.round(i(t.naturalWidth,l.width*t.naturalWidth/100)),u=Math.round(i(t.naturalHeight,l.height*t.naturalHeight/100)),b=t.naturalWidth>=t.naturalHeight*n?{width:Math.round(u*n),height:u}:{width:s,height:Math.round(s/n)};return{croppedAreaPercentages:l,croppedAreaPixels:jt(jt({},b),{x:Math.round(i(t.naturalWidth-b.width,l.x*t.naturalWidth/100)),y:Math.round(i(t.naturalHeight-b.height,l.y*t.naturalHeight/100))})}}function Pt(e,t){return Math.min(e,Math.max(0,t))}function Bt(e,t){return t}function Tt(e,t,r){var n=t.width/t.naturalWidth,o=function(e,t,r){var n=t.width/t.naturalWidth;if(r)return r.height>r.width?r.height/n/e.height:r.width/n/e.width;var o=e.width/e.height;return t.naturalWidth>=t.naturalHeight*o?t.naturalHeight/e.height:t.naturalWidth/e.width}(e,t,r),c=n*o;return{crop:{x:((t.naturalWidth-e.width)/2-e.x)*c,y:((t.naturalHeight-e.height)/2-e.y)*c},zoom:o}}function zt(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function Nt(e,t,r,n,o){var c=Math.cos,a=Math.sin,i=o*Math.PI/180;return[(e-r)*c(i)-(t-n)*a(i)+r,(e-r)*a(i)+(t-n)*c(i)+n]}function Mt(e,t,r){var n=e/2,o=t/2,c=[Nt(0,0,n,o,r),Nt(e,0,n,o,r),Nt(e,t,n,o,r),Nt(0,t,n,o,r)],a=Math.min.apply(Math,c.map((function(e){return e[0]}))),i=Math.max.apply(Math,c.map((function(e){return e[0]}))),l=Math.min.apply(Math,c.map((function(e){return e[1]})));return{width:i-a,height:Math.max.apply(Math,c.map((function(e){return e[1]})))-l}}function Vt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var It=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.imageRef=null,r.videoRef=null,r.containerRef=null,r.styleRef=null,r.containerRect=null,r.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},r.dragStartPosition={x:0,y:0},r.dragStartCrop={x:0,y:0},r.lastPinchDistance=0,r.lastPinchRotation=0,r.rafDragTimeout=null,r.rafPinchTimeout=null,r.wheelTimer=null,r.state={cropSize:null,hasWheelJustStarted:!1},r.preventZoomSafari=function(e){return e.preventDefault()},r.cleanEvents=function(){document.removeEventListener("mousemove",r.onMouseMove),document.removeEventListener("mouseup",r.onDragStopped),document.removeEventListener("touchmove",r.onTouchMove),document.removeEventListener("touchend",r.onDragStopped)},r.clearScrollEvent=function(){r.containerRef&&r.containerRef.removeEventListener("wheel",r.onWheel),r.wheelTimer&&clearTimeout(r.wheelTimer)},r.onMediaLoad=function(){r.computeSizes(),r.emitCropData(),r.setInitialCrop(),r.props.onMediaLoaded&&r.props.onMediaLoaded(r.mediaSize)},r.setInitialCrop=function(){var e=r.props,t=e.initialCroppedAreaPixels,n=e.cropSize;if(t){var o=Tt(t,r.mediaSize,n),c=o.crop,a=o.zoom;r.props.onCropChange(c),r.props.onZoomChange&&r.props.onZoomChange(a)}},r.computeSizes=function(){var e,t,n,o,c=r.imageRef||r.videoRef;if(c){r.mediaSize={width:c.offsetWidth,height:c.offsetHeight,naturalWidth:(null===(e=r.imageRef)||void 0===e?void 0:e.naturalWidth)||(null===(t=r.videoRef)||void 0===t?void 0:t.videoWidth)||0,naturalHeight:(null===(n=r.imageRef)||void 0===n?void 0:n.naturalHeight)||(null===(o=r.videoRef)||void 0===o?void 0:o.videoHeight)||0};var a=r.props.cropSize?r.props.cropSize:wt(c.offsetWidth,c.offsetHeight,r.props.aspect,r.props.rotation);r.setState({cropSize:a},r.recomputeCropPosition)}r.containerRef&&(r.containerRect=r.containerRef.getBoundingClientRect())},r.onMouseDown=function(e){e.preventDefault(),document.addEventListener("mousemove",r.onMouseMove),document.addEventListener("mouseup",r.onDragStopped),r.onDragStart(t.getMousePoint(e))},r.onMouseMove=function(e){return r.onDrag(t.getMousePoint(e))},r.onTouchStart=function(e){e.preventDefault(),document.addEventListener("touchmove",r.onTouchMove,{passive:!1}),document.addEventListener("touchend",r.onDragStopped),2===e.touches.length?r.onPinchStart(e):1===e.touches.length&&r.onDragStart(t.getTouchPoint(e.touches[0]))},r.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?r.onPinchMove(e):1===e.touches.length&&r.onDrag(t.getTouchPoint(e.touches[0]))},r.onDragStart=function(e){var t,n,o=e.x,c=e.y;r.dragStartPosition={x:o,y:c},r.dragStartCrop=jt({},r.props.crop),null===(n=(t=r.props).onInteractionStart)||void 0===n||n.call(t)},r.onDrag=function(e){var t=e.x,n=e.y;r.rafDragTimeout&&window.cancelAnimationFrame(r.rafDragTimeout),r.rafDragTimeout=window.requestAnimationFrame((function(){if(r.state.cropSize&&void 0!==t&&void 0!==n){var e=t-r.dragStartPosition.x,o=n-r.dragStartPosition.y,c={x:r.dragStartCrop.x+e,y:r.dragStartCrop.y+o},a=r.props.restrictPosition?kt(c,r.mediaSize,r.state.cropSize,r.props.zoom,r.props.rotation):c;r.props.onCropChange(a)}}))},r.onDragStopped=function(){var e,t;r.cleanEvents(),r.emitCropData(),null===(t=(e=r.props).onInteractionEnd)||void 0===t||t.call(e)},r.onWheel=function(e){e.preventDefault();var n=t.getMousePoint(e),o=r.props.zoom-e.deltaY*r.props.zoomSpeed/200;r.setNewZoom(o,n),r.state.hasWheelJustStarted||r.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=r.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),r.wheelTimer&&clearTimeout(r.wheelTimer),r.wheelTimer=window.setTimeout((function(){return r.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=r.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)},r.getPointOnContainer=function(e){var t=e.x,n=e.y;if(!r.containerRect)throw new Error("The Cropper is not mounted");return{x:r.containerRect.width/2-(t-r.containerRect.left),y:r.containerRect.height/2-(n-r.containerRect.top)}},r.getPointOnMedia=function(e){var t=e.x,n=e.y,o=r.props,c=o.crop,a=o.zoom;return{x:(t+c.x)/a,y:(n+c.y)/a}},r.setNewZoom=function(e,t){if(r.state.cropSize&&r.props.onZoomChange){var n=r.getPointOnContainer(t),o=r.getPointOnMedia(n),c=Math.min(r.props.maxZoom,Math.max(e,r.props.minZoom)),a={x:o.x*c-n.x,y:o.y*c-n.y},i=r.props.restrictPosition?kt(a,r.mediaSize,r.state.cropSize,c,r.props.rotation):a;r.props.onCropChange(i),r.props.onZoomChange(c)}},r.emitCropData=function(){if(r.state.cropSize){var e=St(r.props.restrictPosition?kt(r.props.crop,r.mediaSize,r.state.cropSize,r.props.zoom,r.props.rotation):r.props.crop,r.mediaSize,r.state.cropSize,r.getAspect(),r.props.zoom,r.props.rotation,r.props.restrictPosition),t=e.croppedAreaPercentages,n=e.croppedAreaPixels;r.props.onCropComplete&&r.props.onCropComplete(t,n)}},r.recomputeCropPosition=function(){if(r.state.cropSize){var e=r.props.restrictPosition?kt(r.props.crop,r.mediaSize,r.state.cropSize,r.props.zoom,r.props.rotation):r.props.crop;r.props.onCropChange(e),r.emitCropData()}},r}return function(e,t){function __(){this.constructor=e}vt(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.computeSizes),this.containerRef&&(this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.preventZoomSafari),this.containerRef.addEventListener("gesturechange",this.preventZoomSafari)),this.props.disableAutomaticStylesInjection||(this.styleRef=document.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",document.head.appendChild(this.styleRef)),this.imageRef&&this.imageRef.complete&&this.onMediaLoad()},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.computeSizes),this.containerRef&&(this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.containerRef.removeEventListener("gesturechange",this.preventZoomSafari)),this.styleRef&&this.styleRef.remove(),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():e.cropSize!==this.props.cropSize&&this.computeSizes(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,r=e.aspect;return t?t.width/t.height:r},t.prototype.onPinchStart=function(e){var r=t.getTouchPoint(e.touches[0]),n=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=Ct(r,n),this.lastPinchRotation=xt(r,n),this.onDragStart(zt(r,n))},t.prototype.onPinchMove=function(e){var r=this,n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),c=zt(n,o);this.onDrag(c),this.rafPinchTimeout&&window.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=window.requestAnimationFrame((function(){var e=Ct(n,o),t=r.props.zoom*(e/r.lastPinchDistance);r.setNewZoom(t,c),r.lastPinchDistance=e;var a=xt(n,o),i=r.props.rotation+(a-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(i),r.lastPinchRotation=a}))},t.prototype.render=function(){var e=this,t=this.props,r=t.image,n=t.video,o=t.mediaProps,c=t.crop,a=c.x,i=c.y,l=t.rotation,s=t.zoom,u=t.cropShape,b=t.showGrid,m=t.style,d=m.containerStyle,p=m.cropAreaStyle,g=m.mediaStyle,h=t.classes,O=h.containerClassName,f=h.cropAreaClassName,v=h.mediaClassName;return _t.a.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:d,className:Vt("reactEasyCrop_Container",O)},r?_t.a.createElement("img",jt({alt:"",className:Vt("reactEasyCrop_Image",v)},o,{src:r,ref:function(t){return e.imageRef=t},style:jt(jt({},g),{transform:"translate("+a+"px, "+i+"px) rotate("+l+"deg) scale("+s+")"}),onLoad:this.onMediaLoad})):n&&_t.a.createElement("video",jt({autoPlay:!0,loop:!0,muted:!0,className:Vt("reactEasyCrop_Video",v)},o,{src:n,ref:function(t){return e.videoRef=t},onLoadedMetadata:this.onMediaLoad,style:jt(jt({},g),{transform:"translate("+a+"px, "+i+"px) rotate("+l+"deg) scale("+s+")"}),controls:!1})),this.state.cropSize&&_t.a.createElement("div",{style:jt(jt({},p),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Vt("reactEasyCrop_CropArea","round"===u&&"reactEasyCrop_CropAreaRound",b&&"reactEasyCrop_CropAreaGrid",f)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(_t.a.Component),Rt={position:"bottom right",isAlternate:!0},Ht=r(47),At=r.n(Ht),Lt=r(34);function Dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Dt(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Gt=Object(Ce.createContext)({}),Ut=function(){return Object(Ce.useContext)(Gt)};function qt(e){var t=e.id,r=e.url,n=e.naturalWidth,o=e.naturalHeight,c=e.isEditing,a=e.onFinishEditing,i=e.onSaveImage,l=e.children,s=function(e,t){var r=function(e){var t=e.url,r=e.naturalWidth,n=e.naturalHeight,o=Object(Ce.useState)(),c=Object(He.a)(o,2),a=c[0],i=c[1],l=Object(Ce.useState)(),s=Object(He.a)(l,2),u=s[0],b=s[1],m=Object(Ce.useState)({x:0,y:0}),d=Object(He.a)(m,2),p=d[0],g=d[1],h=Object(Ce.useState)(),O=Object(He.a)(h,2),f=O[0],v=O[1],j=Object(Ce.useState)(),y=Object(He.a)(j,2),_=y[0],w=y[1],k=Object(Ce.useState)(),E=Object(He.a)(k,2),C=E[0],x=E[1],S=Object(Ce.useState)(),P=Object(He.a)(S,2),B=P[0],T=P[1],z=Object(Ce.useCallback)((function(){g({x:0,y:0}),v(100),w(0),x(r/n),T(r/n)}),[r,n,g,v,w,x,T]),N=Object(Ce.useCallback)((function(){var e=(_+90)%360,o=r/n;if(_%180==90&&(o=n/r),0===e)return i(),w(e),x(1/C),void g({x:-p.y*o,y:p.x*o});var c=new window.Image;c.src=t,c.onload=function(t){var r=document.createElement("canvas"),n=0,c=0;e%180?(r.width=t.target.height,r.height=t.target.width):(r.width=t.target.width,r.height=t.target.height),90!==e&&180!==e||(n=r.width),270!==e&&180!==e||(c=r.height);var a=r.getContext("2d");a.translate(n,c),a.rotate(e*Math.PI/180),a.drawImage(t.target,0,0),r.toBlob((function(t){i(URL.createObjectURL(t)),w(e),x(1/C),g({x:-p.y*o,y:p.x*o})}))};var a=Object(Lt.applyFilters)("media.crossOrigin",void 0,t);"string"==typeof a&&(c.crossOrigin=a)}),[_,r,n,i,w,x,g]);return Object(Ce.useMemo)((function(){return{editedUrl:a,setEditedUrl:i,crop:u,setCrop:b,position:p,setPosition:g,zoom:f,setZoom:v,rotation:_,setRotation:w,rotateClockwise:N,aspect:C,setAspect:x,defaultAspect:B,initializeTransformValues:z}}),[a,i,u,b,p,g,f,v,_,w,N,C,x,B,z])}(e),n=r.initializeTransformValues;return Object(Ce.useEffect)((function(){t&&n()}),[t,n]),r}({url:r,naturalWidth:n,naturalHeight:o},c),u=function(e){var t=e.crop,r=e.rotation,n=e.height,o=e.width,c=e.aspect,a=e.url,i=e.id,l=e.onSaveImage,s=e.onFinishEditing,u=Object(Le.useDispatch)(ot.store).createErrorNotice,b=Object(Ce.useState)(!1),m=Object(He.a)(b,2),d=m[0],p=m[1],g=Object(Ce.useCallback)((function(){p(!1),s()}),[p,s]),h=Object(Ce.useCallback)((function(){p(!0);var e={};(t.width<99.9||t.height<99.9)&&(e=t),r>0&&(e.rotation=r),e.src=a,At()({path:"/wp/v2/media/".concat(i,"/edit"),method:"POST",data:e}).then((function(e){l({id:e.id,url:e.source_url,height:n&&o?o/c:void 0})})).catch((function(e){u(Object(Ee.sprintf)(
|
2 |
/* translators: 1. Error message */
|
3 |
+
Object(Ee.__)("Could not edit image. %s"),e.message),{id:"image-editing-error",type:"snackbar"})})).finally((function(){p(!1),s()}))}),[p,t,r,n,o,c,a,l,u,p,s]);return Object(Ce.useMemo)((function(){return{isInProgress:d,apply:h,cancel:g}}),[d,h,g])}(Ft({id:t,url:r,onSaveImage:i,onFinishEditing:a},s)),b=Object(Ce.useMemo)((function(){return Ft(Ft({},s),u)}),[s,u]);return Object(Ce.createElement)(Gt.Provider,{value:b},l)}function Wt(e){var t=e.url,r=e.width,n=e.height,o=e.clientWidth,c=e.naturalHeight,a=e.naturalWidth,i=Ut(),l=i.isInProgress,s=i.editedUrl,u=i.position,b=i.zoom,m=i.aspect,d=i.setPosition,p=i.setCrop,g=i.setZoom,h=n||o*c/a;return i.rotation%180==90&&(h=o*a/c),Object(Ce.createElement)("div",{className:Be()("wp-block-image__crop-area",{"is-applying":l}),style:{width:r||o,height:h}},Object(Ce.createElement)(It,{image:s||t,disabled:l,minZoom:1,maxZoom:3,crop:u,zoom:b/100,aspect:m,onCropChange:d,onCropComplete:function(e){p(e)},onZoomChange:function(e){g(100*e)}}),l&&Object(Ce.createElement)(Ae.Spinner,null))}var Zt=r(258);function Jt(){var e=Ut(),t=e.isInProgress,r=e.zoom,n=e.setZoom;return Object(Ce.createElement)(Ae.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:Rt,renderToggle:function(e){var r=e.isOpen,n=e.onToggle;return Object(Ce.createElement)(Ae.ToolbarButton,{icon:Zt.a,label:Object(Ee.__)("Zoom"),onClick:n,"aria-expanded":r,disabled:t})},renderContent:function(){return Object(Ce.createElement)(Ae.RangeControl,{label:Object(Ee.__)("Zoom"),min:100,max:300,value:Math.round(r),onChange:n})}})}var Qt=r(145),$t=Object(Ce.createElement)(xe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Ce.createElement)(xe.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}));function Kt(e){var t=e.aspectRatios,r=e.isDisabled,n=e.label,o=e.onClick,c=e.value;return Object(Ce.createElement)(Ae.MenuGroup,{label:n},t.map((function(e){var t=e.title,n=e.aspect;return Object(Ce.createElement)(Ae.MenuItem,{key:n,disabled:r,onClick:function(){o(n)},role:"menuitemradio",isSelected:n===c,icon:n===c?Qt.a:void 0},t)})))}function Yt(e){var t=e.toggleProps,r=Ut(),n=r.isInProgress,o=r.aspect,c=r.setAspect,a=r.defaultAspect;return Object(Ce.createElement)(Ae.DropdownMenu,{icon:$t,label:Object(Ee.__)("Aspect Ratio"),popoverProps:Rt,toggleProps:t,className:"wp-block-image__aspect-ratio"},(function(e){var t=e.onClose;return Object(Ce.createElement)(Ce.Fragment,null,Object(Ce.createElement)(Kt,{isDisabled:n,onClick:function(e){c(e),t()},value:o,aspectRatios:[{title:Object(Ee.__)("Original"),aspect:a},{title:Object(Ee.__)("Square"),aspect:1}]}),Object(Ce.createElement)(Kt,{label:Object(Ee.__)("Landscape"),isDisabled:n,onClick:function(e){c(e),t()},value:o,aspectRatios:[{title:Object(Ee.__)("16:10"),aspect:1.6},{title:Object(Ee.__)("16:9"),aspect:16/9},{title:Object(Ee.__)("4:3"),aspect:4/3},{title:Object(Ee.__)("3:2"),aspect:1.5}]}),Object(Ce.createElement)(Kt,{label:Object(Ee.__)("Portrait"),isDisabled:n,onClick:function(e){c(e),t()},value:o,aspectRatios:[{title:Object(Ee.__)("10:16"),aspect:.625},{title:Object(Ee.__)("9:16"),aspect:9/16},{title:Object(Ee.__)("3:4"),aspect:3/4},{title:Object(Ee.__)("2:3"),aspect:2/3}]}))}))}var Xt=Object(Ce.createElement)(xe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Ce.createElement)(xe.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));function er(){var e=Ut(),t=e.isInProgress,r=e.rotateClockwise;return Object(Ce.createElement)(Ae.ToolbarButton,{icon:Xt,label:Object(Ee.__)("Rotate"),onClick:r,disabled:t})}function tr(){var e=Ut(),t=e.isInProgress,r=e.apply,n=e.cancel;return Object(Ce.createElement)(Ce.Fragment,null,Object(Ce.createElement)(Ae.ToolbarButton,{onClick:r,disabled:t},Object(Ee.__)("Apply")),Object(Ce.createElement)(Ae.ToolbarButton,{onClick:n},Object(Ee.__)("Cancel")))}function rr(e){var t=e.url,r=e.width,n=e.height,o=e.clientWidth,c=e.naturalHeight,a=e.naturalWidth;return Object(Ce.createElement)(Ce.Fragment,null,Object(Ce.createElement)(Wt,{url:t,width:r,height:n,clientWidth:o,naturalHeight:c,naturalWidth:a}),Object(Ce.createElement)(_e.BlockControls,null,Object(Ce.createElement)(Ae.ToolbarGroup,null,Object(Ce.createElement)(Jt,null),Object(Ce.createElement)(Ae.ToolbarItem,null,(function(e){return Object(Ce.createElement)(Yt,{toggleProps:e})}))),Object(Ce.createElement)(Ae.ToolbarGroup,null,Object(Ce.createElement)(er,null)),Object(Ce.createElement)(Ae.ToolbarGroup,null,Object(Ce.createElement)(tr,null))))}var nr=["image"];function or(e){var t=e.attributes,r=t.url,n=void 0===r?"":r,o=t.alt,c=t.caption,a=t.align,i=t.id,l=t.href,s=t.rel,u=t.linkClass,b=t.linkDestination,m=t.title,d=t.width,p=t.height,g=t.linkTarget,h=t.sizeSlug,O=e.setAttributes,f=e.isSelected,v=e.insertBlocksAfter,j=e.onReplace,y=e.onSelectImage,_=e.onSelectURL,w=e.onUploadError,k=e.containerRef,E=Object(Ce.useRef)(),C=Object(Xe.usePrevious)(n),x=Object(Le.useSelect)((function(e){var t=e("core").getMedia,r=e("core/block-editor"),n=r.getMultiSelectedBlockClientIds,o=r.getBlockName,c=r.getSelectedBlock,a=r.getSelectedBlockClientId,l=n();return{block:c(),currentId:a(),image:i&&f?t(i):null,multiImageSelection:l.length&&l.every((function(e){return"core/image"===o(e)}))}}),[i,f]),S=x.block,P=x.currentId,B=x.image,T=x.multiImageSelection,z=Object(Le.useSelect)((function(e){var t=e("core/block-editor").getSettings;return Object(ke.pick)(t(),["imageEditing","imageSizes","maxWidth","mediaUpload"])})),N=z.imageEditing,M=z.imageSizes,V=z.maxWidth,I=z.mediaUpload,R=Object(Le.useDispatch)("core/block-editor"),H=R.replaceBlocks,A=R.toggleSelection,L=Object(Le.useDispatch)(ot.store),D=L.createErrorNotice,F=L.createSuccessNotice,G=Object(Xe.useViewportMatch)("medium"),U=Object(Ce.useState)(!1),q=Object(He.a)(U,2),W=q[0],Z=q[1],J=Object(ke.includes)(["wide","full"],a),Q=Object(Ce.useState)({}),$=Object(He.a)(Q,2),K=$[0],Y=K.naturalWidth,X=K.naturalHeight,ee=$[1],te=Object(Ce.useState)(!1),re=Object(He.a)(te,2),ne=re[0],oe=re[1],ce=Object(Ce.useState)(),ae=Object(He.a)(ce,2),ie=ae[0],le=ae[1],se=ft(k,[a]),ue=!J&&G,be=Object(ke.map)(Object(ke.filter)(M,(function(e){var t=e.slug;return Object(ke.get)(B,["media_details","sizes",t,"source_url"])})),(function(e){var t=e.name;return{value:e.slug,label:t}})),me=!!Object(we.getBlockType)("core/cover");Object(Ce.useEffect)((function(){f||Z(!1)}),[f]),Object(Ce.useEffect)((function(){lr(i,n)&&f&&!ie&&window.fetch(n).then((function(e){return e.blob()})).then((function(e){return le(e)}))}),[i,n,f,ie]),Object(Ce.useEffect)((function(){n&&!C&&f&&E.current.focus()}),[n,C]),Object(Ce.useEffect)((function(){f||oe(!1)}),[f]);var de,pe=i&&Y&&X&&N,ge=!T&&pe&&!ne,he=Object(Ce.createElement)(Ce.Fragment,null,Object(Ce.createElement)(_e.BlockControls,null,!T&&!ne&&Object(Ce.createElement)(Ae.ToolbarGroup,null,Object(Ce.createElement)(_e.__experimentalImageURLInputUI,{url:l||"",onChangeUrl:function(e){O(e)},linkDestination:b,mediaUrl:B&&B.source_url||n,mediaLink:B&&B.link,linkTarget:g,linkClass:u,rel:s})),ge&&Object(Ce.createElement)(Ae.ToolbarGroup,null,Object(Ce.createElement)(Ae.ToolbarButton,{onClick:function(){return oe(!0)},icon:tt,label:Object(Ee.__)("Crop")})),ie&&Object(Ce.createElement)(Ae.ToolbarGroup,null,Object(Ce.createElement)(Ae.ToolbarButton,{onClick:function(){I({filesList:[ie],onFileChange:function(e){var t=Object(He.a)(e,1)[0];y(t),Object(Ye.isBlobURL)(t.url)||(le(),F(Object(Ee.__)("Image uploaded."),{type:"snackbar"}))},allowedTypes:nr,onError:function(e){D(e,{type:"snackbar"})}})},icon:rt.a,label:Object(Ee.__)("Upload external image")})),!T&&!ne&&Object(Ce.createElement)(_e.MediaReplaceFlow,{mediaId:i,mediaURL:n,allowedTypes:nr,accept:"image/*",onSelect:y,onSelectURL:_,onError:w}),!T&&me&&Object(Ce.createElement)(Ae.ToolbarGroup,null,Object(Ce.createElement)(Ae.ToolbarButton,{icon:nt.a,label:Object(Ee.__)("Add text over image"),onClick:function(){return H(P,Object(we.switchToBlockType)(S,"core/cover"))}}))),Object(Ce.createElement)(_e.InspectorControls,null,Object(Ce.createElement)(Ae.PanelBody,{title:Object(Ee.__)("Image settings")},!T&&Object(Ce.createElement)(Ae.TextareaControl,{label:Object(Ee.__)("Alt text (alternative text)"),value:o,onChange:function(e){O({alt:e})},help:Object(Ce.createElement)(Ce.Fragment,null,Object(Ce.createElement)(Ae.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},Object(Ee.__)("Describe the purpose of the image")),Object(Ee.__)("Leave empty if the image is purely decorative."))}),Object(Ce.createElement)(_e.__experimentalImageSizeControl,{onChangeImage:function(e){var t=Object(ke.get)(B,["media_details","sizes",e,"source_url"]);if(!t)return null;O({url:t,width:void 0,height:void 0,sizeSlug:e})},onChange:function(e){return O(e)},slug:h,width:d,height:p,imageSizeOptions:be,isResizable:ue,imageWidth:Y,imageHeight:X}))),Object(Ce.createElement)(_e.InspectorAdvancedControls,null,Object(Ce.createElement)(Ae.TextControl,{label:Object(Ee.__)("Title attribute"),value:m||"",onChange:function(e){O({title:e})},help:Object(Ce.createElement)(Ce.Fragment,null,Object(Ee.__)("Describe the role of this image on the page."),Object(Ce.createElement)(Ae.ExternalLink,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute"},Object(Ee.__)("(Note: many devices and browsers do not display this text.)")))}))),Oe=function(e){var t=Object(et.getPath)(e);if(t)return Object(ke.last)(t.split("/"))}(n);de=o||(Oe?Object(Ee.sprintf)(
|
4 |
/* translators: %s: file name */
|
5 |
Object(Ee.__)("This image has an empty alt attribute; its file name is %s"),Oe):Object(Ee.__)("This image has an empty alt attribute"));var fe,ve,je=Object(Ce.createElement)(Ce.Fragment,null,Object(Ce.createElement)("img",{src:n,alt:de,onClick:function(){W&&Z(!1)},onError:function(){var e;void 0!==(e=pt({attributes:{url:n}}))&&j(e)},onLoad:function(e){ee(Object(ke.pick)(e.target,["naturalWidth","naturalHeight"]))}}),Object(Ye.isBlobURL)(n)&&Object(Ce.createElement)(Ae.Spinner,null));if(se&&Y&&X){var ye=Y>se;fe=ye?se:Y,ve=ye?se*(X/Y):X}if(pe&&ne)je=Object(Ce.createElement)(rr,{url:n,width:d,height:p,clientWidth:se,naturalHeight:X,naturalWidth:Y});else if(ue&&fe){var xe=d||fe,Se=p||ve,Pe=Y/X,Be=Y<X?20:20*Pe,Te=X<Y?20:20/Pe,ze=2.5*V,Ne=!1,Me=!1;"center"===a?(Ne=!0,Me=!0):Object(Ee.isRTL)()?"left"===a?Ne=!0:Me=!0:"right"===a?Me=!0:Ne=!0,je=Object(Ce.createElement)(Ae.ResizableBox,{size:{width:d,height:p},showHandle:f,minWidth:Be,maxWidth:ze,minHeight:Te,maxHeight:ze/Pe,lockAspectRatio:!0,enable:{top:!1,right:Ne,bottom:!0,left:Me},onResizeStart:function(){A(!1)},onResizeStop:function(e,t,r,n){A(!0),O({width:parseInt(xe+n.width,10),height:parseInt(Se+n.height,10)})}},je)}else je=Object(Ce.createElement)("div",{style:{width:d,height:p}},je);return Object(Ce.createElement)(qt,{id:i,url:n,naturalWidth:Y,naturalHeight:X,clientWidth:se,onSaveImage:function(e){return O(e)},isEditing:ne,onFinishEditing:function(){return oe(!1)}},he,je,(!_e.RichText.isEmpty(c)||f)&&Object(Ce.createElement)(_e.RichText,{ref:E,tagName:"figcaption","aria-label":Object(Ee.__)("Image caption text"),placeholder:Object(Ee.__)("Write caption…"),value:c,unstableOnFocus:function(){W||Z(!0)},onChange:function(e){return O({caption:e})},isSelected:W,inlineToolbar:!0,__unstableOnSplitAtEnd:function(){return v(Object(we.createBlock)("core/paragraph"))}}))}function cr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ar(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cr(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ir=function(e,t){return!e&&Object(Ye.isBlobURL)(t)},lr=function(e,t){return t&&!e&&!Object(Ye.isBlobURL)(t)},sr=Object(Ae.withNotices)((function(e){var t=e.attributes,r=e.setAttributes,n=e.isSelected,o=e.className,c=e.noticeUI,a=e.insertBlocksAfter,i=e.noticeOperations,l=e.onReplace,s=t.url,u=void 0===s?"":s,b=t.alt,m=t.caption,d=t.align,p=t.id,g=t.width,h=t.height,O=t.sizeSlug,f=Object(Ce.useRef)();Object(Ce.useEffect)((function(){f.current=b}),[b]);var v=Object(Ce.useRef)();Object(Ce.useEffect)((function(){v.current=m}),[m]);var j=Object(Ce.useRef)(),y=Object(Le.useSelect)((function(e){return(0,e("core/block-editor").getSettings)().mediaUpload}));function _(e){i.removeAllNotices(),i.createErrorNotice(e)}function w(e){var n,o,c,a,i;if(e&&e.url){var l,s,b,m=(l=e,(s=Object(ke.pick)(l,["alt","id","link","caption"])).url=Object(ke.get)(l,["sizes","large","url"])||Object(ke.get)(l,["media_details","sizes","large","source_url"])||l.url,s);ir(p,u)&&f.current&&(m=Object(ke.omit)(m,["alt"])),v.current&&!Object(ke.get)(m,["caption"])&&(m=Object(ke.omit)(m,["caption"])),b=e.id&&e.id===p?{url:u}:{width:void 0,height:void 0,sizeSlug:"large"};var d,g=t.linkDestination;if(!g)switch((null===(n=wp)||void 0===n||null===(o=n.media)||void 0===o||null===(c=o.view)||void 0===c||null===(a=c.settings)||void 0===a||null===(i=a.defaultProps)||void 0===i?void 0:i.link)||"none"){case"file":case"media":g="media";break;case"post":case"attachment":g="attachment";break;case"custom":g="custom";break;case"none":g="none"}switch(g){case"media":d=e.url;break;case"attachment":d=e.link}m.href=d,r(ar(ar(ar({},m),b),{},{linkDestination:g}))}else r({url:void 0,alt:void 0,id:void 0,title:void 0,caption:void 0})}function k(e){e!==u&&r({url:e,id:void 0,sizeSlug:"large"})}var E=ir(p,u);Object(Ce.useEffect)((function(){if(E){var e=Object(Ye.getBlobByURL)(u);e&&y({filesList:[e],onFileChange:function(e){w(Object(He.a)(e,1)[0])},allowedTypes:nr,onError:function(e){i.createErrorNotice(e),r({src:void 0,id:void 0,url:void 0})}})}}),[]),Object(Ce.useEffect)((function(){if(E)return function(){Object(Ye.revokeBlobURL)(u)}}),[E]);var C=lr(p,u),x=Object(Ce.createElement)(_e.BlockControls,null,Object(Ce.createElement)(_e.BlockAlignmentToolbar,{value:d,onChange:function(e){var t=["wide","full"].includes(e)?{width:void 0,height:void 0}:{};r(ar(ar({},t),{},{align:e}))}})),S=C?u:void 0,P=!!u&&Object(Ce.createElement)("img",{alt:Object(Ee.__)("Edit image"),title:Object(Ee.__)("Edit image"),className:"edit-image-preview",src:u}),B=Object(Ce.createElement)(_e.MediaPlaceholder,{icon:Object(Ce.createElement)(_e.BlockIcon,{icon:Qe}),onSelect:w,onSelectURL:k,notices:c,onError:_,accept:"image/*",allowedTypes:nr,value:{id:p,src:S},mediaPreview:P,disableMediaButtons:u}),T=Be()(o,Object(je.a)({"is-transient":Object(Ye.isBlobURL)(u),"is-resized":!!g||!!h,"is-focused":n},"size-".concat(O),O)),z=Object(_e.useBlockProps)({ref:j,className:T});return Object(Ce.createElement)(Ce.Fragment,null,x,Object(Ce.createElement)("figure",z,u&&Object(Ce.createElement)(or,{attributes:t,setAttributes:r,isSelected:n,insertBlocksAfter:a,onReplace:l,onSelectImage:w,onSelectURL:k,onUploadError:_,containerRef:j}),B))}));function ur(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function br(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ur(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function mr(e,t){var r=document.implementation.createHTMLDocument("").body;r.innerHTML=e;var n=r.firstElementChild;if(n&&"A"===n.nodeName)return n.getAttribute(t)||void 0}var dr={img:{attributes:["src","alt","title"],classes:["alignleft","aligncenter","alignright","alignnone",/^wp-image-\d+$/]}},pr={from:[{type:"raw",isMatch:function(e){return"FIGURE"===e.nodeName&&!!e.querySelector("img")},schema:function(e){var t=e.phrasingContentSchema;return{figure:{require:["img"],children:br(br({},dr),{},{a:{attributes:["href","rel","target"],children:dr},figcaption:{children:t}})}}},transform:function(e){var t=e.className+" "+e.querySelector("img").className,r=/(?:^|\s)align(left|center|right)(?:$|\s)/.exec(t),n=""===e.id?void 0:e.id,o=r?r[1]:void 0,c=/(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(t),a=c?Number(c[1]):void 0,i=e.querySelector("a"),l=i&&i.href?"custom":void 0,s=i&&i.href?i.href:void 0,u=i&&i.rel?i.rel:void 0,b=i&&i.className?i.className:void 0,m=Object(we.getBlockAttributes)("core/image",e.outerHTML,{align:o,id:a,linkDestination:l,href:s,rel:u,linkClass:b,anchor:n});return Object(we.createBlock)("core/image",m)}},{type:"files",isMatch:function(e){return 1===e.length&&0===e[0].type.indexOf("image/")},transform:function(e){var t=e[0];return Object(we.createBlock)("core/image",{url:Object(Ye.createBlobURL)(t)})}},{type:"shortcode",tag:"caption",attributes:{url:{type:"string",source:"attribute",attribute:"src",selector:"img"},alt:{type:"string",source:"attribute",attribute:"alt",selector:"img"},caption:{shortcode:function(e,t){var r=t.shortcode,n=document.implementation.createHTMLDocument("").body;n.innerHTML=r.content;for(var o=n.querySelector("img");o&&o.parentNode&&o.parentNode!==n;)o=o.parentNode;return o&&o.parentNode.removeChild(o),n.innerHTML.trim()}},href:{shortcode:function(e,t){return mr(t.shortcode.content,"href")}},rel:{shortcode:function(e,t){return mr(t.shortcode.content,"rel")}},linkClass:{shortcode:function(e,t){return mr(t.shortcode.content,"class")}},id:{type:"number",shortcode:function(e){var t=e.named.id;if(t)return parseInt(t.replace("attachment_",""),10)}},align:{type:"string",shortcode:function(e){var t=e.named.align;return(void 0===t?"alignnone":t).replace("align","")}}}}]},gr={apiVersion:2,name:"core/image",category:"media",attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,__experimentalBorder:{radius:!0}},editorStyle:"wp-block-image-editor",style:"wp-block-image"},hr=gr.name,Or={title:Object(Ee._x)("Image","block title"),description:Object(Ee.__)("Insert an image to make a visual statement."),icon:Qe,keywords:["img",Object(Ee.__)("photo"),Object(Ee.__)("picture")],example:{attributes:{sizeSlug:"large",url:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",
|
6 |
// translators: Caption accompanying an image of the Mont Blanc, which serves as an example for the Image block.
|
11 |
/* translators: accessibility text. 1: heading level. 2: heading content. */
|
12 |
Object(Ee.__)("Level %1$s. %2$s"),n,r)}},transforms:Vr,deprecated:xr,merge:function(e,t){return{content:(e.content||"")+(t.content||"")}},edit:function(e){var t=e.attributes,r=e.setAttributes,n=e.mergeBlocks,o=e.onReplace,c=e.mergedStyle,a=t.textAlign,i=t.content,l=t.level,s=t.placeholder,u="h"+l,b=Object(_e.useBlockProps)({className:Be()(Object(je.a)({},"has-text-align-".concat(a),a)),style:c});return Object(Ce.createElement)(Ce.Fragment,null,Object(Ce.createElement)(_e.BlockControls,null,Object(Ce.createElement)(Ae.ToolbarGroup,null,Object(Ce.createElement)(zr,{selectedLevel:l,onChange:function(e){return r({level:e})}})),Object(Ce.createElement)(_e.AlignmentToolbar,{value:a,onChange:function(e){r({textAlign:e})}})),Object(Ce.createElement)(_e.RichText,Object(Re.a)({identifier:"content",tagName:u,value:i,onChange:function(e){return r({content:e})},onMerge:n,onSplit:function(e){return e?Object(we.createBlock)("core/heading",Mr(Mr({},t),{},{content:e})):Object(we.createBlock)("core/paragraph")},onReplace:o,onRemove:function(){return o([])},"aria-label":Object(Ee.__)("Heading text"),placeholder:s||Object(Ee.__)("Write heading…"),textAlign:a},b)))},save:function(e){var t=e.attributes,r=t.textAlign,n=t.content,o="h"+t.level,c=Be()(Object(je.a)({},"has-text-align-".concat(r),r));return Object(Ce.createElement)(o,_e.useBlockProps.save({className:c}),Object(Ce.createElement)(_e.RichText.Content,{value:n}))}},Ar=Object(Ce.createElement)(xe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Ce.createElement)(xe.Path,{d:"M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z"}));function Lr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Dr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Lr(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Fr={value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"}},Gr=[{attributes:Fr,save:function(e){var t=e.attributes,r=t.align,n=t.value,o=t.citation;return Object(Ce.createElement)("blockquote",{style:{textAlign:r||null}},Object(Ce.createElement)(_e.RichText.Content,{multiline:!0,value:n}),!_e.RichText.isEmpty(o)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"cite",value:o}))}},{attributes:Dr(Dr({},Fr),{},{style:{type:"number",default:1}}),migrate:function(e){return 2===e.style?Dr(Dr({},Object(ke.omit)(e,["style"])),{},{className:e.className?e.className+" is-style-large":"is-style-large"}):e},save:function(e){var t=e.attributes,r=t.align,n=t.value,o=t.citation,c=t.style;return Object(Ce.createElement)("blockquote",{className:2===c?"is-large":"",style:{textAlign:r||null}},Object(Ce.createElement)(_e.RichText.Content,{multiline:!0,value:n}),!_e.RichText.isEmpty(o)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"cite",value:o}))}},{attributes:Dr(Dr({},Fr),{},{citation:{type:"string",source:"html",selector:"footer",default:""},style:{type:"number",default:1}}),save:function(e){var t=e.attributes,r=t.align,n=t.value,o=t.citation,c=t.style;return Object(Ce.createElement)("blockquote",{className:"blocks-quote-style-".concat(c),style:{textAlign:r||null}},Object(Ce.createElement)(_e.RichText.Content,{multiline:!0,value:n}),!_e.RichText.isEmpty(o)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"footer",value:o}))}}];function Ur(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ur(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ur(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Wr=r(24);function Zr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Jr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zr(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Qr={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:function(e){return Object(we.createBlock)("core/quote",{value:Object(Wr.toHTMLString)({value:Object(Wr.join)(e.map((function(e){var t=e.content;return Object(Wr.create)({html:t})})),"\u2028"),multilineTag:"p"}),anchor:e.anchor})}},{type:"block",blocks:["core/heading"],transform:function(e){var t=e.content,r=e.anchor;return Object(we.createBlock)("core/quote",{value:"<p>".concat(t,"</p>"),anchor:r})}},{type:"block",blocks:["core/pullquote"],transform:function(e){var t=e.value,r=e.citation,n=e.anchor;return Object(we.createBlock)("core/quote",{value:t,citation:r,anchor:n})}},{type:"prefix",prefix:">",transform:function(e){return Object(we.createBlock)("core/quote",{value:"<p>".concat(e,"</p>")})}},{type:"raw",isMatch:function(e){var t,r=(t=!1,function(e){return"P"===e.nodeName||(t||"CITE"!==e.nodeName?void 0:(t=!0,!0))});return"BLOCKQUOTE"===e.nodeName&&Array.from(e.childNodes).every(r)},schema:function(e){var t=e.phrasingContentSchema;return{blockquote:{children:{p:{children:t},cite:{children:t}}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.value,r=e.citation,n=[];return t&&"<p></p>"!==t&&n.push.apply(n,Object(ve.a)(Object(Wr.split)(Object(Wr.create)({html:t,multilineTag:"p"}),"\u2028").map((function(e){return Object(we.createBlock)("core/paragraph",{content:Object(Wr.toHTMLString)({value:e})})})))),r&&"<p></p>"!==r&&n.push(Object(we.createBlock)("core/paragraph",{content:r})),0===n.length?Object(we.createBlock)("core/paragraph",{content:""}):n}},{type:"block",blocks:["core/heading"],transform:function(e){var t=e.value,r=e.citation,n=Object(vr.a)(e,["value","citation"]);if("<p></p>"===t)return Object(we.createBlock)("core/heading",{content:r});var o=Object(Wr.split)(Object(Wr.create)({html:t,multilineTag:"p"}),"\u2028"),c=Object(we.createBlock)("core/heading",{content:Object(Wr.toHTMLString)({value:o[0]})});if(!r&&1===o.length)return c;var a=o.slice(1);return[c,Object(we.createBlock)("core/quote",Jr(Jr({},n),{},{citation:r,value:Object(Wr.toHTMLString)({value:a.length?Object(Wr.join)(o.slice(1),"\u2028"):Object(Wr.create)(),multilineTag:"p"})}))]}},{type:"block",blocks:["core/pullquote"],transform:function(e){var t=e.value,r=e.citation,n=e.anchor;return Object(we.createBlock)("core/pullquote",{value:t,citation:r,anchor:n})}}]};function $r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Kr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$r(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$r(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Yr={apiVersion:2,name:"core/quote",category:"text",attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"}},supports:{anchor:!0},editorStyle:"wp-block-quote-editor",style:"wp-block-quote"},Xr=Yr.name,en={title:Object(Ee._x)("Quote","block title"),description:Object(Ee.__)('Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Julio Cortázar'),icon:Ar,keywords:[Object(Ee.__)("blockquote"),Object(Ee.__)("cite")],example:{attributes:{value:"<p>"+Object(Ee.__)("In quoting others, we cite ourselves.")+"</p>",citation:"Julio Cortázar",className:"is-style-large"}},styles:[{name:"default",label:Object(Ee._x)("Default","block style"),isDefault:!0},{name:"large",label:Object(Ee._x)("Large","block style")}],transforms:Qr,edit:function(e){var t=e.attributes,r=e.setAttributes,n=e.isSelected,o=e.mergeBlocks,c=e.onReplace,a=e.className,i=e.insertBlocksAfter,l=e.mergedStyle,s=t.align,u=t.value,b=t.citation,m=Object(_e.useBlockProps)({className:Be()(a,Object(je.a)({},"has-text-align-".concat(s),s)),style:l});return Object(Ce.createElement)(Ce.Fragment,null,Object(Ce.createElement)(_e.BlockControls,null,Object(Ce.createElement)(_e.AlignmentToolbar,{value:s,onChange:function(e){r({align:e})}})),Object(Ce.createElement)(Ae.BlockQuotation,m,Object(Ce.createElement)(_e.RichText,{identifier:"value",multiline:!0,value:u,onChange:function(e){return r({value:e})},onMerge:o,onRemove:function(e){var t=!b||0===b.length;!e&&t&&c([])},"aria-label":Object(Ee.__)("Quote text"),placeholder:// translators: placeholder text used for the quote
|
13 |
Object(Ee.__)("Write quote…"),onReplace:c,onSplit:function(e){return Object(we.createBlock)("core/quote",qr(qr({},t),{},{value:e}))},__unstableOnSplitMiddle:function(){return Object(we.createBlock)("core/paragraph")},textAlign:s}),(!_e.RichText.isEmpty(b)||n)&&Object(Ce.createElement)(_e.RichText,{identifier:"citation",value:b,onChange:function(e){return r({citation:e})},__unstableMobileNoFocusOnMount:!0,"aria-label":Object(Ee.__)("Quote citation text"),placeholder:// translators: placeholder text used for the citation
|
14 |
+
Object(Ee.__)("Write citation…"),className:"wp-block-quote__citation",textAlign:s,__unstableOnSplitAtEnd:function(){return i(Object(we.createBlock)("core/paragraph"))}})))},save:function(e){var t=e.attributes,r=t.align,n=t.value,o=t.citation,c=Be()(Object(je.a)({},"has-text-align-".concat(r),r));return Object(Ce.createElement)("blockquote",_e.useBlockProps.save({className:c}),Object(Ce.createElement)(_e.RichText.Content,{multiline:!0,value:n}),!_e.RichText.isEmpty(o)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"cite",value:o}))},merge:function(e,t){var r=t.value,n=t.citation;return n||(n=e.citation),Kr(Kr({},e),{},r&&"<p></p>"!==r?{value:e.value+r,citation:n}:{citation:n})},deprecated:Gr},tn=Object(Ce.createElement)(xe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Ce.createElement)(xe.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8h-1.5zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zM4.5 4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1V12l-2.3-1.7c-.3-.2-.6-.2-.9 0l-2.9 2.1L8 11.3c-.2-.1-.5-.1-.7 0l-2.9 1.5V4.6zm0 11.8v-1.8l3.2-1.7 2.4 1.2c.2.1.5.1.8-.1l2.8-2 2.8 2v2.5c0 .1-.1.1-.1.1H4.6c0-.1-.1-.2-.1-.2z"}));function rn(e){return Math.min(3,e.images.length)}var nn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"large",r=Object(ke.pick)(e,["alt","id","link","caption"]);r.url=Object(ke.get)(e,["sizes",t,"url"])||Object(ke.get)(e,["media_details","sizes",t,"source_url"])||e.url;var n=Object(ke.get)(e,["sizes","full","url"])||Object(ke.get)(e,["media_details","sizes","full","source_url"]);return n&&(r.fullUrl=n),r};function on(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function cn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?on(Object(r),!0).forEach((function(t){Object(je.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):on(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var an=[{attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},sizeSlug:{type:"string",default:"large"}},supports:{align:!0},isEligible:function(e){var t=e.linkTo;return!t||"attachment"===t||"media"===t},migrate:function(e){var t=e.linkTo;return e.linkTo?"attachment"===e.linkTo?t="post":"media"===e.linkTo&&(t="file"):t="none",cn(cn({},e),{},{linkTo:t})},save:function(e){var t=e.attributes,r=t.images,n=t.columns,o=void 0===n?rn(t):n,c=t.imageCrop,a=t.caption,i=t.linkTo;return Object(Ce.createElement)("figure",{className:"columns-".concat(o," ").concat(c?"is-cropped":"")},Object(Ce.createElement)("ul",{className:"blocks-gallery-grid"},r.map((function(e){var t;switch(i){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}var r=Object(Ce.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object(Ce.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(Ce.createElement)("figure",null,t?Object(Ce.createElement)("a",{href:t},r):r,!_e.RichText.isEmpty(e.caption)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!_e.RichText.isEmpty(a)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:a}))}},{attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},link:{source:"attribute",selector:"img",attribute:"data-link"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",default:[]},columns:{type:"number"},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},isEligible:function(e){var t=e.ids;return t&&t.some((function(e){return"string"==typeof e}))},migrate:function(e){return cn(cn({},e),{},{ids:Object(ke.map)(e.ids,(function(e){var t=parseInt(e,10);return Number.isInteger(t)?t:null}))})},save:function(e){var t=e.attributes,r=t.images,n=t.columns,o=void 0===n?rn(t):n,c=t.imageCrop,a=t.caption,i=t.linkTo;return Object(Ce.createElement)("figure",{className:"columns-".concat(o," ").concat(c?"is-cropped":"")},Object(Ce.createElement)("ul",{className:"blocks-gallery-grid"},r.map((function(e){var t;switch(i){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}var r=Object(Ce.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object(Ce.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(Ce.createElement)("figure",null,t?Object(Ce.createElement)("a",{href:t},r):r,!_e.RichText.isEmpty(e.caption)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!_e.RichText.isEmpty(a)&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:a}))}},{attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"array",source:"children",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},save:function(e){var t=e.attributes,r=t.images,n=t.columns,o=void 0===n?rn(t):n,c=t.imageCrop,a=t.linkTo;return Object(Ce.createElement)("ul",{className:"columns-".concat(o," ").concat(c?"is-cropped":"")},r.map((function(e){var t;switch(a){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}var r=Object(Ce.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object(Ce.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(Ce.createElement)("figure",null,t?Object(Ce.createElement)("a",{href:t},r):r,e.caption&&e.caption.length>0&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",value:e.caption})))})))}},{attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"array",source:"children",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},isEligible:function(e){var t=e.images,r=e.ids;return t&&t.length>0&&(!r&&t||r&&t&&r.length!==t.length||Object(ke.some)(t,(function(e,t){return!e&&null!==r[t]||parseInt(e,10)!==r[t]})))},migrate:function(e){return cn(cn({},e),{},{ids:Object(ke.map)(e.images,(function(e){var t=e.id;return t?parseInt(t,10):null}))})},supports:{align:!0},save:function(e){var t=e.attributes,r=t.images,n=t.columns,o=void 0===n?rn(t):n,c=t.imageCrop,a=t.linkTo;return Object(Ce.createElement)("ul",{className:"columns-".concat(o," ").concat(c?"is-cropped":"")},r.map((function(e){var t;switch(a){case"media":t=e.url;break;case"attachment":t=e.link}var r=Object(Ce.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object(Ce.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(Ce.createElement)("figure",null,t?Object(Ce.createElement)("a",{href:t},r):r,e.caption&&e.caption.length>0&&Object(Ce.createElement)(_e.RichText.Content,{tagName:"figcaption",value:e.caption})))})))}},{attributes:{images:{type:"array",default:[],source:"query",selector:"div.wp-block-gallery figure.blocks-gallery-image img",query:{url:{source:"attribute",attribute:"src"},alt:{source:"attribute",attribute:"alt",default:""},id:{source:"attribute",attribute:"data-id"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},align:{type:"string",default:"none"}},supports:{align:!0},save:function(e){var t=e.attributes,r=t.images,n=t.columns,o=void 0===n?rn(t):n,c=t.align,a=t.imageCrop,i=t.linkTo,l=Be()("columns-".concat(o),{alignnone:"none"===c,"is-cropped":a});return Object(Ce.createElement)("div",{className:l},r.map((function(e){var t;switch(i){case"media":t=e.url;break;case"attachment":t=e.link}var r=Object(Ce.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id});return Object(Ce.createElement)("figure",{key:e.id||e.url,className:"blocks-gallery-image"},t?Object(Ce.createElement)("a",{href:t},r):r)})))}}],ln=r(79),sn=Object(Ce.createElement)(_e.BlockIcon,{icon:tn}),un=r(27),bn=r(28),mn=r(19),dn=r(30),pn=r(32),gn=r(22),hn=r(260),On=r(259),fn=r(239),vn=r(143);var jn=function(e){Object(dn.a)(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=Object(gn.a)(t);if(r){var o=Object(gn.a)(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return Object(pn.a)(this,e)});function o(){var e;return Object(un.a)(this,o),(e=n.apply(this,arguments)).onSelectImage=e.onSelectImage.bind(Object(mn.a)(e)),e.onSelectCaption=e.onSelectCaption.bind(Object(mn.a)(e)),e.onRemoveImage=e.onRemoveImage.bind(Object(mn.a)(e)),e.bindContainer=e.bindContainer.bind(Object(mn.a)(e)),e.onEdit=e.onEdit.bind(Object(mn.a)(e)),e.onSelectImageFromLibrary=e.onSelectImageFromLibrary.bind(Object(mn.a)(e)),e.onSelectCustomURL=e.onSelectCustomURL.bind(Object(mn.a)(e)),e.state={captionSelected:!1,isEditing:!1},e}return Object(bn.a)(o,[{key:"bindContainer",value:function(e){this.container=e}},{key:"onSelectCaption",value:function(){this.state.captionSelected||this.setState({captionSelected:!0}),this.props.isSelected||this.props.onSelect()}},{key:"onSelectImage",value:function(){this.props.isSelected||this.props.onSelect(),this.state.captionSelected&&this.setState({captionSelected:!1})}},{key:"onRemoveImage",value:function(e){this.container===this.container.ownerDocument.activeElement&&this.props.isSelected&&-1!==[Sr.BACKSPACE,Sr.DELETE].indexOf(e.keyCode)&&(e.stopPropagation(),e.preventDefault(),this.props.onRemove())}},{key:"onEdit",value:function(){this.setState({isEditing:!0})}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.isSelected,n=t.image,o=t.url,c=t.__unstableMarkNextChangeAsNotPersistent;n&&!o&&(c(),this.props.setAttributes({url:n.source_url,alt:n.alt_text})),this.state.captionSelected&&!r&&e.isSelected&&this.setState({captionSelected:!1})}},{key:"deselectOnBlur",value:function(){this.props.onDeselect()}},{key:"onSelectImageFromLibrary",value:function(e){var t=this.props,r=t.setAttributes,n=t.id,o=t.url,c=t.alt,a=t.caption,i=t.sizeSlug;if(e&&e.url){var l=nn(e,i);(function(e,t){return!e&&Object(Ye.isBlobURL)(t)})(n,o)&&c&&(l=Object(ke.omit)(l,["alt"])),a&&!Object(ke.get)(l,["caption"])&&(l=Object(ke.omit)(l,["caption"])),r(l),this.setState({isEditing:!1})}}},{key:"onSelectCustomURL",value:function(e){var t=this.props,r=t.setAttributes;e!==t.url&&(r({url:e,id:void 0}),this.setState({isEditing:!1}))}},{key:"render",value:function(){var e,t=this.props,r=t.url,n=t.alt,o=t.id,c=t.linkTo,a=t.link,i=t.isFirstItem,l=t.isLastItem,s=t.isSelected,u=t.caption,b=t.onRemove,m=t.onMoveForward,d=t.onMoveBackward,p=t.setAttributes,g=t["aria-label"],h=this.state.isEditing;switch(c){case"file":e=r;break;case"post":e=a}var O=Object(Ce.createElement)(Ce.Fragment,null,Object(Ce.createElement)("img",{src:r,alt:n,"data-id":o,onClick:this.onSelectImage,onFocus:this.onSelectImage,onKeyDown:this.onRemoveImage,tabIndex:"0","aria-label":g,ref:this.bindContainer}),Object(Ye.isBlobURL)(r)&&Object(Ce.createElement)(Ae.Spinner,null)),f=Be()({"is-selected":s,"is-transient":Object(Ye.isBlobURL)(r)});return Object(Ce.createElement)("figure",{className:f},!h&&(e?Object(Ce.createElement)("a",{href:e},O):O),h&&Object(Ce.createElement)(_e.MediaPlaceholder,{labels:{title:Object(Ee.__)("Edit gallery image")},icon:Qe,onSelect:this.onSelectImageFromLibrary,onSelectURL:this.onSelectCustomURL,accept:"image/*",allowedTypes:["image"],value:{id:o,src:r}}),Object(Ce.createElement)(Ae.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-left"},Object(Ce.createElement)(Ae.Button,{icon:hn.a,onClick:i?void 0:d,label:Object(Ee.__)("Move image backward"),"aria-disabled":i,disabled:!s}),Object(Ce.createElement)(Ae.Button,{icon:On.a,onClick:l?void 0:m,label:Object(Ee.__)("Move image forward"),"aria-disabled":l,disabled:!s})),Object(Ce.createElement)(Ae.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-right"},Object(Ce.createElement)(Ae.Button,{icon:fn.a,onClick:this.onEdit,label:Object(Ee.__)("Replace image"),disabled:!s}),Object(Ce.createElement)(Ae.Button,{icon:vn.a,onClick:b,label:Object(Ee.__)("Remove image"),disabled:!s})),!h&&(s||u)&&Object(Ce.createElement)(_e.RichText,{tagName:"figcaption","aria-label":Object(Ee.__)("Image caption text"),placeholder:s?Object(Ee.__)("Write caption…"):null,value:u,isSelected:this.state.captionSelected,onChange:function(e){return p({caption:e})},unstableOnFocus:this.onSelectCaption,inlineToolbar:!0}))}}]),o}(Ce.Component),yn=Object(Xe.compose)([Object(Le.withSelect)((function(e,t){var r=e("core").getMedia,n=t.id;return{image:n?r(parseInt(n,10)):null}})),Object(Le.withDispatch)((function(e){return{__unstableMarkNextChangeAsNotPersistent:e("core/block-editor").__unstableMarkNextChangeAsNotPersistent}}))])(jn);function wn(e){var t=e.isHidden,r=Object(vr.a)(e,["isHidden"]);return t?Object(Ce.createElement)(Ae.VisuallyHidden,Object(Re.a)({as:_e.RichText},r)):Object(Ce.createElement)(_e.RichText,r)}var kn=function(e){var t,r=e.attributes,n=e.isSelected,o=e.setAttributes,c=e.selectedImage,a=e.mediaPlaceholder,i=e.onMoveBackward,l=e.onMoveForward,s=e.onRemoveImage,u=e.onSelectImage,b=e.onDeselectImage,m=e.onSetImageAttributes,d=e.onFocusGalleryCaption,p=e.insertBlocksAfter,g=e.blockProps,h=r.align,O=r.columns,f=void 0===O?rn(r):O,v=r.caption,j=r.imageCrop,y=r.images;return Object(Ce.createElement)("figure",Object(Re.a)({},g,{className:Be()(g.className,(t={},Object(je.a)(t,"align".concat(h),h),Object(je.a)(t,"columns-".concat(f),f),Object(je.a)(t,"is-cropped",j),t))}),Object(Ce.createElement)("ul",{className:"blocks-gallery-grid"},y.map((function(e,t){var o=Object(Ee.sprintf)(
|
15 |
/* translators: 1: the order number of the image. 2: the total number of images. */
|
|