Version Description
Download this release
Release Info
Developer | gutenbergplugin |
Plugin | Gutenberg |
Version | 9.7.0 |
Comparing to | |
See all releases |
Code changes from version 9.6.2 to 9.7.0
- 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 +11 -11
- build/block-editor/index.asset.php +1 -1
- build/block-editor/index.js +49 -50
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' => '11506a4f66c31a0d7ae6bfe5e0d29a70');
|
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=403)}({1:function(e,t){e.exports=window.wp.i18n},
|
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=403)}({1:function(e,t){e.exports=window.wp.i18n},248:function(e,t){e.exports=window.wp.domReady},403: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(248),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' => '3f79a36777d285056b903a1a8d1f4e98');
|
build/annotations/index.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.wp=window.wp||{},window.wp.annotations=function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=394)}({1:function(t,n){t.exports=window.wp.i18n},146:function(t,n,e){"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));n.a=function(t,n,e){var r=(t=t||{}).random||(t.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,n){e=e||0;for(var o=0;o<16;++o)n[e+o]=r[o];return n}return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=(c[t[n+0]]+c[t[n+1]]+c[t[n+2]]+c[t[n+3]]+"-"+c[t[n+4]]+c[t[n+5]]+"-"+c[t[n+6]]+c[t[n+7]]+"-"+c[t[n+8]]+c[t[n+9]]+"-"+c[t[n+10]]+c[t[n+11]]+c[t[n+12]]+c[t[n+13]]+c[t[n+14]]+c[t[n+15]]).toLowerCase();if(!u(e))throw TypeError("Stringified UUID is invalid");return e}(r)}},15:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var r=e(46);function o(t,n){if(null==t)return{};var e,o,a=Object(r.a)(t,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)e=i[o],n.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(a[e]=t[e])}return a}},17:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var r=e(23),o=e(36),a=e(29);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.")}()}},2:function(t,n){t.exports=window.lodash},22:function(t,n){t.exports=window.wp.richText},23:function(t,n,e){"use strict";function r(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}e.d(n,"a",(function(){return r}))},29:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var r=e(23);function o(t,n){if(t){if("string"==typeof t)return Object(r.a)(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Object(r.a)(t,n):void 0}}},32:function(t,n){t.exports=window.wp.hooks},36:function(t,n,e){"use strict";function r(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}e.d(n,"a",(function(){return r}))},394:function(t,n,e){"use strict";e.r(n),e.d(n,"store",(function(){return D}));var r={};e.r(r),e.d(r,"__experimentalGetAnnotationsForBlock",(function(){return w})),e.d(r,"__experimentalGetAllAnnotationsForBlock",(function(){return _})),e.d(r,"__experimentalGetAnnotationsForRichText",(function(){return T})),e.d(r,"__experimentalGetAnnotations",(function(){return N}));var o={};e.r(o),e.d(o,"__experimentalAddAnnotation",(function(){return E})),e.d(o,"__experimentalRemoveAnnotation",(function(){return I})),e.d(o,"__experimentalUpdateAnnotationRange",(function(){return R})),e.d(o,"__experimentalRemoveAnnotationsBySource",(function(){return S}));var a=e(15),i=e(22),u=e(1),c={name:"core/annotation",title:Object(u.__)("Annotation"),tagName:"mark",className:"annotation-text",attributes:{className:"class",id:"id"},edit:function(){return null},__experimentalGetPropsForEditableTreePreparation:function(t,n){var e=n.richTextIdentifier,r=n.blockClientId;return{annotations:t("core/annotations").__experimentalGetAnnotationsForRichText(r,e)}},__experimentalCreatePrepareEditableTree:function(t){var n=t.annotations;return function(t,e){if(0===n.length)return t;var r={formats:t,text:e};return(r=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n.forEach((function(n){var e=n.start,r=n.end;e>t.text.length&&(e=t.text.length),r>t.text.length&&(r=t.text.length);var o="annotation-text-"+n.source,a="annotation-text-"+n.id;t=Object(i.applyFormat)(t,{type:"core/annotation",attributes:{className:o,id:a}},e,r)})),t}(r,n)).formats}},__experimentalGetPropsForEditableTreeChangeHandler:function(t){return{removeAnnotation:t("core/annotations").__experimentalRemoveAnnotation,updateAnnotationRange:t("core/annotations").__experimentalUpdateAnnotationRange}},__experimentalCreateOnChangeEditableValue:function(t){return function(n){var e=function(t){var n={};return t.forEach((function(t,e){(t=(t=t||[]).filter((function(t){return"core/annotation"===t.type}))).forEach((function(t){var r=t.attributes.id;r=r.replace("annotation-text-",""),n.hasOwnProperty(r)||(n[r]={start:e}),n[r].end=e+1}))})),n}(n),r=t.removeAnnotation,o=t.updateAnnotationRange;!function(t,n,e){var r=e.removeAnnotation,o=e.updateAnnotationRange;t.forEach((function(t){var e=n[t.id];if(e){var a=t.start,i=t.end;a===e.start&&i===e.end||o(t.id,e.start,e.end)}else r(t.id)}))}(t.annotations,e,{removeAnnotation:r,updateAnnotationRange:o})}}},l=c.name,f=Object(a.a)(c,["name"]);Object(i.registerFormatType)(l,f);var s=e(32),d=e(4);Object(s.addFilter)("editor.BlockListBlock","core/annotations",(function(t){return Object(d.withSelect)((function(t,n){var e=n.clientId,r=n.className;return{className:t("core/annotations").__experimentalGetAnnotationsForBlock(e).map((function(t){return"is-annotated-by-"+t.source})).concat(r).filter(Boolean).join(" ")}}))(t)}));var p=e(17),b=e(6),v=e(2);function O(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function y(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?O(Object(e),!0).forEach((function(n){Object(b.a)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):O(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function g(t,n){var e=t.filter(n);return t.length===e.length?t:e}function m(t){return Object(v.isNumber)(t.start)&&Object(v.isNumber)(t.end)&&t.start<=t.end}var h=e(49);function j(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function x(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?j(Object(e),!0).forEach((function(n){Object(b.a)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):j(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var A=[],w=Object(h.a)((function(t,n){var e;return(null!==(e=null==t?void 0:t[n])&&void 0!==e?e:[]).filter((function(t){return"block"===t.selector}))}),(function(t,n){var e;return[null!==(e=null==t?void 0:t[n])&&void 0!==e?e:A]}));function _(t,n){var e;return null!==(e=null==t?void 0:t[n])&&void 0!==e?e:A}var T=Object(h.a)((function(t,n,e){var r;return(null!==(r=null==t?void 0:t[n])&&void 0!==r?r:[]).filter((function(t){return"range"===t.selector&&e===t.richTextIdentifier})).map((function(t){var n=t.range,e=Object(a.a)(t,["range"]);return x(x({},n),e)}))}),(function(t,n){var e;return[null!==(e=null==t?void 0:t[n])&&void 0!==e?e:A]}));function N(t){return Object(v.flatMap)(t,(function(t){return t}))}var P=e(146);function E(t){var n=t.blockClientId,e=t.richTextIdentifier,r=void 0===e?null:e,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(P.a)():f,blockClientId:n,richTextIdentifier:r,source:l,selector:u};return"range"===u&&(s.range=a),s}function I(t){return{type:"ANNOTATION_REMOVE",annotationId:t}}function R(t,n,e){return{type:"ANNOTATION_UPDATE_RANGE",annotationId:t,start:n,end:e}}function S(t){return{type:"ANNOTATION_REMOVE_SOURCE",source:t}}var D=Object(d.createReduxStore)("core/annotations",{reducer:function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"ANNOTATION_ADD":var r=e.blockClientId,o={id:e.id,blockClientId:r,richTextIdentifier:e.richTextIdentifier,source:e.source,selector:e.selector,range:e.range};if("range"===o.selector&&!m(o.range))return n;var a=null!==(t=null==n?void 0:n[r])&&void 0!==t?t:[];return y(y({},n),{},Object(b.a)({},r,[].concat(Object(p.a)(a),[o])));case"ANNOTATION_REMOVE":return Object(v.mapValues)(n,(function(t){return g(t,(function(t){return t.id!==e.annotationId}))}));case"ANNOTATION_UPDATE_RANGE":return Object(v.mapValues)(n,(function(t){var n=!1,r=t.map((function(t){return t.id===e.annotationId?(n=!0,y(y({},t),{},{range:{start:e.start,end:e.end}})):t}));return n?r:t}));case"ANNOTATION_REMOVE_SOURCE":return Object(v.mapValues)(n,(function(t){return g(t,(function(t){return t.source!==e.source}))}))}return n},selectors:r,actions:o});Object(d.register)(D)},4:function(t,n){t.exports=window.wp.data},46:function(t,n,e){"use strict";function r(t,n){if(null==t)return{};var e,r,o={},a=Object.keys(t);for(r=0;r<a.length;r++)e=a[r],n.indexOf(e)>=0||(o[e]=t[e]);return o}e.d(n,"a",(function(){return r}))},49:function(t,n,e){"use strict";var r,o;function a(t){return[t]}function i(){var t={clear:function(){t.head=null}};return t}function u(t,n,e){var r;if(t.length!==n.length)return!1;for(r=e;r<t.length;r++)if(t[r]!==n[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,n.a=function(t,n){var e,c;function l(){e=o?new WeakMap:i()}function f(){var e,r,o,a,i,l=arguments.length;for(a=new Array(l),o=0;o<l;o++)a[o]=arguments[o];for(i=n.apply(null,a),(e=c(i)).isUniqueByDependants||(e.lastDependants&&!u(i,e.lastDependants,0)&&e.clear(),e.lastDependants=i),r=e.head;r;){if(u(r.args,a,1))return r!==e.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=e.head,r.prev=null,e.head.prev=r,e.head=r),r.val;r=r.next}return r={val:t.apply(null,a)},a[0]=null,r.args=a,e.head&&(e.head.prev=r,r.next=e.head),e.head=r,r.val}return n||(n=a),c=o?function(t){var n,o,a,u,c,l=e,f=!0;for(n=0;n<t.length;n++){if(!(c=o=t[n])||"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 e},f.getDependants=n,f.clear=l,l(),f}},6:function(t,n,e){"use strict";function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}e.d(n,"a",(function(){return r}))}});
|
1 |
+
window.wp=window.wp||{},window.wp.annotations=function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=394)}({1:function(t,n){t.exports=window.wp.i18n},146:function(t,n,e){"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));n.a=function(t,n,e){var r=(t=t||{}).random||(t.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,n){e=e||0;for(var o=0;o<16;++o)n[e+o]=r[o];return n}return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=(c[t[n+0]]+c[t[n+1]]+c[t[n+2]]+c[t[n+3]]+"-"+c[t[n+4]]+c[t[n+5]]+"-"+c[t[n+6]]+c[t[n+7]]+"-"+c[t[n+8]]+c[t[n+9]]+"-"+c[t[n+10]]+c[t[n+11]]+c[t[n+12]]+c[t[n+13]]+c[t[n+14]]+c[t[n+15]]).toLowerCase();if(!u(e))throw TypeError("Stringified UUID is invalid");return e}(r)}},15:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var r=e(47);function o(t,n){if(null==t)return{};var e,o,a=Object(r.a)(t,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)e=i[o],n.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(a[e]=t[e])}return a}},16:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var r=e(23),o=e(38),a=e(30);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.")}()}},2:function(t,n){t.exports=window.lodash},22:function(t,n){t.exports=window.wp.richText},23:function(t,n,e){"use strict";function r(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}e.d(n,"a",(function(){return r}))},30:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var r=e(23);function o(t,n){if(t){if("string"==typeof t)return Object(r.a)(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Object(r.a)(t,n):void 0}}},33:function(t,n){t.exports=window.wp.hooks},38:function(t,n,e){"use strict";function r(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}e.d(n,"a",(function(){return r}))},394:function(t,n,e){"use strict";e.r(n),e.d(n,"store",(function(){return D}));var r={};e.r(r),e.d(r,"__experimentalGetAnnotationsForBlock",(function(){return w})),e.d(r,"__experimentalGetAllAnnotationsForBlock",(function(){return _})),e.d(r,"__experimentalGetAnnotationsForRichText",(function(){return T})),e.d(r,"__experimentalGetAnnotations",(function(){return N}));var o={};e.r(o),e.d(o,"__experimentalAddAnnotation",(function(){return E})),e.d(o,"__experimentalRemoveAnnotation",(function(){return I})),e.d(o,"__experimentalUpdateAnnotationRange",(function(){return R})),e.d(o,"__experimentalRemoveAnnotationsBySource",(function(){return S}));var a=e(15),i=e(22),u=e(1),c={name:"core/annotation",title:Object(u.__)("Annotation"),tagName:"mark",className:"annotation-text",attributes:{className:"class",id:"id"},edit:function(){return null},__experimentalGetPropsForEditableTreePreparation:function(t,n){var e=n.richTextIdentifier,r=n.blockClientId;return{annotations:t("core/annotations").__experimentalGetAnnotationsForRichText(r,e)}},__experimentalCreatePrepareEditableTree:function(t){var n=t.annotations;return function(t,e){if(0===n.length)return t;var r={formats:t,text:e};return(r=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n.forEach((function(n){var e=n.start,r=n.end;e>t.text.length&&(e=t.text.length),r>t.text.length&&(r=t.text.length);var o="annotation-text-"+n.source,a="annotation-text-"+n.id;t=Object(i.applyFormat)(t,{type:"core/annotation",attributes:{className:o,id:a}},e,r)})),t}(r,n)).formats}},__experimentalGetPropsForEditableTreeChangeHandler:function(t){return{removeAnnotation:t("core/annotations").__experimentalRemoveAnnotation,updateAnnotationRange:t("core/annotations").__experimentalUpdateAnnotationRange}},__experimentalCreateOnChangeEditableValue:function(t){return function(n){var e=function(t){var n={};return t.forEach((function(t,e){(t=(t=t||[]).filter((function(t){return"core/annotation"===t.type}))).forEach((function(t){var r=t.attributes.id;r=r.replace("annotation-text-",""),n.hasOwnProperty(r)||(n[r]={start:e}),n[r].end=e+1}))})),n}(n),r=t.removeAnnotation,o=t.updateAnnotationRange;!function(t,n,e){var r=e.removeAnnotation,o=e.updateAnnotationRange;t.forEach((function(t){var e=n[t.id];if(e){var a=t.start,i=t.end;a===e.start&&i===e.end||o(t.id,e.start,e.end)}else r(t.id)}))}(t.annotations,e,{removeAnnotation:r,updateAnnotationRange:o})}}},l=c.name,f=Object(a.a)(c,["name"]);Object(i.registerFormatType)(l,f);var s=e(33),d=e(4);Object(s.addFilter)("editor.BlockListBlock","core/annotations",(function(t){return Object(d.withSelect)((function(t,n){var e=n.clientId,r=n.className;return{className:t("core/annotations").__experimentalGetAnnotationsForBlock(e).map((function(t){return"is-annotated-by-"+t.source})).concat(r).filter(Boolean).join(" ")}}))(t)}));var p=e(16),b=e(6),v=e(2);function O(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function y(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?O(Object(e),!0).forEach((function(n){Object(b.a)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):O(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function g(t,n){var e=t.filter(n);return t.length===e.length?t:e}function m(t){return Object(v.isNumber)(t.start)&&Object(v.isNumber)(t.end)&&t.start<=t.end}var h=e(48);function j(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function x(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?j(Object(e),!0).forEach((function(n){Object(b.a)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):j(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var A=[],w=Object(h.a)((function(t,n){var e;return(null!==(e=null==t?void 0:t[n])&&void 0!==e?e:[]).filter((function(t){return"block"===t.selector}))}),(function(t,n){var e;return[null!==(e=null==t?void 0:t[n])&&void 0!==e?e:A]}));function _(t,n){var e;return null!==(e=null==t?void 0:t[n])&&void 0!==e?e:A}var T=Object(h.a)((function(t,n,e){var r;return(null!==(r=null==t?void 0:t[n])&&void 0!==r?r:[]).filter((function(t){return"range"===t.selector&&e===t.richTextIdentifier})).map((function(t){var n=t.range,e=Object(a.a)(t,["range"]);return x(x({},n),e)}))}),(function(t,n){var e;return[null!==(e=null==t?void 0:t[n])&&void 0!==e?e:A]}));function N(t){return Object(v.flatMap)(t,(function(t){return t}))}var P=e(146);function E(t){var n=t.blockClientId,e=t.richTextIdentifier,r=void 0===e?null:e,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(P.a)():f,blockClientId:n,richTextIdentifier:r,source:l,selector:u};return"range"===u&&(s.range=a),s}function I(t){return{type:"ANNOTATION_REMOVE",annotationId:t}}function R(t,n,e){return{type:"ANNOTATION_UPDATE_RANGE",annotationId:t,start:n,end:e}}function S(t){return{type:"ANNOTATION_REMOVE_SOURCE",source:t}}var D=Object(d.createReduxStore)("core/annotations",{reducer:function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"ANNOTATION_ADD":var r=e.blockClientId,o={id:e.id,blockClientId:r,richTextIdentifier:e.richTextIdentifier,source:e.source,selector:e.selector,range:e.range};if("range"===o.selector&&!m(o.range))return n;var a=null!==(t=null==n?void 0:n[r])&&void 0!==t?t:[];return y(y({},n),{},Object(b.a)({},r,[].concat(Object(p.a)(a),[o])));case"ANNOTATION_REMOVE":return Object(v.mapValues)(n,(function(t){return g(t,(function(t){return t.id!==e.annotationId}))}));case"ANNOTATION_UPDATE_RANGE":return Object(v.mapValues)(n,(function(t){var n=!1,r=t.map((function(t){return t.id===e.annotationId?(n=!0,y(y({},t),{},{range:{start:e.start,end:e.end}})):t}));return n?r:t}));case"ANNOTATION_REMOVE_SOURCE":return Object(v.mapValues)(n,(function(t){return g(t,(function(t){return t.source!==e.source}))}))}return n},selectors:r,actions:o});Object(d.register)(D)},4:function(t,n){t.exports=window.wp.data},47:function(t,n,e){"use strict";function r(t,n){if(null==t)return{};var e,r,o={},a=Object.keys(t);for(r=0;r<a.length;r++)e=a[r],n.indexOf(e)>=0||(o[e]=t[e]);return o}e.d(n,"a",(function(){return r}))},48:function(t,n,e){"use strict";var r,o;function a(t){return[t]}function i(){var t={clear:function(){t.head=null}};return t}function u(t,n,e){var r;if(t.length!==n.length)return!1;for(r=e;r<t.length;r++)if(t[r]!==n[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,n.a=function(t,n){var e,c;function l(){e=o?new WeakMap:i()}function f(){var e,r,o,a,i,l=arguments.length;for(a=new Array(l),o=0;o<l;o++)a[o]=arguments[o];for(i=n.apply(null,a),(e=c(i)).isUniqueByDependants||(e.lastDependants&&!u(i,e.lastDependants,0)&&e.clear(),e.lastDependants=i),r=e.head;r;){if(u(r.args,a,1))return r!==e.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=e.head,r.prev=null,e.head.prev=r,e.head=r),r.val;r=r.next}return r={val:t.apply(null,a)},a[0]=null,r.args=a,e.head&&(e.head.prev=r,r.next=e.head),e.head=r,r.val}return n||(n=a),c=o?function(t){var n,o,a,u,c,l=e,f=!0;for(n=0;n<t.length;n++){if(!(c=o=t[n])||"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 e},f.getDependants=n,f.clear=l,l(),f}},6:function(t,n,e){"use strict";function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}e.d(n,"a",(function(){return r}))}});
|
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' => '0b73963ced51da4b64c73f2d292566c1');
|
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=392)}({1:function(e,t){e.exports=window.wp.i18n},15:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(46);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},24:function(e,t){e.exports=window.wp.url},39: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}))},392:function(e,t,r){"use strict";r.r(t);var n=r(6),o=r(15),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(39),y=r(24);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(t,r){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},46: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}))},6: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}))}}).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=392)}({1:function(e,t){e.exports=window.wp.i18n},15:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(47);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}},17:function(e,t){e.exports=window.regeneratorRuntime},25:function(e,t){e.exports=window.wp.url},392:function(e,t,r){"use strict";r.r(t);var n=r(6),o=r(15),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(17),d=r.n(b),j=r(41),y=r(25);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(t,r){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},41: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}))},47: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}))},6: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}))}}).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' => '19074dbb5ed7dce546f1e7999daf6d90');
|
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=268)}({23: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}))},268: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):""}},30:function(e,r,n){"use strict";n.d(r,"a",(function(){return p}));var t=n(23);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}}},39:function(e,r,n){"use strict";function t(e){if(Array.isArray(e))return e}n.d(r,"a",(function(){return t}))},40: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(39),p=n(30),c=n(40);function a(e,r){return Object(t.a)(e)||function(e,r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],t=!0,p=!1,c=void 0;try{for(var a,o=e[Symbol.iterator]();!(t=(a=o.next()).done)&&(n.push(a.value),!r||n.length!==r);t=!0);}catch(e){p=!0,c=e}finally{try{t||null==o.return||o.return()}finally{if(p)throw c}}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' => '7849e3a6afa9e531d4c030bd204ff9f2');
|
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=269)}({269: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' => 'a39d19866da8707de274604016cd49be');
|
build/block-directory/index.js
CHANGED
@@ -1,27 +1,27 @@
|
|
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=385)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){e.exports=window.wp.blocks},13:function(e,t){e.exports=window.wp.compose},130:function(e,t,n){"use strict";var r=n(6),c=n(15),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 c}));var r=n(46);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}},154: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},16:function(e,t){e.exports=window.regeneratorRuntime},17:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(23),c=n(36),o=n(29);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.")}()}},171: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},172: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},2:function(e,t){e.exports=window.lodash},23: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}))},246:function(e,t){e.exports=window.wp.editPost},269: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},29:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(23);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}}},3:function(e,t){e.exports=window.wp.components},32:function(e,t){e.exports=window.wp.hooks},36: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}))},37:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},38: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}))},385:function(e,t,n){"use strict";n.r(t),n.d(t,"store",(function(){return ee}));var r={};n.r(r),n.d(r,"isRequestingDownloadableBlocks",(function(){return k})),n.d(r,"getDownloadableBlocks",(function(){return y})),n.d(r,"getInstalledBlockTypes",(function(){return w})),n.d(r,"getNewBlockTypes",(function(){return h})),n.d(r,"getUnusedBlockTypes",(function(){return g})),n.d(r,"isInstalling",(function(){return v})),n.d(r,"getErrorNotices",(function(){return _})),n.d(r,"getErrorNoticeForBlock",(function(){return E}));var c={};n.r(c),n.d(c,"fetchDownloadableBlocks",(function(){return z})),n.d(c,"receiveDownloadableBlocks",(function(){return H})),n.d(c,"installBlockType",(function(){return K})),n.d(c,"uninstallBlockType",(function(){return U})),n.d(c,"addInstalledBlockType",(function(){return W})),n.d(c,"removeInstalledBlockType",(function(){return Y})),n.d(c,"setIsInstalling",(function(){return G})),n.d(c,"setErrorNotice",(function(){return $})),n.d(c,"clearErrorNotice",(function(){return q}));var o=n(0),a=n(69),i=n(32),l=n(10),s=n(4),u=n(6),b=n(58),d=n(17),f=n(2);function O(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 p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(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 p(p({},e),{},Object(u.a)({},t.filterValue,{isRequesting:!0}));case"RECEIVE_DOWNLOADABLE_BLOCKS":return p(p({},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 p(p({},e),{},{installedBlockTypes:[].concat(Object(d.a)(e.installedBlockTypes),[t.item])});case"REMOVE_INSTALLED_BLOCK_TYPE":return p(p({},e),{},{installedBlockTypes:e.installedBlockTypes.filter((function(e){return e.name!==t.item.name}))});case"SET_INSTALLING_BLOCK":return p(p({},e),{},{isInstalling:p(p({},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 p(p({},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 k(e,t){return!(!e.downloadableBlocks[t]||!e.downloadableBlocks[t].isRequesting)&&e.downloadableBlocks[t].isRequesting}function y(e,t){return e.downloadableBlocks[t]&&e.downloadableBlocks[t].results?e.downloadableBlocks[t].results:[]}function w(e){return e.blockManagement.installedBlockTypes}var h=Object(s.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks();return w(t).filter((function(e){return j(e,n)}))}})),g=Object(s.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks();return w(t).filter((function(e){return!j(e,n)}))}}));function v(e,t){return e.blockManagement.isInstalling[t]||!1}function _(e){return e.errorNotices}function E(e,t){return e.errorNotices[t]}var B=n(16),x=n.n(B),S=n(1),P=n(47),N=n(39),T=n(43),I=n.n(T),L=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 D(e){return{type:"LOAD_ASSETS",assets:e}}var C={LOAD_ASSETS:function(){return I()({url:document.location.href,parse:!1}).then((function(e){return e.text()})).then((function(e){var t=(new window.DOMParser).parseFromString(e,"text/html"),n=Array.from(t.querySelectorAll('link[rel="stylesheet"],script')).filter((function(e){return e.id&&!document.getElementById(e.id)}));return new Promise(function(){var e=Object(N.a)(x.a.mark((function e(t,r){var c;return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=x.a.keys(n);case 1:if((e.t1=e.t0()).done){e.next=13;break}return c=e.t1.value,e.prev=3,e.next=6,L(n[c]);case 6:e.next=11;break;case 8:e.prev=8,e.t2=e.catch(3),r(e.t2);case 11:e.next=1;break;case 13:t();case 14:case"end":return e.stop()}}),e,null,[[3,8]])})));return function(t,n){return e.apply(this,arguments)}}())}))}};function A(e){if(!e)return!1;var t=e.links["wp:plugin"]||e.links.self;return!(!t||!t.length)&&t[0].href}var R=x.a.mark(K),M=x.a.mark(U);function F(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 V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function z(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function H(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}function K(e){var t,n,r,c,o,a,i,u,d;return x.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,G(e.id,!0);case 7:if(c=A(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,W(V(V({},e),{},{links:V(V({},e.links),o)}));case 20:return f.next=22,D(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(S.__)("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(S.__)("An error occurred."),u=f.t0 instanceof Error,(d={folder_exists:Object(S.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:Object(S.__)("Error installing block. You can reload the page and try again.")})[f.t0.code]&&(u=!0,i=d[f.t0.code]),f.next=38,$(t,i,u);case 38:return f.next=40,G(e.id,!1);case 40:return f.abrupt("return",r);case 41:case"end":return f.stop()}}),R,null,[[4,30]])}function U(e){return x.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(b.apiFetch)({url:A(e),data:{status:"inactive"},method:"PUT"});case 3:return t.next=5,Object(b.apiFetch)({url:A(e),method:"DELETE"});case 5:return t.next=7,Y(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(S.__)("An error occurred."));case 13:case"end":return t.stop()}}),M,null,[[0,9]])}function W(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function Y(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function G(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function $(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 J={getDownloadableBlocks:x.a.mark((function e(t){var n,r;return x.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,z(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,H(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 Q(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 X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Z={reducer:m,selectors:r,actions:c,controls:X(X({},b.controls),C),resolvers:J},ee=Object(s.createReduxStore)("core/block-directory",Z);function te(){var e=Object(s.useDispatch)(ee).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(ee).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)(ee);var ne=n(9),re=n(5),ce=n(13),oe=n(3),ae=n(53),ie=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(S.sprintf)(
|
2 |
/* translators: %s: author name. */
|
3 |
Object(S.__)("Authored by %s"),t)),Object(o.createElement)("span",{className:"block-directory-downloadable-block-author-info__content"},r>0?Object(S.sprintf)(
|
4 |
/* translators: 1: number of blocks. 2: average rating. */
|
5 |
Object(S._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(S.sprintf)(
|
6 |
/* translators: 1: number of blocks. */
|
7 |
-
Object(S._n)("This author has %1$d block.","This author has %1$d blocks.",n),n)))},
|
8 |
/* translators: %s: number of stars. */
|
9 |
-
Object(S.__)("%s out of 5 stars"),n)},Object(f.times)(r,(function(e){return Object(o.createElement)(
|
10 |
-
Object(S._n)("%d total rating","%d total ratings",n),n)},"(",n,")"))},
|
11 |
-
Object(S.__)("%s block icon"),n)}):Object(o.createElement)(re.BlockIcon,{icon:t,showColors:!0}))},
|
12 |
/* translators: %d: number of active installations. */
|
13 |
Object(S.__)("%d+ Million active installations"),Math.floor(n/1e6)):0===n?Object(S.__)("Less than 10 active installations"):Object(S.sprintf)(
|
14 |
/* translators: %d: number of active installations. */
|
15 |
-
Object(S.__)("%d+ active installations"),n),Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",{className:"block-directory-downloadable-block-info__content"},Object(
|
16 |
-
Object(S.sprintf)(Object(S.__)("Updated %s"),c)))},
|
17 |
/* translators: %s: number of available blocks. */
|
18 |
-
Object(S._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(S.__)("No blocks found in your library. These blocks can be downloaded and installed:")),Object(o.createElement)(
|
19 |
/* translators: %s: Name of the block author. */
|
20 |
-
Object(S.__)("By %s"),c))))}))):null}function Pe(){var e=Object(s.useSelect)((function(e){return e(ee).getNewBlockTypes()}),[]);return e.length?Object(o.createElement)(
|
21 |
Object(S._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(S._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)),Object(o.createElement)(Se,{items:e})):null}function Ne(e){var t=e.attributes,n=e.block,r=e.clientId,c=Object(s.useSelect)((function(e){return e(ee).isInstalling(n.id)})),a=Object(s.useDispatch)(ee).installBlockType,i=Object(s.useDispatch)("core/block-editor").replaceBlock;return Object(o.createElement)(oe.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(ne.a)(o,1)[0];a&&i(r,Object(l.createBlock)(c.name,a.attributes,a.innerBlocks))}}))},disabled:c,isBusy:c,isPrimary:!0},Object(S.sprintf)(
|
22 |
/* translators: %s: block name */
|
23 |
-
Object(S.__)("Install %s"),n.title))}Object(a.registerPlugin)("block-directory",{render:function(){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(te,null),Object(o.createElement)(
|
24 |
/* translators: %s: block name */
|
25 |
Object(S.__)("Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely."),i.title||r),p=[Object(o.createElement)(Ne,{key:"install",block:i,attributes:e.attributes,clientId:e.clientId})];return d&&f&&(O=Object(S.sprintf)(
|
26 |
/* translators: %s: block name */
|
27 |
-
Object(S.__)("Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely."),i.title||r),p.push(Object(o.createElement)(oe.Button,{key:"convert",onClick:function(){b(e.clientId,Object(l.createBlock)("core/html",{content:c}))},isLink:!0},Object(S.__)("Keep as HTML")))),Object(o.createElement)(o.Fragment,null,Object(o.createElement)(re.Warning,{actions:p},O),Object(o.createElement)(o.RawHTML,null,c))})),e;var n}))},39: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}))},
|
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=385)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){e.exports=window.wp.blocks},13:function(e,t){e.exports=window.wp.compose},131:function(e,t,n){"use strict";var r=n(6),c=n(15),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 c}));var r=n(47);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}},156: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},16:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(23),c=n(38),o=n(30);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.")}()}},168:function(e,t){e.exports=window.wp.editPost},17:function(e,t){e.exports=window.regeneratorRuntime},174: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},175: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},2:function(e,t){e.exports=window.lodash},23: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}))},270: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},3:function(e,t){e.exports=window.wp.components},30:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(23);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}}},33:function(e,t){e.exports=window.wp.hooks},38: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}))},385:function(e,t,n){"use strict";n.r(t),n.d(t,"store",(function(){return ee}));var r={};n.r(r),n.d(r,"isRequestingDownloadableBlocks",(function(){return k})),n.d(r,"getDownloadableBlocks",(function(){return y})),n.d(r,"getInstalledBlockTypes",(function(){return w})),n.d(r,"getNewBlockTypes",(function(){return h})),n.d(r,"getUnusedBlockTypes",(function(){return g})),n.d(r,"isInstalling",(function(){return v})),n.d(r,"getErrorNotices",(function(){return _})),n.d(r,"getErrorNoticeForBlock",(function(){return E}));var c={};n.r(c),n.d(c,"fetchDownloadableBlocks",(function(){return z})),n.d(c,"receiveDownloadableBlocks",(function(){return H})),n.d(c,"installBlockType",(function(){return K})),n.d(c,"uninstallBlockType",(function(){return U})),n.d(c,"addInstalledBlockType",(function(){return W})),n.d(c,"removeInstalledBlockType",(function(){return Y})),n.d(c,"setIsInstalling",(function(){return G})),n.d(c,"setErrorNotice",(function(){return $})),n.d(c,"clearErrorNotice",(function(){return q}));var o=n(0),a=n(70),i=n(33),l=n(10),s=n(4),u=n(6),b=n(59),d=n(16),f=n(2);function O(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 p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(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 p(p({},e),{},Object(u.a)({},t.filterValue,{isRequesting:!0}));case"RECEIVE_DOWNLOADABLE_BLOCKS":return p(p({},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 p(p({},e),{},{installedBlockTypes:[].concat(Object(d.a)(e.installedBlockTypes),[t.item])});case"REMOVE_INSTALLED_BLOCK_TYPE":return p(p({},e),{},{installedBlockTypes:e.installedBlockTypes.filter((function(e){return e.name!==t.item.name}))});case"SET_INSTALLING_BLOCK":return p(p({},e),{},{isInstalling:p(p({},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 p(p({},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 k(e,t){return!(!e.downloadableBlocks[t]||!e.downloadableBlocks[t].isRequesting)&&e.downloadableBlocks[t].isRequesting}function y(e,t){return e.downloadableBlocks[t]&&e.downloadableBlocks[t].results?e.downloadableBlocks[t].results:[]}function w(e){return e.blockManagement.installedBlockTypes}var h=Object(s.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks();return w(t).filter((function(e){return j(e,n)}))}})),g=Object(s.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks();return w(t).filter((function(e){return!j(e,n)}))}}));function v(e,t){return e.blockManagement.isInstalling[t]||!1}function _(e){return e.errorNotices}function E(e,t){return e.errorNotices[t]}var B=n(17),x=n.n(B),S=n(1),P=n(49),N=n(41),T=n(44),I=n.n(T),L=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 D(e){return{type:"LOAD_ASSETS",assets:e}}var C={LOAD_ASSETS:function(){return I()({url:document.location.href,parse:!1}).then((function(e){return e.text()})).then((function(e){var t=(new window.DOMParser).parseFromString(e,"text/html"),n=Array.from(t.querySelectorAll('link[rel="stylesheet"],script')).filter((function(e){return e.id&&!document.getElementById(e.id)}));return new Promise(function(){var e=Object(N.a)(x.a.mark((function e(t,r){var c;return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=x.a.keys(n);case 1:if((e.t1=e.t0()).done){e.next=13;break}return c=e.t1.value,e.prev=3,e.next=6,L(n[c]);case 6:e.next=11;break;case 8:e.prev=8,e.t2=e.catch(3),r(e.t2);case 11:e.next=1;break;case 13:t();case 14:case"end":return e.stop()}}),e,null,[[3,8]])})));return function(t,n){return e.apply(this,arguments)}}())}))}};function A(e){if(!e)return!1;var t=e.links["wp:plugin"]||e.links.self;return!(!t||!t.length)&&t[0].href}var R=x.a.mark(K),M=x.a.mark(U);function F(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 V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function z(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function H(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}function K(e){var t,n,r,c,o,a,i,u,d;return x.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,G(e.id,!0);case 7:if(c=A(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,W(V(V({},e),{},{links:V(V({},e.links),o)}));case 20:return f.next=22,D(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(S.__)("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(S.__)("An error occurred."),u=f.t0 instanceof Error,(d={folder_exists:Object(S.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:Object(S.__)("Error installing block. You can reload the page and try again.")})[f.t0.code]&&(u=!0,i=d[f.t0.code]),f.next=38,$(t,i,u);case 38:return f.next=40,G(e.id,!1);case 40:return f.abrupt("return",r);case 41:case"end":return f.stop()}}),R,null,[[4,30]])}function U(e){return x.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(b.apiFetch)({url:A(e),data:{status:"inactive"},method:"PUT"});case 3:return t.next=5,Object(b.apiFetch)({url:A(e),method:"DELETE"});case 5:return t.next=7,Y(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(S.__)("An error occurred."));case 13:case"end":return t.stop()}}),M,null,[[0,9]])}function W(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function Y(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function G(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function $(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 J={getDownloadableBlocks:x.a.mark((function e(t){var n,r;return x.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,z(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,H(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 Q(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 X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Z={reducer:m,selectors:r,actions:c,controls:X(X({},b.controls),C),resolvers:J},ee=Object(s.createReduxStore)("core/block-directory",Z);function te(){var e=Object(s.useDispatch)(ee).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(ee).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)(ee);var ne=n(9),re=n(5),ce=n(13),oe=n(3),ae=n(54),ie=n(168),le=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(S.sprintf)(
|
2 |
/* translators: %s: author name. */
|
3 |
Object(S.__)("Authored by %s"),t)),Object(o.createElement)("span",{className:"block-directory-downloadable-block-author-info__content"},r>0?Object(S.sprintf)(
|
4 |
/* translators: 1: number of blocks. 2: average rating. */
|
5 |
Object(S._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(S.sprintf)(
|
6 |
/* translators: 1: number of blocks. */
|
7 |
+
Object(S._n)("This author has %1$d block.","This author has %1$d blocks.",n),n)))},se=n(77),ue=n(131),be=n(174),de=n(7),fe=Object(o.createElement)(de.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(de.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(175),pe=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(S.sprintf)(
|
8 |
/* translators: %s: number of stars. */
|
9 |
+
Object(S.__)("%s out of 5 stars"),n)},Object(f.times)(r,(function(e){return Object(o.createElement)(ue.a,{key:"full_stars_".concat(e),icon:be.a,size:16})})),Object(f.times)(c,(function(e){return Object(o.createElement)(ue.a,{key:"half_stars_".concat(e),icon:fe,size:16})})),Object(f.times)(a,(function(e){return Object(o.createElement)(ue.a,{key:"empty_stars_".concat(e),icon:Oe.a,size:16})})))},me=function(e){var t=e.rating,n=e.ratingCount;return Object(o.createElement)("div",{className:"block-directory-block-ratings"},Object(o.createElement)(pe,{rating:t}),Object(o.createElement)("span",{className:"block-directory-block-ratings__rating-count","aria-label":Object(S.sprintf)(// translators: %d: number of ratings (number).
|
10 |
+
Object(S._n)("%d total rating","%d total ratings",n),n)},"(",n,")"))},je=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(S.sprintf)(// translators: %s: Name of the plugin e.g: "Akismet".
|
11 |
+
Object(S.__)("%s block icon"),n)}):Object(o.createElement)(re.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)(je,{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(se.decodeEntities)(n)),Object(o.createElement)(me,{rating:r,ratingCount:c})),Object(o.createElement)(oe.Button,{isSecondary:!0,isBusy:i,disabled:i||!s,onClick:function(e){e.preventDefault(),!i&&s&&u()}},i?Object(S.__)("Adding…"):Object(S.__)("Add block")))},ye=Object(o.createElement)(de.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(o.createElement)(de.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"})),we=n(270),he=function(e){var t,n=e.activeInstalls,r=e.description,c=e.humanizedUpdated;return t=n>1e6?Object(S.sprintf)(
|
12 |
/* translators: %d: number of active installations. */
|
13 |
Object(S.__)("%d+ Million active installations"),Math.floor(n/1e6)):0===n?Object(S.__)("Less than 10 active installations"):Object(S.sprintf)(
|
14 |
/* translators: %d: number of active installations. */
|
15 |
+
Object(S.__)("%d+ active installations"),n),Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",{className:"block-directory-downloadable-block-info__content"},Object(se.decodeEntities)(r)),Object(o.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(o.createElement)(ue.a,{className:"block-directory-downloadable-block-info__icon",icon:ye}),t),Object(o.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(o.createElement)(ue.a,{className:"block-directory-downloadable-block-info__icon",icon:we.a}),// translators: %s: Humanized date of last update e.g: "2 months ago".
|
16 |
+
Object(S.sprintf)(Object(S.__)("Updated %s"),c)))},ge=function(e){var t=e.block,n=e.onClick,r=Object(s.useSelect)((function(e){return e(ee).getErrorNoticeForBlock(t.id)}),[t]);return r?Object(o.createElement)(oe.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)(oe.Button,{isSmall:!0,isPrimary:!0,onClick:function(){if(r.isFatal)return window.location.reload(),!1;n(t)}},r.isFatal?Object(S.__)("Reload"):Object(S.__)("Retry"))):null};function ve(e){var t=e.item,n=e.onClick,r=Object(s.useSelect)((function(e){var n=e(ee),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,O=t.author,p=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)(ge,{onClick:n,block:t}),Object(o.createElement)(he,{activeInstalls:d,description:u,humanizedUpdated:p})),Object(o.createElement)("footer",{className:"block-directory-downloadable-block-list-item__footer"},Object(o.createElement)(le,{author:O,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)(ee).installBlockType,i=Object(s.useDispatch)(ie.store).setIsInserterOpened;return t.length?Object(o.createElement)("ul",{role:"list",className:"block-directory-downloadable-blocks-list"},t.map((function(e){return Object(o.createElement)(ve,{key:e.id,onClick:function(){a(e).then((function(t){t&&(c(e),i(!1))})),r(null)},item:e})}))):null},Ee=Object(ce.compose)([Object(s.withSelect)((function(e,t){var n=t.filterValue,r=e(ee),c=r.getDownloadableBlocks,o=r.isRequestingDownloadableBlocks,a=e("core").canUser("read","block-directory/search");return{downloadableItems:a?c(n):[],hasPermission:a,isLoading:o(n)}}))])((function(e){var t=e.downloadableItems,n=e.onSelect,r=e.onHover,c=e.hasPermission,a=e.isLoading,i=e.isWaiting,l=Object(ce.useDebounce)(ae.speak,500);return!1===c?(l(Object(S.__)("No blocks found in your library.")),Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(S.__)("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)(oe.Spinner,null)):t.length?(l(Object(S.sprintf)(
|
17 |
/* translators: %s: number of available blocks. */
|
18 |
+
Object(S._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(S.__)("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(S.__)("No blocks found in your library."))})),Be=function(){var e=Object(o.useState)(""),t=Object(ne.a)(e,2),n=t[0],r=t[1],c=Object(f.debounce)(r,400);return Object(o.createElement)(re.__experimentalInserterMenuExtension,null,(function(e){var t=e.onSelect,r=e.onHover,a=e.filterValue;return e.hasItems||!a?null:(n!==a&&c(a),Object(o.createElement)(Ee,{onSelect:t,onHover:r,filterValue:n,isWaiting:a!==n}))}))},xe=n(156);function Se(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)(je,{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(S.sprintf)(
|
19 |
/* translators: %s: Name of the block author. */
|
20 |
+
Object(S.__)("By %s"),c))))}))):null}function Pe(){var e=Object(s.useSelect)((function(e){return e(ee).getNewBlockTypes()}),[]);return e.length?Object(o.createElement)(ie.PluginPrePublishPanel,{icon:xe.a,title:Object(S.sprintf)(// translators: %d: number of blocks (number).
|
21 |
Object(S._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(S._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)),Object(o.createElement)(Se,{items:e})):null}function Ne(e){var t=e.attributes,n=e.block,r=e.clientId,c=Object(s.useSelect)((function(e){return e(ee).isInstalling(n.id)})),a=Object(s.useDispatch)(ee).installBlockType,i=Object(s.useDispatch)("core/block-editor").replaceBlock;return Object(o.createElement)(oe.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(ne.a)(o,1)[0];a&&i(r,Object(l.createBlock)(c.name,a.attributes,a.innerBlocks))}}))},disabled:c,isBusy:c,isPrimary:!0},Object(S.sprintf)(
|
22 |
/* translators: %s: block name */
|
23 |
+
Object(S.__)("Install %s"),n.title))}Object(a.registerPlugin)("block-directory",{render:function(){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(te,null),Object(o.createElement)(Be,null),Object(o.createElement)(Pe,null))}}),Object(i.addFilter)("blocks.registerBlockType","block-directory/fallback",(function(e,t){return"core/missing"!==t||(e.edit=(n=e.edit,function(e){var t=e.attributes,r=t.originalName,c=t.originalUndelimitedContent,a=Object(s.useSelect)((function(e){var t=(0,e(ee).getDownloadableBlocks)("block:"+r).filter((function(e){var t=e.name;return r===t}));return{hasPermission:e("core").canUser("read","block-directory/search"),block:t.length&&t[0]}}),[r]),i=a.block,u=a.hasPermission,b=Object(s.useDispatch)("core/block-editor").replaceBlock;if(!u||!i)return Object(o.createElement)(n,e);var d=!!c,f=Object(l.getBlockType)("core/html"),O=Object(S.sprintf)(
|
24 |
/* translators: %s: block name */
|
25 |
Object(S.__)("Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely."),i.title||r),p=[Object(o.createElement)(Ne,{key:"install",block:i,attributes:e.attributes,clientId:e.clientId})];return d&&f&&(O=Object(S.sprintf)(
|
26 |
/* translators: %s: block name */
|
27 |
+
Object(S.__)("Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely."),i.title||r),p.push(Object(o.createElement)(oe.Button,{key:"convert",onClick:function(){b(e.clientId,Object(l.createBlock)("core/html",{content:c}))},isLink:!0},Object(S.__)("Keep as HTML")))),Object(o.createElement)(o.Fragment,null,Object(o.createElement)(re.Warning,{actions:p},O),Object(o.createElement)(o.RawHTML,null,c))})),e;var n}))},39:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return 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(){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}))},41: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}))},44:function(e,t){e.exports=window.wp.apiFetch},47: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}))},49:function(e,t){e.exports=window.wp.notices},5:function(e,t){e.exports=window.wp.blockEditor},54:function(e,t){e.exports=window.wp.a11y},59:function(e,t){e.exports=window.wp.dataControls},6: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}))},7:function(e,t){e.exports=window.wp.primitives},70:function(e,t){e.exports=window.wp.plugins},77:function(e,t){e.exports=window.wp.htmlEntities},9:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(39),c=n(30),o=n(40);function a(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}}(e,t)||Object(c.a)(e,t)||Object(o.a)()}}});
|
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' => '97fffcbb2ca23799ffea84ef0015b694');
|
build/block-editor/index.js
CHANGED
@@ -1,81 +1,81 @@
|
|
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=375)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.lodash},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.wp.data},,function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.wp.primitives},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(37),o=n(29),c=n(38);function i(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}(e,t)||Object(o.a)(e,t)||Object(c.a)()}},function(e,t){e.exports=window.wp.blocks},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)}()},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.compose},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}function o(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 c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(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}function a(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 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 a(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)?a(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(46);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}},function(e,t){e.exports=window.regeneratorRuntime},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(23),o=n(36),c=n(29);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.")}()}},function(e,t){e.exports=window.wp.keycodes},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.wp.richText},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}))},function(e,t){e.exports=window.wp.url},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(41),o=n(19);function c(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(23);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}}},function(e,t){e.exports=window.wp.dom},function(e,t,n){e.exports=n(140)()},function(e,t){e.exports=window.wp.hooks},,function(e,t){e.exports=window.wp.deprecated},,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}))},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n,r,o,c,i){try{var a=e[c](i),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).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 a(e){r(i,o,c,a,l,"next",e)}function l(e){r(i,o,c,a,l,"throw",e)}a(void 0)}))}}n.d(t,"a",(function(){return o}))},,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}))},function(e,t){e.exports=window.wp.keyboardShortcuts},,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}function o(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 c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(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}function a(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 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 a(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)?a(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return l}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(12),o=n(59);function c(e){var t=Object(r.useRef)(e);return Object(o.a)((function(){t.current=e})),t}},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}))},function(e,t){e.exports=window.wp.notices},function(e,t){e.exports=window.wp.blob},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 a(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,t.a=function(e,t){var n,l;function u(){n=o?new WeakMap:i()}function s(){var n,r,o,c,i,u=arguments.length;for(c=new Array(u),o=0;o<u;o++)c[o]=arguments[o];for(i=t.apply(null,c),(n=l(i)).isUniqueByDependants||(n.lastDependants&&!a(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(a(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),l=o?function(e){var t,o,c,a,l,u=n,s=!0;for(t=0;t<e.length;t++){if(!(l=o=e[t])||"object"!=typeof l){s=!1;break}u.has(o)?u=u.get(o):(c=new WeakMap,u.set(o,c),u=c)}return u.has(r)||((a=i()).isUniqueByDependants=s,u.set(r,a)),u.get(r)}:function(){return n},s.getDependants=t,s.clear=u,u(),s}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(12),o=n(63);function c(e,t){Object(r.useDebugValue)(e);var n=Object(r.useContext)(o.a);return null!=n[e]?n[e]:t}var i=n(44),a=n(54);function l(e){var t,n,o,l=(o=e.compose,Array.isArray(o)?o:void 0!==o?[o]:[]),u=function(t,n){if(e.useOptions&&(t=e.useOptions(t,n)),e.name&&(t=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var o="use"+e+"Options";Object(r.useDebugValue)(o);var a=c(o);return a?Object(i.a)(Object(i.a)({},t),a(t,n)):t}(e.name,t,n)),e.compose)for(var o,a=Object(i.c)(l);!(o=a()).done;)t=o.value.__useOptions(t,n);return t},s=function(t,n,o){if(void 0===t&&(t={}),void 0===n&&(n={}),void 0===o&&(o=!1),o||(t=u(t,n)),e.useProps&&(n=e.useProps(t,n)),e.name&&(n=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var o="use"+e+"Props";Object(r.useDebugValue)(o);var i=c(o);return i?i(t,n):n}(e.name,t,n)),e.compose)if(e.useComposeOptions&&(t=e.useComposeOptions(t,n)),e.useComposeProps)n=e.useComposeProps(t,n);else for(var a,s=Object(i.c)(l);!(a=s()).done;)n=(0,a.value)(t,n,!0);var d={},b=n||{};for(var f in b)void 0!==b[f]&&(d[f]=b[f]);return d};s.__useOptions=u;var d=l.reduce((function(e,t){return e.push.apply(e,t.__keys||[]),e}),[]);return s.__keys=[].concat(d,(null===(t=e.useState)||void 0===t?void 0:t.__keys)||[],e.keys||[]),s.unstable_propsAreEqual=e.propsAreEqual||(null===(n=l[0])||void 0===n?void 0:n.unstable_propsAreEqual)||a.a,s}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(12),o=n(44),c=n(78);function i(e,t){for(var n={},r={},o=0,c=Object.keys(e);o<c.length;o++){var i=c[o];t.indexOf(i)>=0?n[i]=e[i]:r[i]=e[i]}return[n,r]}var a=n(54);function l(e){var t,n=e.as,l=e.useHook,u=e.memo,s=e.propsAreEqual,d=void 0===s?null==l?void 0:l.unstable_propsAreEqual:s,b=e.keys,f=void 0===b?(null==l?void 0:l.__keys)||[]:b,p=e.useCreateElement,m=void 0===p?c.a:p,v=function(e,t){var r=e.as,c=void 0===r?n:r,a=Object(o.b)(e,["as"]);if(l){var u,s=i(a,f),d=s[0],b=s[1],p=l(d,Object(o.a)({ref:t},b)),v=p.wrapElement,O=Object(o.b)(p,["wrapElement"]),g=(null===(u=c.render)||void 0===u?void 0:u.__keys)||c.__keys,h=g&&i(a,g)[0],j=h?Object(o.a)(Object(o.a)({},O),h):O,k=m(c,j);return v?v(k):k}return m(c,Object(o.a)({ref:t},a))};return t=v,v=Object(r.forwardRef)(t),u&&(v=function(e,t){return Object(r.memo)(e,t)}(v,d)),v.__keys=f,v.unstable_propsAreEqual=d||a.a,v}},function(e,t,n){"use strict";function r(e){return e?e.ownerDocument||e:window.document}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.wp.a11y},function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(var c=0,i=n;c<i.length;c++){var a=i[c];if(e[a]!==t[a])return!1}return!0}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";function r(e){return e.target===e.currentTarget}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return O})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return h})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return S}));var r=n(14),o=n(12),c=n(59),i=n(61),a=n(62),l=n(64);function u(e){return e.slice().reverse()}function s(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function d(e,t){return e.findIndex((function(e){return!(!e.ref.current||!t.ref.current)&&s(t.ref.current,e.ref.current)}))}function b(e,t){return t?e.find((function(e){return!e.disabled&&e.id!==t})):e.find((function(e){return!e.disabled}))}function f(e,t){if(t)return null==e?void 0:e.find((function(e){return e.id===t&&!e.disabled}))}function p(e){for(var t,n=[[]],o=function(){var e=t.value,r=n.find((function(t){return!t[0]||t[0].groupId===e.groupId}));r?r.push(e):n.push([e])},c=Object(r.c)(e);!(t=c()).done;)o();return n}function m(e){for(var t,n=0,o=Object(r.c)(e);!(t=o()).done;){var c=t.value.length;c>n&&(n=c)}return n}function v(e){for(var t=p(e),n=m(t),o=[],c=0;c<n;c+=1)for(var i,a=Object(r.c)(t);!(i=a()).done;){var l=i.value;l[c]&&o.push(Object(r.b)(Object(r.b)({},l[c]),{},{groupId:l[c].groupId?""+c:void 0}))}return o}function O(e){for(var t,n=[],o=Object(r.c)(e);!(t=o()).done;){var c=t.value;n.push.apply(n,c)}return n}function g(e){for(var t,n=m(e),o=Object(r.c)(e);!(t=o()).done;){var c=t.value;if(c.length<n)for(var i=0;i<n;i+=1)c[i]||(c[i]={id:"__EMPTY_ITEM__",disabled:!0,ref:{current:null},groupId:c[i-1].groupId})}return e}function h(e,t){var n;return t||null===t?t:e.currentId||null===e.currentId?e.currentId:null===(n=b(e.items||[]))||void 0===n?void 0:n.id}var j={id:null,ref:{current:null}};function k(e,t){return e.filter((function(e){return e.groupId===t}))}var y={horizontal:"vertical",vertical:"horizontal"};function _(e,t,n){return n in e?[].concat(e.slice(0,n),[t],e.slice(n)):[].concat(e,[t])}function E(e){var t=e.slice(),n=!1;return t.sort((function(e,t){var r=e.ref.current,o=t.ref.current;return r&&o&&s(r,o)?(n=!0,-1):0})),n?t:e}function w(e,t){var n=e.unstable_virtual,o=e.rtl,c=e.orientation,i=e.items,l=e.groups,s=e.currentId,m=e.loop,C=e.wrap,S=e.pastIds,I=e.unstable_moves,B=e.initialVirtual,x=e.initialRTL,P=e.initialOrientation,T=e.initialCurrentId,N=e.initialLoop,D=e.initialWrap,A=e.hasSetCurrentId;switch(t.type){case"registerGroup":var R=t.group;if(0===l.length)return Object(r.b)(Object(r.b)({},e),{},{groups:[R]});var L=d(l,R);return Object(r.b)(Object(r.b)({},e),{},{groups:_(l,R,L)});case"unregisterGroup":var M=t.id,F=l.filter((function(e){return e.id!==M}));return F.length===l.length?e:Object(r.b)(Object(r.b)({},e),{},{groups:F});case"registerItem":var V,H=t.item,z=l.find((function(e){var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(H.ref.current)})),G=Object(r.b)({groupId:null==z?void 0:z.id},H),U=d(i,G),K=Object(r.b)(Object(r.b)({},e),{},{items:_(i,G,U)});return A||I||void 0!==T?K:Object(r.b)(Object(r.b)({},K),{},{currentId:null===(V=b(K.items))||void 0===V?void 0:V.id});case"unregisterItem":var W=t.id,q=i.filter((function(e){return e.id!==W}));if(q.length===i.length)return e;var $=S.filter((function(e){return e!==W})),Y=Object(r.b)(Object(r.b)({},e),{},{pastIds:$,items:q});if(s&&s===W){var X=h(Object(r.b)(Object(r.b)({},Y),{},{currentId:$[0]}));return Object(r.b)(Object(r.b)({},Y),{},{currentId:X})}return Y;case"move":var Q=t.id;if(void 0===Q)return e;var Z=S.filter((function(e){return e!==s&&e!==Q})),J=s?[s].concat(Z):Z,ee=Object(r.b)(Object(r.b)({},e),{},{pastIds:J});if(null===Q)return Object(r.b)(Object(r.b)({},ee),{},{unstable_moves:I+1,currentId:h(ee,Q)});var te=f(i,Q);return Object(r.b)(Object(r.b)({},ee),{},{unstable_moves:te?I+1:I,currentId:h(ee,null==te?void 0:te.id)});case"next":if(null==s)return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"first"}));var ne=o&&"vertical"!==c,re=ne?u(i):i,oe=re.find((function(e){return e.id===s}));if(!oe)return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"first"}));var ce=!!oe.groupId,ie=re.indexOf(oe),ae=re.slice(ie+1),le=k(ae,oe.groupId);if(t.allTheWay){var ue=b(ne?k(re,oe.groupId):u(le));return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==ue?void 0:ue.id}))}var se=function(e){return e&&y[e]}(ce?c||"horizontal":c),de=m&&m!==se,be=ce&&C&&C!==se,fe=t.hasNullItem||!ce&&de&&null===T;if(de){var pe=b(function(e,t,n){var r=e.findIndex((function(e){return e.id===t}));return[].concat(e.slice(r+1),n?[j]:[],e.slice(0,r))}(be&&!fe?re:k(re,oe.groupId),s,fe),s);return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==pe?void 0:pe.id}))}if(be){var me=b(fe?le:ae,s),ve=fe?(null==me?void 0:me.id)||null:null==me?void 0:me.id;return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:ve}))}var Oe=b(le,s);return w(e,!Oe&&fe?Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null}):Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==Oe?void 0:Oe.id}));case"previous":var ge=!l.length&&null===T,he=w(Object(r.b)(Object(r.b)({},e),{},{items:u(i)}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:ge}));return Object(r.b)(Object(r.b)({},he),{},{items:i});case"down":var je=v(O(g(p(i)))),ke=m&&"horizontal"!==m&&null===T,ye=w(Object(r.b)(Object(r.b)({},e),{},{orientation:"vertical",items:je}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:ke}));return Object(r.b)(Object(r.b)({},ye),{},{orientation:c,items:i});case"up":var _e=v(u(O(g(p(i))))),Ee=null===T,we=w(Object(r.b)(Object(r.b)({},e),{},{orientation:"vertical",items:_e}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:Ee}));return Object(r.b)(Object(r.b)({},we),{},{orientation:c,items:i});case"first":var Ce=b(i);return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==Ce?void 0:Ce.id}));case"last":var Se=w(Object(r.b)(Object(r.b)({},e),{},{items:u(i)}),Object(r.b)(Object(r.b)({},t),{},{type:"first"}));return Object(r.b)(Object(r.b)({},Se),{},{items:i});case"sort":return Object(r.b)(Object(r.b)({},e),{},{items:E(i),groups:E(l)});case"setVirtual":return Object(r.b)(Object(r.b)({},e),{},{unstable_virtual:Object(a.a)(t.virtual,n)});case"setRTL":return Object(r.b)(Object(r.b)({},e),{},{rtl:Object(a.a)(t.rtl,o)});case"setOrientation":return Object(r.b)(Object(r.b)({},e),{},{orientation:Object(a.a)(t.orientation,c)});case"setCurrentId":var Ie=h(Object(r.b)(Object(r.b)({},e),{},{currentId:Object(a.a)(t.currentId,s)}));return Object(r.b)(Object(r.b)({},e),{},{currentId:Ie,hasSetCurrentId:!0});case"setLoop":return Object(r.b)(Object(r.b)({},e),{},{loop:Object(a.a)(t.loop,m)});case"setWrap":return Object(r.b)(Object(r.b)({},e),{},{wrap:Object(a.a)(t.wrap,C)});case"reset":return Object(r.b)(Object(r.b)({},e),{},{unstable_virtual:B,rtl:x,orientation:P,currentId:h(Object(r.b)(Object(r.b)({},e),{},{currentId:T})),loop:N,wrap:D,unstable_moves:0,pastIds:[]});default:throw new Error}}function C(e){return Object(o.useCallback)(e,[])}function S(e){void 0===e&&(e={});var t=Object(i.a)(e),n=t.unstable_virtual,a=void 0!==n&&n,u=t.rtl,s=void 0!==u&&u,d=t.orientation,b=t.currentId,f=t.loop,p=void 0!==f&&f,m=t.wrap,v=void 0!==m&&m,O=Object(r.a)(t,["unstable_virtual","rtl","orientation","currentId","loop","wrap"]),g=Object(o.useReducer)(w,{unstable_virtual:a,rtl:s,orientation:d,items:[],groups:[],currentId:b,loop:p,wrap:v,unstable_moves:0,pastIds:[],initialVirtual:a,initialRTL:s,initialOrientation:d,initialCurrentId:b,initialLoop:p,initialWrap:v}),h=g[0],j=(h.pastIds,h.initialVirtual,h.initialRTL,h.initialOrientation,h.initialCurrentId,h.initialLoop,h.initialWrap,h.hasSetCurrentId,Object(r.a)(h,["pastIds","initialVirtual","initialRTL","initialOrientation","initialCurrentId","initialLoop","initialWrap","hasSetCurrentId"])),k=g[1],y=Object(o.useState)(!1),_=y[0],E=y[1],S=Object(l.a)(O),I=function(){var e=Object(o.useRef)(!1);return Object(c.a)((function(){return function(){e.current=!0}}),[]),e}();return Object(r.b)(Object(r.b)(Object(r.b)({},S),j),{},{unstable_hasActiveWidget:_,unstable_setHasActiveWidget:E,registerItem:C((function(e){I.current||k({type:"registerItem",item:e})})),unregisterItem:C((function(e){I.current||k({type:"unregisterItem",id:e})})),registerGroup:C((function(e){I.current||k({type:"registerGroup",group:e})})),unregisterGroup:C((function(e){I.current||k({type:"unregisterGroup",id:e})})),move:C((function(e){return k({type:"move",id:e})})),next:C((function(e){return k({type:"next",allTheWay:e})})),previous:C((function(e){return k({type:"previous",allTheWay:e})})),up:C((function(e){return k({type:"up",allTheWay:e})})),down:C((function(e){return k({type:"down",allTheWay:e})})),first:C((function(){return k({type:"first"})})),last:C((function(){return k({type:"last"})})),unstable_sort:C((function(){return k({type:"sort"})})),unstable_setVirtual:C((function(e){return k({type:"setVirtual",virtual:e})})),setRTL:C((function(e){return k({type:"setRTL",rtl:e})})),setOrientation:C((function(e){return k({type:"setOrientation",orientation:e})})),setCurrentId:C((function(e){return k({type:"setCurrentId",currentId:e})})),setLoop:C((function(e){return k({type:"setLoop",loop:e})})),setWrap:C((function(e){return k({type:"setWrap",wrap:e})})),reset:C((function(){return k({type:"reset"})}))})}var I=[].concat(l.a.__keys,["unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","unstable_moves","unstable_hasActiveWidget","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","unstable_sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","reset","unstable_setHasActiveWidget"]);S.__keys=I},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(12),o="undefined"==typeof window?r.useEffect:r.useLayoutEffect},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(52);function o(e){return Object(r.a)(e).activeElement}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(12);function o(e){return Object(r.useState)(e)[0]}},function(e,t,n){"use strict";function r(e,t){return function(e){return"function"==typeof e}(e)?e(t):e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(12),o=Object(r.createContext)({})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(12),o=n(61),c=n(66);function i(e){void 0===e&&(e={});var t=Object(o.a)(e).baseId,n=Object(r.useContext)(c.a),i=Object(r.useRef)(0),a=Object(r.useState)((function(){return t||n()}));return{baseId:a[0],unstable_setBaseId:a[1],unstable_idCountRef:i}}i.__keys=["baseId","unstable_setBaseId","unstable_idCountRef"]},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(12),o=Object(r.createContext)((function(e){return void 0===e&&(e="id"),(e?e+"-":"")+Math.random().toString(32).substr(2,6)}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(14),o=n(51),c=n(50),i=n(54),a=Object(c.a)({name:"Box",keys:["unstable_system"],propsAreEqual:function(e,t){var n=e.unstable_system,o=Object(r.a)(e,["unstable_system"]),c=t.unstable_system,a=Object(r.a)(t,["unstable_system"]);return!(n!==c&&!Object(i.a)(n,c))&&Object(i.a)(o,a)}});Object(o.a)({as:"div",useHook:a})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(12);function o(e,t){void 0===t&&(t=null),e&&("function"==typeof e?e(t):e.current=t)}function c(e,t){return Object(r.useMemo)((function(){return null==e&&null==t?null:function(n){o(e,n),o(t,n)}}),[e,t])}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(60);function o(e){var t=Object(r.a)(e);if(!t)return!1;if(e.contains(t))return!0;var n=t.getAttribute("aria-activedescendant");return!(!n||n!==e.id&&!e.querySelector("#"+n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=["button","color","file","image","reset","submit"];function o(e){if("BUTTON"===e.tagName)return!0;if("INPUT"===e.tagName){var t=e;return-1!==r.indexOf(t.type)}return!1}},function(e,t,n){"use strict";function r(e,t){return"matches"in e?e.matches(t):"msMatchesSelector"in e?e.msMatchesSelector(t):e.webkitMatchesSelector(t)}function o(e,t){if("closest"in e)return e.closest(t);do{if(r(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));var c=n(60),i="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function a(e){return r(e,i)&&function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}(e)}function l(e){for(;e&&!a(e);)e=o(e,i);return e}function u(e){return Object(c.a)(e)===e}function s(e,t){var n=void 0===t?{}:t,r=n.isActive,o=void 0===r?u:r,c=n.preventScroll;return o(e)?-1:(e.focus({preventScroll:c}),o(e)?-1:requestAnimationFrame((function(){e.focus({preventScroll:c})})))}},function(e,t,n){"use strict";function r(e){return!((t=e.currentTarget)===(n=e.target)||t.contains(n));var t,n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(14),o=n(51),c=n(50),i=n(67),a=n(12),l=n(68),u=n(72),s=(n(82),n(45)),d=n(59),b=n(71),f=n(74),p=n(60),m=n(73);function v(e){return"undefined"!=typeof window&&-1!==window.navigator.userAgent.indexOf(e)}var O=v("Mac")&&!v("Chrome")&&(v("Safari")||v("Firefox"));function g(e){Object(b.a)(e)||e.focus()}var h=Object(c.a)({name:"Tabbable",compose:i.a,keys:["disabled","focusable"],useOptions:function(e,t){var n=t.disabled;return Object(r.b)({disabled:n},e)},useProps:function(e,t){var n=t.ref,o=t.tabIndex,c=t.onClick,i=t.onMouseDown,b=t.style,v=Object(r.a)(t,["ref","tabIndex","onClick","onMouseDown","style"]),h=Object(a.useRef)(null),j=Object(s.a)(c),k=Object(s.a)(i),y=e.disabled&&!e.focusable,_=Object(a.useState)(!0),E=_[0],w=_[1],C=E?o:o||0,S=e.disabled?Object(r.b)({pointerEvents:"none"},b):b,I=function(){if(O){var e=Object(a.useState)(null),t=e[0],n=e[1];return Object(a.useEffect)((function(){t&&(g(t),n(null))}),[t]),Object(a.useCallback)((function(e){var t=e.currentTarget;if(!Object(f.a)(e)&&Object(u.a)(t)){var r=Object(p.a)(t);if(r){var o="BODY"===r.tagName,c=Object(m.b)(t.parentElement);r===c||o&&!c?n(t):c?c.addEventListener("focusin",(function(){return n(t)}),{once:!0}):r.addEventListener("blur",(function(){return g(t)}),{once:!0})}}}),[])}}();Object(d.a)((function(){var e,t=h.current;t&&"BUTTON"!==(e=t).tagName&&"INPUT"!==e.tagName&&"SELECT"!==e.tagName&&"TEXTAREA"!==e.tagName&&"A"!==e.tagName&&"AUDIO"!==e.tagName&&"VIDEO"!==e.tagName&&w(!1)}),[]);var B=Object(a.useCallback)((function(t){var n;if(e.disabled)return t.stopPropagation(),void t.preventDefault();null===(n=j.current)||void 0===n||n.call(j,t)}),[e.disabled]),x=Object(a.useCallback)((function(t){var n;if(e.disabled)return t.stopPropagation(),void t.preventDefault();null===(n=k.current)||void 0===n||n.call(k,t),t.defaultPrevented||null==I||I(t)}),[e.disabled,I]);return Object(r.b)({ref:Object(l.a)(h,n),style:S,tabIndex:y?void 0:C,disabled:!(!y||!E)||void 0,"aria-disabled":!!e.disabled||void 0,onClick:B,onMouseDown:x},v)}});Object(o.a)({as:"div",useHook:h})},function(e,t){e.exports=window.wp.htmlEntities},function(e,t,n){e.exports=function(e,t){var n,r,o=0;function c(){var c,i,a=n,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(i=0;i<l;i++)if(a.args[i]!==arguments[i]){a=a.next;continue e}return a!==n&&(a===r&&(r=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n,a.prev=null,n.prev=a,n=a),a.val}a=a.next}for(c=new Array(l),i=0;i<l;i++)c[i]=arguments[i];return a={args:c,val:e.apply(null,c)},n?(n.prev=a,a.next=n):r=a,o===t.maxSize?(r=r.prev).next=null:o++,n=a,a.val}return t=t||{},c.clear=function(){n=null,r=null,o=0},c}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(12),o=n(63),c=n(44),i=function(e,t,n){void 0===n&&(n=t.children);var i=Object(r.useContext)(o.a);return i.useCreateElement?i.useCreateElement(e,t,n):"string"==typeof e&&function(e){return"function"==typeof e}(n)?(t.children,n(Object(c.b)(t,["children"]))):Object(r.createElement)(e,t,n)}},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t,n){var r;!function(o){var c=/^\s+/,i=/\s+$/,a=0,l=o.round,u=o.min,s=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,a={r:0,g:0,b:0},l=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,a={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),a=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),a=n*(1-c*t),l=n*(1-(1-c)*t),u=r%6;return{r:255*[n,a,i,i,l,n][u],g:255*[l,n,n,a,i,i][u],b:255*[i,i,l,n,n,a][u]}}(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),a=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 a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=i(l,a,e+1/3),o=i(l,a,e),c=i(l,a,e-1/3)}return{r:255*r,g:255*o,b:255*c}}(e.h,d,f),p=!0,m="hsl"),e.hasOwnProperty("a")&&(l=e.a)),l=T(l),{ok:p,format:e.format||m,r:u(255,s(a.r,0)),g:u(255,s(a.g,0)),b:u(255,s(a.b,0)),a:l}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=a++}function f(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=s(e,t,n),i=u(e,t,n),a=(c+i)/2;if(c==i)r=o=0;else{var l=c-i;switch(o=a>.5?l/(2-c-i):l/(c+i),c){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,l:a}}function p(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=s(e,t,n),i=u(e,t,n),a=c,l=c-i;if(o=0===c?0:l/c,c==i)r=0;else{switch(c){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,v:a}}function m(e,t,n,r){var o=[R(l(e).toString(16)),R(l(t).toString(16)),R(l(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(l(e).toString(16)),R(l(t).toString(16)),R(l(n).toString(16))].join("")}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 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 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=s(0,u(255,n.r-l(-t/100*255))),n.g=s(0,u(255,n.g-l(-t/100*255))),n.b=s(0,u(255,n.b-l(-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 w(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 C(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 I(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 B(e,t){t=t||6;for(var n=b(e).toHsv(),r=n.h,o=n.s,c=n.v,i=[],a=1/t;t--;)i.push(b({h:r,s:o,v:c})),c=(c+a)%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=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(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=l(360*e.h),n=l(100*e.s),r=l(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(l(e).toString(16)),R(l(t).toString(16)),R(l(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:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*N(this._r,255))+"%",g:l(100*N(this._g,255))+"%",b:l(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%)":"rgba("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(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(O,arguments)},saturate:function(){return this._applyModification(g,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(I,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(B,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(C,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,a,l=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"!==(a=(c.size||"small").toLowerCase())&&"large"!==a&&(a="small"),r={level:i,size:a}).level+r.size){case"AAsmall":case"AAAlarge":o=l>=4.5;break;case"AAlarge":o=l>=3;break;case"AAAsmall":o=l>=7}return o},b.mostReadable=function(e,t,n){var r,o,c,i,a=null,l=0;o=(n=n||{}).includeFallbackColors,c=n.level,i=n.size;for(var u=0;u<t.length;u++)(r=b.readability(e,t[u]))>l&&(l=r,a=b(t[u]));return b.isReadable(e,a,{level:c,size:i})||!o?a:(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=u(t,s(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 u(1,s(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)},,function(e,t,n){"use strict";n(97),n(12)},function(e,t,n){"use strict";function r(e){var t=void 0===e?{}:e,n=t.keyMap,r=t.onKey,o=t.stopPropagation,c=t.onKeyDown,i=t.shouldKeyDown,a=void 0===i?function(){return!0}:i,l=t.preventDefault,u=void 0===l||l;return function(e){if(n){var t,i="function"==typeof n?n(e):n,l="function"==typeof u?u(e):u,s="function"==typeof o?o(e):o;if(e.key in i){var d=i[e.key];if("function"==typeof d&&a(e))return l&&e.preventDefault(),s&&e.stopPropagation(),r&&r(e),void d(e)}c&&"current"in c?null===(t=c.current)||void 0===t||t.call(c,e):null==c||c(e)}}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(14),o=n(51),c=n(50),i=n(12),a=n(72),l=(n(82),n(45)),u=n(56),s=n(75),d=Object(c.a)({name:"Clickable",compose:s.a,keys:["unstable_clickOnEnter","unstable_clickOnSpace"],useOptions:function(e){var t=e.unstable_clickOnEnter,n=void 0===t||t,o=e.unstable_clickOnSpace,c=void 0===o||o,i=Object(r.a)(e,["unstable_clickOnEnter","unstable_clickOnSpace"]);return Object(r.b)({unstable_clickOnEnter:n,unstable_clickOnSpace:c},i)},useProps:function(e,t){var n=t.onKeyDown,o=t.onKeyUp,c=Object(r.a)(t,["onKeyDown","onKeyUp"]),s=Object(i.useState)(!1),d=s[0],b=s[1],f=Object(l.a)(n),p=Object(l.a)(o),m=Object(i.useCallback)((function(t){var n;if(null===(n=f.current)||void 0===n||n.call(f,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey&&Object(u.a)(t)){var r=e.unstable_clickOnEnter&&"Enter"===t.key,o=e.unstable_clickOnSpace&&" "===t.key;if(r||o){if(function(e){var t=e.currentTarget;return!!e.isTrusted&&(Object(a.a)(t)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"A"===t.tagName||"SELECT"===t.tagName)}(t))return;t.preventDefault(),r?t.currentTarget.click():o&&b(!0)}}}),[e.disabled,e.unstable_clickOnEnter,e.unstable_clickOnSpace]),v=Object(i.useCallback)((function(t){var n;if(null===(n=p.current)||void 0===n||n.call(p,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey){var r=e.unstable_clickOnSpace&&" "===t.key;d&&r&&(b(!1),t.currentTarget.click())}}),[e.disabled,e.unstable_clickOnSpace,d]);return Object(r.b)({"data-active":d||void 0,onKeyDown:m,onKeyUp:v},c)}});Object(o.a)({as:"button",memo:!0,useHook:d})},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(103);function o(e,t,n){return e.dispatchEvent(Object(r.a)(e,t,n))}},function(e,t,n){"use strict";function r(e){try{var t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName,r="true"===e.contentEditable;return t||n||r||!1}catch(e){return!1}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){e.value=t}n.d(t,"a",(function(){return r}))},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(14),o=n(51),c=n(50),i=n(12),a=n(66),l=n(64),u=Object(c.a)({useState:l.a,keys:["id"],useOptions:function(e,t){var n=Object(i.useContext)(a.a),o=Object(i.useState)((function(){return e.unstable_idCountRef?(e.unstable_idCountRef.current+=1,"-"+e.unstable_idCountRef.current):e.baseId?"-"+n(""):""}))[0],c=Object(i.useMemo)((function(){return e.baseId||n()}),[e.baseId,n]),l=t.id||e.id||""+c+o;return Object(r.b)(Object(r.b)({},e),{},{id:l})},useProps:function(e,t){return Object(r.b)({id:e.id},t)}});Object(o.a)({as:"div",useHook:u})},,,,function(e,t,n){},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(52);function o(e,t,n){return e.dispatchEvent(function(e,t,n){if(void 0===n&&(n={}),"function"==typeof KeyboardEvent)return new KeyboardEvent(t,n);var o=Object(r.a)(e).createEvent("KeyboardEvent");return o.initKeyboardEvent(t,n.bubbles,n.cancelable,function(e){return Object(r.a)(e).defaultView||window}(e),n.key,n.location,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),o}(e,t,n))}},,function(e,t,n){"use strict";t.__esModule=!0;var r=n(177);t.default=r.TextareaAutosize},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(52);function o(e,t,n){var o,c;if(void 0===n&&(n={}),"function"==typeof Event)return new Event(t,n);var i=Object(r.a)(e).createEvent("Event");return i.initEvent(t,null===(o=n)||void 0===o?void 0:o.bubbles,null===(c=n)||void 0===c?void 0:c.cancelable),i}},,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return E})),n.d(t,"b",(function(){return _}));var r=n(14),o=n(51),c=n(50),i=n(67),a=n(12),l=n(68),u=(n(82),n(45)),s=n(56),d=n(60),b=n(75),f=n(78),p=n(83),m=n(52),v=n(88),O=n(99),g=n(57),h="undefined"!=typeof window&&"msCrypto"in window,j="undefined"!=typeof window&&"msCrypto"in window;function k(e,t,n){var r=Object(u.a)(n);return Object(a.useCallback)((function(n){var o;if(e&&function(e){return!!Object(s.a)(e)&&!e.metaKey&&"Tab"!==e.key}(n)){var c=null==t?void 0:t.ref.current;if(c&&(Object(O.a)(c,n.type,n),n.currentTarget.contains(c)))return n.stopPropagation(),void n.preventDefault()}null===(o=r.current)||void 0===o||o.call(r,n)}),[e,t])}function y(e,t){return null==e?void 0:e.some((function(e){return!!t&&e.ref.current===t}))}var _=Object(c.a)({name:"Composite",compose:[b.a],useState:g.g,useOptions:function(e){return Object(r.b)(Object(r.b)({},e),{},{currentId:Object(g.e)(e)})},useProps:function(e,t){var n=t.ref,o=t.onFocus,c=t.onBlur,i=t.onKeyDown,b=t.onKeyUp,f=Object(r.a)(t,["ref","onFocus","onBlur","onKeyDown","onKeyUp"]),O=Object(a.useRef)(null),_=Object(g.d)(e.items,e.currentId),E=Object(a.useRef)(void 0),w=Object(u.a)(o),C=Object(u.a)(c),S=j?function(e){var t=Object(a.useRef)(null);return Object(a.useEffect)((function(){var n=Object(m.a)(e.current),r=function(e){var n=e.target;t.current=n};return n.addEventListener("focus",r,!0),function(){n.removeEventListener("focus",r,!0)}}),[]),t}(O):void 0;Object(a.useEffect)((function(){var t=O.current;t&&e.unstable_moves&&!_&&t.focus()}),[e.unstable_moves,_]);var I=k(e.unstable_virtual,_,i),B=k(e.unstable_virtual,_,b),x=Object(a.useCallback)((function(t){var n;if(e.unstable_virtual){var r,o,c=(null==S?void 0:S.current)||t.relatedTarget,i=y(e.items,c);if(Object(s.a)(t)&&!i)return null===(r=w.current)||void 0===r||r.call(w,t),void(null==_||null===(o=_.ref.current)||void 0===o||o.focus());if(i)return void t.stopPropagation()}else if(Object(s.a)(t)){var a;null===(a=e.setCurrentId)||void 0===a||a.call(e,null)}null===(n=w.current)||void 0===n||n.call(w,t)}),[e.unstable_virtual,e.items,_,e.setCurrentId]),P=Object(a.useCallback)((function(t){var n;if(e.unstable_virtual){var r,o=y(e.items,t.target),c=function(e){return h?Object(d.a)(e.target):e.relatedTarget}(t),i=y(e.items,c);if(Object(s.a)(t)&&i)return(null===(r=E.current)||void 0===r?void 0:r.ref.current)&&Object(v.a)(E.current.ref.current,"blur",t),E.current=_,void t.stopPropagation();o?E.current=_:((null==_?void 0:_.ref.current)&&Object(v.a)(_.ref.current,"blur",t),E.current=void 0)}null===(n=C.current)||void 0===n||n.call(C,t)}),[e.unstable_virtual,e.items,_]),T=Object(a.useMemo)((function(){return Object(p.a)({onKeyDown:I,stopPropagation:!0,shouldKeyDown:function(t){return Object(s.a)(t)&&null===e.currentId},keyMap:function(){var t,n="horizontal"!==e.orientation,r="vertical"!==e.orientation,o=!!(null===(t=e.groups)||void 0===t?void 0:t.length),c=e.first&&function(){return e.first()},i=e.last&&function(){return e.last()};return{ArrowUp:(o||n)&&function(){if(o){var t,n=(c=e.items,Object(g.a)(Object(g.b)(Object(g.f)(Object(g.c)(c)))));(null==n?void 0:n.id)&&(null===(t=e.move)||void 0===t||t.call(e,n.id))}else{var r;null===(r=e.last)||void 0===r||r.call(e)}var c},ArrowRight:(o||r)&&c,ArrowDown:(o||n)&&c,ArrowLeft:(o||r)&&i,Home:c,End:i,PageUp:c,PageDown:i}}})}),[I,e.currentId,e.orientation,e.groups,e.items,e.move,e.last,e.first]);return Object(r.b)({ref:Object(l.a)(O,n),id:e.baseId,onFocus:x,onBlur:P,onKeyDown:T,onKeyUp:B,"aria-activedescendant":e.unstable_virtual&&(null==_?void 0:_.id)||void 0},f)},useComposeProps:function(e,t){t=Object(i.a)(e,t,!0);var n=Object(b.a)(e,t,!0);return e.unstable_virtual||null===e.currentId?n:Object(r.b)(Object(r.b)({},t),{},{ref:n.ref})}}),E=Object(o.a)({as:"div",useHook:_,useCreateElement:function(e,t,n){return Object(f.a)(e,t,n)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return k}));var r=n(14),o=n(51),c=n(50),i=n(12),a=n(68),l=(n(82),n(45)),u=n(56),s=n(71),d=n(74),b=n(73),f=n(84),p=n(83),m=n(52),v=n(57),O=n(93),g=n(89),h=n(90);function j(e){return e.querySelector("[data-composite-item-widget]")}var k=Object(c.a)({name:"CompositeItem",compose:[f.a,O.a],useState:v.g,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return f.a.unstable_propsAreEqual(e,t);var n=e.currentId,o=e.unstable_moves,c=Object(r.a)(e,["currentId","unstable_moves"]),i=t.currentId,a=t.unstable_moves,l=Object(r.a)(t,["currentId","unstable_moves"]);if(i!==n){if(t.id===i||t.id===n)return!1}else if(o!==a)return!1;return f.a.unstable_propsAreEqual(c,l)},useOptions:function(e){return Object(r.b)(Object(r.b)({},e),{},{id:e.id,currentId:Object(v.e)(e),unstable_clickOnSpace:!e.unstable_hasActiveWidget&&e.unstable_clickOnSpace})},useProps:function(e,t){var n,o=t.ref,c=t.tabIndex,f=void 0===c?0:c,v=t.onFocus,O=t.onBlur,k=t.onKeyDown,y=t.onClick,_=Object(r.a)(t,["ref","tabIndex","onFocus","onBlur","onKeyDown","onClick"]),E=Object(i.useRef)(null),w=e.id,C=e.disabled&&!e.focusable,S=e.currentId===w,I=Object(l.a)(S),B=Object(i.useRef)(!1),x=function(e){return Object(i.useMemo)((function(){var t;return null===(t=e.items)||void 0===t?void 0:t.find((function(t){return e.id&&t.id===e.id}))}),[e.items,e.id])}(e),P=Object(l.a)(v),T=Object(l.a)(O),N=Object(l.a)(k),D=Object(l.a)(y),A=!e.unstable_virtual&&!e.unstable_hasActiveWidget&&S||!(null===(n=e.items)||void 0===n?void 0:n.length);Object(i.useEffect)((function(){var t;if(w)return null===(t=e.registerItem)||void 0===t||t.call(e,{id:w,ref:E,disabled:!!C}),function(){var t;null===(t=e.unregisterItem)||void 0===t||t.call(e,w)}}),[w,C,e.registerItem,e.unregisterItem]),Object(i.useEffect)((function(){var t=E.current;t&&e.unstable_moves&&I.current&&t.focus()}),[e.unstable_moves]);var R=Object(i.useCallback)((function(t){var n,o;if(null===(n=P.current)||void 0===n||n.call(P,t),!t.defaultPrevented&&!Object(d.a)(t)&&w&&!function(e,t){if(Object(u.a)(e))return!1;for(var n,o=Object(r.c)(t);!(n=o()).done;)if(n.value.ref.current===e.target)return!0;return!1}(t,e.items)&&(null===(o=e.setCurrentId)||void 0===o||o.call(e,w),e.unstable_virtual&&e.baseId&&Object(u.a)(t))){var c=t.target,i=Object(m.a)(c).getElementById(e.baseId);i&&(B.current=!0,Object(b.a)(i))}}),[w,e.items,e.setCurrentId,e.unstable_virtual,e.baseId]),L=Object(i.useCallback)((function(t){var n;if(e.unstable_virtual&&B.current)return B.current=!1,t.preventDefault(),void t.stopPropagation();null===(n=T.current)||void 0===n||n.call(T,t)}),[e.unstable_virtual]),M=Object(i.useCallback)((function(e){var t;if(null===(t=N.current)||void 0===t||t.call(N,e),Object(u.a)(e)&&1===e.key.length&&" "!==e.key){var n=j(e.currentTarget);if(n&&Object(g.a)(n)){n.focus();var r=e.key;window.requestAnimationFrame((function(){Object(h.a)(n,r)}))}}}),[]),F=Object(i.useMemo)((function(){return Object(p.a)({onKeyDown:M,stopPropagation:!0,shouldKeyDown:u.a,keyMap:function(){var t="horizontal"!==e.orientation,n="vertical"!==e.orientation,r=!!(null==x?void 0:x.groupId),o=function(e){var t=j(e.currentTarget);t&&Object(g.a)(t)&&Object(h.a)(t,"")},c=e.up&&function(){return e.up()},i=e.next&&function(){return e.next()},a=e.down&&function(){return e.down()},l=e.previous&&function(){return e.previous()};return{Delete:o,Backspace:o,ArrowUp:(r||t)&&c,ArrowRight:(r||n)&&i,ArrowDown:(r||t)&&a,ArrowLeft:(r||n)&&l,Home:function(t){var n,o;!r||t.ctrlKey?null===(n=e.first)||void 0===n||n.call(e):null===(o=e.previous)||void 0===o||o.call(e,!0)},End:function(t){var n,o;!r||t.ctrlKey?null===(n=e.last)||void 0===n||n.call(e):null===(o=e.next)||void 0===o||o.call(e,!0)},PageUp:function(){var t,n;r?null===(t=e.up)||void 0===t||t.call(e,!0):null===(n=e.first)||void 0===n||n.call(e)},PageDown:function(){var t,n;r?null===(t=e.down)||void 0===t||t.call(e,!0):null===(n=e.last)||void 0===n||n.call(e)}}}})}),[M,e.orientation,x,e.up,e.next,e.down,e.previous,e.first,e.last]),V=Object(i.useCallback)((function(e){var t;if(null===(t=D.current)||void 0===t||t.call(D,e),!e.defaultPrevented){var n=j(e.currentTarget);n&&!Object(s.a)(n)&&n.focus()}}),[]);return Object(r.b)({ref:Object(a.a)(E,o),id:w,tabIndex:A?f:-1,"aria-selected":!(!e.unstable_virtual||!S)||void 0,onFocus:R,onBlur:L,onKeyDown:F,onClick:V},_)}}),y=Object(o.a)({as:"button",memo:!0,useHook:k})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(37),o=n(36),c=n(29),i=n(38);function a(e){return Object(r.a)(e)||Object(o.a)(e)||Object(c.a)(e)||Object(i.a)()}},,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(173)),c=r(n(174)),i=n(12),a=r(i),l=r(n(147)),u=r(n(175)),s={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(s.str(e)||s.num(e))return e===t;if(s.obj(e)&&s.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!s.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 s.und(e)||s.nul(e)?t:e}function f(e){return s.und(e)?[]:s.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 s.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(s.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return s.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var v,O,g=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 g&&e.addChild(u(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.removeChild(u(t))}))},t}return l(t,e),t}(g),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 g&&e.addChild(u(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.removeChild(u(t))}))},t}l(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 g)&&(t[n]=r instanceof g?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(g);function k(e,t){v={fn:e,transform:t}}function y(e){O=e}var _,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},w=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function C(e){_=e}var S,I=function(){return Date.now()};function B(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 O},injectColorNames:y,get requestFrame(){return E},get cancelFrame(){return w},injectFrame:function(e,t){E=e,w=t},get interpolation(){return _},injectStringInterpolator:C,get now(){return I},injectNow:function(e){I=e},get defaultElement(){return S},injectDefaultElement:B,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 l(t,e),t}(j),R=!1,L=new Set,M=function e(){if(!R)return!1;var t=I(),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,a=!1,l=0;l<i.configs.length;l++){for(var u=i.configs[l],s=void 0,d=void 0,b=0;b<u.animatedValues.length;b++){var f=u.animatedValues[b];if(!f.done){var p=u.fromValues[b],m=u.toValues[b],v=f.lastPosition,O=m instanceof g,h=Array.isArray(u.initialVelocity)?u.initialVelocity[b]:u.initialVelocity;if(O&&(m=m.getValue()),u.immediate)f.setValue(m),f.done=!0;else if("string"!=typeof p&&"string"!=typeof m){if(void 0!==u.duration)v=p+u.easing((t-f.startTime)/u.duration)*(m-p),s=t>=f.startTime+u.duration;else if(u.decay)v=p+h/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(s=Math.abs(f.lastPosition-v)<.1)&&(m=v);else{d=void 0!==f.lastTime?f.lastTime:t,h=void 0!==f.lastVelocity?f.lastVelocity:u.initialVelocity,t>d+64&&(d=t);for(var j=Math.floor(t-d),k=0;k<j;++k)v+=1*(h+=(-u.tension*(v-m)+-u.friction*h)/u.mass*1/1e3)/1e3;var y=!(!u.clamp||0===u.tension)&&(p<m?v>m:v<m),_=Math.abs(h)<=u.precision,w=0===u.tension||Math.abs(m-v)<=u.precision;s=y||_&&w,f.lastVelocity=h,f.lastTime=t}O&&!u.toValues[b].done&&(s=!1),s?(f.value!==m&&(v=m),f.done=!0):a=!0,f.setValue(v),f.lastPosition=v}else f.setValue(m),f.done=!0}}i.props.onFrame&&(i.values[u.name]=u.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(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",a=r.extrapolateRight||r.extrapolate||"extend",l=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,a,l){var u=l?l(e):e;if(u<t){if("identity"===i)return u;"clamp"===i&&(u=t)}if(u>n){if("identity"===a)return u;"clamp"===a&&(u=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?u=-u:n===1/0?u-=t:u=(u-t)/(n-t),u=c(u),r===-1/0?u=-u:o===1/0?u+=r:u=u*(o-r)+r,u)}(e,c[t],c[t+1],o[t],o[t+1],l,i,a,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}l(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}l(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}(g),z=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new H(e)})),n}l(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,a=c(t,["delay","to"]);if(s.arr(i)||s.fun(i))this.queue.push(o({},a,{delay:r,to:i}));else if(i){var l={};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)},a),u=l[i.delay]&&l[i.delay].to;l[i.delay]=o({},l[i.delay],i,{to:o({},u,i.to)})})),this.queue=Object.values(l)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),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;s.obj(r)&&(t.merged=o({},r,t.merged)),s.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 a=o.delay,l=c(o,["delay"]),u=function(o){i===r.length-1&&n===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=s.arr(l.to)||s.fun(l.to);a?setTimeout((function(){n===t.guid&&(d?t.runAsync(l,u):t.diff(l).start(u))}),a):d?t.runAsync(l,u):t.diff(l).start(u)}))}else s.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,a=Promise.resolve(void 0);if(s.arr(r.to))for(var l=function(e){var t=e,c=o({},r,m(r.to[t]));s.arr(c.config)&&(c.config=c.config[t]),a=a.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},u=0;u<r.to.length;u++)l(u);else if(s.fun(r.to)){var d,b=0;a=a.then((function(){return r.to((function(e){var t=o({},r,m(e));if(s.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}))}))}a.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,a=void 0===i?{}:i,l=n.config,u=void 0===l?{}:l,d=n.reverse,m=n.attach,v=n.reset,g=n.immediate;if(d){var h=[a,c];c=h[0],a=h[1]}this.merged=o({},c,this.merged,a),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],a=e[r]||{},l=s.num(i),d=s.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!O[i],m=s.arr(i),h=!l&&!m&&!d,k=s.und(c[r])?i:c[r],y=l||m||d?i:1,E=p(u,r);j&&(y=j.animations[r].parent);var w,C=a.parent,S=a.interpolation,B=f(j?y.getPayload():y),x=i;h&&(x=_({range:[0,1],output:[i,i]})(1));var P,T=S&&S.getValue(),N=!s.und(C)&&a.animatedValues.some((function(e){return!e.done})),D=!s.equ(x,T),A=!s.equ(x,a.previous),R=!s.equ(E,a.config);if(v||A&&D||R){var L;if(l||d)C=S=a.parent||new H(k);else if(m)C=S=a.parent||new z(k);else if(h){var M=a.interpolation&&a.interpolation.calc(a.parent.value);M=void 0===M||v?k:M,a.parent?(C=a.parent).setValue(0,!1):C=new H(0);var F={output:[M,i]};a.interpolation?(S=a.interpolation,a.interpolation.updateConfig(F)):S=C.interpolate(F)}return B=f(j?y.getPayload():y),w=f(C.getPayload()),v&&!h&&C.setValue(k,!1),t.hasChanged=!0,w.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=I(),e.done=!1,e.animatedStyles.clear()})),p(g,r)&&C.setValue(h?y:i,!1),o({},e,((L={})[r]=o({},a,{name:r,parent:C,interpolation:S,animatedValues:w,toValues:B,previous:x,config:E,fromValues:f(C.getValue()),immediate:p(g,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&&(C.setValue(1,!1),S.updateConfig({output:[x,x]})),C.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}(),K=function(e,t){var n=i.useRef(!1),r=i.useRef(),o=s.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]),a=c[0],l=c[1];r.current=a,i.useImperativeHandle(l,(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 u=i.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?p(e,n,t):e[n]),l||t.start()}))}}),[e]);i.useEffect((function(){n.current?o||u(t):l||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,u,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:d},W=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,a=function(e){return e.key!==n};(s.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},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 g||(t=v.transform(t)),n.payload=t,n}return l(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})$/,ae=/^#([0-9a-fA-F]{8})$/;function le(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 ue(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=le(o,r,e+1/3),i=le(o,r,e),a=le(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function se(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))?(se(n[1])<<24|se(n[2])<<16|se(n[3])<<8|255)>>>0:(n=te.exec(t))?(se(n[1])<<24|se(n[2])<<16|se(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=ae.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|ue(de(n[1]),fe(n[2]),fe(n[3])))>>>0:(n=re.exec(t))?(ue(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,Oe=new RegExp("("+Object.keys(Q).join("|")+")","g"),ge={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||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}ge=Object.keys(ge).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}),ge);var ke={};N((function(e){return new X(e)})),B("div"),C((function(e){var t=e.output.map((function(e){return e.replace(ve,pe)})).map((function(e){return e.replace(Oe,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,a=c(t,["style","children","scrollTop","scrollLeft"]),l="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var u in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(u)){var s=0===u.indexOf("--"),d=je(u,n[u],s);"float"===u&&(u="cssFloat"),s?e.style.setProperty(u,d):e.style[u]=d}for(var b in a){var f=l?b:ke[b]||(ke[b]=b.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,a[b])}}),(function(e){return e}));var ye,_e,Ee=(ye=function(e){return i.forwardRef((function(t,n){var r=d(),l=i.useRef(!0),u=i.useRef(null),b=i.useRef(null),f=i.useCallback((function(e){var t=u.current;u.current=new A(e,(function(){b.current&&!1===v.fn(b.current,u.current.getAnimatedValue())&&r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){l.current=!1,u.current&&u.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(b,l,r)})),f(t);var p=u.current.getValue(),m=(p.scrollTop,p.scrollLeft,c(p,["scrollTop","scrollLeft"]));return a.createElement(e,o({},m,{ref:function(e){return b.current=(t=e,(r=n)&&(s.fun(r)?r(t):s.obj(r)&&(r.current=t)),t);var t,r}}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(s.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)}),we=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=we,t.a=we,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=D,t.useSpring=function(e){var t=s.fun(e),n=K(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=s.fun(t),c=p(t),a=i.useRef(),l=K(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},c,{config:p(c.config,e),attach:e>0&&function(){return a.current[e-1]}})})),u=l[0],d=l[1],b=l[2],f=i.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=a.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?[u,f,b]:u},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=$(r),l=a.lazy,u=void 0!==l&&l,s=(a.unique,a.reset),b=void 0!==s&&s,f=(a.enter,a.leave,a.update,a.onDestroyed),m=(a.keys,a.items,a.onFrame),v=a.onRest,O=a.onStart,g=a.ref,h=c(a,["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"]),a=$(t),l=a.items,u=a.keys,s=a.initial,d=a.from,b=a.enter,f=a.leave,m=a.update,v=a.trail,O=void 0===v?0:v,g=a.unique,h=a.config,j=a.order,k=void 0===j?["enter","leave","update"]:j,y=$(r),_=y.keys,E=y.items,w=o({},i.current),C=[].concat(i.deleted),S=Object.keys(w),I=new Set(S),B=new Set(u),x=u.filter((function(e){return!I.has(e)})),P=i.transitions.filter((function(e){return!e.destroyed&&!B.has(e.originalKey)})).map((function(e){return e.originalKey})),T=u.filter((function(e){return I.has(e)})),N=-O;k.length;)switch(k.shift()){case"enter":x.forEach((function(e,t){g&&C.find((function(t){return t.originalKey===e}))&&(C=C.filter((function(t){return t.originalKey!==e})));var r=u.indexOf(e),o=l[r],c=n&&void 0!==s?"initial":"enter";w[e]={slot:c,originalKey:e,key:g?String(e):W++,item:o,trail:N+=O,config:p(h,o,c),from:p(n&&void 0!==s?s||{}:d,o),to:p(b,o)}}));break;case"leave":P.forEach((function(e){var t=_.indexOf(e),n=E[t];C.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=O,config:p(h,n,"leave"),to:p(f,n)})),delete w[e]}));break;case"update":T.forEach((function(e){var t=u.indexOf(e),n=l[t];w[e]=o({},w[e],{item:n,slot:"update",trail:N+=O,config:p(h,n,"update"),to:p(m,n)})}))}var D=u.map((function(e){return w[e]}));return C.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:w,deleted:C,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,a=e.key,l=e.item;y.current.instances.has(a)||y.current.instances.set(a,new U);var s=y.current.instances.get(a),d=o({},h,{to:r,from:n,config:c,ref:g,onRest:function(n){y.current.mounted&&(e.destroyed&&(g||u||Y(y,a),f&&f(l)),!Array.from(y.current.instances).some((function(e){return!e[1].idle}))&&(g||u)&&y.current.deleted.length>0&&Y(y),v&&v(l,t,n))},onStart:O&&function(){return O(l,t)},onFrame:m&&function(e){return m(l,t,e)},delay:i,reset:b&&"enter"===t});s.update(d),y.current.paused||s.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(){s.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 a=n*t[r];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+a})})),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=K},,,,,,function(e,t,n){"use strict";e.exports=n(181)},function(e,t){e.exports=window.wp.wordcount},,,function(e,t){e.exports=window.wp.shortcode},function(e,t,n){"use strict";var r=n(6),o=n(15),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,a=void 0===n?24:n,l=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:a,height:a},l))}},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},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},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},,,,,,,function(e,t,n){"use strict";var r=n(141);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,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}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},,,,,,function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},,,,,function(e,t){e.exports=window.wp.tokenList},,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},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},,,,,,,,,,,function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},,,,,,,function(e,t){function 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},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}},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}},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},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),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 a=n(12),l=n(31),u=n(178),s=n(179),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:s(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&&u(e.textarea)})):this.textarea&&u(this.textarea),this.textarea&&this.textarea.addEventListener("autosize:resized",this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener("autosize:resized",this.onResize),u.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),l=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),u=this.state.lineHeight,s=n&&u?u*n:null;return a.createElement("textarea",c({},l,{onChange:this.onChange,style:s?c({},r,{maxHeight:s}):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&&u.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(d,c({},e,{innerRef:t}))}))},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 a(e){var t=o.get(e);t&&t.update()}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t,n=null,r=null,i=null,a=function(){e.clientWidth!==r&&d()},l=function(t){window.removeEventListener("resize",a,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",l,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),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",l,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:l,update:d}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function u(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function s(){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(){s();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&&(u("scroll"),s(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(u("hidden"),s(),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},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=l,e.exports=t.default})?r.apply(t,[e,t]):r)||(e.exports=o)},function(e,t,n){var r=n(180);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 a=r(e,"font-size");i.style.fontSize=a,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i),n=i.offsetHeight,l.removeChild(i)}return n}},function(e,t){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},function(e,t,n){"use strict";var r=n(182);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,a=n.alignWithLeft,l=n.offsetTop||0,u=n.offsetLeft||0,s=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,O=void 0,g=void 0,h=void 0,j=void 0,k=void 0,y=void 0,_=void 0,E=void 0,w=void 0;b?(y=t,w=r.height(y),E=r.width(y),_={left:r.scrollLeft(y),top:r.scrollTop(y)},j={left:f.left-_.left-u,top:f.top-_.top-l},k={left:f.left+m-(_.left+E)+d,top:f.top+p-(_.top+w)+s},h=_):(v=r.offset(t),O=t.clientHeight,g=t.clientWidth,h={left:t.scrollLeft,top:t.scrollTop},j={left:f.left-(v.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-u,top:f.top-(v.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-l},k={left:f.left+m-(v.left+g+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:f.top+p-(v.top+O+(parseFloat(r.css(t,"borderBottomWidth"))||0))+s}),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===a?r.scrollLeft(t,h.left+j.left):!1===a?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||((a=void 0===a||!!a)?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+k.left)))}},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function 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 a(e){return c(e,!0)}function l(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+=a(r),t}var u=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),s=/^(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(u.test(n)&&!s.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 O(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 a;a="border"===o?o+n[i]+"Width":o+n[i],r+=parseFloat(b(e,a))||0}return r}function g(e){return null!=e&&e==e.window}var h={};function j(e,t,n){if(g(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 a=void 0!==o||c,l=o||i;if(-1===n)return a?l-O(e,["border","padding"],r):i;if(a){var u=2===n?-O(e,["border"],r):O(e,["margin"],r);return l+(1===n?0:u)}return i+O(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+=O(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 l(e);!function(e,t){"static"===_(e,"position")&&(e.style.position="relative");var n=l(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:g,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(g(e)){if(void 0===t)return i(e);window.scrollTo(t,a(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(g(e)){if(void 0===t)return a(e);window.scrollTo(i(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},h)},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},,,,,,,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},,,,,,,,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},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},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},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},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},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},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},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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(274))&&r.__esModule?r:{default:r}).default);t.characterDiff=o},function(e,t,n){"use strict";t.match=function(e,t){return l(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=s(o),c=s(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":o=u(o),c=u(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=l;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)?$/,a=/(dpi|dpcm|dppx)?$/;function l(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(r),n=t[1],i=t[2],a=t[3]||"",l={};return l.inverse=!!n&&"not"===n.toLowerCase(),l.type=i?i.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],l.expressions=a.map((function(e){var t=e.match(o),n=t[1].toLowerCase().match(c);return{modifier:n[1],feature:n[2],value:t[2]}})),l}))}function u(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function s(e){var t=parseFloat(e);switch(String(e).match(a)[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}}},function(e,t){var n=e.exports=function(e){return new r(e)};function r(e){this.value=e}function o(e,t,n){var r=[],o=[],a=!0;return function e(d){var 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){l(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(){a=!1},block:function(){p=!1}};if(!a)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 O=t.call(m,m.node);return void 0!==O&&m.update&&m.update(O),f.before&&f.before.call(m,m.node),p?("object"!=typeof m.node||null===m.node||m.circular||(o.push(m),v(),u(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&&s.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(l(e))t=[];else if("[object Date]"===a(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===a(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===a(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===a(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===a(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===a(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return u(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||!s.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||!s.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];s.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},r.prototype.map=function(e){return o(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(r=e.call(this,r,t))})),r},r.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},r.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var a=c(r);return e.push(r),t.push(a),u(i(r),(function(e){a[e]=n(r[e])})),e.pop(),t.pop(),a}return r}(this.value)};var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function a(e){return Object.prototype.toString.call(e)}var l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},u=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};u(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 s=Object.hasOwnProperty||function(e,t){return t in e}},,,,,,,,,,,,,,,,,,,,,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},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},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},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},function(e,t,n){"use strict";function r(){}function o(e,t,n,r,o){for(var c=0,i=t.length,a=0,l=0;c<i;c++){var u=t[c];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,c&&t[c-1].added){var s=t[c-1];t[c-1]=t[c],t[c]=s}}else{if(!u.added&&o){var d=n.slice(a,a+u.count);d=d.map((function(e,t){var n=r[l+t];return n.length>e.length?n:e})),u.value=e.join(d)}else u.value=e.join(n.slice(a,a+u.count));a+=u.count,u.added||(l+=u.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 a(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 l=(t=this.removeEmpty(this.tokenize(t))).length,u=e.length,s=1,d=l+u,b=[{newPos:-1,components:[]}],f=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=l&&f+1>=u)return a([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*s;n<=s;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<l,v=f&&0<=p&&p<u;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>=l&&p+1>=u)return a(o(i,r.components,t,e,i.useLongestToken));b[n]=r}else b[n]=void 0}s++}if(r)!function e(){setTimeout((function(){if(s>d)return r();p()||e()}),0)}();else for(;s<=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,a=i-r,l=0;i+1<o&&a+1<c&&this.equals(t[i+1],n[a+1]);)i++,a++,l++;return l&&e.components.push({count:l}),e.newPos=i,a},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},function(e,t,n){"use strict";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},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},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"getColorClassName",(function(){return Ne})),n.d(t,"getColorObjectByAttributeValues",(function(){return Pe})),n.d(t,"getColorObjectByColorValue",(function(){return Te})),n.d(t,"createCustomColorsHOC",(function(){return qn})),n.d(t,"withColors",(function(){return $n})),n.d(t,"__experimentalUseColors",(function(){return sr})),n.d(t,"__experimentalGetGradientClass",(function(){return Ae})),n.d(t,"getGradientValueBySlug",(function(){return Re})),n.d(t,"__experimentalGetGradientObjectByGradientValue",(function(){return Le})),n.d(t,"getGradientSlugByValue",(function(){return Me})),n.d(t,"__experimentalUseGradient",(function(){return Fe})),n.d(t,"getFontSize",(function(){return dn})),n.d(t,"getFontSizeClass",(function(){return fn})),n.d(t,"getFontSizeObjectByValue",(function(){return bn})),n.d(t,"FontSizePicker",(function(){return pn})),n.d(t,"withFontSizes",(function(){return mr})),n.d(t,"AlignmentToolbar",(function(){return _r})),n.d(t,"Autocomplete",(function(){return Vr})),n.d(t,"BlockAlignmentToolbar",(function(){return z})),n.d(t,"__experimentalBlockFullHeightAligmentToolbar",(function(){return zr})),n.d(t,"__experimentalBlockAlignmentMatrixToolbar",(function(){return Gr})),n.d(t,"BlockBreadcrumb",(function(){return Kr})),n.d(t,"BlockContextProvider",(function(){return Yr})),n.d(t,"BlockControls",(function(){return w})),n.d(t,"BlockColorsStyleSelector",(function(){return Jr})),n.d(t,"BlockEdit",(function(){return no})),n.d(t,"useBlockEditContext",(function(){return h})),n.d(t,"BlockFormatControls",(function(){return ao})),n.d(t,"BlockIcon",(function(){return Lr})),n.d(t,"BlockNavigationDropdown",(function(){return Td})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return gd})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return qd})),n.d(t,"__experimentalBlockNavigationTree",(function(){return Id})),n.d(t,"__experimentalBlockVariationPicker",(function(){return Yd})),n.d(t,"__experimentalBlockVariationTransforms",(function(){return Zd})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return ib})),n.d(t,"ButtonBlockerAppender",(function(){return xu})),n.d(t,"ColorPalette",(function(){return sb})),n.d(t,"ColorPaletteControl",(function(){return db})),n.d(t,"ContrastChecker",(function(){return at})),n.d(t,"__experimentalGradientPicker",(function(){return pb})),n.d(t,"__experimentalGradientPickerControl",(function(){return mb})),n.d(t,"__experimentalGradientPickerPanel",(function(){return vb})),n.d(t,"__experimentalFontAppearanceControl",(function(){return Xt})),n.d(t,"__experimentalFontFamilyControl",(function(){return rn})),n.d(t,"__experimentalColorGradientControl",(function(){return Ye})),n.d(t,"__experimentalPanelColorGradientSettings",(function(){return ot})),n.d(t,"__experimentalImageSizeControl",(function(){return gb})),n.d(t,"InnerBlocks",(function(){return Pb})),n.d(t,"__experimentalUseInnerBlocksProps",(function(){return xb})),n.d(t,"InspectorAdvancedControls",(function(){return ee})),n.d(t,"InspectorControls",(function(){return ve})),n.d(t,"__experimentalLinkControl",(function(){return uf})),n.d(t,"__experimentalLinkControlSearchInput",(function(){return tf})),n.d(t,"__experimentalLinkControlSearchResults",(function(){return Ub})),n.d(t,"__experimentalLinkControlSearchItem",(function(){return Gb})),n.d(t,"LineHeightControl",(function(){return Gt})),n.d(t,"MediaReplaceFlow",(function(){return pf})),n.d(t,"MediaPlaceholder",(function(){return jf})),n.d(t,"MediaUpload",(function(){return bf})),n.d(t,"MediaUploadCheck",(function(){return ff})),n.d(t,"PanelColorSettings",(function(){return Jn})),n.d(t,"PlainText",(function(){return _f})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return wf})),n.d(t,"RichText",(function(){return Wd})),n.d(t,"RichTextShortcut",(function(){return Cf})),n.d(t,"RichTextToolbarButton",(function(){return Sf})),n.d(t,"__unstableRichTextInputEvent",(function(){return If})),n.d(t,"ToolSelector",(function(){return xf})),n.d(t,"__experimentalUnitControl",(function(){return Pf})),n.d(t,"URLInput",(function(){return Vb})),n.d(t,"URLInputButton",(function(){return Df})),n.d(t,"URLPopover",(function(){return gf})),n.d(t,"__experimentalImageURLInputUI",(function(){return Mf})),n.d(t,"withColorContext",(function(){return ub})),n.d(t,"__experimentalBlockSettingsMenuFirstItem",(function(){return Ss})),n.d(t,"__experimentalInserterMenuExtension",(function(){return Ou})),n.d(t,"__experimentalPreviewOptions",(function(){return Vf})),n.d(t,"__experimentalUseResizeCanvas",(function(){return qf})),n.d(t,"BlockInspector",(function(){return Jf})),n.d(t,"BlockList",(function(){return Ys})),n.d(t,"useBlockProps",(function(){return od})),n.d(t,"__experimentalBlock",(function(){return rp})),n.d(t,"BlockMover",(function(){return rs})),n.d(t,"BlockPreview",(function(){return Vl})),n.d(t,"BlockSelectionClearer",(function(){return cp})),n.d(t,"__unstableUseBlockSelectionClearer",(function(){return op})),n.d(t,"BlockSettingsMenu",(function(){return Rs})),n.d(t,"BlockSettingsMenuControls",(function(){return Ns})),n.d(t,"BlockTitle",(function(){return Ur})),n.d(t,"BlockToolbar",(function(){return Hs})),n.d(t,"CopyHandler",(function(){return js})),n.d(t,"__unstableUseClipboardHandler",(function(){return hs})),n.d(t,"DefaultBlockAppender",(function(){return Bu})),n.d(t,"__unstableUseEditorStyles",(function(){return Bp})),n.d(t,"Inserter",(function(){return Iu})),n.d(t,"__experimentalLibrary",(function(){return xp})),n.d(t,"__experimentalSearchForm",(function(){return Jo})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return Tp})),n.d(t,"MultiSelectScrollIntoView",(function(){return Dp})),n.d(t,"__unstableUseScrollMultiSelectionIntoView",(function(){return Np})),n.d(t,"NavigableToolbar",(function(){return ts})),n.d(t,"ObserveTyping",(function(){return Lp})),n.d(t,"__unstableUseTypingObserver",(function(){return Rp})),n.d(t,"PreserveScrollInReorder",(function(){return Mp})),n.d(t,"SkipToSelectedBlock",(function(){return $f})),n.d(t,"Typewriter",(function(){return zp})),n.d(t,"__unstableUseTypewriter",(function(){return Hp})),n.d(t,"Warning",(function(){return Do})),n.d(t,"WritingFlow",(function(){return qu})),n.d(t,"__unstableUseCanvasClickRedirect",(function(){return Up})),n.d(t,"BlockEditorProvider",(function(){return Ll})),n.d(t,"__experimentalUseSimulatedMediaQuery",(function(){return Wf})),n.d(t,"__experimentalUseEditorFeature",(function(){return he})),n.d(t,"transformStyles",(function(){return Ip})),n.d(t,"validateThemeColors",(function(){return Kp})),n.d(t,"validateThemeGradients",(function(){return Wp})),n.d(t,"__experimentalGetMatchingVariation",(function(){return Xd})),n.d(t,"storeConfig",(function(){return Nl})),n.d(t,"store",(function(){return Dl})),n.d(t,"SETTINGS_DEFAULTS",(function(){return nc}));var r={};n.r(r),n.d(r,"getBlockName",(function(){return Cc})),n.d(r,"isBlockValid",(function(){return Sc})),n.d(r,"getBlockAttributes",(function(){return Ic})),n.d(r,"getBlock",(function(){return Bc})),n.d(r,"__unstableGetBlockWithoutInnerBlocks",(function(){return xc})),n.d(r,"getBlocks",(function(){return Pc})),n.d(r,"__unstableGetBlockWithBlockTree",(function(){return Tc})),n.d(r,"__unstableGetBlockTree",(function(){return Nc})),n.d(r,"getClientIdsOfDescendants",(function(){return Dc})),n.d(r,"getClientIdsWithDescendants",(function(){return Ac})),n.d(r,"getGlobalBlockCount",(function(){return Rc})),n.d(r,"getBlocksByClientId",(function(){return Lc})),n.d(r,"getBlockCount",(function(){return Mc})),n.d(r,"getSelectionStart",(function(){return Fc})),n.d(r,"getSelectionEnd",(function(){return Vc})),n.d(r,"getBlockSelectionStart",(function(){return Hc})),n.d(r,"getBlockSelectionEnd",(function(){return zc})),n.d(r,"getSelectedBlockCount",(function(){return Gc})),n.d(r,"hasSelectedBlock",(function(){return Uc})),n.d(r,"getSelectedBlockClientId",(function(){return Kc})),n.d(r,"getSelectedBlock",(function(){return Wc})),n.d(r,"getBlockRootClientId",(function(){return qc})),n.d(r,"getBlockParents",(function(){return $c})),n.d(r,"getBlockParentsByBlockName",(function(){return Yc})),n.d(r,"getBlockHierarchyRootClientId",(function(){return Xc})),n.d(r,"getLowestCommonAncestorWithSelectedBlock",(function(){return Qc})),n.d(r,"getAdjacentBlockClientId",(function(){return Zc})),n.d(r,"getPreviousBlockClientId",(function(){return Jc})),n.d(r,"getNextBlockClientId",(function(){return ei})),n.d(r,"getSelectedBlocksInitialCaretPosition",(function(){return ti})),n.d(r,"getSelectedBlockClientIds",(function(){return ni})),n.d(r,"getMultiSelectedBlockClientIds",(function(){return ri})),n.d(r,"getMultiSelectedBlocks",(function(){return oi})),n.d(r,"getFirstMultiSelectedBlockClientId",(function(){return ci})),n.d(r,"getLastMultiSelectedBlockClientId",(function(){return ii})),n.d(r,"isFirstMultiSelectedBlock",(function(){return ai})),n.d(r,"isBlockMultiSelected",(function(){return li})),n.d(r,"isAncestorMultiSelected",(function(){return ui})),n.d(r,"getMultiSelectedBlocksStartClientId",(function(){return si})),n.d(r,"getMultiSelectedBlocksEndClientId",(function(){return di})),n.d(r,"getBlockOrder",(function(){return bi})),n.d(r,"getBlockIndex",(function(){return fi})),n.d(r,"isBlockSelected",(function(){return pi})),n.d(r,"hasSelectedInnerBlock",(function(){return mi})),n.d(r,"isBlockWithinSelection",(function(){return vi})),n.d(r,"hasMultiSelection",(function(){return Oi})),n.d(r,"isMultiSelecting",(function(){return gi})),n.d(r,"isSelectionEnabled",(function(){return hi})),n.d(r,"getBlockMode",(function(){return ji})),n.d(r,"isTyping",(function(){return ki})),n.d(r,"isDraggingBlocks",(function(){return yi})),n.d(r,"getDraggedBlockClientIds",(function(){return _i})),n.d(r,"isBlockBeingDragged",(function(){return Ei})),n.d(r,"isAncestorBeingDragged",(function(){return wi})),n.d(r,"isCaretWithinFormattedText",(function(){return Ci})),n.d(r,"getBlockInsertionPoint",(function(){return Si})),n.d(r,"isBlockInsertionPointVisible",(function(){return Ii})),n.d(r,"isValidTemplate",(function(){return Bi})),n.d(r,"getTemplate",(function(){return xi})),n.d(r,"getTemplateLock",(function(){return Pi})),n.d(r,"canInsertBlockType",(function(){return Ni})),n.d(r,"canInsertBlocks",(function(){return Di})),n.d(r,"getInserterItems",(function(){return Mi})),n.d(r,"hasInserterItems",(function(){return Fi})),n.d(r,"__experimentalGetAllowedBlocks",(function(){return Vi})),n.d(r,"getBlockListSettings",(function(){return Hi})),n.d(r,"getSettings",(function(){return zi})),n.d(r,"isLastBlockChangePersistent",(function(){return Gi})),n.d(r,"__experimentalGetBlockListSettingsForBlocks",(function(){return Ui})),n.d(r,"__experimentalGetParsedReusableBlock",(function(){return Ki})),n.d(r,"__unstableIsLastBlockChangeIgnored",(function(){return Wi})),n.d(r,"__experimentalGetLastBlockAttributeChanges",(function(){return qi})),n.d(r,"isNavigationMode",(function(){return Yi})),n.d(r,"hasBlockMovingClientId",(function(){return Xi})),n.d(r,"didAutomaticChange",(function(){return Qi})),n.d(r,"isBlockHighlighted",(function(){return Zi})),n.d(r,"areInnerBlocksControlled",(function(){return Ji})),n.d(r,"__experimentalGetActiveBlockIdByBlockNames",(function(){return ea}));var o={};n.r(o),n.d(o,"resetBlocks",(function(){return Ia})),n.d(o,"validateBlocksToTemplate",(function(){return Ba})),n.d(o,"resetSelection",(function(){return xa})),n.d(o,"receiveBlocks",(function(){return Pa})),n.d(o,"updateBlockAttributes",(function(){return Ta})),n.d(o,"updateBlock",(function(){return Na})),n.d(o,"selectBlock",(function(){return Da})),n.d(o,"selectPreviousBlock",(function(){return Aa})),n.d(o,"selectNextBlock",(function(){return Ra})),n.d(o,"startMultiSelect",(function(){return La})),n.d(o,"stopMultiSelect",(function(){return Ma})),n.d(o,"multiSelect",(function(){return Fa})),n.d(o,"clearSelectedBlock",(function(){return Va})),n.d(o,"toggleSelection",(function(){return Ha})),n.d(o,"replaceBlocks",(function(){return Ga})),n.d(o,"replaceBlock",(function(){return Ua})),n.d(o,"moveBlocksDown",(function(){return Wa})),n.d(o,"moveBlocksUp",(function(){return qa})),n.d(o,"moveBlocksToPosition",(function(){return $a})),n.d(o,"moveBlockToPosition",(function(){return Ya})),n.d(o,"insertBlock",(function(){return Xa})),n.d(o,"insertBlocks",(function(){return Qa})),n.d(o,"__unstableSetInsertionPoint",(function(){return Za})),n.d(o,"showInsertionPoint",(function(){return Ja})),n.d(o,"hideInsertionPoint",(function(){return el})),n.d(o,"setTemplateValidity",(function(){return tl})),n.d(o,"synchronizeTemplate",(function(){return nl})),n.d(o,"mergeBlocks",(function(){return rl})),n.d(o,"removeBlocks",(function(){return ol})),n.d(o,"removeBlock",(function(){return cl})),n.d(o,"replaceInnerBlocks",(function(){return il})),n.d(o,"toggleBlockMode",(function(){return al})),n.d(o,"startTyping",(function(){return ll})),n.d(o,"stopTyping",(function(){return ul})),n.d(o,"startDraggingBlocks",(function(){return sl})),n.d(o,"stopDraggingBlocks",(function(){return dl})),n.d(o,"enterFormattedText",(function(){return bl})),n.d(o,"exitFormattedText",(function(){return fl})),n.d(o,"selectionChange",(function(){return pl})),n.d(o,"insertDefaultBlock",(function(){return ml})),n.d(o,"updateBlockListSettings",(function(){return vl})),n.d(o,"updateSettings",(function(){return Ol})),n.d(o,"__unstableSaveReusableBlock",(function(){return gl})),n.d(o,"__unstableMarkLastChangeAsPersistent",(function(){return hl})),n.d(o,"__unstableMarkNextChangeAsNotPersistent",(function(){return jl})),n.d(o,"__unstableMarkAutomaticChange",(function(){return kl})),n.d(o,"__unstableMarkAutomaticChangeFinal",(function(){return yl})),n.d(o,"setNavigationMode",(function(){return _l})),n.d(o,"setBlockMovingClientId",(function(){return El})),n.d(o,"duplicateBlocks",(function(){return wl})),n.d(o,"insertBeforeBlock",(function(){return Cl})),n.d(o,"insertAfterBlock",(function(){return Sl})),n.d(o,"toggleBlockHighlight",(function(){return Il})),n.d(o,"flashBlock",(function(){return Bl})),n.d(o,"setHasControlledInnerBlocks",(function(){return xl}));var c=n(22),i=n(8),a=n(6),l=n(0),u=n(11),s=n.n(u),d=n(2),b=n(13),f=n(32),p=n(10),m=n(4),v=n(3),O=Object(l.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:d.noop,clientId:null}),g=O.Provider;function h(){return Object(l.useContext)(O)}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,a=o.getMultiSelectedBlockClientIds;return!!i(n)&&a().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(l.createElement)(y,null,(function(e){var r=Object(d.isEmpty)(e)?null:e;return Object(l.createElement)(v.__experimentalToolbarContext.Provider,{value:r},Object(l.createElement)(v.ToolbarGroup,{controls:t}),n)})):null};E.Slot=function(e){var t=Object(l.useContext)(v.__experimentalToolbarContext);return Object(l.createElement)(_,Object(i.a)({},e,{fillProps:t}))};var w=E,C=n(1),S=n(7),I=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),B=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),x=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),P=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),T=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),N={type:"default"},D=Object(l.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(a.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:I,title:Object(C.__)("Align left")},center:{icon:B,title:Object(C.__)("Align center")},right:{icon:x,title:Object(C.__)("Align right")},wide:{icon:P,title:Object(C.__)("Wide width")},full:{icon:T,title:Object(C.__)("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,a=Object(m.useSelect)((function(e){return{wideControlsEnabled:(0,e("core/block-editor").getSettings)().alignWide}})).wideControlsEnabled,u=void 0!==a&&a,s=Object(l.useContext)(D);if("default"!==s.type)return null;var d=s.alignments,b=void 0===d?F:d,f=o.filter((function(e){return(u||!V.includes(e))&&b.includes(e)}));if(0===f.length)return null;var p=M[t],O=M.center;return Object(l.createElement)(v.ToolbarGroup,{popoverProps:H,isCollapsed:i,icon:p?p.icon:O.icon,label:Object(C.__)("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(a.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 K=["left","center","right","wide","full"],W=["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)?K.filter((function(t){return e.includes(t)})):!0===e?K:[],!r||!0===e&&!n?d.without.apply(void 0,[t].concat(W)):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(l.createElement)(w,{key:"align-controls"},Object(l.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(l.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(l.createElement)(e,t);var c=q(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0),o),a=t.wrapperProps;return c.includes(r)&&(a=U(U({},a),{},{"data-align":r})),Object(l.createElement)(e,Object(i.a)({},t,{wrapperProps:a}))}}));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(K,[""])}})),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=s()("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(l.createElement)(Q,null,t):null}J.slotName="InspectorAdvancedControls",J.Slot=Z;var ee=J;function te(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 ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var re=/[\s#]/g,oe=Object(b.createHigherOrderComponent)((function(e){return function(t){return Object(p.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object(l.createElement)(l.Fragment,null,Object(l.createElement)(e,t),Object(l.createElement)(ee,null,Object(l.createElement)(v.TextControl,{className:"html-anchor-control",label:Object(C.__)("HTML anchor"),help:Object(l.createElement)(l.Fragment,null,Object(C.__)("Enter a word or two — without spaces — to make a unique web address just for this heading, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),Object(l.createElement)(v.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(C.__)("Learn more about anchors"))),value:t.attributes.anchor||"",onChange:function(e){e=e.replace(re,"-"),t.setAttributes({anchor:e})},autoComplete:"off"}))):Object(l.createElement)(e,t)}}),"withInspectorControl");function ce(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 ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(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=ne(ne({},e.attributes),{},{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",oe),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 ae=Object(b.createHigherOrderComponent)((function(e){return function(t){return Object(p.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(l.createElement)(l.Fragment,null,Object(l.createElement)(e,t),Object(l.createElement)(ee,null,Object(l.createElement)(v.TextControl,{autoComplete:"off",label:Object(C.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})},help:Object(C.__)("Separate multiple classes with spaces.")}))):Object(l.createElement)(e,t)}}),"withInspectorControl");function le(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=ie(ie({},e.attributes),{},{className:{type:"string"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",ae),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=s()(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=le(o),i=le(n),a=Object(d.difference)(i,c);a.length?e.className=a.join(" "):o&&delete e.className}return e}));var ue=n(17);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(ue.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(p.getBlockDefaultClassName)(t.name)),e}));var se=n(9),de=n(117),be=Object(v.createSlotFill)("InspectorControls"),fe=be.Fill,pe=be.Slot;function me(e){var t=e.children;return j()?Object(l.createElement)(fe,null,t):null}me.Slot=pe;var ve=me,Oe={"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}};function ge(e,t){for(var n in t)if(t[n]!==e[n])return!1;return!0}function he(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,a=(0,c.getSettings)(),l=t(p.store).getBlockType(n),u=n,s=Object(d.get)(l,["supports","__experimentalSelector"]);if(Object(d.isObject)(s)){var b=i(r)||{};for(var f in s)if(ge(b,s[f].attributes)){u=f;break}}var m="__experimentalFeatures.global.".concat(e),v="__experimentalFeatures.".concat(u,".").concat(e),O=null!==(o=Object(d.get)(a,v))&&void 0!==o?o:Object(d.get)(a,m);if(void 0!==O)return O;var g=Oe[e]?Oe[e](a):void 0;return void 0!==g?g:"typography.dropCap"===e||void 0}),[n,r,e])}var je=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 ke(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 ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _e(e){var t,n=e.attributes.style,r=e.setAttributes;return we(e)?null:Object(l.createElement)(v.RangeControl,{value:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,label:Object(C.__)("Border radius"),min:0,max:50,initialPosition:0,allowReset:!0,onChange:function(e){var t=ye(ye({},n),{},{border:ye(ye({},null==n?void 0:n.border),{},{radius:e})});r({style:je(t)})}})}function Ee(e){var t=Object(p.getBlockSupport)(e,Ce);return!0===t||t&&!!t.radius}function we(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!he("border.customRadius");return!Ee(t)||n}var Ce="__experimentalBorder";function Se(e){var t=Ie(e),n=function(e){if("web"!==l.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,Ce);return!0===t||t&&t.radius}(e.name);return t||!n?null:Object(l.createElement)(ve,null,Object(l.createElement)(v.PanelBody,{title:Object(C.__)("Border settings")},Object(l.createElement)(_e,e)))}var Ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[we(e)];return t.filter(Boolean).length===t.length},Be=n(80),xe=n.n(Be),Pe=function(e,t,n){if(t){var r=Object(d.find)(e,{slug:t});if(r)return r}return{color:n}},Te=function(e,t){return Object(d.find)(e,{color:t})};function Ne(e,t){if(e&&t)return"has-".concat(Object(d.kebabCase)(t),"-").concat(e)}var De=[];function Ae(e){if(e)return"has-".concat(e,"-gradient-background")}function Re(e,t){var n=Object(d.find)(e,["slug",t]);return n&&n.gradient}function Le(e,t){return Object(d.find)(e,["gradient",t])}function Me(e,t){var n=Le(e,t);return n&&n.slug}function Fe(){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,u=he("color.gradients")||De,s=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=s.gradient,b=s.customGradient,f=Object(m.useDispatch)("core/block-editor"),p=f.updateBlockAttributes,v=Object(l.useCallback)((function(e){var t,r,c=Me(u,e);p(i,c?(r={},Object(a.a)(r,n,c),Object(a.a)(r,o,void 0),r):(t={},Object(a.a)(t,n,void 0),Object(a.a)(t,o,e),t))}),[u,i,p]),O=Ae(d);return{gradientClass:O,gradientValue:d?Re(u,d):b,setGradient:v}}var Ve=n(15);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 ze(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(a.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}
|
2 |
// translators: first %s: the color name or value (e.g. red or #ff0000)
|
3 |
-
var
|
4 |
-
function
|
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
|
7 |
-
function it(e){var t=e.tinyBackgroundColor,n=e.tinyTextColor,r=e.backgroundColor,o=e.textColor,c=t.getBrightness()<n.getBrightness()?Object(C.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):Object(C.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return Object(l.useEffect)((function(){Object(ct.speak)(Object(C.__)("This color combination may be hard for people to read."))}),[r,o]),Object(l.createElement)("div",{className:"block-editor-contrast-checker"},Object(l.createElement)(v.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},c))}var at=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 a=xe()(t||n),u=xe()(i||r);return 1!==a.getAlpha()||1!==u.getAlpha()||xe.a.isReadable(a,u,{level:"AA",size:c||!1!==c&&o>=24?"large":"small"})?null:Object(l.createElement)(it,{backgroundColor:t,textColor:i,tinyBackgroundColor:a,tinyTextColor:u})};function lt(e,t){return t.getElementById("block-"+e)}function ut(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 dt(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function bt(e){var t=e.settings,n=e.clientId,r=e.enableContrastChecking,o=void 0===r||r,c=Object(l.useState)(),i=Object(se.a)(c,2),a=i[0],u=i[1],s=Object(l.useState)(),d=Object(se.a)(s,2),b=d[0],f=d[1];return Object(l.useEffect)((function(){if(o){var e=lt(n,document);if(e){f(dt(e).color);for(var t=e,r=dt(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===t.parentNode.ELEMENT_NODE;)r=dt(t=t.parentNode).backgroundColor;u(r)}}})),Object(l.createElement)(ve,null,Object(l.createElement)(ot,{title:Object(C.__)("Color settings"),initialOpen:!1,settings:t},o&&Object(l.createElement)(at,{backgroundColor:a,textColor:b})))}function ft(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 pt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ft(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ft(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var mt=[],vt=function(e){var t=Object(p.getBlockSupport)(e,"color");return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},Ot=function(e){if("web"!==l.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,"color");return Object(d.isObject)(t)&&!!t.link},gt=function(e){if("web"!==l.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,"color");return Object(d.isObject)(t)&&!!t.gradients},ht=function(e){var t=Object(p.getBlockSupport)(e,"color");return t&&!1!==t.text};function jt(e,t,n){var r,o,c,i,l,u;if(!vt(t))return e;var d=gt(t),b=n.backgroundColor,f=n.textColor,p=n.gradient,m=n.style,v=Ne("background-color",b),O=Ae(p),g=Ne("color",f),h=s()(e.className,g,O,(u={},Object(a.a)(u,v,!(d&&null!=m&&null!==(r=m.color)&&void 0!==r&&r.gradient||!v)),Object(a.a)(u,"has-text-color",f||(null==m||null===(o=m.color)||void 0===o?void 0:o.text)),Object(a.a)(u,"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(a.a)(u,"has-link-color",null==m||null===(l=m.color)||void 0===l?void 0:l.link),u));return e.className=h||void 0,e}var kt=function(e,t){var n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?Pe(e,n[1]).color:t};function yt(e){var t,n,r,o,c,i,u=e.name,s=e.attributes,d=he("color.link"),b=he("color.palette")||mt,f=he("color.gradients")||mt,m=Object(l.useRef)(s);if(Object(l.useEffect)((function(){m.current=s}),[s]),!vt(u)||"web"!==l.Platform.OS)return null;var v,O,g,h=(v=u,(O=Object(p.getBlockSupport)(v,"color"))&&!1!==O.background),j=gt(u),k=s.style,y=s.textColor,_=s.backgroundColor,E=s.gradient;if(j&&E)g=Re(f,E);else if(j){var w;g=null==k||null===(w=k.color)||void 0===w?void 0:w.gradient}var S=function(t){return function(n){var r,o,c=Te(b,n),i=t+"Color",l=pt(pt({},m.current.style),{},{color:pt(pt({},null===(r=m.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color),{},Object(a.a)({},t,null!=c&&c.slug?void 0:n))}),u=null!=c&&c.slug?c.slug:void 0,s=Object(a.a)({style:je(l)},i,u);e.setAttributes(s),m.current=pt(pt({},m.current),s)}};return Object(l.createElement)(bt,{enableContrastChecking:!("web"!==l.Platform.OS||E||null!=k&&null!==(t=k.color)&&void 0!==t&&t.gradient),clientId:e.clientId,settings:[].concat(Object(ue.a)(ht(u)?[{label:Object(C.__)("Text Color"),onColorChange:S("text"),colorValue:Pe(b,y,null==k||null===(n=k.color)||void 0===n?void 0:n.text).color}]:[]),Object(ue.a)(h||j?[{label:Object(C.__)("Background Color"),onColorChange:h?S("background"):void 0,colorValue:Pe(b,_,null==k||null===(r=k.color)||void 0===r?void 0:r.background).color,gradientValue:g,onGradientChange:j?function(t){var n,r=Me(f,t);if(r){var o,c,i,a=pt(pt({},null===(o=m.current)||void 0===o?void 0:o.style),{},{color:pt(pt({},null===(c=m.current)||void 0===c||null===(i=c.style)||void 0===i?void 0:i.color),{},{gradient:void 0})});n={style:je(a),gradient:r}}else{var l,u,s,d=pt(pt({},null===(l=m.current)||void 0===l?void 0:l.style),{},{color:pt(pt({},null===(u=m.current)||void 0===u||null===(s=u.style)||void 0===s?void 0:s.color),{},{gradient:t})});n={style:je(d),gradient:void 0}}e.setAttributes(n),m.current=pt(pt({},m.current),n)}:void 0}]:[]),Object(ue.a)(d&&Ot(u)?[{label:Object(C.__)("Link Color"),onColorChange:function(t){var n,r=Te(b,t);e.setAttributes({style:pt(pt({},e.attributes.style),{},{color:pt(pt({},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:kt(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 _t=Object(b.createHigherOrderComponent)((function(e){return function(t){var n,r,o,c=t.name,a=t.attributes,u=a.backgroundColor,s=a.textColor,d=he("color.palette")||mt;if(!vt(c))return Object(l.createElement)(e,t);var b={color:s?null===(n=Pe(d,s))||void 0===n?void 0:n.color:void 0,backgroundColor:u?null===(r=Pe(d,u))||void 0===r?void 0:r.color:void 0},f=t.wrapperProps;return f=pt(pt({},t.wrapperProps),{},{style:pt(pt({},b),null===(o=t.wrapperProps)||void 0===o?void 0:o.style)}),Object(l.createElement)(e,Object(i.a)({},t,{wrapperProps:f}))}}));Object(f.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return vt(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",jt),Object(f.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!vt(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),jt(r,e,n)},e})),Object(f.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",_t);var Et=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.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"})),wt=n(270),Ct=[{name:Object(C.__)("Underline"),value:"underline",icon:Et},{name:Object(C.__)("Strikethrough"),value:"line-through",icon:wt.a}];function St(e){var t=e.value,n=e.onChange;return Object(l.createElement)("fieldset",{className:"block-editor-text-decoration-control"},Object(l.createElement)("legend",null,Object(C.__)("Decoration")),Object(l.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},Ct.map((function(e){return Object(l.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 It(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?It(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):It(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xt(e){var t,n=e.attributes.style,r=e.setAttributes;return Pt(e)?null:Object(l.createElement)(St,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){r({style:je(Bt(Bt({},n),{},{typography:Bt(Bt({},null==n?void 0:n.typography),{},{textDecoration:e})}))})}})}function Pt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Object(p.hasBlockSupport)(t,"__experimentalTextDecoration"),r=he("typography.customTextDecorations");return n||!r}var Tt=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.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"})),Nt=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.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"})),Dt=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.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"})),At=[{name:Object(C.__)("Uppercase"),value:"uppercase",icon:Tt},{name:Object(C.__)("Lowercase"),value:"lowercase",icon:Nt},{name:Object(C.__)("Capitalize"),value:"capitalize",icon:Dt}];function Rt(e){var t=e.value,n=e.onChange;return Object(l.createElement)("fieldset",{className:"block-editor-text-transform-control"},Object(l.createElement)("legend",null,Object(C.__)("Letter case")),Object(l.createElement)("div",{className:"block-editor-text-transform-control__buttons"},At.map((function(e){return Object(l.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 Lt(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 Mt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lt(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ft(e){var t,n=e.attributes.style,r=e.setAttributes;return Vt(e)?null:Object(l.createElement)(Rt,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){r({style:je(Mt(Mt({},n),{},{typography:Mt(Mt({},null==n?void 0:n.typography),{},{textTransform:e})}))})}})}function Vt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Object(p.hasBlockSupport)(t,"__experimentalTextTransform"),r=he("typography.customTextTransforms");return n||!r}function Ht(e){var t=!Pt(e),n=!Vt(e);return t||n?Object(l.createElement)("div",{className:"block-editor-text-decoration-and-transform"},t&&Object(l.createElement)(xt,e),n&&Object(l.createElement)(Ft,e)):null}var zt=n(18);function Gt(e){var t=e.value,n=e.onChange,r=function(e){return void 0!==e&&""!==e}(t),o=r?t:"";return Object(l.createElement)("div",{className:"block-editor-line-height-control"},Object(l.createElement)(v.TextControl,{autoComplete:"off",onKeyDown:function(e){e.keyCode!==zt.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(C.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:o,min:0}))}function Ut(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 Kt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ut(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 qt(e)?null:Object(l.createElement)(Gt,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:function(t){var r=Kt(Kt({},n),{},{typography:Kt(Kt({},null==n?void 0:n.typography),{},{lineHeight:t})});e.setAttributes({style:je(r)})}})}function qt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!he("typography.customLineHeight");return!Object(p.hasBlockSupport)(t,"lineHeight")||n}var $t=[{name:Object(C.__)("Regular"),value:"normal"},{name:Object(C.__)("Italic"),value:"italic"}],Yt=[{name:Object(C.__)("Thin"),value:"100"},{name:Object(C.__)("Extra Light"),value:"200"},{name:Object(C.__)("Light"),value:"300"},{name:Object(C.__)("Regular"),value:"400"},{name:Object(C.__)("Medium"),value:"500"},{name:Object(C.__)("Semi Bold"),value:"600"},{name:Object(C.__)("Bold"),value:"700"},{name:Object(C.__)("Extra Bold"),value:"800"},{name:Object(C.__)("Black"),value:"900"}];function Xt(e){var t=e.onChange,n=e.hasFontStyles,r=void 0===n||n,o=e.hasFontWeights,c=void 0===o||o,i=e.value,a=i.fontStyle,u=i.fontWeight,s=r||c,d={key:"default",name:Object(C.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},b=Object(l.useMemo)((function(){return r&&c?(e=[d],$t.forEach((function(t){var n=t.name,r=t.value;Yt.forEach((function(t){var o=t.name,c=t.value,i="normal"===r?o:Object(C.sprintf)(
|
8 |
/* translators: 1: Font weight name. 2: Font style name. */
|
9 |
-
Object(C.__)("%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 $t.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 Yt.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===a&&e.style.fontWeight===u}));return Object(l.createElement)("fieldset",{className:"components-font-appearance-control"},s&&Object(l.createElement)(v.CustomSelectControl,{className:"components-font-appearance-control__select",label:r?c?Object(C.__)("Appearance"):Object(C.__)("Font style"):Object(C.__)("Font weight"),options:b,value:f,onChange:function(e){var n=e.selectedItem;return t(n.style)}}))}function Qt(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 Zt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qt(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Jt(e){var t,n,r=e.attributes.style,o=e.setAttributes,c=!en(e),i=!tn(e);if(!c&&!i)return null;var a=null==r||null===(t=r.typography)||void 0===t?void 0:t.fontStyle,u=null==r||null===(n=r.typography)||void 0===n?void 0:n.fontWeight;return Object(l.createElement)(Xt,{onChange:function(e){o({style:je(Zt(Zt({},r),{},{typography:Zt(Zt({},null==r?void 0:r.typography),{},{fontStyle:e.fontStyle,fontWeight:e.fontWeight})}))})},hasFontStyles:c,hasFontWeights:i,value:{fontStyle:a,fontWeight:u}})}function en(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(p.hasBlockSupport)(t,"__experimentalFontStyle"),r=he("typography.customFontStyle");return!n||!r}function tn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(p.hasBlockSupport)(t,"__experimentalFontWeight"),r=he("typography.customFontWeight");return!n||!r}function nn(e){var t=en(e),n=tn(e);return t&&n}function rn(e){var t=e.value,n=void 0===t?"":t,r=e.onChange,o=e.fontFamilies,c=Object(Ve.a)(e,["value","onChange","fontFamilies"]),a=he("typography.fontFamilies");if(o||(o=a),Object(d.isEmpty)(o))return null;var u=[{value:"",label:Object(C.__)("Default")}].concat(Object(ue.a)(o.map((function(e){var t=e.fontFamily;return{value:t,label:e.name||t}}))));return Object(l.createElement)(v.SelectControl,Object(i.a)({label:Object(C.__)("Font family"),options:u,value:n,onChange:r,labelPosition:"top"},c))}function on(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?on(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):on(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function an(e){var t,n=e.name,r=e.setAttributes,o=e.attributes.style,c=void 0===o?{}:o,i=he("typography.fontFamilies");if(ln({name:n}))return null;var a=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(l.createElement)(rn,{className:"block-editor-hooks-font-family-control",fontFamilies:i,value:a,onChange:function(e){var t=Object(d.find)(i,(function(t){return t.fontFamily===e}));r({style:je(cn(cn({},c),{},{typography:cn(cn({},c.typography||{}),{},{fontFamily:t?"var:preset|font-family|".concat(t.slug):e||void 0})}))})}})}function ln(e){var t=e.name,n=he("typography.fontFamilies");return!n||0===n.length||!Object(p.hasBlockSupport)(t,"__experimentalFontFamily")}var un=n(152),sn=n.n(un),dn=function(e,t,n){if(t){var r=Object(d.find)(e,{slug:t});if(r)return r}return{size:n}};function bn(e,t){return Object(d.find)(e,{size:t})||{size:t}}function fn(e){if(e)return"has-".concat(Object(d.kebabCase)(e),"-font-size")}var pn=function(e){var t=he("typography.fontSizes"),n=!he("typography.customFontSize");return Object(l.createElement)(v.FontSizePicker,Object(i.a)({},e,{fontSizes:t,disableCustomFontSizes:n}))};function mn(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 vn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mn(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function On(e,t,n){if(!Object(p.hasBlockSupport)(t,"fontSize"))return e;var r=new sn.a(e.className);r.add(fn(n.fontSize));var o=r.value;return e.className=o||void 0,e}function gn(e){var t,n=e.attributes,r=n.fontSize,o=n.style,c=e.setAttributes,i=hn(e),a=he("typography.fontSizes");if(i)return null;var u=dn(a,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize);return Object(l.createElement)(pn,{value:u.size,onChange:function(e){var t=bn(a,e).slug;c({style:je(vn(vn({},o),{},{typography:vn(vn({},null==o?void 0:o.typography),{},{fontSize:t?void 0:e})})),fontSize:t})}})}function hn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=he("typography.fontSizes"),r=!(null==n||!n.length);return!Object(p.hasBlockSupport)(t,"fontSize")||!r}var jn=Object(b.createHigherOrderComponent)((function(e){return function(t){var n,r=he("typography.fontSizes"),o=t.name,c=t.attributes,i=c.fontSize,a=c.style,u=t.wrapperProps,s=vn({},t);if(Object(p.hasBlockSupport)(o,"fontSize")&&i&&(null==a||null===(n=a.typography)||void 0===n||!n.fontSize)){var d,b=dn(r,i,null==a||null===(d=a.typography)||void 0===d?void 0:d.fontSize).size;s.wrapperProps=vn(vn({},u),{},{style:vn({fontSize:b},null==u?void 0:u.style)})}return Object(l.createElement)(e,s)}}),"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",On),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)),On(r,e,n)},e})),Object(f.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",jn);var kn=["lineHeight","fontSize","__experimentalFontStyle","__experimentalFontWeight","__experimentalFontFamily","__experimentalTextDecoration","__experimentalTextTransform"];function yn(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[nn(e),hn(e),qt(e),ln(e),Pt(e),Vt(e)];return t.filter(Boolean).length===t.length}(e),n=_n(e.name);return t||!n?null:Object(l.createElement)(ve,null,Object(l.createElement)(v.PanelBody,{title:Object(C.__)("Typography")},Object(l.createElement)(an,e),Object(l.createElement)(gn,e),Object(l.createElement)(Jt,e),Object(l.createElement)(Wt,e),Object(l.createElement)(Ht,e)))}var _n=function(e){return"web"===l.Platform.OS&&kn.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 wn(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(a.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 Cn(e){var t,n=e.name,r=e.attributes.style,o=e.setAttributes,c=he("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)?l.Platform.select({web:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:function(e){var t=wn(wn({},r),{},{spacing:{padding:e}});o({style:je(t)})},onChangeShowVisualizer:function(e){var t=wn(wn({},r),{},{visualizers:{padding:e}});o({style:je(t)})},label:Object(C.__)("Padding"),units:i})),native:null}):null}function Sn(e){var t=e.children,n=Object(Ve.a)(e,["children"]);return he("spacing.customPadding")?Object(l.createElement)(ve,n,Object(l.createElement)(v.PanelBody,{title:Object(C.__)("Spacing")},t)):null}function In(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 Bn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?In(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):In(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xn=[].concat(Object(ue.a)(kn),[Ce,"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=Bn(Bn({},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=Object(d.mapValues)(p.__EXPERIMENTAL_STYLE_PROPERTY,(function(e){return e.value}));return Object.entries(n).forEach((function(n){var r=Object(de.a)(n),o=r[0],c=r.slice(1),i=Object(se.a)(c,1)[0];Object(d.has)(e,i)&&(t[o]=Tn(Object(d.get)(e,i)))})),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(l.createElement)(yn,Object(i.a)({key:"typography"},t)),Object(l.createElement)(Se,Object(i.a)({key:"border"},t)),Object(l.createElement)(yt,Object(i.a)({key:"colors"},t)),Object(l.createElement)(e,Object(i.a)({key:"edit"},t)),r&&Object(l.createElement)(Sn,{key:"spacing"},Object(l.createElement)(Cn,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(25),Rn=n(26),Ln=n(19),Mn=n(27),Fn=n(28),Vn=n(21);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(a.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(l.createElement)(t,Object(i.a)({},n,{colors:e}))}}),"withCustomColorPalette")},Kn=function(){return Object(b.createHigherOrderComponent)((function(e){return function(t){var n=he("color.palette")||Gn;return Object(l.createElement)(e,Object(i.a)({},t,{colors:n}))}}),"withEditorColorPalette")};function Wn(e,t){var n=Object(d.reduce)(e,(function(e,t){return zn(zn({},e),Object(d.isString)(t)?Object(a.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 xe.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=Te(n.props.colors,r);n.props.setAttributes((o={},Object(a.a)(o,e,c&&c.slug?c.slug:void 0),Object(a.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(l.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=Pe(o,r[c],r["custom".concat(Object(d.upperFirst)(c))]),a=t[c];return(null==a?void 0:a.color)===i.color&&a?e[c]=a:e[c]=zn(zn({},i),{},{class:Ne(n,i.slug)}),e}),{})}}]),i}(l.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)(Wn(r,t),"withCustomColors")}}function $n(){for(var e=Kn(),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Object(b.createHigherOrderComponent)(Wn(n,e),"withColors")}var Yn=n(77),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(a.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(Ve.a)(e,["colorSettings"]),r=t.map((function(e){var t=e.value,n=e.onChange;return Zn(Zn({},Object(Ve.a)(e,["value","onChange"])),{},{colorValue:t,onColorChange:n})}));return Object(l.createElement)(ot,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,a=e.detectedColor,u=e.panelChildren,s=e.initialOpen;return Object(l.createElement)(Jn,Object(i.a)({title:t,initialOpen:s,colorSettings:Object.values(n)},r),o&&(Array.isArray(o)?o.map((function(e){var t=e.backgroundColor,r=e.textColor,o=Object(Ve.a)(e,["backgroundColor","textColor"]);return t=er(t,n,c),r=er(r,n,a),Object(l.createElement)(at,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,u=o.textColor;return r=er(r||t,n,c),u=er(u||t,n,a),Object(l.createElement)(at,Object(i.a)({},o,{key:"".concat(r,"-").concat(u),backgroundColor:r,textColor:u}))}))),"function"==typeof u?u(n):u)}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,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)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(a.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 ar=[],lr={textColor:Object(C.__)("Text Color"),backgroundColor:Object(C.__)("Background Color")},ur=function(e){return Object(l.createElement)(ve,null,Object(l.createElement)(tr,e))};function sr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{panelTitle:Object(C.__)("Color settings")},n=t.panelTitle,r=void 0===n?Object(C.__)("Color settings"):n,o=t.colorPanelProps,c=t.contrastCheckers,i=t.panelChildren,u=t.colorDetector,b=(u=void 0===u?{}:u).targetRef,f=u.backgroundColorTargetRef,p=void 0===f?b:f,v=u.textColorTargetRef,O=void 0===v?b:v,g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],j=h(),k=j.clientId,y=he("color.palette")||ar,_=Object(m.useSelect)((function(e){return{attributes:(0,e("core/block-editor").getBlockAttributes)(k)}}),[k]),E=_.attributes,w=Object(m.useDispatch)("core/block-editor"),S=w.updateBlockAttributes,I=Object(l.useCallback)((function(e){return S(k,e)}),[S,k]),B=Object(l.useMemo)((function(){return Xn()((function(e,t,n,r,o,c){return function(i){var u,b=i.children,f=i.className,p=void 0===f?"":f,m=i.style,v=void 0===m?{}:m,O={};r?O=Object(a.a)({},t,o):c&&(O=Object(a.a)({},t,c));var g={className:s()(p,(u={},Object(a.a)(u,"has-".concat(Object(d.kebabCase)(r),"-").concat(Object(d.kebabCase)(t)),r),Object(a.a)(u,n||"has-".concat(Object(d.kebabCase)(e)),r||c),u)),style:cr(cr({},O),v)};return Object(d.isFunction)(b)?b(g):l.Children.map(b,(function(e){return Object(l.cloneElement)(e,{className:s()(e.props.className,g.className),style:cr(cr({},g.style),e.props.style||{})})}))}}),{maxSize:e.length})}),[e.length]),x=Object(l.useMemo)((function(){return Xn()((function(e,t){return function(n){var r=t.find((function(e){return e.color===n}));I(Object(a.a)({},r?Object(d.camelCase)("custom ".concat(e)):e,void 0)),I(Object(a.a)({},r?e:Object(d.camelCase)("custom ".concat(e)),r?r.slug:n))}}),{maxSize:e.length})}),[I,e.length]),P=Object(l.useState)(),T=Object(se.a)(P,2),N=T[0],D=T[1],A=Object(l.useState)(),R=Object(se.a)(A,2),L=R[0],M=R[1];return Object(l.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,a=o.textColor;if(t||(t=!0===i),n||(n=!0===a),t&&n)break}}catch(e){r.e(e)}finally{r.f()}if(n&&M(ir(O.current).color),t){for(var l=p.current,u=ir(l).backgroundColor;"rgba(0, 0, 0, 0)"===u&&l.parentNode&&l.parentNode.nodeType===l.parentNode.ELEMENT_NODE;)u=ir(l=l.parentNode).backgroundColor;D(u)}}}),[e.reduce((function(e,t){return"".concat(e," | ").concat(E[t.name]," | ").concat(E[Object(d.camelCase)("custom ".concat(t.name))])}),"")].concat(Object(ue.a)(g))),Object(l.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,a=r.className,l=r.panelLabel,u=void 0===l?n.label||lr[o]||Object(d.startCase)(o):l,s=r.componentName,b=void 0===s?Object(d.startCase)(o).replace(/\s/g,""):s,f=r.color,p=void 0===f?n.color:f,m=r.colors,v=void 0===m?y:m,O=E[Object(d.camelCase)("custom ".concat(o))],g=O?void 0:v.find((function(e){return e.slug===p}));return e[b]=B(o,i,a,p,g&&g.color,O),e[b].displayName=b,e[b].color=O||g&&g.color,e[b].slug=p,e[b].setColor=x(o,v),t[b]={value:g?g.color:E[Object(d.camelCase)("custom ".concat(o))],onChange:e[b].setColor,label:u,colors:v},v||delete t[b].colors,e}),{}),a={title:r,initialOpen:!1,colorSettings:t,colorPanelProps:o,contrastCheckers:c,detectedBackgroundColor:N,detectedColor:L,panelChildren:i};return cr(cr({},n),{},{ColorPanel:Object(l.createElement)(tr,a),InspectorControlsColorPanel:Object(l.createElement)(ur,a)})}),[E,I,L,N].concat(Object(ue.a)(g)))}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(a.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=he("typography.fontSizes")||pr;return Object(l.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(a.a)(o,e,c&&c.slug?c.slug:void 0),Object(a.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(l.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=dn(o,c,n[t]);return e[r]=br(br({},i),{},{class:fn(c)}),e}),{});return br(br({},t),i)}}]),o}(l.Component)}]),"withFontSizes")},vr=n(271),Or=n(272),gr=n(273);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(a.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(C.__)("Align text left"),align:"left"},{icon:Or.a,title:Object(C.__)("Align text center"),align:"center"},{icon:gr.a,title:Object(C.__)("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(C.__)("Change text alignment"):c,a=e.isCollapsed,u=void 0===a||a,s=e.isRTL;function b(e){return function(){return n(t===e?void 0:e)}}var f=Object(d.find)(o,(function(e){return e.align===t}));return Object(l.createElement)(v.ToolbarGroup,{isCollapsed:u,icon:f?f.icon:s?gr.a:vr.a,label:i,popoverProps:yr,controls:o.map((function(e){var n=e.align,r=t===n;return jr(jr({},e),{},{isActive:r,role:u?"menuitemradio":void 0,onClick:b(n)})}))})},Er=function(e){return e.name||""},wr=function(e){return e.title},Cr=function(e){return e.keywords||[]},Sr=function(e){return e.category},Ir=function(){return null};function Br(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(e=(e=Object(d.deburr)(e)).replace(/^\//,"")).toLowerCase()}var xr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(d.words)(Br(e))},Pr=function(e,t){return Object(d.differenceWith)(e,xr(t),(function(e,t){return t.includes(e)}))},Tr=function(e,t,n,r){return 0===xr(r).length?e:Nr(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},getVariations:function(e){var t=e.variations,n=void 0===t?[]:t;return Array.from(n.reduce((function(e,t){var n=t.title,r=t.keywords,o=void 0===r?[]:r;return e.add(n),o.forEach((function(t){return e.add(t)})),e}),new Set))}})},Nr=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=xr(t);if(0===r.length)return e;var o=e.map((function(e){return[e,Dr(e,t,n)]})).filter((function(e){return Object(se.a)(e,2)[1]>0}));return o.sort((function(e,t){var n=Object(se.a)(e,2)[1];return Object(se.a)(t,2)[1]-n})),o.map((function(e){return Object(se.a)(e,1)[0]}))};function Dr(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?wr:c,a=n.getKeywords,l=void 0===a?Cr:a,u=n.getCategory,s=void 0===u?Sr:u,b=n.getCollection,f=void 0===b?Ir:b,p=o(e),m=i(e),v=l(e),O=s(e),g=f(e),h=Br(t),j=Br(m),k=0;if(h===j)k+=30;else if(j.startsWith(h))k+=20;else{var y=[p,m].concat(Object(ue.a)(v),[O,g]).join(" "),_=Object(d.words)(h),E=Pr(_,y);0===E.length&&(k+=10)}return 0!==k&&p.startsWith("core/")&&k++,k}var Ar=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,function(e){var n=e.name,r=e.initialAttributes,o=e.innerBlocks,c=Object(p.createBlock)(n,r,Object(p.createBlocksFromInnerBlocksTemplate)(o));t(c)}]},Rr=n(154);function Lr(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:Rr.a});var i=Object(l.createElement)(v.Icon,{icon:n&&n.src?n.src:n}),a=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return Object(l.createElement)("span",{style:a,className:s()("block-editor-block-icon",c,{"has-colors":o})},i)}var Mr={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=Ar(n,d.noop),c=Object(se.a)(o,3),i=c[0],a=c[1],u=c[2],s=Object(l.useMemo)((function(){return(e.trim()?Tr(i,a,u,e):Object(d.orderBy)(i,["frecency"],["desc"])).filter((function(e){return e.name!==r})).slice(0,9)}),[e,r,i,a,u]);return[Object(l.useMemo)((function(){return s.map((function(e){var t=e.title,n=e.icon,r=e.isDisabled;return{key:"block-".concat(e.id),value:e,label:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Lr,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))}),[s])]},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))}}},Fr=[],Vr=function(e){var t=h().name,n=e.completers,r=void 0===n?Fr:n;return r=Object(l.useMemo)((function(){var e=r;return t===Object(p.getDefaultBlockName)()&&(e=e.concat([Mr])),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(l.createElement)(v.Autocomplete,Object(i.a)({},e,{completers:r}))},Hr=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.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"})),zr=function(e){var t=e.isActive,n=e.label,r=void 0===n?Object(C.__)("Toggle full height"):n,o=e.onToggle;return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{isActive:t,icon:Hr,label:r,onClick:function(){return o(!t)}}))},Gr=function(e){var t=e.label,n=void 0===t?Object(C.__)("Change matrix alignment"):t,r=e.onChange,o=void 0===r?d.noop:r,c=e.value,i=void 0===c?"center":c,a=Object(l.createElement)(v.__experimentalAlignmentMatrixControl.Icon,{value:i}),u="block-editor-block-alignment-matrix-toolbar",s="".concat(u,"__popover");return Object(l.createElement)(v.Dropdown,{position:"bottom right",className:u,popoverProps:{className:s,isAlternate:!0},renderToggle:function(e){var t=e.onToggle,r=e.isOpen;return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":r,onKeyDown:function(e){r||e.keyCode!==zt.DOWN||(e.preventDefault(),e.stopPropagation(),t())},label:n,icon:a,showTooltip:!0}))},renderContent:function(){return Object(l.createElement)(v.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:o,value:i})}})};function Ur(e){var t=e.clientId,n=Object(m.useSelect)((function(e){if(!t)return{};var n=e("core/block-editor"),r=n.getBlockName;return{attributes:(0,n.getBlockAttributes)(t),name:r(t)}}),[t]),r=n.attributes,o=n.name;if(!o)return null;var c=Object(p.getBlockType)(o);if(!c)return null;var i=c.title,a=Object(p.__experimentalGetBlockLabel)(c,r);return a!==i?"".concat(i,": ").concat(Object(d.truncate)(a,{length:15})):i}var Kr=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(l.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":Object(C.__)("Block breadcrumb")},Object(l.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&Object(l.createElement)(v.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:n},Object(C.__)("Document")),!i&&Object(C.__)("Document")),c.map((function(e){return Object(l.createElement)("li",{key:e},Object(l.createElement)(v.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:function(){return t(e)}},Object(l.createElement)(Ur,{clientId:e})))})),!!o&&Object(l.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},Object(l.createElement)(Ur,{clientId:o})))};function Wr(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 qr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wr(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $r=Object(l.createContext)({});function Yr(e){var t=e.value,n=e.children,r=Object(l.useContext)($r),o=Object(l.useMemo)((function(){return qr(qr({},r),t)}),[r,t]);return Object(l.createElement)($r.Provider,{value:o,children:n})}var Xr=$r,Qr=function(){return Object(l.createElement)(v.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Object(l.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"}))},Zr=function(e){var t=e.style,n=e.className;return Object(l.createElement)("div",{className:"block-library-colors-selector__icon-container"},Object(l.createElement)("div",{className:"".concat(n," block-library-colors-selector__state-selection"),style:t},Object(l.createElement)(Qr,null)))},Jr=function(e){var t,n,r,o=e.children,c=Object(Ve.a)(e,["children"]);return Object(l.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(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:Object(C.__)("Open Colors Selector"),onClick:t,onKeyDown:function(e){o||e.keyCode!==zt.DOWN||(e.preventDefault(),e.stopPropagation(),t())},icon:Object(l.createElement)(r,null,Object(l.createElement)(n,null,Object(l.createElement)(Zr,null)))}))}),renderContent:function(){return o}})},eo={},to=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(l.useContext)(Xr),a=Object(l.useMemo)((function(){return o&&o.usesContext?Object(d.pick)(c,o.usesContext):eo}),[o,c]);if(!o)return null;var u=o.edit||o.save;if(o.apiVersion>1||Object(p.hasBlockSupport)(o,"lightBlockWrapper",!1))return Object(l.createElement)(u,Object(i.a)({},e,{context:a}));var b=Object(p.hasBlockSupport)(o,"className",!0)?Object(p.getBlockDefaultClassName)(r):null,f=s()(b,n.className);return Object(l.createElement)(u,Object(i.a)({},e,{context:a,className:f}))}));function no(e){var t={name:e.name,isSelected:e.isSelected,clientId:e.clientId,onFocus:e.onFocus,onCaretVerticalPositionChange:e.onCaretVerticalPositionChange};return Object(l.createElement)(g,{value:Object(l.useMemo)((function(){return t}),Object.values(t))},Object(l.createElement)(to,e))}var ro=Object(v.createSlotFill)("BlockFormatControls"),oo=ro.Fill,co=ro.Slot,io=function(e){return h().isSelected?Object(l.createElement)(oo,null,(function(t){var n=Object(d.isEmpty)(t)?null:t;return Object(l.createElement)(v.__experimentalToolbarContext.Provider,{value:n},e.children)})):null};io.Slot=function(e){var t=Object(l.useContext)(v.__experimentalToolbarContext);return Object(l.createElement)(co,Object(i.a)({},e,{fillProps:t}))};var ao=io,lo=n(42),uo=n(16),so=n.n(uo),bo=n(39),fo=n(202),po=n(119),mo=n(30),vo=function(e){return e+1},Oo=function(e){return{top:e.offsetTop,left:e.offsetLeft}},go=function(e,t,n,r,o){var c=Object(b.useReducedMotion)()||!r,i=Object(l.useReducer)(vo,0),a=Object(se.a)(i,2),u=a[0],s=a[1],d=Object(l.useReducer)(vo,0),f=Object(se.a)(d,2),p=f[0],m=f[1],v=Object(l.useState)({x:0,y:0}),O=Object(se.a)(v,2),g=O[0],h=O[1],j=Object(l.useMemo)((function(){return e.current?Oo(e.current):null}),[o]),k=Object(l.useMemo)((function(){if(!n||!e.current)return function(){};var t=Object(mo.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(l.useLayoutEffect)((function(){u&&m()}),[u]),Object(l.useLayoutEffect)((function(){if(j)if(c)k();else{e.current.style.transform="";var t=Oo(e.current);s(),h({x:Math.round(j.left-t.left),y:Math.round(j.top-t.top)})}}),[o]),y.x=0,y.y=0,Object(po.useSpring)({from:{x:g.x,y:g.y},to:{x:0,y:0},reset:u!==p,config:{mass:5,tension:2e3,friction:200},immediate:c,onFrame:y})},ho=Object(po.animated)(v.__experimentalTreeGridRow);function jo(e){var t=e.isSelected,n=e.position,r=e.level,o=e.rowCount,c=e.children,a=e.className,u=e.path,d=Object(Ve.a)(e,["isSelected","position","level","rowCount","children","className","path"]),b=Object(l.useRef)(null),f=u.join("_"),p=go(b,t,!1,!0,f);return Object(l.createElement)(ho,Object(i.a)({ref:b,style:p,className:s()("block-editor-block-navigation-leaf",a),level:r,positionInSet:n,setSize:o},d),c)}var ko=n(199),yo=n(200),_o=n(201),Eo=n(176);var wo=function(e,t,n){return"up"===e?"horizontal"===t?n?ko.a:yo.a:_o.a:"down"===e?"horizontal"===t?n?yo.a:ko.a:Eo.a:null},Co=function(e,t,n){return"up"===e?"horizontal"===t?n?Object(C.__)("Move right"):Object(C.__)("Move left"):Object(C.__)("Move up"):"down"===e?"horizontal"===t?n?Object(C.__)("Move left"):Object(C.__)("Move right"):Object(C.__)("Move down"):null},So=Object(l.forwardRef)((function(e,t){var n=e.clientIds,r=e.direction,o=e.orientation,c=Object(Ve.a)(e,["clientIds","direction","orientation"]),a=Object(b.useInstanceId)(So),u=Object(d.castArray)(n).length,f=Object(m.useSelect)((function(e){var t=e("core/block-editor"),c=t.getBlockIndex,i=t.getBlockRootClientId,a=t.getBlockOrder,l=t.getBlock,u=t.getSettings,s=t.getBlockListSettings,b=Object(d.castArray)(n),f=Object(d.first)(b),m=i(f),v=c(f,m),O=c(Object(d.last)(b),m),g=a(m),h=l(f),j=0===v,k=O===g.length-1,y=(s(m)||{}).orientation;return{blockType:h?Object(p.getBlockType)(h.name):null,isDisabled:"up"===r?j:k,rootClientId:m,firstIndex:v,isFirst:j,isLast:k,isRTL:u().isRTL,orientation:o||y}}),[n,r]),O=f.blockType,g=f.isDisabled,h=f.rootClientId,j=f.isFirst,k=f.isLast,y=f.firstIndex,_=f.isRTL,E=f.orientation,w=void 0===E?"vertical":E,S=Object(m.useDispatch)("core/block-editor"),I=S.moveBlocksDown,B=S.moveBlocksUp,x="up"===r?B:I,P="block-editor-block-mover-button__description-".concat(a);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.Button,Object(i.a)({ref:t,className:s()("block-editor-block-mover-button","is-".concat(r,"-button")),icon:wo(r,w,_),label:Co(r,w,_),"aria-describedby":P},c,{onClick:g?null:function(e){x(n,h),c.onClick&&c.onClick(e)},"aria-disabled":g})),Object(l.createElement)("span",{id:P,className:"block-editor-block-mover-button__description"},function(e,t,n,r,o,c,i,a){var l=n+1,u=function(e){return"up"===e?"horizontal"===i?a?"right":"left":"up":"down"===e?"horizontal"===i?a?"left":"right":"down":null};if(e>1)return function(e,t,n,r,o){var c=t+1;return o<0&&n?Object(C.__)("Blocks cannot be moved up as they are already at the top"):o>0&&r?Object(C.__)("Blocks cannot be moved down as they are already at the bottom"):o<0&&!n?Object(C.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
|
|
|
|
|
10 |
Object(C._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(C.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
|
11 |
Object(C._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(C.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
|
12 |
-
Object(C.__)("Block %s is the only block, and cannot be moved"),t);if(c>0&&!o){var
|
13 |
-
Object(C.__)("Move %1$s block from position %2$d down to position %3$d"),t,
|
14 |
-
Object(C.__)("Move %1$s block from position %2$d left to position %3$d"),t,
|
15 |
-
Object(C.__)("Move %1$s block from position %2$d right to position %3$d"),t,
|
16 |
-
Object(C.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===
|
17 |
-
Object(C.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===
|
18 |
-
Object(C.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(c<0&&!r){var
|
19 |
-
Object(C.__)("Move %1$s block from position %2$d up to position %3$d"),t,
|
20 |
-
Object(C.__)("Move %1$s block from position %2$d left to position %3$d"),t,
|
21 |
-
Object(C.__)("Move %1$s block from position %2$d right to position %3$d"),t,
|
22 |
-
Object(C.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===
|
23 |
-
Object(C.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===
|
24 |
-
Object(C.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(u,O&&O.title,y,j,k,"up"===r?-1:1,
|
25 |
// translators: Button to fix block content
|
26 |
-
title:Object(C._x)("Resolve","imperative verb"),onClick:b},i&&{title:Object(C.__)("Convert to HTML"),onClick:t},{title:Object(C.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)}),[b,t,r]);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(
|
27 |
-
Object(C.__)("Resolve Block"),onRequestClose:f,className:"block-editor-block-compare"},Object(l.createElement)(Lo,{block:c,onKeep:t,onConvert:n,convertor:Mo,convertButtonText:Object(C.__)("Convert to Blocks")})))})),Vo=Object(l.createElement)(Do,{className:"block-editor-block-list__block-crash-warning"},Object(C.__)("This block has encountered an error and cannot be previewed.")),Ho=function(){return Vo};var zo=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}(l.Component),Go=n(101),Uo=n.n(Go),Ko=function(e){var t=e.clientId,n=Object(l.useState)(""),r=Object(se.a)(n,2),o=r[0],c=r[1],i=Object(m.useSelect)((function(e){return e("core/block-editor").getBlock(t)}),[t]),a=Object(m.useDispatch)("core/block-editor").updateBlock;return Object(l.useEffect)((function(){c(Object(p.getBlockContent)(i))}),[i]),Object(l.createElement)(Uo.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),l=!o||Object(p.isValidBlockContent)(e,n,r);a(t,{attributes:n,originalContent:r,isValid:l}),o||c({content:r})},onChange:function(e){return c(e.target.value)}})},Wo=n(76),qo=n(155),$o=[Object(l.createInterpolateElement)(Object(C.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:Object(l.createElement)("kbd",null)}),Object(l.createInterpolateElement)(Object(C.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:Object(l.createElement)("kbd",null)}),Object(l.createInterpolateElement)(Object(C.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:Object(l.createElement)("kbd",null)}),Object(C.__)("Drag files into the editor to automatically insert media blocks."),Object(C.__)("Change a block's type by pressing the block icon on the toolbar.")],Yo=function(){var e=Object(l.useState)(Math.floor(Math.random()*$o.length)),t=Object(se.a)(e,1)[0];return Object(l.createElement)(v.Tip,null,$o[t])},Xo=n(131),Qo=n(130),Zo=n(198),Jo=function e(t){var n=t.className,r=t.onChange,o=t.value,c=t.placeholder,i=Object(b.useInstanceId)(e),a=Object(l.useRef)();return Object(l.createElement)("div",{className:s()("block-editor-inserter__search",n)},Object(l.createElement)(v.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-".concat(i)},c),Object(l.createElement)("input",{ref:a,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(l.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(l.createElement)(v.Button,{icon:Xo.a,label:Object(C.__)("Reset search"),onClick:function(){r(""),a.current.focus()}}),!o&&Object(l.createElement)(Qo.a,{icon:Zo.a})))},ec=function(e){var t=e.blockType,n=t.icon,r=t.title,o=t.description;return Object(l.createElement)("div",{className:"block-editor-block-card"},Object(l.createElement)(Lr,{icon:n,showColors:!0}),Object(l.createElement)("div",{className:"block-editor-block-card__content"},Object(l.createElement)("h2",{className:"block-editor-block-card__title"},r),Object(l.createElement)("span",{className:"block-editor-block-card__description"},o)))},tc={insertUsage:{}},nc={alignWide:!1,colors:[{name:Object(C.__)("Black"),slug:"black",color:"#000000"},{name:Object(C.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(C.__)("White"),slug:"white",color:"#ffffff"},{name:Object(C.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(C.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(C.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(C.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(C.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(C.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(C.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(C.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(C.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(C._x)("Small","font size name"),size:13,slug:"small"},{name:Object(C._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(C._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(C._x)("Large","font size name"),size:36,slug:"large"},{name:Object(C._x)("Huge","font size name"),size:42,slug:"huge"}],imageSizes:[{slug:"thumbnail",name:Object(C.__)("Thumbnail")},{slug:"medium",name:Object(C.__)("Medium")},{slug:"large",name:Object(C.__)("Large")},{slug:"full",name:Object(C.__)("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(C.__)("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(C.__)("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(C.__)("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(C.__)("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(C.__)("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(C.__)("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(C.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(C.__)("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(C.__)("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(C.__)("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(C.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(C.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function rc(e,t,n){return[].concat(Object(ue.a)(e.slice(0,n)),Object(ue.a)(Object(d.castArray)(t)),Object(ue.a)(e.slice(n)))}function oc(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(ue.a)(e);return o.splice(t,r),rc(o,e.slice(t,t+r),n)}function cc(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 ic(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cc(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ac(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(a.a)({},t,[]);return e.forEach((function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,ac(o,r))})),n}function lc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce((function(e,n){return Object.assign(e,Object(a.a)({},n.clientId,t),lc(n.innerBlocks,n.clientId))}),{})}function uc(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.identity,n={},r=Object(ue.a)(e);r.length;){var o=r.shift(),c=o.innerBlocks,i=Object(Ve.a)(o,["innerBlocks"]);r.push.apply(r,Object(ue.a)(c)),n[i.clientId]=t(i)}return n}function sc(e){return uc(e,(function(e){return Object(d.omit)(e,"attributes")}))}function dc(e){return uc(e,(function(e){return e.attributes}))}function bc(e,t){return e===t?ic({},e):t}function fc(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 pc=function(e){return e.reduce((function(e,t){return e[t]={},e}),{})},mc=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=ic({},t)).attributes=Object(d.mapValues)(t.attributes,(function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?ic(ic({},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)(uc(n.blocks),(function(){return{}}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":var c=Object(d.keys)(uc(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&c.push(n.rootClientId),r.cache=ic(ic({},r.cache),pc(o(c)));break;case"UPDATE_BLOCK":r.cache=ic(ic({},r.cache),pc(o([n.clientId])));break;case"UPDATE_BLOCK_ATTRIBUTES":r.cache=ic(ic({},r.cache),pc(o(n.clientIds)));break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var i=pc(o(n.replacedClientIds));r.cache=ic(ic(ic({},Object(d.omit)(r.cache,n.replacedClientIds)),Object(d.omit)(i,n.replacedClientIds)),pc(Object(d.keys)(uc(n.blocks))));break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":r.cache=ic(ic({},Object(d.omit)(r.cache,n.removedClientIds)),pc(Object(d.difference)(o(n.clientIds),n.clientIds)));break;case"MOVE_BLOCKS_TO_POSITION":var a=Object(ue.a)(n.clientIds);n.fromRootClientId&&a.push(n.fromRootClientId),n.toRootClientId&&a.push(n.toRootClientId),r.cache=ic(ic({},r.cache),pc(o(a)));break;case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":var l=[];n.rootClientId&&l.push(n.rootClientId),r.cache=ic(ic({},r.cache),pc(o(l)));break;case"SAVE_REUSABLE_BLOCK_SUCCESS":var u=Object(d.keys)(Object(d.omitBy)(r.attributes,(function(e,t){return"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId})));r.cache=ic(ic({},r.cache),pc(o(u)))}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(ue.a)(r)),(c=r).push.apply(c,Object(ue.a)(t.order[r[o]])))}return r};if(t)switch(n.type){case"REMOVE_BLOCKS":n=ic(ic({},n),{},{type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(n.clientIds)});break;case"REPLACE_BLOCKS":n=ic(ic({},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(ue.a)(n.blocks);o.length;){var c=o.shift(),i=c.innerBlocks,a=Object(Ve.a)(c,["innerBlocks"]);o.push.apply(o,Object(ue.a)(i)),t.controlledInnerBlocks[a.clientId]&&(r[a.clientId]=!0)}var l=t;t.order[n.rootClientId]&&(l=e(l,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order[n.rootClientId]}));var u=l;return n.blocks.length&&((u=e(u,ic(ic({},n),{},{type:"INSERT_BLOCKS",index:0}))).order=ic(ic({},u.order),Object(d.reduce)(r,(function(e,n,r){return t.order[r]&&(e[r]=t.order[r]),e}),{}))),u}}),(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(ue.a)(n),[o],Object(ue.a)(e(t,o)))}),[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(d.pickBy)(t.controlledInnerBlocks));return ic(ic({},t),{},{byClientId:ic(ic({},Object(d.omit)(t.byClientId,r)),sc(n.blocks)),attributes:ic(ic({},Object(d.omit)(t.attributes,r)),dc(n.blocks)),order:ic(ic({},Object(d.omit)(t.order,r)),Object(d.omit)(ac(n.blocks),o)),parents:ic(ic({},Object(d.omit)(t.parents,r)),lc(n.blocks)),cache:ic(ic({},Object(d.omit)(t.cache,r)),Object(d.omit)(Object(d.mapValues)(uc(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 a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;var l=null===(a=null==r?void 0:r.isPersistentChange)||void 0===a||a;return r.isPersistentChange===l?r:ic(ic({},c),{},{isPersistentChange:l})}return c=ic(ic({},c),{},{isPersistentChange:i?!n:!fc(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 sc(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return ic(ic({},e),sc(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:ic(ic({},e),{},Object(a.a)({},t.clientId,ic(ic({},e[t.clientId]),n)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?ic(ic({},Object(d.omit)(e,t.replacedClientIds)),sc(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 dc(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return ic(ic({},e),dc(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?ic(ic({},e),{},Object(a.a)({},t.clientId,ic(ic({},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 ic(ic({},n),{},Object(a.a)({},r,Object(d.reduce)(t.attributes,(function(t,n,o){return n!==t[o]&&((t=bc(e[r],t))[o]=n),t}),e[r])))}),{});return t.clientIds.every((function(t){return n[t]===e[t]}))?e:ic(ic({},e),n);case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?ic(ic({},Object(d.omit)(e,t.replacedClientIds)),dc(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 ac(t.blocks);case"RECEIVE_BLOCKS":return ic(ic({},e),Object(d.omit)(ac(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=e[r]||[],c=ac(t.blocks,r),i=t.index,l=void 0===i?o.length:i;return ic(ic(ic({},e),c),{},Object(a.a)({},r,rc(o,c[r],l)));case"MOVE_BLOCKS_TO_POSITION":var u,s=t.fromRootClientId,b=void 0===s?"":s,f=t.toRootClientId,p=void 0===f?"":f,m=t.clientIds,v=t.index,O=void 0===v?e[p].length:v;if(b===p){var g=e[p],h=g.indexOf(m[0]);return ic(ic({},e),{},Object(a.a)({},p,oc(e[p],h,O,m.length)))}return ic(ic({},e),{},(u={},Object(a.a)(u,b,d.without.apply(void 0,[e[b]].concat(Object(ue.a)(m)))),Object(a.a)(u,p,rc(e[p],m,O)),u));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 w=E.indexOf(_);return ic(ic({},e),{},Object(a.a)({},y,oc(E,w,w-1,j.length)));case"MOVE_BLOCKS_DOWN":var C=t.clientIds,S=t.rootClientId,I=void 0===S?"":S,B=Object(d.first)(C),x=Object(d.last)(C),P=e[I];if(!P.length||x===Object(d.last)(P))return e;var T=P.indexOf(B);return ic(ic({},e),{},Object(a.a)({},I,oc(P,T,T+1,C.length)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var N=t.clientIds;if(!t.blocks)return e;var D=ac(t.blocks);return Object(d.flow)([function(e){return Object(d.omit)(e,t.replacedClientIds)},function(e){return ic(ic({},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(ue.a)(e),Object(ue.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(ue.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 lc(t.blocks);case"RECEIVE_BLOCKS":return ic(ic({},e),lc(t.blocks));case"INSERT_BLOCKS":return ic(ic({},e),lc(t.blocks,t.rootClientId||""));case"MOVE_BLOCKS_TO_POSITION":return ic(ic({},e),t.clientIds.reduce((function(e,n){return e[n]=t.toRootClientId||"",e}),{}));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return ic(ic({},Object(d.omit)(e,t.replacedClientIds)),lc(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?ic(ic({},e),{},Object(a.a)({},r,o)):e}});function vc(){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 Oc(e,t,n){switch(t.type){case"CLEAR_SELECTED_BLOCK":case"SELECT_BLOCK":case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":return n}return e}var gc=Object(m.combineReducers)({blocks:mc,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},selectionStart:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SELECTION_CHANGE":return{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset};case"RESET_SELECTION":return t.selectionStart;case"MULTI_SELECT":return{clientId:t.start}}return vc(e,t)},selectionEnd:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SELECTION_CHANGE":return{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset};case"RESET_SELECTION":return t.selectionEnd;case"MULTI_SELECT":return{clientId:t.end}}return vc(e,t)},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 ic(ic({},e),{},Object(a.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:ic(ic({},e),{},Object(a.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 Oc(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 Oc(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 ic(ic({},e),{},{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nc,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return ic(ic({},e),t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tc,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),ic(ic({},e),{},{insertUsage:ic(ic({},e.insertUsage),{},Object(a.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(a.a)({},t.clientId,t.updates.attributes);case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((function(e,n){return ic(ic({},e),{},Object(a.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}}),hc=n(49);function jc(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 kc(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)?kc(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,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function kc(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 yc(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 _c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yc(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ec=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(l.createElement)(v.G,null,Object(l.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"}))),wc=[];function Cc(e,t){var n=e.blocks.byClientId[t];if("web"!==l.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 Sc(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}function Ic(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}var Bc=Object(hc.a)((function(e,t){var n=e.blocks.byClientId[t];return n?_c(_c({},n),{},{attributes:Ic(e,t),innerBlocks:Ji(e,t)?wc:Pc(e,t)}):null}),(function(e,t){return[e.blocks.cache[t]]})),xc=Object(hc.a)((function(e,t){var n=e.blocks.byClientId[t];return n?_c(_c({},n),{},{attributes:Ic(e,t)}):null}),(function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t]]})),Pc=Object(hc.a)((function(e,t){return Object(d.map)(bi(e,t),(function(t){return Bc(e,t)}))}),(function(e,t){return Object(d.map)(e.blocks.order[t||""],(function(t){return e.blocks.cache[t]}))})),Tc=Object(hc.a)((function(e,t){var n=e.blocks.byClientId[t];return n?_c(_c({},n),{},{attributes:Ic(e,t),innerBlocks:Nc(e,t)}):null}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),Nc=Object(hc.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(bi(e,t),(function(t){return Tc(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),Dc=function e(t,n){return Object(d.flatMap)(n,(function(n){var r=bi(t,n);return[].concat(Object(ue.a)(r),Object(ue.a)(e(t,r)))}))},Ac=Object(hc.a)((function(e){var t=bi(e);return[].concat(Object(ue.a)(t),Object(ue.a)(Dc(e,t)))}),(function(e){return[e.blocks.order]})),Rc=Object(hc.a)((function(e,t){var n=Ac(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]})),Lc=Object(hc.a)((function(e,t){return Object(d.map)(Object(d.castArray)(t),(function(t){return Bc(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function Mc(e,t){return bi(e,t).length}function Fc(e){return e.selectionStart}function Vc(e){return e.selectionEnd}function Hc(e){return e.selectionStart.clientId}function zc(e){return e.selectionEnd.clientId}function Gc(e){return ri(e).length||(e.selectionStart.clientId?1:0)}function Uc(e){var t=e.selectionStart,n=e.selectionEnd;return!!t.clientId&&t.clientId===n.clientId}function Kc(e){var t=e.selectionStart,n=e.selectionEnd,r=t.clientId;return r&&r===n.clientId?r:null}function Wc(e){var t=Kc(e);return t?Bc(e,t):null}function qc(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}var $c=Object(hc.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]})),Yc=Object(hc.a)((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=$c(e,t,r);return Object(d.map)(Object(d.filter)(Object(d.map)(o,(function(t){return{id:t,name:Cc(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 Xc(e,t){var n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function Qc(e,t){for(var n,r=Kc(e),o=[].concat(Object(ue.a)($c(e,t)),[t]),c=[].concat(Object(ue.a)($c(e,r)),[r]),i=Math.min(o.length,c.length),a=0;a<i&&o[a]===c[a];a++)n=o[a];return n}function Zc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Kc(e)),void 0===t&&(t=n<0?ci(e):ii(e)),!t)return null;var r=qc(e,t);if(null===r)return null;var o=e.blocks.order,c=o[r],i=c.indexOf(t),a=i+1*n;return a<0||a===c.length?null:c[a]}function Jc(e,t){return Zc(e,t,-1)}function ei(e,t){return Zc(e,t,1)}function ti(e){return e.initialPosition}var ni=Object(hc.a)((function(e){var t=e.selectionStart,n=e.selectionEnd;if(void 0===t.clientId||void 0===n.clientId)return wc;if(t.clientId===n.clientId)return[t.clientId];var r=qc(e,t.clientId);if(null===r)return wc;var o=bi(e,r),c=o.indexOf(t.clientId),i=o.indexOf(n.clientId);return c>i?o.slice(i,c+1):o.slice(c,i+1)}),(function(e){return[e.blocks.order,e.selectionStart.clientId,e.selectionEnd.clientId]}));function ri(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?wc:ni(e)}var oi=Object(hc.a)((function(e){var t=ri(e);return t.length?t.map((function(t){return Bc(e,t)})):wc}),(function(e){return[].concat(Object(ue.a)(ni.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])}));function ci(e){return Object(d.first)(ri(e))||null}function ii(e){return Object(d.last)(ri(e))||null}function ai(e,t){return ci(e)===t}function li(e,t){return-1!==ri(e).indexOf(t)}var ui=Object(hc.a)((function(e,t){for(var n=t,r=!1;n&&!r;)r=li(e,n=qc(e,n));return r}),(function(e){return[e.blocks.order,e.selectionStart.clientId,e.selectionEnd.clientId]}));function si(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:t.clientId||null}function di(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:n.clientId||null}function bi(e,t){return e.blocks.order[t||""]||wc}function fi(e,t,n){return bi(e,n).indexOf(t)}function pi(e,t){var n=e.selectionStart,r=e.selectionEnd;return n.clientId===r.clientId&&n.clientId===t}function mi(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(d.some)(bi(e,t),(function(t){return pi(e,t)||li(e,t)||n&&mi(e,t,n)}))}function vi(e,t){if(!t)return!1;var n=ri(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function Oi(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId!==n.clientId}function gi(e){return e.isMultiSelecting}function hi(e){return e.isSelectionEnabled}function ji(e,t){return e.blocksMode[t]||"visual"}function ki(e){return e.isTyping}function yi(e){return!!e.draggedBlocks.length}function _i(e){return e.draggedBlocks}function Ei(e,t){return e.draggedBlocks.includes(t)}function wi(e,t){if(!yi(e))return!1;var n=$c(e,t);return Object(d.some)(n,(function(t){return Ei(e,t)}))}function Ci(e){return e.isCaretWithinFormattedText}function Si(e){var t,n,r=e.insertionPoint,o=e.selectionEnd;if(null!==r)return r;var c=o.clientId;return c?(t=qc(e,c)||void 0,n=fi(e,o.clientId,t)+1):n=bi(e).length,{rootClientId:t,index:n}}function Ii(e){return e.insertionPointVisibility}function Bi(e){return e.template.isValid}function xi(e){return e.settings.template}function Pi(e,t){if(!t)return e.settings.templateLock;var n=Hi(e,t);return n?n.templateLock:null}var Ti=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(d.isBoolean)(e)?e:Object(d.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},o=Object(p.getBlockType)(t);if(!o)return!1;var c=zi(e),i=c.allowedBlockTypes,a=r(i,t,!0);if(!a)return!1;var l=!!Pi(e,n);if(l)return!1;var u=Hi(e,n);if(n&&void 0===u)return!1;var s=null==u?void 0:u.allowedBlocks,b=r(s,t),f=o.parent,m=Cc(e,n),v=r(f,m);return null!==b&&null!==v?b||v:null!==b?b:null===v||v},Ni=Object(hc.a)(Ti,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function Di(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((function(t){return Ni(e,Cc(e,t),n)}))}function Ai(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 Ri=function(e,t,n){return!!Object(p.hasBlockSupport)(t,"inserter",!0)&&Ti(e,t.name,n)},Li=function(e){return function(t){return _c(_c({},e),{},{id:"".concat(e.id,"-").concat(t.name),icon:t.icon||e.icon,title:t.title||e.title,description:t.description||e.description,example:t.hasOwnProperty("example")?t.example:e.example,initialAttributes:_c(_c({},e.initialAttributes),t.attributes),innerBlocks:t.innerBlocks,keywords:t.keywords||e.keywords})}},Mi=Object(hc.a)((function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=function(e,t){if(!e)return t;var n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},o=function(t){var n=t.name,o=!1;Object(p.hasBlockSupport)(t.name,"multiple",!0)||(o=Object(d.some)(Lc(e,Ac(e)),{name:t.name}));var c=Ai(e,n)||{},i=c.time,a=c.count,l=void 0===a?0:a,u=t.variations.filter((function(e){var t=e.scope;return!t||t.includes("inserter")}));return{id:n,name:t.name,initialAttributes:{},title:t.title,description:t.description,icon:t.icon,category:t.category,keywords:t.keywords,variations:u,example:t.example,isDisabled:o,utility:1,frecency:r(i,l)}},c=function(t){var n,o="core/block/".concat(t.id),c=Ki(e,t.id);1===c.length&&(n=Object(p.getBlockType)(c[0].name));var i=Ai(e,o)||{},a=i.time,l=i.count,u=r(a,void 0===l?0:l);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n?n.icon:Ec,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:u}},i=Object(p.getBlockTypes)().filter((function(t){return Ri(e,t,n)})).map(o),a=Ti(e,"core/block",n)?$i(e).map(c):[],l=i.filter((function(e){var t=e.variations;return!(void 0===t?[]:t).some((function(e){return e.isDefault}))})),u=[],s=jc(i);try{for(s.s();!(t=s.n()).done;){var b=t.value,f=b.variations,m=void 0===f?[]:f;if(m.length){var v=Li(b);u.push.apply(u,Object(ue.a)(m.map(v)))}}}catch(e){s.e(e)}finally{s.f()}return[].concat(Object(ue.a)(l),u,Object(ue.a)(a))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,$i(e),Object(p.getBlockTypes)()]})),Fi=Object(hc.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 Ri(e,n,t)}));if(n)return!0;var r=Ti(e,"core/block",t)&&$i(e).length>0;return r}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,$i(e),Object(p.getBlockTypes)()]})),Vi=Object(hc.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 Ri(e,n,t)}))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]}));function Hi(e,t){return e.blockListSettings[t]}function zi(e){return e.settings}function Gi(e){return e.blocks.isPersistentChange}var Ui=Object(hc.a)((function(e,t){return Object(d.filter)(e.blockListSettings,(function(e,n){return t.includes(n)}))}),(function(e){return[e.blockListSettings]})),Ki=Object(hc.a)((function(e,t){var n=Object(d.find)($i(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[$i(e)]}));function Wi(e){return e.blocks.isIgnoredChange}function qi(e){return e.lastBlockAttributesChange}function $i(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:wc}function Yi(e){return e.isNavigationMode}function Xi(e){return e.hasBlockMovingClientId}function Qi(e){return!!e.automaticChangeStatus}function Zi(e,t){return e.highlightedBlock===t}function Ji(e,t){return!!e.blocks.controlledInnerBlocks[t]}var ea=Object(hc.a)((function(e,t){if(!t.length)return null;var n=Kc(e);if(t.includes(Cc(e,n)))return n;var r=ri(e),o=Yc(e,n||r[0],t);return o?Object(d.last)(o):null}),(function(e,t){return[e.selectionStart.clientId,e.selectionEnd.clientId,t]})),ta=n(41),na={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 ra(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 oa(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)?oa(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,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function oa(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 ca(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 ia(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ca(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ca(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var aa=so.a.mark(Sa),la=so.a.mark(Ia),ua=so.a.mark(Ba),sa=so.a.mark(Aa),da=so.a.mark(Ra),ba=so.a.mark(Fa),fa=so.a.mark(Ga),pa=so.a.mark($a),ma=so.a.mark(Ya),va=so.a.mark(Qa),Oa=so.a.mark(nl),ga=so.a.mark(rl),ha=so.a.mark(ol),ja=so.a.mark(kl),ka=so.a.mark(_l),ya=so.a.mark(El),_a=so.a.mark(wl),Ea=so.a.mark(Cl),wa=so.a.mark(Sl),Ca=so.a.mark(Bl);function Sa(){return so.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,ml();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),aa)}function Ia(e){return so.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(Ba(e),"t0",3);case 3:return t.abrupt("return",t.t0);case 4:case"end":return t.stop()}}),la)}function Ba(e){var t,n,r,o;return so.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,tl(r);case 13:return c.abrupt("return",r);case 14:case"end":return c.stop()}}),ua)}function xa(e,t){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t}}function Pa(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function Ta(e,t){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Object(d.castArray)(e),attributes:t}}function Na(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Da(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function Aa(e){var t;return so.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,Da(t,-1);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),sa)}function Ra(e){var t;return so.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,Da(t);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),da)}function La(){return{type:"START_MULTI_SELECT"}}function Ma(){return{type:"STOP_MULTI_SELECT"}}function Fa(e,t){var n;return so.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(ct.speak)(Object(C.sprintf)(
|
28 |
-
/* translators: %s: number of selected blocks */
|
29 |
-
Object(C._n)("%s block selected.","%s blocks selected.",n),n),"assertive");case 6:case"end":return r.stop()}}),ba)}function Va(){return{type:"CLEAR_SELECTED_BLOCK"}}function Ha(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function za(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,a=o[n];return ia(ia({},e),{},{attributes:ia(ia({},i),{},{className:"".concat(r||""," is-style-").concat(a).trim()})})}))}function Ga(e,t,n,r,o){var c,i,a;return so.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return e=Object(d.castArray)(e),l.t0=za,l.t1=Object(d.castArray)(t),l.next=5,m.controls.select("core/block-editor","getSettings");case 5:return l.t2=l.sent,t=(0,l.t0)(l.t1,l.t2),l.next=9,m.controls.select("core/block-editor","getBlockRootClientId",Object(d.first)(e));case 9:c=l.sent,i=0;case 11:if(!(i<t.length)){l.next=21;break}return a=t[i],l.next=15,m.controls.select("core/block-editor","canInsertBlockType",a.name,c);case 15:if(l.sent){l.next=18;break}return l.abrupt("return");case 18:i++,l.next=11;break;case 21:return l.next=23,{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:r,meta:o};case 23:return l.delegateYield(Sa(),"t3",24);case 24:case"end":return l.stop()}}),fa)}function Ua(e,t){return Ga(e,t)}function Ka(e){return function(t,n){return{clientIds:Object(d.castArray)(t),type:e,rootClientId:n}}}var Wa=Ka("MOVE_BLOCKS_DOWN"),qa=Ka("MOVE_BLOCKS_UP");function $a(e){var t,n,r,o,c,i=arguments;return so.a.wrap((function(a){for(;;)switch(a.prev=a.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,a.next=5,m.controls.select("core/block-editor","getTemplateLock",t);case 5:if("all"!==(o=a.sent)){a.next=8;break}return a.abrupt("return");case 8:if(c={type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r},t!==n){a.next=13;break}return a.next=12,c;case 12:return a.abrupt("return");case 13:if("insert"!==o){a.next=15;break}return a.abrupt("return");case 15:return a.next=17,m.controls.select("core/block-editor","canInsertBlocks",e,n);case 17:if(!a.sent){a.next=21;break}return a.next=21,c;case 21:case"end":return a.stop()}}),pa)}function Ya(e){var t,n,r,o=arguments;return so.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,$a([e],t,n,r);case 5:case"end":return c.stop()}}),ma)}function Xa(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Qa([e],t,n,r)}function Qa(e,t,n){var r,o,c,i,a,l,u=arguments;return so.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return r=!(u.length>3&&void 0!==u[3])||u[3],o=u.length>4?u[4]:void 0,s.t0=za,s.t1=Object(d.castArray)(e),s.next=6,m.controls.select("core/block-editor","getSettings");case 6:s.t2=s.sent,e=(0,s.t0)(s.t1,s.t2),c=[],i=ra(e),s.prev=10,i.s();case 12:if((a=i.n()).done){s.next=20;break}return l=a.value,s.next=16,m.controls.select("core/block-editor","canInsertBlockType",l.name,n);case 16:s.sent&&c.push(l);case 18:s.next=12;break;case 20:s.next=25;break;case 22:s.prev=22,s.t3=s.catch(10),i.e(s.t3);case 25:return s.prev=25,i.f(),s.finish(25);case 28:if(!c.length){s.next=30;break}return s.abrupt("return",{type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,meta:o});case 30:case"end":return s.stop()}}),va,null,[[10,22,25,28]])}function Za(e,t){return{type:"SET_INSERTION_POINT",rootClientId:e,index:t}}function Ja(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function el(){return{type:"HIDE_INSERTION_POINT"}}function tl(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function nl(){var e,t,n;return so.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,Ia(n);case 11:return r.abrupt("return",r.sent);case 12:case"end":return r.stop()}}),Oa)}function rl(e,t){var n,r,o,i,a,l,u,s,b,f,v,O,g,h,j,k,y,_,E,w,C,S,I,B,x,P,T,N,D,A,R,L,M,F;return so.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,(a=Object(p.getBlockType)(i.name)).merge){V.next=12;break}return V.next=11,Da(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 l=V.sent,u=Object(p.getBlockType)(l.name),V.next=18,m.controls.select("core/block-editor","getSelectionStart");case 18:if(s=V.sent,b=s.clientId,f=s.attributeKey,v=s.offset,O=(b===r?a:u).attributes[f],g=(b===r||b===o)&&void 0!==f&&void 0!==v&&!!O,O||("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(ta.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)(l),g&&(_=(y=b===r?j:k).attributes[f],E=O.multiline,w=O.__unstableMultilineWrapperTags,C=O.__unstablePreserveWhiteSpace,S=Object(c.insert)(Object(c.create)({html:_,multilineTag:E,multilineWrapperTags:w,preserveWhiteSpace:C}),h,v,v),y.attributes[f]=Object(c.toHTMLString)({value:S,multilineTag:E,preserveWhiteSpace:C})),(I=i.name===l.name?[k]:Object(p.switchToBlockType)(k,i.name))&&I.length){V.next=33;break}return V.abrupt("return");case 33:if(B=a.merge(j.attributes,I[0].attributes),!g){V.next=45;break}return x=Object(d.findKey)(B,(function(e){return"string"==typeof e&&-1!==e.indexOf(h)})),P=B[x],T=a.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}),B[x]=F,V.next=45,pl(i.clientId,x,L,L);case 45:return V.delegateYield(Ga([i.clientId,l.clientId],[ia(ia({},i),{},{attributes:ia(ia({},i.attributes),B)})].concat(Object(ue.a)(I.slice(1)))),"t0",46);case 46:case"end":return V.stop()}}),ga)}function ol(e){var t,n,r,o,c=arguments;return so.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,Aa(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(Sa(),"t0",24);case 24:return o=i.t0,i.abrupt("return",[r||o]);case 26:case"end":return i.stop()}}),ha)}function cl(e,t){return ol([e],t)}function il(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 al(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function ll(){return{type:"START_TYPING"}}function ul(){return{type:"STOP_TYPING"}}function sl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function dl(){return{type:"STOP_DRAGGING_BLOCKS"}}function bl(){return{type:"ENTER_FORMATTED_TEXT"}}function fl(){return{type:"EXIT_FORMATTED_TEXT"}}function pl(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function ml(e,t,n){var r=Object(p.getDefaultBlockName)();if(r)return Xa(Object(p.createBlock)(r,e),n,t)}function vl(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Ol(e){return{type:"UPDATE_SETTINGS",settings:e}}function gl(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function hl(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function jl(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function kl(){return so.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()}}),ja)}function yl(){return{type:"MARK_AUTOMATIC_CHANGE_FINAL"}}function _l(){var e,t=arguments;return so.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(ct.speak)(Object(C.__)("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(ct.speak)(Object(C.__)("You are currently in edit mode. To return to the navigation mode, press Escape."));case 4:case"end":return n.stop()}}),ka)}function El(){var e,t=arguments;return so.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(ct.speak)(Object(C.__)("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()}}),ya)}function wl(e){var t,n,r,o,c,i,a=arguments;return so.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(t=!(a.length>1&&void 0!==a[1])||a[1],e||e.length){l.next=3;break}return l.abrupt("return");case 3:return l.next=5,m.controls.select("core/block-editor","getBlocksByClientId",e);case 5:return n=l.sent,l.next=8,m.controls.select("core/block-editor","getBlockRootClientId",e[0]);case 8:if(r=l.sent,!Object(d.some)(n,(function(e){return!e}))){l.next=11;break}return l.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)}))){l.next=14;break}return l.abrupt("return");case 14:return l.next=16,m.controls.select("core/block-editor","getBlockIndex",Object(d.last)(Object(d.castArray)(e)),r);case 16:return c=l.sent,i=n.map((function(e){return Object(p.cloneBlock)(e)})),l.next=20,Qa(i,c+1,r,t);case 20:if(!(i.length>1&&t)){l.next=23;break}return l.next=23,Fa(Object(d.first)(i).clientId,Object(d.last)(i).clientId);case 23:return l.abrupt("return",i.map((function(e){return e.clientId})));case 24:case"end":return l.stop()}}),_a)}function Cl(e){var t,n;return so.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,ml({},t,n);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),Ea)}function Sl(e){var t,n;return so.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,ml({},t,n+1);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),wa)}function Il(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function Bl(e){return so.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Il(e,!0);case 2:return t.next=4,{type:"SLEEP",duration:150};case 4:return t.next=6,Il(e,!1);case 6:case"end":return t.stop()}}),Ca)}function xl(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function Pl(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 Tl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pl(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Nl={reducer:gc,selectors:r,actions:o,controls:na},Dl=Object(m.createReduxStore)("core/block-editor",Tl(Tl({},Nl),{},{persist:["preferences"]}));function Al(e){var t=e.clientId,n=void 0===t?null:t,r=e.value,o=e.selectionStart,c=e.selectionEnd,i=e.onChange,a=void 0===i?d.noop:i,u=e.onInput,s=void 0===u?d.noop:u,b=Object(m.useRegistry)(),f=b.dispatch("core/block-editor"),p=f.resetBlocks,v=f.resetSelection,O=f.replaceInnerBlocks,g=f.setHasControlledInnerBlocks,h=f.__unstableMarkNextChangeAsNotPersistent,j=b.select("core/block-editor"),k=j.getBlockName,y=j.getBlocks,_=Object(l.useRef)({incoming:null,outgoing:[]}),E=Object(l.useRef)(s),w=Object(l.useRef)(a);Object(l.useEffect)((function(){E.current=s,w.current=a}),[s,a]),Object(l.useEffect)((function(){var e,t=b.select("core/block-editor"),r=t.getSelectionStart,o=t.getSelectionEnd,c=t.isLastBlockChangePersistent,i=t.__unstableIsLastBlockChangeIgnored,a=c(),l=!1,u=b.subscribe((function(){if(null===n||null!==k(n)){var t=c(),u=y(n),s=u!==e;if(e=u,s&&(_.current.incoming||i()))return _.current.incoming=null,void(a=t);(s||l&&!s&&t&&!a)&&(a=t,_.current.outgoing.push(e),(a?w.current:E.current)(e,{selectionStart:r(),selectionEnd:o()})),l=s}}));return function(){return u()}}),[b,n]),Object(l.useEffect)((function(){_.current.outgoing.includes(r)?Object(d.last)(_.current.outgoing)===r&&(_.current.outgoing=[]):y(n)!==r&&(_.current.outgoing=[],_.current.incoming=r,r&&(h(),n?(g(n,!0),h(),O(n,r)):p(r)),o&&c&&v(o,c))}),[r,n])}Object(m.registerStore)("core/block-editor",Tl(Tl({},Nl),{},{persist:["preferences"]}));var Rl,Ll=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(Ve.a)(t,["useSubRegistry","registry"]);if(!r)return Object(l.createElement)(e,Object(i.a)({registry:o},c));var a=Object(l.useState)(null),u=Object(se.a)(a,2),s=u[0],d=u[1];return Object(l.useEffect)((function(){var e=Object(m.createRegistry)({},o);e.registerStore("core/block-editor",Nl),d(e)}),[o]),s?Object(l.createElement)(m.RegistryProvider,{value:s},Object(l.createElement)(e,Object(i.a)({registry:s},c))):null}))}),"withRegistryProvider")((function(e){var t=e.children,n=e.settings,r=Object(m.useDispatch)("core/block-editor").updateSettings;return Object(l.useEffect)((function(){r(n)}),[n]),Al(e),t}));function Ml(e){var t=e.onClick;return Object(l.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},Object(l.createElement)(v.Disabled,null,Object(l.createElement)(Ys,null)))}var Fl=function(e){var t=e.viewportWidth,n=e.__experimentalPadding,r=Object(b.useResizeObserver)(),o=Object(se.a)(r,2),c=o[0],i=o[1].width,a=Object(b.useResizeObserver)(),u=Object(se.a)(a,2),s=u[0],d=u[1].height;Rl=Rl||Object(b.pure)(Ys);var f=(i-2*n)/t;return Object(l.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:d*f+2*n}},c,Object(l.createElement)(v.Disabled,{style:{transform:"scale(".concat(f,")"),width:t,left:n,right:n,top:n},className:"block-editor-block-preview__content"},s,Object(l.createElement)(Rl,null)))},Vl=Object(l.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,a=void 0!==i&&i,u=e.__experimentalOnClick,s=Object(m.useSelect)((function(e){return e("core/block-editor").getSettings()}),[]),b=Object(l.useMemo)((function(){return Object(d.castArray)(t)}),[t]);return t&&0!==t.length?Object(l.createElement)(Ll,{value:b,settings:s},a?Object(l.createElement)(Ml,{onClick:u}):Object(l.createElement)(Fl,{viewportWidth:c,__experimentalPadding:r})):null}));function Hl(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 zl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hl(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Gl=function(e){var t,n,r=e.item,o=Object(p.getBlockType)(r.name);return Object(l.createElement)("div",{className:"block-editor-inserter__preview-container"},Object(l.createElement)("div",{className:"block-editor-inserter__preview"},Object(p.isReusableBlock)(r)||o.example?Object(l.createElement)("div",{className:"block-editor-inserter__preview-content"},Object(l.createElement)(Vl,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=o.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:o.example?Object(p.getBlockFromExample)(r.name,{attributes:zl(zl({},o.example.attributes),r.initialAttributes),innerBlocks:o.example.innerBlocks}):Object(p.createBlock)(r.name,r.initialAttributes)})):Object(l.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},Object(C.__)("No Preview Available."))),!Object(p.isReusableBlock)(r)&&Object(l.createElement)(ec,{blockType:r}))},Ul=n(57),Kl=n(115),Wl=n(116),ql=Object(l.createElement)(S.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(l.createElement)(S.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function $l(e){var t=e.count,n=e.icon;return Object(l.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},Object(l.createElement)("div",{className:"block-editor-block-draggable-chip"},Object(l.createElement)(v.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},Object(l.createElement)(v.FlexItem,null,n?Object(l.createElement)(Lr,{icon:n}):Object(C.sprintf)(
|
30 |
/* translators: %d: Number of blocks. */
|
31 |
-
Object(C._n)("%d block","%d blocks",t),t)),Object(l.createElement)(v.FlexItem,null,Object(l.createElement)(Lr,{icon:
|
32 |
/* translators: %s: block pattern title. */
|
33 |
-
Object(C.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function
|
34 |
// translators: %d: the name of the block that has been added
|
35 |
-
var n=Object(C._n)("%d block added.","%d blocks added.",e.length);Object(
|
36 |
/* translators: %d: number of results. */
|
37 |
-
Object(C._n)("%d result found.","%d results found.",e),e);g(n)}}),[t,g]);var
|
38 |
/* translators: Blocks tab title in the block inserter. */
|
39 |
-
title:Object(C.__)("Blocks")},
|
40 |
/* translators: Patterns tab title in the block inserter. */
|
41 |
-
title:Object(C.__)("Patterns")},
|
42 |
/* translators: Reusable blocks tab title in the block inserter. */
|
43 |
-
title:Object(C.__)("Reusable")},
|
44 |
-
Object(C._x)("Add %s","directly add the only allowed block"),c):Object(C._x)("Add block","Generic label for block inserter button");var d=s.onClick,b=Object(
|
45 |
-
Object(C.__)("%s block added"),a.title);Object(
|
46 |
-
Object(C._x)("Add %s","directly add the only allowed block"),d):Object(C._x)("Add block","Generic label for block inserter button");var f=!b,p=Object(l.createElement)(v.Button,{ref:t,onFocus:c,tabIndex:i,className:s()(r,"block-editor-button-block-appender"),onClick:o,"aria-haspopup":f?"true":void 0,"aria-expanded":f?u:void 0,disabled:a,label:n},!b&&Object(l.createElement)(v.VisuallyHidden,{as:"span"},n),Object(l.createElement)(Qo.a,{icon:qo.a}));return(f||b)&&(p=Object(l.createElement)(v.Tooltip,{text:n},p)),p},isAppender:!0})}));function Pu(e){e.stopPropagation()}Object(l.createContext)();var Tu=Object(m.withSelect)((function(e,t){var n=t.rootClientId,r=e("core/block-editor"),o=r.getBlockOrder,c=r.canInsertBlockType,i=r.getTemplateLock,a=r.getSelectedBlockClientId;return{isLocked:!!i(n),blockClientIds:o(n),canInsertDefaultBlock:c(Object(p.getDefaultBlockName)(),n),selectedBlockClientId:a()}}))((function(e){var t,n=e.blockClientIds,r=e.rootClientId,o=e.canInsertDefaultBlock,c=e.isLocked,i=e.renderAppender,a=e.className,u=e.selectedBlockClientId,b=e.tagName,f=void 0===b?"div":b;if(c||!1===i)return null;if(i)t=Object(l.createElement)(i,null);else{var p=!r,m=u===r,v=u&&!n.includes(u);if(!p&&!m&&(!u||v))return null;t=o?Object(l.createElement)(Bu,{rootClientId:r,lastBlockClientId:Object(d.last)(n)}):Object(l.createElement)(xu,{rootClientId:r,className:"block-list-appender__toggle"})}return Object(l.createElement)(f,{tabIndex:-1,onFocus:Pu,className:s()("block-list-appender","wp-block",a)},t)}));function Nu(e,t,n,r,o,c,i){return function(a){var l=function(e){var t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(a),u=l.srcRootClientId,s=l.srcClientIds,d=l.type,b=l.blocks;if("inserter"===d&&(i(),c(b,t,e,!1)),"block"===d){var f=n(s[0],u);if(u===e&&f===t)return;if(s.includes(e)||r(s).some((function(t){return t===e})))return;var p=u===e,m=s.length;o(s,u,e,p&&f<t?t-m:t)}}}function Du(e,t,n,r,o){return function(c){if(n){var i=Object(p.findTransform)(Object(p.getBlockTransforms)("from"),(function(e){return"files"===e.type&&e.isMatch(c)}));if(i){var a=i.transform(c,r);o(a,t,e)}}}}function Au(e,t,n){return function(r){var o=Object(p.pasteHandler)({HTML:r,mode:"BLOCKS"});o.length&&n(o,t,e)}}function Ru(e,t){var n=Object(m.useSelect)((function(e){var t=e("core/block-editor");return{getBlockIndex:t.getBlockIndex,getClientIdsOfDescendants:t.getClientIdsOfDescendants,hasUploadPermissions:(0,t.getSettings)().mediaUpload}}),[]),r=n.getBlockIndex,o=n.getClientIdsOfDescendants,c=n.hasUploadPermissions,i=Object(m.useDispatch)("core/block-editor"),a=i.insertBlocks,l=i.moveBlocksToPosition,u=i.updateBlockAttributes;return{onDrop:Nu(e,t,r,o,l,a,i.clearSelectedBlock),onFilesDrop:Du(e,t,c,u,a),onHTMLDrop:Au(e,t,a)}}function Lu(e,t,n){var r,o="top"===n||"bottom"===n,c=e.x,i=e.y,a=o?c:i,l=o?i:c,u=o?t.left:t.top,s=o?t.right:t.bottom,d=t[n];return r=a>=u&&a<=s?a:a<s?u:s,Math.sqrt(Math.pow(a-r,2)+Math.pow(l-d,2))}function Mu(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((function(o){var c=Lu(e,t,o);(void 0===n||c<n)&&(n=c,r=o)})),[n,r]}function Fu(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 Vu=Object(l.forwardRef)((function(e,t){var n=e.selectedClientId,r=e.isReverse,o=e.containerRef,c=e.noCapture,i=e.hasMultiSelection,a=e.multiSelectionContainer,u=Object(m.useSelect)((function(e){return e("core/block-editor").isNavigationMode()})),s=Object(m.useDispatch)("core/block-editor").setNavigationMode;return Object(l.createElement)("div",{ref:t,tabIndex:u?void 0:"0",onFocus:function(){if(c.current)c.current=null;else if(n){var e=lt(n,t.current.ownerDocument);if(r){var l=mo.focus.tabbable.find(e);(Object(d.last)(l)||e).focus()}else e.focus()}else{if(i)return void a.current.focus();s(!0);var u=mo.focus.tabbable.find(o.current);u.length&&(r?Object(d.last)(u).focus():Object(d.first)(u).focus())}},style:{position:"fixed"}})}));function Hu(e,t){for(var n="start"===t?"firstChild":"lastChild",r="start"===t?"nextSibling":"previousSibling";e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[r];)e=e[r];return e}function zu(e){var t=e("core/block-editor"),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.getMultiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.getSelectedBlockClientId;return{isSelectionEnabled:n(),isMultiSelecting:r(),multiSelectedBlockClientIds:o(),hasMultiSelection:c(),getBlockParents:i,selectedBlockClientId:a()}}function Gu(e,t){Array.from(e.querySelectorAll(".rich-text")).forEach((function(e){t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}var Uu=Object(l.createContext)();function Ku(e,t,n,r){var o,c=mo.focus.focusable.find(n);return t&&(c=Object(d.reverse)(c)),c=c.slice(c.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),Object(d.find)(c,(function t(n,c,i){if(!mo.focus.tabbable.isTabbableIndex(n))return!1;if(r){var a=n.getBoundingClientRect();if(a.left>=o.right||a.right<=o.left)return!1}if(Object(mo.isTextField)(n))return!0;if(!n.classList.contains("block-editor-block-list__block"))return!1;if((l=n).classList.contains("block-editor-block-list__layout")||l.querySelector(".block-editor-block-list__layout"))return!0;var l;if(n.contains(e))return!1;for(var u,s=1;(u=i[c+s])&&n.contains(u);s++)if(t(u,c+s,i))return!1;return!0}))}function Wu(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksStartClientId,o=t.getMultiSelectedBlocksEndClientId,c=t.getPreviousBlockClientId,i=t.getNextBlockClientId,a=t.getFirstMultiSelectedBlockClientId,l=t.getLastMultiSelectedBlockClientId,u=t.hasMultiSelection,s=t.getBlockOrder,b=t.isNavigationMode,f=t.isSelectionEnabled,p=t.getBlockSelectionStart,m=t.isMultiSelecting,v=t.getSettings,O=n(),g=r(),h=o(),j=s();return{selectedBlockClientId:O,selectionStartClientId:g,selectionBeforeEndClientId:c(h||O),selectionAfterEndClientId:i(h||O),selectedFirstClientId:a(),selectedLastClientId:l(),hasMultiSelection:u(),firstBlock:Object(d.first)(j),lastBlock:Object(d.last)(j),isNavigationMode:b(),isSelectionEnabled:f(),blockSelectionStart:p(),isMultiSelecting:m(),keepCaretInsideBlock:v().keepCaretInsideBlock}}function qu(e){var t=e.children,n=Object(l.useRef)(),r=Object(l.useRef)(),o=Object(l.useRef)(),c=Object(l.useRef)(),i=Object(l.useRef)(),a=Object(l.useRef)(),u=Object(l.useRef)(),b=function(e){var t=Object(m.useSelect)(zu,[]),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.multiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.selectedBlockClientId,u=Object(m.useDispatch)("core/block-editor"),s=u.startMultiSelect,d=u.stopMultiSelect,b=u.multiSelect,f=u.selectBlock,p=Object(l.useRef)(),v=Object(l.useRef)(),O=Object(l.useRef)();Object(l.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;if(c&&!r){var i=o.length;if(!(i<2)){var l=o[0],u=o[i-1],s=lt(l,t),d=lt(u,t),b=n.getSelection(),f=t.createRange();s=Hu(s,"start"),d=Hu(d,"end"),f.setStartBefore(s),f.setEndAfter(d),b.removeAllRanges(),b.addRange(f)}}else{if(!a||r)return;var p=n.getSelection();if(p.rangeCount&&!p.isCollapsed){var m=lt(a,t),v=p.getRangeAt(0),O=v.startContainer,g=v.endContainer;!m||m.contains(O)&&m.contains(g)||p.removeAllRanges()}}}),[c,r,o,f,a]);var g=Object(l.useCallback)((function(t){var n=t.isSelectionEnd,r=e.current.ownerDocument.defaultView.getSelection();if(r.rangeCount&&!r.isCollapsed){var o=st(r.focusNode);if(v.current===o){if(f(o),n&&(Gu(e.current,!0),r.rangeCount)){var c=r.getRangeAt(0).commonAncestorContainer;O.current.contains(c)&&O.current.focus()}}else{var a=[].concat(Object(ue.a)(i(v.current)),[v.current]),l=[].concat(Object(ue.a)(i(o)),[o]),u=Math.min(a.length,l.length)-1;b(a[u],l[u])}}else Gu(e.current,!0)}),[f,i,b]),h=Object(l.useCallback)((function(){var t=e.current.ownerDocument,n=t.defaultView;t.removeEventListener("selectionchange",g),n.removeEventListener("mouseup",h),p.current=n.requestAnimationFrame((function(){g({isSelectionEnd:!0}),d()}))}),[g,d]);return Object(l.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;return function(){t.removeEventListener("selectionchange",g),n.removeEventListener("mouseup",h),n.cancelAnimationFrame(p.current)}}),[g,h]),Object(l.useCallback)((function(t){if(n){var r=e.current.ownerDocument,o=r.defaultView;v.current=t,O.current=r.activeElement,s(),r.addEventListener("selectionchange",g),o.addEventListener("mouseup",h),Gu(e.current,!1)}}),[n,s,h])}(n),f=Object(m.useSelect)(Wu,[]),p=f.selectedBlockClientId,v=f.selectionStartClientId,O=f.selectionBeforeEndClientId,g=f.selectionAfterEndClientId,h=f.selectedFirstClientId,j=f.selectedLastClientId,k=f.hasMultiSelection,y=f.firstBlock,_=f.lastBlock,E=f.isNavigationMode,w=f.isSelectionEnabled,S=f.blockSelectionStart,I=f.isMultiSelecting,B=f.keepCaretInsideBlock,x=Object(m.useDispatch)("core/block-editor"),P=x.multiSelect,T=x.selectBlock,N=x.setNavigationMode;function D(e){var t=e?O:g;t&&P(v||p,t)}function A(e){var t=e?h:j;t&&T(t)}Object(l.useEffect)((function(){k&&!I&&c.current.focus()}),[k,I]);var R=s()("block-editor-writing-flow",{"is-navigate-mode":E});return Object(l.createElement)(Uu.Provider,{value:b},Object(l.createElement)(Vu,{ref:r,selectedClientId:p,containerRef:n,noCapture:a,hasMultiSelection:k,multiSelectionContainer:c}),Object(l.createElement)("div",{ref:c,tabIndex:k?"0":void 0,"aria-label":k?Object(C.__)("Multiple selected blocks"):void 0,style:{position:"fixed"},onKeyDown:function(e){var t=e.keyCode,n=e.shiftKey,c=t===zt.UP,i=t===zt.DOWN,l=t===zt.LEFT,u=t===zt.RIGHT,s=c||l,d=l||u||c||i;t===zt.TAB?(a.current=!0,n?r.current.focus():o.current.focus()):d&&((n?D:A)(s),e.preventDefault())}}),Object(l.createElement)("div",{ref:n,className:R,onKeyDown:function(e){var t=e.keyCode,c=e.target;if(n.current.contains(c)){var l=t===zt.UP,s=t===zt.DOWN,b=t===zt.LEFT,f=t===zt.RIGHT,m=t===zt.TAB,v=t===zt.ESCAPE,h=l||b,j=b||f,k=l||s,E=j||k,w=e.shiftKey,C=w||e.ctrlKey||e.altKey||e.metaKey,S=k?mo.isVerticalEdge:mo.isHorizontalEdge,I=n.current.ownerDocument,x=I.defaultView;if(p)if(m){var T=lt(p,I);if(w){if(c===T)return a.current=!0,void r.current.focus()}else{var A=mo.focus.tabbable.find(T);if(c===(Object(d.last)(A)||T))return a.current=!0,void o.current.focus()}}else v&&N(!0);if(k?u.current||(u.current=Object(mo.computeCaretRect)(x)):u.current=null,!E)return zt.isKeyboardEvent.primary(e)&&(i.current=Object(mo.isEntirelySelected)(c)),void(zt.isKeyboardEvent.primary(e,"a")&&((c.isContentEditable?i.current:Object(mo.isEntirelySelected)(c))&&(P(y,_),e.preventDefault()),i.current=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===zt.UP||t===zt.DOWN)&&!n)return!0;var r=e.tagName;return"INPUT"!==r&&"TEXTAREA"!==r}(c,t,C)){var R,L="rtl"===(R=c).ownerDocument.defaultView.getComputedStyle(R).direction?!h:h;if(w)(h&&O||!h&&g)&&function(e,t){var r,o,c=Ku(e,t,n.current);return!(c&&(r=e,o=c,r.closest(".block-editor-block-list__block")===o.closest(".block-editor-block-list__block")))}(c,h)&&S(c,h)&&(D(h),e.preventDefault());else if(k&&Object(mo.isVerticalEdge)(c,h)&&!B){var M=Ku(c,h,n.current,!0);M&&(Object(mo.placeCaretAtVerticalEdge)(M,h,u.current),e.preventDefault())}else if(j&&x.getSelection().isCollapsed&&Object(mo.isHorizontalEdge)(c,L)&&!B){var F=Ku(c,L,n.current);Object(mo.placeCaretAtHorizontalEdge)(F,L),e.preventDefault()}}}},onMouseDown:function(e){u.current=null;var t=e.target.ownerDocument;if(E&&p&&ut(lt(p,t),e.target)&&N(!1),w&&0===e.button){var n=st(e.target);n&&(e.shiftKey?S!==n&&(P(S,n),e.preventDefault()):k&&T(n))}}},t),Object(l.createElement)(Vu,{ref:o,selectedClientId:p,containerRef:n,noCapture:a,hasMultiSelection:k,multiSelectionContainer:c,isReverse:!0}))}function $u(e){var t=e.clientId,n=e.setIsInserterForced,r=e.containerRef,o=Object(l.useRef)(),c=Object(m.useSelect)((function(e){var n=e("core/block-editor"),r=n.getMultiSelectedBlockClientIds,o=n.getSelectedBlockClientId,c=n.hasMultiSelection;if((0,n.getSettings)().hasReducedUI)return!0;var i=r(),a=o();return c()?i.includes(t):t===a}),[t]);return Object(l.createElement)("div",{ref:o,onFocus:function(){return n(!0)},onBlur:function(){return n(!1)},onClick:function(e){var n=e.clientX,c=e.clientY,i=e.target;if(i===o.current){var a=r.current.ownerDocument,l=i.getBoundingClientRect(),u=c<l.top+l.height/2,s=lt(t,a),d=Ku(s,!0,u?r.current:s)||s,b=new window.DOMRect(n,c,0,16);Object(mo.placeCaretAtVerticalEdge)(d,u,b,!1)}},tabIndex:-1,className:s()("block-editor-block-list__insertion-point-inserter",{"is-inserter-hidden":c})},Object(l.createElement)(Iu,{position:"bottom center",clientId:t,__experimentalIsQuick:!0}))}function Yu(e){var t=e.clientId,n=e.rootClientId,r=e.isInserterShown,o=e.isInserterForced,c=e.setIsInserterForced,i=e.containerRef,a=e.showInsertionPoint,u=Object(m.useSelect)((function(e){var r=e("core/block-editor").getBlockOrder,o=i.current.ownerDocument;return lt(t||Object(d.last)(r(n)),o)}),[t,n]),b=t?"top":"bottom",f=s()("block-editor-block-list__insertion-point",{"is-insert-after":!t});return Object(l.createElement)(v.Popover,{noArrow:!0,animate:!1,anchorRef:u,position:"".concat(b," right left"),focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:"block-toolbar",__unstableForcePosition:!0},Object(l.createElement)("div",{className:f,style:{width:null==u?void 0:u.offsetWidth}},a&&Object(l.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}),(r||o)&&Object(l.createElement)($u,{clientId:t,setIsInserterForced:c,containerRef:i})))}function Xu(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksEndClientId,o=t.getPreviousBlockClientId,c=t.getNextBlockClientId,i=t.hasBlockMovingClientId,a=t.getBlockIndex,l=t.getBlockRootClientId,u=t.getClientIdsOfDescendants,s=t.canInsertBlockType,d=t.getBlockName,b=n(),f=r();return{selectedBlockClientId:b,selectionBeforeEndClientId:o(f||b),selectionAfterEndClientId:c(f||b),hasBlockMovingClientId:i,getBlockIndex:a,getBlockRootClientId:l,getClientIdsOfDescendants:u,canInsertBlockType:s,getBlockName:d}}var Qu=function(e){var t=e.clientId,n=e.rootClientId,r=e.blockElement,o=Object(m.useSelect)((function(e){var r,o=e("core/block-editor"),c=o.__unstableGetBlockWithoutInnerBlocks,i=o.getBlockIndex,a=o.hasBlockMovingClientId,l=o.getBlockListSettings,u=i(t,n),s=c(t);return{index:u,name:s.name,attributes:s.attributes,blockMovingMode:a(),orientation:null===(r=l(n))||void 0===r?void 0:r.orientation}}),[t,n]),c=o.index,i=o.name,a=o.attributes,u=o.blockMovingMode,d=o.orientation,b=Object(m.useDispatch)("core/block-editor"),f=b.setNavigationMode,O=b.removeBlock,g=Object(l.useRef)();Object(l.useEffect)((function(){g.current.focus(),window.navigator.platform.indexOf("Win")>-1&&Object(ct.speak)(N)}),[]);var h=Object(m.useSelect)(Xu,[]),j=h.selectedBlockClientId,k=h.selectionBeforeEndClientId,y=h.selectionAfterEndClientId,_=h.hasBlockMovingClientId,E=h.getBlockIndex,w=h.getBlockRootClientId,C=h.getClientIdsOfDescendants,S=Object(m.useDispatch)("core/block-editor"),I=S.selectBlock,B=S.clearSelectedBlock,x=S.setBlockMovingClientId,P=S.moveBlockToPosition,T=Object(p.getBlockType)(i),N=Object(p.__experimentalGetAccessibleBlockLabel)(T,a,c+1,d),D=s()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!u});return Object(l.createElement)("div",{className:D},Object(l.createElement)(v.Button,{ref:g,onClick:function(){return f(!1)},onKeyDown:function(e){var n=e.keyCode,o=n===zt.UP,c=n===zt.DOWN,i=n===zt.LEFT,a=n===zt.RIGHT,l=n===zt.TAB,u=n===zt.ESCAPE,s=n===zt.ENTER,d=n===zt.SPACE,b=e.shiftKey;if(n===zt.BACKSPACE||n===zt.DELETE)return O(t),void e.preventDefault();var f,p=l&&b||o,m=l&&!b||c,v=i,g=a;if(p)f=k;else if(m)f=y;else if(v){var h;f=null!==(h=w(j))&&void 0!==h?h:j}else if(g){var S;f=null!==(S=C([j])[0])&&void 0!==S?S:j}var T=_();if(u&&T&&x(null),(s||d)&&T){var N=w(T),D=w(j),A=E(T,N),R=E(j,D);A<R&&N===D&&(R-=1),P(T,N,D,R),I(T),x(null)}if(m||p||v||g)if(f)e.preventDefault(),I(f);else if(l&&j){var L;(L=m?mo.focus.tabbable.findNext(r):mo.focus.tabbable.findPrevious(r))&&(e.preventDefault(),L.focus(),B())}},label:N},Object(l.createElement)(Ur,{clientId:t})))},Zu=n(34),Ju=n.n(Zu);function es(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var ts=function(e){var t=e.children,n=e.focusOnMount,r=e.__experimentalInitialIndex,o=e.__experimentalOnIndexChange,c=Object(Ve.a)(e,["children","focusOnMount","__experimentalInitialIndex","__experimentalOnIndexChange"]),a=Object(l.useRef)(),u=function(e){var t=Object(l.useState)(!0),n=Object(se.a)(t,2),r=n[0],o=n[1],c=Object(l.useCallback)((function(){var t=!mo.focus.tabbable.find(e.current).some((function(e){return!("toolbarItem"in e.dataset)}));t||Ju()("Using custom components as toolbar controls",{alternative:"ToolbarItem or ToolbarButton components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),o(t)}),[]);return Object(l.useLayoutEffect)((function(){var t=new window.MutationObserver(c);return t.observe(e.current,{childList:!0,subtree:!0}),function(){return t.disconnect()}}),[r]),r}(a);return function(e,t,n,r,o){var c=Object(l.useState)(t),i=Object(se.a)(c,1)[0],a=Object(l.useState)(r),u=Object(se.a)(a,1)[0],s=Object(l.useCallback)((function(){var t,n,r;t=e.current,n=mo.focus.tabbable.find(t),(r=Object(se.a)(n,1)[0])&&r.focus()}),[]);Object(lo.useShortcut)("core/block-editor/focus-toolbar",s,{bindGlobal:!0,eventName:"keydown"}),Object(l.useEffect)((function(){i&&s()}),[n,i,s]),Object(l.useEffect)((function(){var t=0;return u&&!i&&(t=window.requestAnimationFrame((function(){var t,n=es(e.current),r=u||0;n[r]&&(t=e.current).contains(t.ownerDocument.activeElement)&&n[r].focus()}))),function(){if(window.cancelAnimationFrame(t),o){var n=es(e.current).findIndex((function(e){return 0===e.tabIndex}));o(n)}}}),[u,i])}(a,n,u,r,o),u?Object(l.createElement)(v.Toolbar,Object(i.a)({label:c["aria-label"],ref:a},c),t):Object(l.createElement)(v.NavigableMenu,Object(i.a)({orientation:"horizontal",role:"toolbar",ref:a},c),t)},ns=function(e){var t,n,r,o,c=e.children,i=e.clientIds,a=e.cloneClassname,u=e.onDragStart,s=e.onDragEnd,d=e.elementId,b=Object(m.useSelect)((function(e){var t,n=e("core/block-editor"),r=n.getBlockRootClientId,o=n.getTemplateLock,c=n.getBlockName,a=r(i[0]),l=a?o(a):null,u=c(i[0]);return{srcRootClientId:a,isDraggable:"all"!==l,icon:null===(t=Object(p.getBlockType)(u))||void 0===t?void 0:t.icon}}),[i]),f=b.srcRootClientId,O=b.isDraggable,g=b.icon,h=Object(l.useRef)(!1),j=(t=Object(l.useRef)(null),n=Object(l.useRef)(null),r=Object(l.useRef)(null),o=Object(l.useRef)(null),Object(l.useEffect)((function(){return function(){o.current&&(clearInterval(o.current),o.current=null)}}),[]),[Object(l.useCallback)((function(e){t.current=e.clientY,r.current=Object(mo.getScrollContainer)(e.target),o.current=setInterval((function(){if(r.current&&n.current){var e=r.current.scrollTop+n.current;r.current.scroll({top:e})}}),25)}),[]),Object(l.useCallback)((function(e){if(r.current){var o=r.current.offsetHeight,c=t.current-r.current.offsetTop,i=e.clientY-r.current.offsetTop;if(e.clientY>c){var a=Math.max(o-c-50,0),l=Math.max(i-c-50,0)/a;n.current=25*l}else if(e.clientY<c){var u=Math.max(c-50,0),s=Math.max(c-i-50,0)/u;n.current=-25*s}else n.current=0}}),[]),function(){t.current=null,r.current=null,o.current&&(clearInterval(o.current),o.current=null)}]),k=Object(se.a)(j,3),y=k[0],_=k[1],E=k[2],w=Object(m.useDispatch)("core/block-editor"),C=w.startDraggingBlocks,S=w.stopDraggingBlocks;if(Object(l.useEffect)((function(){return function(){h.current&&S()}}),[]),!O)return c({isDraggable:!1});var I={type:"block",srcClientIds:i,srcRootClientId:f};return Object(l.createElement)(v.Draggable,{cloneClassname:a,elementId:d,transferData:I,onDragStart:function(e){C(i),h.current=!0,y(e),u&&u()},onDragOver:_,onDragEnd:function(){S(),h.current=!1,E(),s&&s()},__experimentalDragComponent:Object(l.createElement)($l,{count:i.length,icon:g})},(function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return c({draggable:!0,onDragStart:t,onDragEnd:n})}))},rs=Object(m.withSelect)((function(e,t){var n,r=t.clientIds,o=e("core/block-editor"),c=o.getBlock,i=o.getBlockIndex,a=o.getBlockListSettings,l=o.getTemplateLock,u=o.getBlockOrder,s=o.getBlockRootClientId,b=Object(d.castArray)(r),f=Object(d.first)(b),m=c(f),v=s(Object(d.first)(b)),O=i(f,v),g=0===O,h=i(Object(d.last)(b),v)===u(v).length-1;return{blockType:m?Object(p.getBlockType)(m.name):null,isLocked:"all"===l(v),rootClientId:v,firstIndex:O,isFirst:g,isLast:h,orientation:null===(n=a(v))||void 0===n?void 0:n.orientation}}))((function(e){var t=e.isFirst,n=e.isLast,r=e.clientIds,o=e.isLocked,c=e.isHidden,a=e.rootClientId,u=e.orientation,d=e.hideDragHandle,b=Object(l.useState)(!1),f=Object(se.a)(b,2),p=f[0],m=f[1],O=function(){return m(!0)},g=function(){return m(!1)};if(o||t&&n&&!a)return null;var h=1===r.length?Object(C.__)("Drag block"):Object(C.__)("Drag blocks");return Object(l.createElement)("div",{className:s()("block-editor-block-mover",{"is-visible":p||!c,"is-horizontal":"horizontal"===u})},!d&&Object(l.createElement)(ns,{clientIds:r,cloneClassname:"block-editor-block-mover__drag-clone"},(function(e){return Object(l.createElement)(v.Button,Object(i.a)({icon:ql,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:h,tabIndex:"-1"},e))})),Object(l.createElement)(v.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},Object(l.createElement)(v.ToolbarItem,{onFocus:O,onBlur:g},(function(e){return Object(l.createElement)(Io,Object(i.a)({clientIds:r},e))})),Object(l.createElement)(v.ToolbarItem,{onFocus:O,onBlur:g},(function(e){return Object(l.createElement)(Bo,Object(i.a)({clientIds:r},e))}))))}));function os(){var e=Object(m.useDispatch)("core/block-editor").selectBlock,t=Object(m.useSelect)((function(e){var t=e("core/block-editor"),r=t.getBlockName,o=t.getBlockParents,c=t.getSelectedBlockClientId,i=e(p.store).hasBlockSupport,a=o(c()),l=a[a.length-1],u=r(l);return{parentBlockType:Object(p.getBlockType)(u),firstParentClientId:l,shouldHide:!i(n,"__experimentalParentSelector",!0)}}),[]),n=t.parentBlockType,r=t.firstParentClientId;return t.shouldHide?null:void 0!==r?Object(l.createElement)("div",{className:"block-editor-block-parent-selector",key:r},Object(l.createElement)(v.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:function(){return e(r)},label:Object(C.sprintf)(
|
47 |
/* translators: %s: Name of the block's parent. */
|
48 |
-
Object(C.__)("Select parent (%s)"),n.title),showTooltip:!0,icon:Object(l.createElement)(Lr,{icon:n.icon})})):null}var
|
49 |
/* translators: %s: number of blocks. */
|
50 |
-
Object(C._n)("Change type of %d block","Change type of %d blocks",
|
51 |
Object(C.__)('Copied "%s" to clipboard.'),a):Object(C.sprintf)(// Translators: Name of the block being cut, e.g. "Paragraph".
|
52 |
Object(C.__)('Moved "%s" to clipboard.'),a)}else c="copy"===r?Object(C.sprintf)(// Translators: %d: Number of blocks being copied.
|
53 |
Object(C._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):Object(C.sprintf)(// Translators: %d: Number of blocks being cut.
|
54 |
-
Object(C._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(c,{type:"snackbar"})}),[])}function hs(e){var t=Object(m.useSelect)((function(e){return e("core/block-editor")}),[]),n=t.getBlocksByClientId,r=t.getSelectedBlockClientIds,o=t.hasMultiSelection,c=t.getSettings,i=Object(m.useDispatch)("core/block-editor"),a=i.flashBlock,u=i.removeBlocks,s=i.replaceBlocks,d=gs();Object(l.useEffect)((function(){function t(t){var i=r();if(0!==i.length){if(!o()){var l=t.target.ownerDocument;if("copy"===t.type||"cut"===t.type?Object(mo.documentHasUncollapsedSelection)(l):Object(mo.documentHasSelection)(l))return}if(e.current.contains(t.target)){if(t.preventDefault(),"copy"===t.type||"cut"===t.type){1===i.length&&a(i[0]),d(t.type,i);var b=n(i),f=Object(p.serialize)(b);t.clipboardData.setData("text/plain",f),t.clipboardData.setData("text/html",f)}if("cut"===t.type)u(i);else if("paste"===t.type){var m=c().__experimentalCanUserUseUnfilteredHTML,v=function(e){var t=e.clipboardData,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}var o=Object(mo.getFilesFromDataTransfer)(t).filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)}));return o.length&&!r&&(r=o.map((function(e){return'<img src="'.concat(Object(Os.createBlobURL)(e),'">')})).join(""),n=""),{html:r,plainText:n}}(t),O=v.plainText,g=v.html,h=Object(p.pasteHandler)({HTML:g,plainText:O,mode:"BLOCKS",canUserUseUnfilteredHTML:m});s(i,h,h.length-1,-1)}}}}return e.current.addEventListener("copy",t),e.current.addEventListener("cut",t),e.current.addEventListener("paste",t),function(){e.current.removeEventListener("copy",t),e.current.removeEventListener("cut",t),e.current.removeEventListener("paste",t)}}),[])}var js=function(e){var t=e.children,n=Object(l.useRef)();return hs(n),Object(l.createElement)("div",{ref:n},t)};function ks(e){var t=e.clientIds,n=e.children,r=e.__experimentalUpdateSelection,o=Object(m.useSelect)((function(e){return e("core/block-editor")}),[]),c=o.canInsertBlockType,i=o.getBlockRootClientId,a=o.getBlocksByClientId,l=o.getTemplateLock,u=Object(m.useSelect)((function(e){return e(p.store)}),[]),s=u.getDefaultBlockName,b=u.getGroupingBlockName,f=a(t),v=i(t[0]),O=Object(d.every)(f,(function(e){return!!e&&Object(p.hasBlockSupport)(e.name,"multiple",!0)&&c(e.name,v)})),g=c(s(),v),h=Object(m.useDispatch)("core/block-editor"),j=h.removeBlocks,k=h.replaceBlocks,y=h.duplicateBlocks,_=h.insertAfterBlock,E=h.insertBeforeBlock,w=h.flashBlock,C=h.setBlockMovingClientId,S=h.setNavigationMode,I=h.selectBlock,B=gs();return n({canDuplicate:O,canInsertDefaultBlock:g,isLocked:!!l(v),rootClientId:v,blocks:f,onDuplicate:function(){return y(t,r)},onRemove:function(){return j(t,r)},onInsertBefore:function(){E(Object(d.first)(Object(d.castArray)(t)))},onInsertAfter:function(){_(Object(d.last)(Object(d.castArray)(t)))},onMoveTo:function(){S(!0),I(t[0]),C(t[0])},onGroup:function(){if(f.length){var e=b(),n=Object(p.switchToBlockType)(f,e);n&&k(t,n)}},onUngroup:function(){if(f.length){var e=f[0].innerBlocks;e.length&&k(t,e)}},onCopy:function(){var e=f.map((function(e){return e.clientId}));1===f.length&&w(e[0]),B("copy",e)}})}var ys=Object(b.compose)([Object(m.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor"),o=r.getBlock,c=r.getBlockMode,i=r.getSettings,a=o(n),l=i().codeEditingEnabled;return{mode:c(n),blockType:a?Object(p.getBlockType)(a.name):null,isCodeEditingEnabled:l}})),Object(m.withDispatch)((function(e,t){var n=t.onToggle,r=void 0===n?d.noop:n,o=t.clientId;return{onToggleMode:function(){e("core/block-editor").toggleBlockMode(o),r()}}}))])((function(e){var t=e.blockType,n=e.mode,r=e.onToggleMode,o=e.small,c=void 0!==o&&o,i=e.isCodeEditingEnabled,a=void 0===i||i;if(!Object(p.hasBlockSupport)(t,"html",!0)||!a)return null;var u="visual"===n?Object(C.__)("Edit as HTML"):Object(C.__)("Edit visually");return Object(l.createElement)(v.MenuItem,{onClick:r},!c&&u)})),_s=Object(b.compose)(Object(m.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor").getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),Object(m.withDispatch)((function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Object(p.rawHandler)({HTML:Object(p.getBlockContent)(n)}))}}})))((function(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(C.__)("Convert to Blocks");return Object(l.createElement)(v.MenuItem,{onClick:n},!r&&o)})),Es=Object(v.createSlotFill)("__experimentalBlockSettingsMenuFirstItem"),ws=Es.Fill,Cs=Es.Slot;ws.Slot=Cs;var Ss=ws;function Is(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 Bs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Is(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Is(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xs=Object(v.createSlotFill)("BlockSettingsMenuControls"),Ps=xs.Fill,Ts=xs.Slot;Ps.Slot=function(e){var t=e.fillProps,n=e.clientIds,r=void 0===n?null:n,o=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlocksByClientId,o=t.getSelectedBlockClientIds,c=null!==r?r:o();return Object(d.map)(Object(d.compact)(n(c)),(function(e){return e.name}))}),[r]);return Object(l.createElement)(Ts,{fillProps:Bs(Bs({},t),{},{selectedBlocks:o})},(function(e){return!Object(d.isEmpty)(e)&&Object(l.createElement)(v.MenuGroup,null,e)}))};var Ns=Ps,Ds={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0},As=function(e){var t=e.clientIds,n=e.__experimentalSelectBlock,r=e.children,o=Object(Ve.a)(e,["clientIds","__experimentalSelectBlock","children"]),c=Object(d.castArray)(t),a=c.length,u=c[0],s=Object(m.useSelect)((function(e){var t=e(lo.store).getShortcutRepresentation;return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),b=Object(l.useCallback)(n?function(){var e=Object(bo.a)(so.a.mark((function e(t){var r;return so.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:(r=e.sent)&&r[0]&&n(r[0]);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}():d.noop,[n]),f=1===a?Object(C.__)("Remove block"):Object(C.__)("Remove blocks");return Object(l.createElement)(ks,{clientIds:t,__experimentalUpdateSelection:!n},(function(e){var n=e.canDuplicate,c=e.canInsertDefaultBlock,m=e.isLocked,O=e.onDuplicate,g=e.onInsertAfter,h=e.onInsertBefore,j=e.onRemove,k=e.onCopy,y=e.onMoveTo,_=e.blocks;return Object(l.createElement)(v.DropdownMenu,Object(i.a)({icon:fo.a,label:Object(C.__)("More options"),className:"block-editor-block-settings-menu",popoverProps:Ds,noIcons:!0},o),(function(e){var o=e.onClose;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(Ss.Slot,{fillProps:{onClose:o}}),1===a&&Object(l.createElement)(_s,{clientId:u}),Object(l.createElement)(v.ClipboardButton,{text:function(){return Object(p.serialize)(_)},role:"menuitem",className:"components-menu-item__button",onCopy:k},Object(C.__)("Copy")),n&&Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,O,b),shortcut:s.duplicate},Object(C.__)("Duplicate")),c&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,h),shortcut:s.insertBefore},Object(C.__)("Insert Before")),Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,g),shortcut:s.insertAfter},Object(C.__)("Insert After"))),!m&&Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,y)},Object(C.__)("Move To")),1===a&&Object(l.createElement)(ys,{clientId:u,onToggle:o})),Object(l.createElement)(Ns.Slot,{fillProps:{onClose:o},clientIds:t}),"function"==typeof r?r({onClose:o}):l.Children.map((function(e){return Object(l.cloneElement)(e,{onClose:o})})),Object(l.createElement)(v.MenuGroup,null,!m&&Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,j,b),shortcut:s.remove},f)))}))}))},Rs=function(e){var t=e.clientIds,n=Object(Ve.a)(e,["clientIds"]);return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarItem,null,(function(e){return Object(l.createElement)(As,Object(i.a)({clientIds:t,toggleProps:e},n))})))},Ls=window,Ms=Ls.clearTimeout,Fs=Ls.setTimeout;function Vs(e){var t=e.ref,n=e.isFocused,r=e.debounceTimeout,o=void 0===r?200:r,c=e.onChange,i=void 0===c?d.noop:c,a=Object(l.useState)(!1),u=Object(se.a)(a,2),s=u[0],b=u[1],f=Object(l.useRef)(),p=function(e){null!=t&&t.current&&b(e),i(e)},m=function(){var e=f.current;e&&Ms&&Ms(e)};return Object(l.useEffect)((function(){return function(){return m()}}),[]),{showMovers:s,debouncedShowMovers:function(e){e&&e.stopPropagation(),m(),s||p(!0)},debouncedHideMovers:function(e){e&&e.stopPropagation(),m(),f.current=Fs((function(){var e;e=(null==t?void 0:t.current)&&t.current.matches(":hover"),!n&&!e&&p(!1)}),o)}}}function Hs(e){var t=e.hideDragHandle,n=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getBlockMode,o=t.getSelectedBlockClientIds,c=t.isBlockValid,i=t.getBlockRootClientId,a=t.getSettings,l=o(),u=l[0],s=i(u),d=a();return{blockClientIds:l,blockClientId:u,blockType:u&&Object(p.getBlockType)(n(u)),hasFixedToolbar:d.hasFixedToolbar,hasReducedUI:d.hasReducedUI,rootClientId:s,isValid:l.every((function(e){return c(e)})),isVisual:l.every((function(e){return"visual"===r(e)}))}}),[]),r=n.blockClientIds,o=n.blockClientId,c=n.blockType,a=n.hasFixedToolbar,u=n.hasReducedUI,f=n.isValid,O=n.isVisual,g=Object(m.useDispatch)("core/block-editor").toggleBlockHighlight,h=Object(l.useRef)(),j=function(e){var t=e.ref,n=e.debounceTimeout,r=void 0===n?200:n,o=e.onChange,c=void 0===o?d.noop:o,i=Object(l.useState)(!1),a=Object(se.a)(i,2),u=a[0],s=a[1],b=Vs({ref:t,debounceTimeout:r,isFocused:u,onChange:c}),f=b.showMovers,p=b.debouncedShowMovers,m=b.debouncedHideMovers,v=Object(l.useRef)(!1),O=function(){return(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement)};return Object(l.useEffect)((function(){var e=t.current,n=function(){O()&&(s(!0),p())},r=function(){O()||(s(!1),m())};return e&&!v.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),v.current=!0),function(){e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,v,s,p,m]),{showMovers:f,gestures:{onMouseMove:p,onMouseLeave:m}}}({ref:h,onChange:function(e){e&&u||g(o,e)}}),k=j.showMovers,y=j.gestures,_=Object(b.useViewportMatch)("medium","<")||a;if(c&&!Object(p.hasBlockSupport)(c,"__experimentalToolbar",!0))return null;var E=_||k;if(0===r.length)return null;var C=f&&O,S=r.length>1,I=s()("block-editor-block-toolbar",E&&"is-showing-movers");return Object(l.createElement)("div",{className:I},Object(l.createElement)("div",Object(i.a)({ref:h},y),!S&&Object(l.createElement)("div",{className:"block-editor-block-toolbar__block-parent-selector-wrapper"},Object(l.createElement)(os,{clientIds:r})),(C||S)&&Object(l.createElement)(v.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},Object(l.createElement)(vs,{clientIds:r}),Object(l.createElement)(rs,{clientIds:r,hideDragHandle:t||u}))),C&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(w.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"}),Object(l.createElement)(ao.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"})),Object(l.createElement)(Rs,{clientIds:r}))}var zs=function(e){var t=e.focusOnMount,n=Object(Ve.a)(e,["focusOnMount"]),r=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getSelectedBlockClientIds,o=e(p.store).getBlockType,c=r()[0];return{blockType:c&&o(n(c))}}),[]).blockType;return r&&!Object(p.hasBlockSupport)(r,"__experimentalToolbar",!0)?null:Object(l.createElement)("div",{className:"block-editor-block-contextual-toolbar-wrapper"},Object(l.createElement)(ts,Object(i.a)({focusOnMount:t,className:"block-editor-block-contextual-toolbar"
|
55 |
-
/* translators: accessibility text for the block toolbar */,"aria-label":Object(C.__)("Block tools")},n),Object(l.createElement)(Hs,null)))};function Gs(e){var t=e("core/block-editor"),n=t.isNavigationMode,r=t.isMultiSelecting,o=t.hasMultiSelection,c=t.isTyping,i=t.isCaretWithinFormattedText,a=t.getSettings,l=t.getLastMultiSelectedBlockClientId;return{isNavigationMode:n(),isMultiSelecting:r(),isTyping:c(),isCaretWithinFormattedText:i(),hasMultiSelection:o(),hasFixedToolbar:a().hasFixedToolbar,lastClientId:l()}}function Us(e){var t=e.clientId,n=e.rootClientId,r=e.isValid,o=e.isEmptyDefaultBlock,c=e.capturingClientId,i=Object(m.useSelect)(Gs,[]),a=i.isNavigationMode,u=i.isMultiSelecting,d=i.isTyping,f=i.isCaretWithinFormattedText,p=i.hasMultiSelection,O=i.hasFixedToolbar,g=i.lastClientId,h=Object(b.useViewportMatch)("medium"),j=Object(l.useState)(!1),k=Object(se.a)(j,2),y=k[0],_=k[1],E=Object(l.useState)(!1),w=Object(se.a)(E,2),C=w[0],S=w[1],I=Object(l.useContext)(qs),B=!d&&!a&&o&&r,x=a,P=!a&&!O&&h&&!B&&!u&&(!d||f),T=!(a||P||O||o);Object(lo.useShortcut)("core/block-editor/focus-toolbar",Object(l.useCallback)((function(){_(!0)}),[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!T});var N=Object(l.useRef)();if(Object(l.useEffect)((function(){N.current=void 0}),[t]),!(x||P||y||B))return null;var D=I[t];if(!D)return null;var A=D.ownerDocument;c&&(D=lt(c,A));var R=D;if(p){var L=I[g];if(!L)return null;R={top:D,bottom:L}}var M=B?"top left right":"top right left",F=B?void 0:Object(mo.getScrollContainer)(D)||A.body;return Object(l.createElement)(v.Popover,{noArrow:!0,animate:!1,position:M,focusOnMount:!1,anchorRef:R,className:"block-editor-block-list__block-popover",__unstableStickyBoundaryElement:F,__unstableSlotName:"block-toolbar",__unstableBoundaryParent:!0,__unstableObserveElement:D,onFocusOutside:function(){_(!1)},shouldAnchorIncludePadding:!0},(P||y)&&Object(l.createElement)("div",{onFocus:function(){S(!0)},onBlur:function(){S(!1)},tabIndex:-1,className:s()("block-editor-block-list__block-popover-inserter",{"is-visible":C})},Object(l.createElement)(Iu,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(P||y)&&Object(l.createElement)(zs,{focusOnMount:y,__experimentalInitialIndex:N.current,__experimentalOnIndexChange:function(e){N.current=e}}),x&&Object(l.createElement)(Qu,{clientId:t,rootClientId:n,blockElement:D}),B&&Object(l.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},Object(l.createElement)(Iu,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function Ks(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getFirstMultiSelectedBlockClientId,o=t.getBlockRootClientId,c=t.__unstableGetBlockWithoutInnerBlocks,i=t.getBlockParents,a=t.__experimentalGetBlockListSettingsForBlocks,l=n()||r();if(l){var u,s=c(l)||{},b=s.name,f=s.attributes,m=void 0===f?{}:f,v=s.isValid,O=i(l),g=a(O),h=Object(d.findIndex)(g,["__experimentalCaptureToolbars",!0]);return-1!==h&&(u=O[h]),{clientId:l,rootClientId:o(l),name:b,isValid:v,isEmptyDefaultBlock:b&&Object(p.isUnmodifiedDefaultBlock)({name:b,attributes:m}),capturingClientId:u}}}function Ws(){var e=Object(m.useSelect)(Ks,[]);if(!e)return null;var t=e.clientId,n=e.rootClientId,r=e.name,o=e.isValid,c=e.isEmptyDefaultBlock,i=e.capturingClientId;return r?Object(l.createElement)(Us,{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:c,capturingClientId:i}):null}var qs=Object(l.createContext)(),$s=Object(l.createContext)();function Ys(e){var t=e.className,n=Object(l.useRef)(),r=Object(l.useState)({}),o=Object(se.a)(r,2),c=o[0],i=o[1],a=function(e){var t=Object(l.useState)(!1),n=Object(se.a)(t,2),r=n[0],o=n[1],c=Object(l.useState)(!1),i=Object(se.a)(c,2),a=i[0],u=i[1],s=Object(l.useState)(null),d=Object(se.a)(s,2),b=d[0],f=d[1],p=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.isMultiSelecting,r=t.isBlockInsertionPointVisible,o=t.getBlockInsertionPoint,c=t.getBlockOrder,i=o(),a=c(i.rootClientId);return{isMultiSelecting:n(),isInserterVisible:r(),selectedClientId:a[i.index],selectedRootClientId:i.rootClientId}}),[]),v=p.isMultiSelecting,O=p.isInserterVisible,g=p.selectedClientId,h=p.selectedRootClientId,j=Object(l.useCallback)((function(e){if(e.target.classList.contains("block-editor-block-list__layout")){var t=e.target.getBoundingClientRect(),n=e.clientY-t.top,c=Array.from(e.target.children).find((function(e){return e.offsetTop>n}));if(c&&(c.id||(c=c.firstElementChild))){var i=c.id.slice("block-".length);if(i){var a=c.getBoundingClientRect();e.clientX>a.right||e.clientX<a.left?r&&o(!1):(o(!0),f(i))}}}else r&&o(!1)}),[r,o,f]),k=!a&&!v;return Object(l.useEffect)((function(){if(k)return e.current.addEventListener("mousemove",j),function(){e.current.removeEventListener("mousemove",j)}}),[k,j]),!v&&(r||a||O)&&Object(l.createElement)(Yu,{clientId:O?g:b,rootClientId:h,isInserterShown:r,isInserterForced:a,setIsInserterForced:u,containerRef:e,showInsertionPoint:O})}(n);return Object(l.createElement)(qs.Provider,{value:c},a,Object(l.createElement)(Ws,null),Object(l.createElement)("div",{ref:n,className:s()("block-editor-block-list__layout is-root-container",t)},Object(l.createElement)($s.Provider,{value:i},Object(l.createElement)(Qs,{wrapperRef:n}))))}function Xs(e){var t=e.placeholder,n=e.rootClientId,r=e.renderAppender,o=e.__experimentalAppenderTagName,c=e.wrapperRef,i=Object(m.useSelect)((function(e){var t,r=e("core/block-editor"),o=r.getBlockOrder,c=r.getBlockListSettings,i=r.getSettings,a=r.getSelectedBlockClientId,l=r.getMultiSelectedBlockClientIds,u=r.hasMultiSelection,s=r.getGlobalBlockCount,d=r.isTyping,b=(0,r.__experimentalGetActiveBlockIdByBlockNames)(i().__experimentalSpotlightEntityBlocks);return{blockClientIds:o(n),selectedBlockClientId:a(),multiSelectedBlockClientIds:l(),orientation:null===(t=c(n))||void 0===t?void 0:t.orientation,hasMultiSelection:u(),enableAnimation:!d()&&s()<=200,activeEntityBlockId:b}}),[n]),u=i.blockClientIds,d=i.selectedBlockClientId,b=i.multiSelectedBlockClientIds,f=i.orientation,p=i.hasMultiSelection,O=i.enableAnimation,g=i.activeEntityBlockId,h=function(e){var t=e.element,n=e.rootClientId,r=void 0===n?"":n,o=Object(l.useState)(null),c=Object(se.a)(o,2),i=c[0],u=c[1],s=Object(m.useSelect)((function(e){var t,n=e("core/block-editor"),o=n.getBlockListSettings;return{isLockedAll:"all"===(0,n.getTemplateLock)(r),orientation:null===(t=o(r))||void 0===t?void 0:t.orientation}}),[r]),d=s.isLockedAll,b=s.orientation,f=Ru(r,i),p=Object(v.__unstableUseDropZone)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fu(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({element:t,isDisabled:d,withPosition:!0},f)).position;if(Object(l.useEffect)((function(){if(p){var e=function(e,t,n){var r,o,c="horizontal"===n?["left","right"]:["top","bottom"];return e.forEach((function(n,i){if(n.classList.contains("wp-block")){var a=n.getBoundingClientRect(),l=Mu(t,a,c),u=Object(se.a)(l,2),s=u[0],d=u[1];if(void 0===o||s<o){var b="bottom"===d||"right"===d,f=b?1:0,p=b&&e[i+1]&&e[i+1].classList.contains("is-dragging");o=s,r=i+(f+=p?1:0)}}})),r}(Array.from(t.current.children),p,b);u(void 0===e?0:e)}}),[p]),p)return i}({element:c,rootClientId:n}),j=h===u.length;return Object(l.createElement)(l.Fragment,null,u.map((function(e,t){var r=p?b.includes(e):d===e,o=h===t;return Object(l.createElement)(m.AsyncModeProvider,{key:e,value:!r},Object(l.createElement)(dd,{rootClientId:n,clientId:e,index:t,enableAnimation:O,className:s()({"is-drop-target":o,"is-dropping-horizontally":o&&"horizontal"===f,"has-active-entity":g}),activeEntityBlockId:g}))})),u.length<1&&t,Object(l.createElement)(Tu,{tagName:o,rootClientId:n,renderAppender:r,className:s()({"is-drop-target":j,"is-dropping-horizontally":j&&"horizontal"===f})}))}function Qs(e){return Object(l.createElement)(m.AsyncModeProvider,{value:!1},Object(l.createElement)(Xs,e))}function Zs(e,t){var n=function(e){return Object(m.useSelect)((function(t){var n=t("core/block-editor"),r=n.getSelectedBlocksInitialCaretPosition,o=n.isMultiSelecting,c=n.isNavigationMode;if((0,n.isBlockSelected)(e)&&!o()&&!c())return r()||0}),[e])}(t);Object(l.useEffect)((function(){if(void 0!==n){var t=e.current.ownerDocument;if(!t.activeElement||!ut(e.current,t.activeElement)){var r=mo.focus.tabbable.find(e.current).filter((function(t){return Object(mo.isTextField)(t)&&ut(e.current,t)&&!t.closest(".block-list-appender")})),o=-1===n,c=(o?d.last:d.first)(r)||e.current;Object(mo.placeCaretAtHorizontalEdge)(c,o)}}}),[n])}function Js(e){var t=Object(l.useState)(!1),n=Object(se.a)(t,2),r=n[0],o=n[1],c=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.isNavigationMode,r=t.getSettings;return{isNavigationMode:n(),isOutlineMode:r().outlineMode}}),[]),i=c.isNavigationMode,a=c.isOutlineMode;return Object(l.useEffect)((function(){function t(t,n){function r(e){e.defaultPrevented||(e.preventDefault(),o(n))}return e.current.addEventListener(t,r),function(){e.current.removeEventListener(t,r)}}return r?t("mouseout",!1):a||i?t("mouseover",!0):void 0}),[i,a,r,o]),r}function ed(e){return Object(m.useSelect)((function(t){var n=t("core/block-editor"),r=n.hasBlockMovingClientId,o=n.canInsertBlockType,c=n.getBlockName,i=n.getBlockRootClientId;if((0,n.isBlockSelected)(e)){var a=r();if(a)return s()("is-block-moving-mode",{"can-insert-moving-block":o(c(a),i(e))})}}),[e])}function td(e,t){var n=Object(l.useContext)(Uu),r=Object(m.useSelect)((function(e){var n=e("core/block-editor"),r=n.isBlockSelected,o=n.getBlockRootClientId,c=n.getBlockIndex;return{isSelected:r(t),rootClientId:o(t),index:c(t)}}),[t]),o=r.isSelected,c=r.rootClientId,i=r.index,a=Object(m.useDispatch)("core/block-editor"),u=a.insertDefaultBlock,s=a.removeBlock,d=a.selectBlock;Object(l.useEffect)((function(){if(!o){function r(n){ut(e.current,n.target)&&d(t)}return e.current.addEventListener("focusin",r),function(){e.current.removeEventListener("focusin",r)}}function a(n){var r=n.keyCode,o=n.target;r!==zt.ENTER&&r!==zt.BACKSPACE&&r!==zt.DELETE||o!==e.current||Object(mo.isTextField)(o)||(n.preventDefault(),r===zt.ENTER?u({},c,i+1):s(t))}function l(e){1===e.buttons&&n(t)}function b(e){e.preventDefault()}return e.current.addEventListener("keydown",a),e.current.addEventListener("mouseleave",l),e.current.addEventListener("dragstart",b),function(){e.current.removeEventListener("mouseleave",l),e.current.removeEventListener("keydown",a),e.current.removeEventListener("dragstart",b)}}),[o,c,i,n,u,s,d])}function nd(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 rd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function od(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.__unstableIsHtml,r=Object(l.useRef)(),o=e.ref||r,c=Object(l.useContext)($s),i=Object(l.useContext)(ad),u=i.clientId,b=i.isSelected,f=i.isFirstMultiSelected,p=i.isLastMultiSelected,m=i.isPartOfMultiSelection,v=i.enableAnimation,O=i.index,g=i.className,h=i.name,j=i.mode,k=i.blockTitle,y=i.wrapperProps,_=void 0===y?{}:y;Object(l.useEffect)((function(){if(b||f||p){var e=o.current;return c((function(t){return rd(rd({},t),{},Object(a.a)({},u,e))})),function(){c((function(e){return Object(d.omit)(e,u)}))}}}),[b,f,p]),Object(l.useEffect)((function(){var e=o.current;c((function(t){return t[u]&&t[u]!==e?rd(rd({},t),{},Object(a.a)({},u,e)):t}))}));// translators: %s: Type of block (i.e. Text, Image etc)
|
56 |
-
var E=Object(C.sprintf)(Object(C.__)("Block: %s"),k);
|
57 |
/* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
|
58 |
-
Object(C.__)("Block %1$d of %2$d, Level %3$d"),e,t,n)},
|
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(C.__)("Add block at position %1$d, Level %2$d"),n,r);return Object(l.createElement)(
|
61 |
-
/* translators: button label text should, if possible, be under 16 characters. */,label:Object(C.__)("Outline"),className:"block-editor-block-navigation",shortcut:a,"aria-disabled":!t}))}var Td=Object(l.forwardRef)((function(e,t){var n=e.isDisabled,r=e.__experimentalFeatures,o=Object(Ve.a)(e,["isDisabled","__experimentalFeatures"]),c=Object(m.useSelect)((function(e){return!!e("core/block-editor").getBlockCount()}),[])&&!n;return Object(l.createElement)(v.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(l.createElement)(Pd,Object(i.a)({},o,{innerRef:t,isOpen:n,onToggle:r,isEnabled:c}))},renderContent:function(e){var t=e.onClose;return Object(l.createElement)(Bd,{onSelect:t,__experimentalFeatures:r})}})})),Nd=n(129),Dd=[zt.rawShortcut.primary("z"),zt.rawShortcut.primaryShift("z"),zt.rawShortcut.primary("y")],Ad=Object(l.createElement)(v.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(d.fromPairs)(Dd.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),Rd=function(){return Ad};function Ld(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(Os.createBlobURL)(e),'">')})).join("")}var Md={position:"bottom right",isAlternate:!0},Fd=function(){return Object(l.createElement)("div",{className:"block-editor-format-toolbar"},Object(l.createElement)(v.ToolbarGroup,null,["bold","italic","link","text-color"].map((function(e){return Object(l.createElement)(v.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object(l.createElement)(v.Slot,{name:"RichText.ToolbarControls"},(function(e){return 0!==e.length&&Object(l.createElement)(v.ToolbarItem,null,(function(t){return Object(l.createElement)(v.DropdownMenu,{icon:Eo.a,label:Object(C.__)("More rich text controls"),toggleProps:t,controls:Object(d.orderBy)(e.map((function(e){return Object(se.a)(e,1)[0].props})),"title"),popoverProps:Md})}))}))))},Vd=function(e){var t=e.inline,n=e.anchorRef;return t?Object(l.createElement)(v.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar"},Object(l.createElement)(Fd,null)):Object(l.createElement)(ao,null,Object(l.createElement)(Fd,null))};function Hd(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 zd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gd(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function Ud(e){var t=e.allowedFormats,n=e.formattingControls;return e.disableFormats?Ud.EMPTY_ARRAY:t||n?t||(Ju()("wp.blockEditor.RichText formattingControls prop",{alternative:"allowedFormats"}),n.map((function(e){return"core/".concat(e)}))):void 0}Ud.EMPTY_ARRAY=[];var Kd=Object(l.forwardRef)((function e(t,n){var r=t.children,o=t.tagName,a=t.value,u=t.onChange,d=t.isSelected,f=t.multiline,v=t.inlineToolbar,O=t.wrapperClassName,g=t.autocompleters,j=t.onReplace,k=t.placeholder,y=t.keepPlaceholderOnFocus,_=t.allowedFormats,E=t.formattingControls,w=t.withoutInteractiveFormatting,C=t.onRemove,S=t.onMerge,I=t.onSplit,B=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,K=t.tagsToEliminate,W=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(Ve.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(l.useRef)(),ce=n||oe,ie=h(),ae=ie.clientId,le=ie.onCaretVerticalPositionChange,de=ie.isSelected,be=Object(m.useSelect)((function(e){var t,n=e("core/block-editor"),r=n.isCaretWithinFormattedText,o=n.getSelectionStart,c=n.getSelectionEnd,i=n.getSettings,a=n.didAutomaticChange,u=n.__unstableGetBlockWithoutInnerBlocks,s=n.isMultiSelecting,b=n.hasMultiSelection,f=o(),m=c(),v=i().__experimentalUndo;void 0===d?t=f.clientId===ae&&f.attributeKey===P:d&&(t=f.clientId===ae);var O={};if("native"===l.Platform.OS){var g=ae&&u(ae);O={shouldBlurOnUnmount:g&&t&&Object(p.isUnmodifiedDefaultBlock)(g)}}return zd({isCaretWithinFormattedText:r(),selectionStart:t?f.offset:void 0,selectionEnd:t?m.offset:void 0,isSelected:t,didAutomaticChange:a(),disabled:s()||b(),undo:v},O)})),fe=be.isCaretWithinFormattedText,pe=be.selectionStart,me=be.selectionEnd,ve=be.isSelected,Oe=be.didAutomaticChange,ge=be.disabled,he=be.undo,je=be.shouldBlurOnUnmount,ke=Object(m.useDispatch)("core/block-editor"),ye=ke.__unstableMarkLastChangeAsPersistent,_e=ke.enterFormattedText,Ee=ke.exitFormattedText,we=ke.selectionChange,Ce=ke.__unstableMarkAutomaticChange,Se=Gd(f),Ie=Ud({allowedFormats:_,formattingControls:E,disableFormats:A}),Be=!Ie||Ie.length>0,xe=a,Pe=u;Array.isArray(a)&&(xe=p.children.toHTML(a),Pe=function(e){return u(p.children.fromDOM(Object(c.__unstableCreateElement)(document,e).childNodes))});var Te=Object(l.useCallback)((function(e,t){we(ae,P,e,t)}),[ae,P]),Ne=Object(l.useCallback)((function(e){var t=e.value,n=e.isReverse;S&&S(!n),C&&Object(c.isEmpty)(t)&&n&&C(!n)}),[S,C]),De=Object(l.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(j&&I){var n=[],r=Object(c.split)(e),o=Object(se.a)(r,2),i=o[0],a=o[1],l=t.length>0,u=-1;l&&Object(c.isEmpty)(i)||(n.push(I(Object(c.toHTMLString)({value:i,multilineTag:Se}))),u+=1),l?(n.push.apply(n,Object(ue.a)(t)),u+=t.length):x&&n.push(x()),(l||x)&&Object(c.isEmpty)(a)||n.push(I(Object(c.toHTMLString)({value:a,multilineTag:Se})));var s=l?u:1,d=l?-1:null;j(n,s,d)}}),[j,I,Se,x]),Ae=Object(l.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.shiftKey,o=j&&I;if(j){var i=Object(p.getBlockTransforms)("from").filter((function(e){return"enter"===e.type})),a=Object(p.findTransform)(i,(function(e){return e.regExp.test(t.text)}));a&&(j([a.transform({content:t.text})]),Ce())}if(f)r?R||n(Object(c.insert)(t,"\n")):o&&Object(c.__unstableIsEmptyLine)(t)?De(t):n(Object(c.__unstableInsertLineSeparator)(t));else{var l=t.text,u=t.start,s=t.end,d=B&&u===s&&s===l.length;r||!o&&!d?R||n(Object(c.insert)(t,"\n")):!o&&d?B():o&&De(t)}}),[j,I,Ce,f,De,B]),Re=Object(l.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.html,i=e.plainText,a=e.files,l=e.activeFormats;if(N)n(Object(c.insert)(t,Object(c.create)({text:i})));else{if(a&&a.length&&!r){var u=Object(p.pasteHandler)({HTML:Ld(a),mode:"BLOCKS",tagName:o,preserveWhiteSpace:T});return window.console.log("Received items:\n\n",a),void(j&&Object(c.isEmpty)(t)?j(u):De(t,u))}var s,d=j&&I?"AUTO":"INLINE";"AUTO"===d&&Object(c.isEmpty)(t)&&(s=i,Object(Nd.regexp)(".*").test(s))&&(d="BLOCKS"),D&&Object(c.isEmpty)(t)&&Object(su.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(l.length)for(var v=m.formats.length;v--;)m.formats[v]=[].concat(Object(ue.a)(l),Object(ue.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):De(t,b))}}),[o,j,I,De,D,f,T,N]),Le=Object(l.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})),a=Object(p.findTransform)(i,(function(e){var t=e.prefix;return o===t}));if(a){var l=t(Object(c.slice)(e,n,r.length)),u=a.transform(l);j([u]),Ce()}}}}),[j,Ce]),Me=Object(l.createElement)(c.__experimentalRichText,{clientId:ae,identifier:P,ref:ce,value:xe,onChange:Pe,selectionStart:pe,selectionEnd:me,onSelectionChange:Te,tagName:o,placeholder:k,allowedFormats:Ie,withoutInteractiveFormatting:w,onEnter:Ae,onDelete:Ne,onPaste:Re,__unstableIsSelected:ve,__unstableInputRule:Le,__unstableMultilineTag:Se,__unstableIsCaretWithinFormattedText:fe,__unstableOnEnterFormattedText:_e,__unstableOnExitFormattedText:Ee,__unstableOnCreateUndoLevel:ye,__unstableMarkAutomaticChange:Ce,__unstableDidAutomaticChange:Oe,__unstableUndo:he,__unstableDisableFormats:A,preserveWhiteSpace:T,disabled:ge,unstableOnFocus:L,__unstableAllowPrefixTransformations:M,__unstableMultilineRootTag:F,onCaretVerticalPositionChange:le,blockIsSelected:void 0!==d?d:de,shouldBlurOnUnmount:je,__unstableMobileNoFocusOnMount:V,deleteEnter:H,placeholderTextColor:z,textAlign:G,selectionColor:U,tagsToEliminate:K,rootTagsToEliminate:W,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,a=e.editableProps,u=e.editableTagName;return Object(l.createElement)(l.Fragment,null,r&&r({value:n,onChange:o,onFocus:c}),t&&Be&&Object(l.createElement)(Vd,{inline:v,anchorRef:ce.current}),t&&Object(l.createElement)(Rd,null),Object(l.createElement)(Vr,{onReplace:j,completers:g,record:n,onChange:o,isSelected:t,contentRef:ce},(function(e){var t=e.listBoxId,n=e.activeId,r=e.onKeyDown;return Object(l.createElement)(u,Object(i.a)({},a,ne,{style:ne.style?zd(zd({},ne.style),a.style):a.style,className:s()("block-editor-rich-text__editable",ne.className,a.className,{"keep-placeholder-on-focus":y}),"aria-autocomplete":t?"list":void 0,"aria-owns":t,"aria-activedescendant":n,onKeyDown:function(e){r(e),a.onKeyDown(e)}}))})))}));return O?(Ju()("wp.blockEditor.RichText wrapperClassName prop",{alternative:"className prop or create your own wrapper div"}),Object(l.createElement)("div",{className:s()("block-editor-rich-text",O)},Me)):Me}));Kd.Content=function(e){var t=e.value,n=e.tagName,r=e.multiline,o=Object(Ve.a)(e,["value","tagName","multiline"]);Array.isArray(t)&&(t=p.children.toHTML(t));var c=Gd(r);!t&&c&&(t="<".concat(c,"></").concat(c,">"));var i=Object(l.createElement)(l.RawHTML,null,t);return n?Object(l.createElement)(n,Object(d.omit)(o,["format"]),i):i},Kd.isEmpty=function(e){return!e||0===e.length},Kd.Content.defaultProps={format:"string",value:""};var Wd=Kd;function qd(e){var t=e.value,n=e.onChange;return Object(l.createElement)(gd,null,Object(l.createElement)(Wd,{value:t,onChange:n,placeholder:Object(C.__)("Navigation item"),keepPlaceholderOnFocus:!0,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var $d=n(275),Yd=function(e){var t=e.icon,n=void 0===t?$d.a:t,r=e.label,o=void 0===r?Object(C.__)("Choose variation"):r,c=e.instructions,i=void 0===c?Object(C.__)("Select a variation to start with."):c,a=e.variations,u=e.onSelect,d=e.allowSkip,b=s()("block-editor-block-variation-picker",{"has-many-variations":a.length>4});return Object(l.createElement)(v.Placeholder,{icon:n,label:o,instructions:i,className:b},Object(l.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(C.__)("Block variations")},a.map((function(e){return Object(l.createElement)("li",{key:e.name},Object(l.createElement)(v.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:function(){return u(e)},className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(l.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))}))),d&&Object(l.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(l.createElement)(v.Button,{isLink:!0,onClick:function(){return u()}},Object(C.__)("Skip"))))},Xd=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 Qd(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 Zd=function(e){var t=e.blockClientId,n=Object(l.useState)(),r=Object(se.a)(n,2),o=r[0],c=r[1],i=Object(m.useDispatch)("core/block-editor").updateBlockAttributes,u=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]),s=u.variations,d=u.blockAttributes;if(Object(l.useEffect)((function(){var e;c(null===(e=Xd(d,s))||void 0===e?void 0:e.name)}),[d,s]),null==s||!s.length)return null;var b=s.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?Qd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},s.find((function(t){return t.name===e})).attributes))},O="block-editor-block-variation-transforms";return Object(l.createElement)(v.DropdownMenu,{className:O,label:Object(C.__)("Transform to variation"),text:Object(C.__)("Transform to variation"),popoverProps:{position:"bottom center",className:"".concat(O,"__popover")},icon:Eo.a,toggleProps:{iconPosition:"right"}},(function(){return Object(l.createElement)("div",{className:"".concat(O,"__container")},Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(v.MenuItemsChoice,{choices:b,value:o,onSelect:f})))}))},Jd=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),eb=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"}));function tb(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 nb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var rb={top:{icon:Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(C._x)("Align top","Block vertical alignment setting")},center:{icon:eb,title:Object(C._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Jd,title:Object(C._x)("Align bottom","Block vertical alignment setting")}},ob=["top","center","bottom"],cb={isAlternate:!0},ib=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?ob:r,c=e.isCollapsed,i=void 0===c||c,a=rb[t],u=rb.top;return Object(l.createElement)(v.ToolbarGroup,{popoverProps:cb,isCollapsed:i,icon:a?a.icon:u.icon,label:Object(C._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((function(e){return nb(nb({},rb[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})};function ab(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 lb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ab(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ab(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ub=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=he("color.palette"),r=!he("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(l.createElement)(e,lb(lb({},t),{},{colors:o,disableCustomColors:c,hasColorsToChoose:i}))}}),"withColorContext"),sb=ub(v.ColorPalette);function db(e){var t=e.onChange,n=e.value,r=Object(Ve.a)(e,["onChange","value"]);return Object(l.createElement)(Ye,Object(i.a)({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var bb=[];function fb(e){var t=he("color.gradients")||bb,n=!he("color.customGradient");return Object(l.createElement)(v.__experimentalGradientPicker,Object(i.a)({gradients:void 0!==e.gradients?e.gradient:t,disableCustomGradients:void 0!==e.disableCustomGradients?e.disableCustomGradients:n},e))}var pb=function(e){var t=void 0!==e.gradients&&void 0!==e.disableCustomGradients?v.__experimentalGradientPicker:fb;return Object(l.createElement)(t,e)};function mb(e){var t=e.className,n=e.value,r=e.onChange,o=e.label,c=void 0===o?Object(C.__)("Gradient Presets"):o,a=Object(Ve.a)(e,["className","value","onChange","label"]),u=he("color.gradients"),b=!he("color.customGradient");return Object(d.isEmpty)(u)&&b?null:Object(l.createElement)(v.BaseControl,{className:s()("block-editor-gradient-picker-control",t)},Object(l.createElement)(v.BaseControl.VisualLabel,null,c),Object(l.createElement)(pb,Object(i.a)({value:n,onChange:r,className:"block-editor-gradient-picker-control__gradient-picker-presets",gradients:u,disableCustomGradients:b},a)))}function vb(e){var t=he("color.gradients");return Object(d.isEmpty)(t)?null:Object(l.createElement)(v.PanelBody,{title:Object(C.__)("Gradient")},Object(l.createElement)(mb,e))}var Ob=[25,50,75,100];function gb(e){var t,n,r=e.imageWidth,o=e.imageHeight,c=e.imageSizeOptions,i=void 0===c?[]:c,a=e.isResizable,u=void 0===a||a,s=e.slug,b=e.width,f=e.height,p=e.onChange,m=e.onChangeImage,O=void 0===m?d.noop:m;function g(e,t){return function(){p({width:e,height:t})}}return Object(l.createElement)(l.Fragment,null,!Object(d.isEmpty)(i)&&Object(l.createElement)(v.SelectControl,{label:Object(C.__)("Image size"),value:s,options:i,onChange:O}),u&&Object(l.createElement)("div",{className:"block-editor-image-size-control"},Object(l.createElement)("p",{className:"block-editor-image-size-control__row"},Object(C.__)("Image dimensions")),Object(l.createElement)("div",{className:"block-editor-image-size-control__row"},Object(l.createElement)(v.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:Object(C.__)("Width"),value:null!==(t=null!=b?b:r)&&void 0!==t?t:"",min:1,onChange:function(e){return p({width:parseInt(e,10)})}}),Object(l.createElement)(v.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:Object(C.__)("Height"),value:null!==(n=null!=f?f:o)&&void 0!==n?n:"",min:1,onChange:function(e){return p({height:parseInt(e,10)})}})),Object(l.createElement)("div",{className:"block-editor-image-size-control__row"},Object(l.createElement)(v.ButtonGroup,{"aria-label":Object(C.__)("Image size presets")},Ob.map((function(e){var t=Math.round(r*(e/100)),n=Math.round(o*(e/100)),c=b===t&&f===n;return Object(l.createElement)(v.Button,{key:e,isSmall:!0,isPrimary:c,isPressed:c,onClick:g(t,n)},e,"%")}))),Object(l.createElement)(v.Button,{isSmall:!0,onClick:g()},Object(C.__)("Reset")))))}var hb=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=h().clientId;return Object(l.createElement)(e,Object(i.a)({},t,{clientId:n}))}}),"withClientId"),jb=hb((function(e){var t=e.clientId,n=e.showSeparator,r=e.isFloating,o=e.onAddBlock;return Object(l.createElement)(xu,{rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})})),kb=Object(b.compose)([hb,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(l.createElement)(Bu,{rootClientId:t,lastBlockClientId:n})})),yb=n(79),_b=n.n(yb),Eb=new WeakMap;function wb(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 Cb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sb(e){var t=e.clientId,n=e.allowedBlocks,r=e.template,o=e.templateLock,c=e.wrapperRef,i=e.templateInsertUpdatesSelection,a=e.__experimentalCaptureToolbars,u=e.__experimentalAppenderTagName,s=e.renderAppender,b=e.orientation,f=e.placeholder,v=e.__experimentalLayout,O=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]),a=i.blockListSettings,u=i.parentLock;Object(l.useLayoutEffect)((function(){var i={allowedBlocks:t,templateLock:void 0===n?u:n};void 0!==r&&(i.__experimentalCaptureToolbars=r),void 0!==o&&(i.orientation=o),_b()(a,i)||c(e,i)}),[e,a,t,n,u,r,o,c])}(t,n,o,a,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(l.useRef)(null);Object(l.useLayoutEffect)((function(){if((0===c.length||"all"===n)&&!Object(d.isEqual)(t,i.current)){i.current=t;var a=Object(p.synchronizeBlocksWithTemplate)(c,t);Object(d.isEqual)(a,c)||o(e,a,0===c.length&&r&&0!==a.length)}}),[c,n,e])}(t,r,o,i);var g=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){Eb.has(t)||Eb.set(t,new WeakMap);var n=Eb.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(l.createElement)(A,{value:O},Object(l.createElement)(Yr,{value:g},Object(l.createElement)(Qs,{rootClientId:t,renderAppender:s,__experimentalAppenderTagName:u,wrapperRef:c,placeholder:f})))}function Ib(e){return Al(e),Object(l.createElement)(Sb,e)}var Bb=Object(l.forwardRef)((function(e,t){var n=xb({ref:t},e);return Object(l.createElement)("div",{className:"block-editor-inner-blocks"},Object(l.createElement)("div",n))}));function xb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(l.useRef)(),r=h(),o=r.clientId,c=Object(b.useViewportMatch)("medium","<"),a=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.isBlockSelected,i=t.hasSelectedInnerBlock,a=(0,t.isNavigationMode)()||c;return"core/template"!==n(o)&&!r(o)&&!i(o,!0)&&a}),[o,c]),u=e.ref||n,d=t.value&&t.onChange?Ib:Sb;return Cb(Cb({},e),{},{ref:u,className:s()(e.className,"block-editor-block-list__layout",{"has-overlay":a}),children:Object(l.createElement)(d,Object(i.a)({},t,{clientId:o,wrapperRef:u}))})}Bb.DefaultBlockAppender=kb,Bb.ButtonBlockAppender=jb,Bb.Content=Object(p.withBlockContentContext)((function(e){var t=e.BlockContent;return Object(l.createElement)(t,null)}));var Pb=Bb,Tb=n(203);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(a.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}var Ab=[{id:"opensInNewTab",title:Object(C.__)("Open in new tab")}],Rb=function(e){var t=e.value,n=e.onChange,r=void 0===n?d.noop:n,o=e.settings,c=void 0===o?Ab:o;if(!c||!c.length)return null;var i=function(e){return function(n){r(Db(Db({},t),{},Object(a.a)({},e.id,n)))}},u=c.map((function(e){return Object(l.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(l.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(l.createElement)(v.VisuallyHidden,{as:"legend"},Object(C.__)("Currently selected link settings")),u)},Lb=n(125),Mb=n.n(Lb);var Fb=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(l.createRef)(),t.inputRef=Object(l.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,Mb()(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(su.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(C.sprintf)(
|
62 |
/* translators: %s: number of results. */
|
63 |
-
Object(C._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(C.__)("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
|
64 |
/* translators: %s: search term. */
|
65 |
-
Object(C.__)("Create: <mark>%s</mark>"),n),{mark:Object(l.createElement)("mark",null)}),Object(l.createElement)(v.Button,Object(i.a)({},o,{className:s()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":c}),onClick:r}),Object(l.createElement)(
|
66 |
/* translators: %s: search term. */
|
67 |
-
Object(C.__)('Search results for "%s"'),r),E=Object(l.createElement)(f?l.Fragment:v.VisuallyHidden,{},Object(l.createElement)("span",{className:"block-editor-link-control__search-results-label",id:y},_));return Object(l.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},E,Object(l.createElement)("div",Object(i.a)({},c,{className:O,"aria-labelledby":y}),u.map((function(e,t){return j&&"__CREATE__"===e.type?Object(l.createElement)(Hb,{searchTerm:r,buttonText:p,onClick:function(){return o(e)},key:e.type,itemProps:a(e,t),isSelected:t===d}):"__CREATE__"===e.type?null:Object(l.createElement)(Gb,{key:"".concat(e.id,"-").concat(e.type),itemProps:a(e,t),suggestion:e,index:t,onClick:function(){o(e)},isSelected:t===d,isURL:g.includes(e.type.toLowerCase()),searchTerm:r,shouldShowType:k})}))))}function Kb(e){var t=Object(d.startsWith)(e,"#");return Object(su.isURL)(e)||e&&e.includes("www.")||t}function Wb(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 qb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $b=function(){return Promise.resolve([])},Yb=function(e){var t="URL",n=Object(su.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(su.prependHTTP)(e):e,type:t}])},Xb=function(){var e=Object(bo.a)(so.a.mark((function e(t,n,r,o,c,i){var a,l,u;return so.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.isInitialSuggestions,e.next=3,Promise.all([r(t,n),o(t)]);case 3:if(l=e.sent,u=!t.includes(" "),l=u&&i&&!a?l[0].concat(l[1]):l[0],!a){e.next=8;break}return e.abrupt("return",l);case 8:return e.abrupt("return",Kb(t)||!c?l:l.concat({title:t,url:t,type:"__CREATE__"}));case 9:case"end":return e.stop()}}),e)})));return function(t,n,r,o,c,i){return e.apply(this,arguments)}}();function Qb(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?Qb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Jb=Promise.resolve([]),ef=Object(l.forwardRef)((function(e,t){var n=e.value,r=e.children,o=e.currentLink,c=void 0===o?{}:o,i=e.className,a=void 0===i?null:i,u=e.placeholder,s=void 0===u?null:u,f=e.withCreateSuggestion,p=void 0!==f&&f,v=e.onCreateSuggestion,O=void 0===v?d.noop:v,g=e.onChange,h=void 0===g?d.noop:g,j=e.onSelect,k=void 0===j?d.noop:j,y=e.showSuggestions,_=void 0===y||y,E=e.renderSuggestions,w=void 0===E?function(e){return Object(l.createElement)(Ub,e)}:E,S=e.fetchSuggestions,I=void 0===S?null:S,B=e.allowDirectEntry,x=void 0===B||B,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?Yb:$b;return Object(l.useCallback)((function(t,i){var a=i.isInitialSuggestions;return Kb(t)?c(t,{isInitialSuggestions:a}):Xb(t,qb(qb({},e),{},{isInitialSuggestions:a}),o,c,n,r)}),[c,o,n])}(D,x,p,R),F=_?I||M:Jb,V=Object(b.useInstanceId)(ef),H=Object(l.useState)(),z=Object(se.a)(H,2),G=z[0],U=z[1],K=function(){var e=Object(bo.a)(so.a.mark((function e(t){var n,r;return so.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,O(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(Zb(Zb({},Object(d.omit)(c,"id","url")),n),n);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();return Object(l.createElement)("form",{onSubmit:function(e){e.preventDefault(),K(G||{url:n})}},Object(l.createElement)(Vb,{className:a,value:n,onChange:function(e,t){h(e),U(t)},placeholder:null!=s?s:Object(C.__)("Search or type url"),__experimentalRenderSuggestions:_?function(e){return w(Zb(Zb({},e),{},{instanceId:V,withCreateSuggestion:p,currentInputValue:n,createSuggestionButtonText:L,suggestionsQuery:D,handleSuggestionClick:function(t){e.handleSuggestionClick&&e.handleSuggestionClick(t),K(t)}}))}:null,__experimentalFetchLinkSuggestions:F,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:T,ref:t}),r)})),tf=ef,nf=Object(v.createSlotFill)("BlockEditorLinkControlViewer"),rf=nf.Slot,of=nf.Fill;function cf(e){var t=e.value,n=e.onEditClick,r=t&&Object(su.filterURLForDisplay)(Object(su.safeDecodeURI)(t.url))||"";return Object(l.createElement)("div",{"aria-label":Object(C.__)("Currently selected"),"aria-selected":"true",className:s()("block-editor-link-control__search-item",{"is-current":!0})},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)(v.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},t&&t.title||r),t&&t.title&&Object(l.createElement)("span",{className:"block-editor-link-control__search-item-info"},r)),Object(l.createElement)(v.Button,{isSecondary:!0,onClick:function(){return n()},className:"block-editor-link-control__search-item-action"},Object(C.__)("Edit")),Object(l.createElement)(rf,{fillProps:t}))}var af=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 lf(e){var t=e.searchInputPlaceholder,n=e.value,r=e.settings,o=e.onChange,c=void 0===o?d.noop:o,i=e.noDirectEntry,a=void 0!==i&&i,u=e.showSuggestions,s=void 0===u||u,b=e.showInitialSuggestions,f=e.forceIsEditingLink,p=e.createSuggestion,m=e.withCreateSuggestion,O=e.inputValue,g=void 0===O?"":O,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(l.useRef)(!0),w=Object(l.useRef)(),S=Object(l.useState)(n&&n.url||""),I=Object(se.a)(S,2),B=I[0],x=I[1],P=g||B,T=Object(l.useState)(void 0!==f?f:!n||!n.url),N=Object(se.a)(T,2),D=N[0],A=N[1],R=Object(l.useRef)(!1);Object(l.useEffect)((function(){void 0!==f&&f!==D&&A(f)}),[f]),Object(l.useEffect)((function(){E.current?E.current=!1:(w.current.contains(w.current.ownerDocument.activeElement)||(mo.focus.focusable.find(w.current)[0]||w.current).focus(),R.current=!1)}),[D]);var L=function(e){var t=Object(l.useRef)(),n=Object(l.useState)(!1),r=Object(se.a)(n,2),o=r[0],c=r[1],i=Object(l.useState)(null),a=Object(se.a)(i,2),u=a[0],s=a[1],d=function(){var n=Object(bo.a)(so.a.mark((function n(r){return so.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!0),s(null),n.prev=2,t.current=af(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 s(n.t0.message||Object(C.__)("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(e){return n.apply(this,arguments)}}();return Object(l.useEffect)((function(){return function(){t.current&&t.current.cancel()}}),[]),{createPage:d,isCreatingPage:o,errorMessage:u}}(p),M=L.createPage,F=L.isCreatingPage,V=L.errorMessage;return Object(l.createElement)("div",{tabIndex:-1,ref:w,className:"block-editor-link-control"},F&&Object(l.createElement)("div",{className:"block-editor-link-control__loading"},Object(l.createElement)(v.Spinner,null)," ",Object(C.__)("Creating"),"…"),(D||!n)&&!F&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(l.createElement)(tf,{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=w.current)||void 0===t||!t.contains(w.current.ownerDocument.activeElement)),A(!1)},showInitialSuggestions:b,allowDirectEntry:!a,showSuggestions:s,suggestionsQuery:j,withURLSuggestion:!y,createSuggestionButtonText:_},Object(l.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(l.createElement)(v.Button,{type:"submit",label:Object(C.__)("Submit"),icon:Tb.a,className:"block-editor-link-control__search-submit"})))),V&&Object(l.createElement)(v.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},V)),n&&!D&&!F&&Object(l.createElement)(cf,{value:n,onEditClick:function(){return A(!0)}}),Object(l.createElement)(Rb,{value:n,settings:r,onChange:c}))}lf.ViewerFill=of;var uf=lf,sf=n(276),df=n(204),bf=Object(v.withFilters)("editor.MediaUpload")((function(){return null})),ff=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},pf=Object(b.compose)([Object(m.withDispatch)((function(e){var t=e(ru.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,a=e.onFilesUpload,u=void 0===a?d.noop:a,s=e.name,b=void 0===s?Object(C.__)("Replace"):s,f=e.createNotice,p=e.removeNotice,O=Object(l.useState)(t),g=Object(se.a)(O,2),h=g[0],j=g[1],k=Object(m.useSelect)((function(e){return e("core/block-editor").getSettings().mediaUpload}),[]),y=Object(l.createRef)(),_=Object(d.uniqueId)("block-editor/media-replace-flow/error-notice/"),E=function(e){var t=document.createElement("div");t.innerHTML=Object(l.renderToString)(e);var n=t.textContent||t.innerText||"";setTimeout((function(){f("error",n,{speak:!0,id:_,isDismissible:!0})}),1e3)},w=function(e){c(e),j(e.url),Object(ct.speak)(Object(C.__)("The media file has been replaced")),p(_)},S=function(e){e.keyCode===zt.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(l.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(l.createElement)(v.ToolbarGroup,{className:"media-replace-flow"},Object(l.createElement)(v.ToolbarButton,{ref:y,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:S},b))},renderContent:function(e){return e.onClose,Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(l.createElement)(bf,{value:n,onSelect:function(e){return w(e)},allowedTypes:r,render:function(e){var t=e.open;return Object(l.createElement)(v.MenuItem,{icon:sf.a,onClick:t},Object(C.__)("Open Media Library"))}}),Object(l.createElement)(ff,null,Object(l.createElement)(v.FormFileUpload,{onChange:function(e){!function(e){var t=e.target.files;u(t),k({allowedTypes:r,filesList:t,onFileChange:function(e){var t=Object(se.a)(e,1)[0];w(t)},onError:E})}(e)},accept:o,render:function(e){var t=e.openFileDialog;return Object(l.createElement)(v.MenuItem,{icon:df.a,onClick:function(){t()}},Object(C.__)("Upload"))}}))),i&&Object(l.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:function(e){[zt.TAB,zt.ESCAPE].includes(e.keyCode)||e.stopPropagation()},onKeyPress:function(e){[zt.TAB,zt.ESCAPE].includes(e.keyCode)||e.stopPropagation()}},Object(l.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(C.__)("Current media URL:")),Object(l.createElement)(uf,{value:{url:h},settings:[],showSuggestions:!1,onChange:function(e){var t=e.url;j(t),i(t),y.current.focus()}})))}})})),mf=n(190);function vf(e){var t=e.url,n=e.urlLabel,r=e.className,o=s()(r,"block-editor-url-popover__link-viewer-url");return t?Object(l.createElement)(v.ExternalLink,{className:o,href:t},n||Object(su.filterURLForDisplay)(Object(su.safeDecodeURI)(t))):Object(l.createElement)("span",{className:o})}function Of(e){var t=e.additionalControls,n=e.children,r=e.renderSettings,o=e.position,c=void 0===o?"bottom center":o,a=e.focusOnMount,u=void 0===a?"firstElement":a,s=Object(Ve.a)(e,["additionalControls","children","renderSettings","position","focusOnMount"]),d=Object(l.useState)(!1),b=Object(se.a)(d,2),f=b[0],p=b[1],m=!!r&&f;return Object(l.createElement)(v.Popover,Object(i.a)({className:"block-editor-url-popover",focusOnMount:u,position:c},s),Object(l.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(l.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&Object(l.createElement)(v.Button,{className:"block-editor-url-popover__settings-toggle",icon:Eo.a,label:Object(C.__)("Link settings"),onClick:function(){p(!f)},"aria-expanded":f})),m&&Object(l.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!m&&Object(l.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}Of.LinkEditor=function(e){var t=e.autocompleteRef,n=e.className,r=e.onChangeInputValue,o=e.value,c=Object(Ve.a)(e,["autocompleteRef","className","onChangeInputValue","value"]);return Object(l.createElement)("form",Object(i.a)({className:s()("block-editor-url-popover__link-editor",n)},c),Object(l.createElement)(Vb,{value:o,onChange:r,autocompleteRef:t}),Object(l.createElement)(v.Button,{icon:Tb.a,label:Object(C.__)("Apply"),type:"submit"}))},Of.LinkViewer=function(e){var t=e.className,n=e.linkClassName,r=e.onEditLinkClick,o=e.url,c=e.urlLabel,a=Object(Ve.a)(e,["className","linkClassName","onEditLinkClick","url","urlLabel"]);return Object(l.createElement)("div",Object(i.a)({className:s()("block-editor-url-popover__link-viewer",t)},a),Object(l.createElement)(vf,{url:o,urlLabel:c,className:n}),r&&Object(l.createElement)(v.Button,{icon:mf.a,label:Object(C.__)("Edit"),onClick:r}))};var gf=Of,hf=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(l.createElement)(gf,{onClose:o},Object(l.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},Object(l.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(C.__)("URL"),placeholder:Object(C.__)("Paste or type URL"),onChange:n,value:t}),Object(l.createElement)(v.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Tb.a,label:Object(C.__)("Apply"),type:"submit"})))},jf=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,a=void 0===i?{}:i,u=e.mediaPreview,b=e.notices,f=e.isAppender,p=e.accept,O=e.addToGallery,g=e.multiple,h=void 0!==g&&g,j=e.dropZoneUIOnly,k=e.disableDropZone,y=e.disableMediaButtons,_=e.onError,E=e.onSelect,w=e.onCancel,S=e.onSelectURL,I=e.onDoubleClick,B=e.onFilesPreUpload,x=void 0===B?d.noop:B,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(l.useState)(""),R=Object(se.a)(A,2),L=R[0],M=R[1],F=Object(l.useState)(!1),V=Object(se.a)(F,2),H=V[0],z=V[1];Object(l.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)},K=function(){z(!1)},W=function(e){e.preventDefault(),L&&S&&(S(L),K())},q=function(e){var t;if(x(e),h)if(O){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(se.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=a.instructions,i=a.title;if(D||S||(n=Object(C.__)("To edit this block, you need permission to upload media.")),void 0===n||void 0===i){var d=null!=r?r:[],p=Object(se.a)(d,1)[0],m=1===d.length,O=m&&"audio"===p,g=m&&"image"===p,h=m&&"video"===p;void 0===n&&D&&(n=Object(C.__)("Upload a media file or pick one from your media library."),O?n=Object(C.__)("Upload an audio file, pick one from your media library, or add one with a URL."):g?n=Object(C.__)("Upload an image file, pick one from your media library, or add one with a URL."):h&&(n=Object(C.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===i&&(i=Object(C.__)("Media"),O?i=Object(C.__)("Audio"):g?i=Object(C.__)("Image"):h&&(i=Object(C.__)("Video")))}var j=s()("block-editor-media-placeholder",o,{"is-appender":f});return Object(l.createElement)(v.Placeholder,{icon:c,label:i,instructions:n,className:j,notices:b,onClick:t,onDoubleClick:I,preview:u},e,N)},X=function(){return k?null:Object(l.createElement)(v.DropZone,{onFilesDrop:q,onHTMLDrop:T})},Q=function(){return w&&Object(l.createElement)(v.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(C.__)("Cancel"),isLink:!0,onClick:w},Object(C.__)("Cancel"))},Z=function(){return S&&Object(l.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(l.createElement)(v.Button,{className:"block-editor-media-placeholder__button",onClick:U,isPressed:H,isTertiary:!0},Object(C.__)("Insert from URL")),H&&Object(l.createElement)(hf,{src:L,onChange:G,onSubmit:W,onClose:K}))};return j||y?(j&&Ju()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{alternative:"disableMediaButtons"}),Object(l.createElement)(ff,null,X())):Object(l.createElement)(ff,{fallback:Y(Z())},function(){var e=Object(l.createElement)(bf,{addToGallery:O,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(l.createElement)(v.Button,{isTertiary:!0,onClick:function(e){e.stopPropagation(),t()}},Object(C.__)("Media Library"))}});if(D&&f)return Object(l.createElement)(l.Fragment,null,X(),Object(l.createElement)(v.FormFileUpload,{onChange:$,accept:p,multiple:h,render:function(t){var n=t.openFileDialog,r=Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.Button,{isPrimary:!0,className:s()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(C.__)("Upload")),e,Z(),Q());return Y(r,n)}}));if(D){var t=Object(l.createElement)(l.Fragment,null,X(),Object(l.createElement)(v.FormFileUpload,{isPrimary:!0,className:s()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:$,accept:p,multiple:h},Object(C.__)("Upload")),e,Z(),Q());return Y(t)}return Y(e)}())})),kf=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(Wd,Object(i.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))}));kf.Content=function(e){var t=e.value,n=void 0===t?"":t,r=e.tagName,o=void 0===r?"div":r,c=Object(Ve.a)(e,["value","tagName"]);return Object(l.createElement)(o,c,n)};var yf=kf,_f=Object(l.forwardRef)((function(e,t){var n=e.__experimentalVersion,r=Object(Ve.a)(e,["__experimentalVersion"]);if(2===n)return Object(l.createElement)(yf,Object(i.a)({ref:t},r));var o=r.className,c=r.onChange,a=Object(Ve.a)(r,["className","onChange"]);return Object(l.createElement)(Uo.a,Object(i.a)({ref:t,className:s()("block-editor-plain-text",o),onChange:function(e){return c(e.target.value)}},a))}));function Ef(e){var t=e.property,n=e.viewport,r=e.desc,o=Object(b.useInstanceId)(Ef),c=r||Object(C.sprintf)(
|
68 |
/* translators: 1: property name. 2: viewport name. */
|
69 |
-
Object(C._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(l.createElement)(l.Fragment,null,Object(l.createElement)("span",{"aria-describedby":"rbc-desc-".concat(o)},n.label),Object(l.createElement)(v.VisuallyHidden,{as:"span",id:"rbc-desc-".concat(o)},c))}var
|
70 |
/* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
|
71 |
label:Object(C.__)("All")}:d,f=e.viewports,p=void 0===f?[{id:"small",label:Object(C.__)("Small screens")},{id:"medium",label:Object(C.__)("Medium screens")},{id:"large",label:Object(C.__)("Large screens")}]:f;if(!t||!n||!c)return null;var m=r||Object(C.sprintf)(
|
72 |
/* 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) */
|
73 |
-
Object(C.__)("Use the same %s on all screensizes."),n),O=Object(C.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),g=c(Object(l.createElement)(
|
74 |
-
/* translators: 'Help text for the responsive mode toggle control.' */return Object(l.createElement)("fieldset",{className:"block-editor-responsive-block-control"},Object(l.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),Object(l.createElement)("div",{className:"block-editor-responsive-block-control__inner"},Object(l.createElement)(v.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:m,checked:!u,onChange:o,help:O}),Object(l.createElement)("div",{className:s()("block-editor-responsive-block-control__group",{"is-responsive":u})},!u&&g,u&&(i?i(p):p.map((function(e){return Object(l.createElement)(l.Fragment,{key:e.id},c(Object(l.createElement)(
|
75 |
-
/* translators: button label text should, if possible, be under 16 characters. */,label:Object(C.__)("Modes")}))},position:"bottom right",renderContent:function(){return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.NavigableMenu,{role:"menu","aria-label":Object(C.__)("Modes")},Object(l.createElement)(v.MenuItemsChoice,{value:n?"select":"edit",onSelect:o,choices:[{value:"edit",label:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(
|
76 |
/* translators: button label text should, if possible, be under 16 characters. */
|
77 |
-
children:Object(C.__)("Preview")};return Object(l.createElement)(v.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:a,toggleProps:u,icon:null},(function(){return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Desktop")},icon:"Desktop"===c&&
|
78 |
/* translators: %d: number of blocks */
|
79 |
Object(C._n)("%d block","%d blocks",t.length),t.length)),Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},Object(C.sprintf)(
|
80 |
/* translators: %d: number of words */
|
81 |
-
Object(C._n)("%d word","%d words",n),n))))}));function Qf(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(l.useMemo)((function(){return[{label:Object(C.__)("Not set"),value:""}].concat(Object(ue.a)(c.map((function(e){return{label:e.label,value:e.name}}))))}),[c]),a=Object(l.useCallback)((function(e){o(t,e)}),[t,o]);return o&&Object(l.createElement)(v.SelectControl,{options:i,value:r||"",label:Object(C.__)("Default Style"),onChange:a})}var Zf=function(e){var t=e.slotName,n=e.bubblesVirtually,r=Object(v.__experimentalUseSlot)(t);return Boolean(r.fills&&r.fills.length)?Object(l.createElement)(v.PanelBody,{className:"block-editor-block-inspector__advanced",title:Object(C.__)("Advanced"),initialOpen:!1},Object(l.createElement)(ee.Slot,{bubblesVirtually:n})):null},Jf=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(),a=i&&o(i),l=i&&Object(p.getBlockType)(a),u=i&&c(a);return{count:r(),hasBlockStyles:u&&u.length>0,selectedBlockName:a,selectedBlockClientId:i,blockType:l}}))((function(e){var t=e.blockType,n=e.count,r=e.hasBlockStyles,o=e.selectedBlockClientId,c=e.selectedBlockName,i=e.showNoBlockSelectedMessage,a=void 0===i||i,u=e.bubblesVirtually,s=void 0===u||u;if(n>1)return Object(l.createElement)("div",{className:"block-editor-block-inspector"},Object(l.createElement)(Xf,null),Object(l.createElement)(ve.Slot,{bubblesVirtually:s}));var d=c===Object(p.getUnregisteredTypeHandlerName)();return t&&o&&!d?Object(l.createElement)("div",{className:"block-editor-block-inspector"},Object(l.createElement)(ec,{blockType:t}),Object(l.createElement)(Zd,{blockClientId:o}),r&&Object(l.createElement)("div",null,Object(l.createElement)(v.PanelBody,{title:Object(C.__)("Styles")},Object(l.createElement)(ss,{clientId:o}),Object(p.hasBlockSupport)(t.name,"defaultStylePicker",!0)&&Object(l.createElement)(Qf,{blockName:t.name}))),Object(l.createElement)(ve.Slot,{bubblesVirtually:s}),Object(l.createElement)("div",null,Object(l.createElement)(Zf,{slotName:ee.slotName,bubblesVirtually:s})),Object(l.createElement)($f,{key:"back"})):a?Object(l.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},Object(C.__)("No block selected.")):null}));function ep(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 tp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ep(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ep(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var np=Object(l.forwardRef)((function(e,t){var n=e.children,r=e.tagName,o=void 0===r?"div":r,c=Object(Ve.a)(e,["children","tagName"]);Ju()("wp.blockEditor.__experimentalBlock",{alternative:"wp.blockEditor.useBlockProps"});var i=od(tp(tp({},c),{},{ref:t}));return Object(l.createElement)(o,i,n)})),rp=["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(l.forwardRef)((function(e,n){return Object(l.createElement)(np,Object(i.a)({},e,{ref:n,tagName:t}))})),e}),np);function op(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(l.useEffect)((function(){if(t)return e.current.addEventListener("focus",r),function(){e.current.removeEventListener("focus",r)};function r(){n()}}),[t,n])}function cp(e){var t=Object(l.useRef)();return op(t),Object(l.createElement)("div",Object(i.a)({tabIndex:-1,ref:t},e))}var ip=n(249),ap=n.n(ip),lp=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function up(e){return e?e.replace(/^\s+|\s+$/g,""):""}var sp=n(166),dp=n.n(sp),bp=fp;function fp(e){this.options=e||{}}fp.prototype.emit=function(e){return e},fp.prototype.visit=function(e){return this[e.type](e)},fp.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 pp=mp;function mp(e){bp.call(this,e)}dp()(mp,bp),mp.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},mp.prototype.comment=function(e){return this.emit("",e.position)},mp.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},mp.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},mp.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("}")},mp.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},mp.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},mp.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},mp.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},mp.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},mp.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("}")},mp.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},mp.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},mp.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},mp.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("}"):""},mp.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var vp=Op;function Op(e){e=e||{},bp.call(this,e),this.indentation=e.indent}dp()(Op,bp),Op.prototype.compile=function(e){return this.stylesheet(e)},Op.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Op.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Op.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Op.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}")},Op.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}")},Op.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Op.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Op.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}")},Op.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)+"}")},Op.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")},Op.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}")},Op.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}")},Op.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}")},Op.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Op.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()+"}"):""},Op.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Op.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var gp=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 a=[];function l(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;a.push(c)}function u(){return b(/^{\s*/)}function s(){return b(/^}/)}function d(){var t,n,r,o=[];for(f(),p(o);e.length&&"}"!==e.charAt(0)&&(t=w()||(n=void 0,r=void 0,n=c(),(r=v())?(p(),n({type:"rule",selectors:r,declarations:g()})):l("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 l("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 up(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function O(){var e=c(),t=b(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=up(t[0]),!b(/^:\s*/))return l("property missing ':'");var n=b(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(lp,""),value:n?up(n[0]).replace(lp,""):""});return b(/^[;\s]*/),r}}function g(){var e,t=[];if(!u())return l("missing '{'");for(p(t);e=O();)!1!==e&&(t.push(e),p(t));return s()?t:l("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:g()})}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 w(){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 l("@keyframes missing name");var r,o=t[1];if(!u())return l("@keyframes missing '{'");for(var i=p();r=h();)i.push(r),i=i.concat(p());return s()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):l("@keyframes missing '}'")}}()||function(){var e=c(),t=b(/^@media *([^{]+)/);if(t){var n=up(t[1]);if(!u())return l("@media missing '{'");var r=p().concat(d());return s()?e({type:"media",media:n,rules:r}):l("@media missing '}'")}}()||function(){var e=c(),t=b(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:up(t[1]),media:up(t[2])})}()||function(){var e=c(),t=b(/^@supports *([^{]+)/);if(t){var n=up(t[1]);if(!u())return l("@supports missing '{'");var r=p().concat(d());return s()?e({type:"supports",supports:n,rules:r}):l("@supports missing '}'")}}()||k()||y()||_()||function(){var e=c(),t=b(/^@([-\w]+)?document *([^{]+)/);if(t){var n=up(t[1]),r=up(t[2]);if(!u())return l("@document missing '{'");var o=p().concat(d());return s()?e({type:"document",document:r,vendor:n,rules:o}):l("@document missing '}'")}}()||function(){var e=c();if(b(/^@page */)){var t=v()||[];if(!u())return l("@page missing '{'");for(var n,r=p();n=O();)r.push(n),r=r.concat(p());return s()?e({type:"page",selectors:t,declarations:r}):l("@page missing '}'")}}()||function(){var e=c();if(b(/^@host\s*/)){if(!u())return l("@host missing '{'");var t=p().concat(d());return s()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=c();if(b(/^@font-face\s*/)){if(!u())return l("@font-face missing '{'");for(var t,n=p();t=O();)n.push(t),n=n.concat(p());return s()?e({type:"font-face",declarations:n}):l("@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(ta.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:a}}))}(e);return r=ap.a.map(n,(function(e){if(!e)return e;var n=t(e);return this.update(n)})),((o=o||{}).compress?new pp(o):new vp(o)).compile(r)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var r,o};function hp(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 jp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hp(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function kp(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 yp(e,t){return new URL(e,t).toString()}var _p=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]};kp(o)&&r.push(o)}return r}(t.value).map((c=e,function(e){return jp(jp({},e),{},{newUrl:"url("+e.before+e.quote+yp(e.value,c)+e.quote+e.after+")"})}));return jp(jp({},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 Ep(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 wp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ep(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ep(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Cp=/^(body|html|:root).*$/,Sp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?wp(wp({},n),{},{selectors:n.selectors.map((function(n){return t.includes(n.trim())?n:n.match(Cp)?n.replace(/^(body|html|:root)/,e):e+" "+n}))}):n}},Ip=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(Sp(t)),r&&c.push(_p(r)),c.length?gp(n,Object(b.compose)(c)):n}))};function Bp(e,t){Object(l.useEffect)((function(){var n=Ip(t,".editor-styles-wrapper"),r=e.current.ownerDocument,o=Object(d.map)(Object(d.compact)(n),(function(e){var t=r.createElement("style");return t.innerHTML=e,r.body.appendChild(t),t}));return function(){return o.forEach((function(e){return r.body.removeChild(e)}))}}),[e,t])}var xp=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.showInserterHelpPanel,c=e.showMostUsedBlocks,i=void 0!==c&&c,a=e.__experimentalSelectBlockOnInsert,u=e.__experimentalInsertionIndex,s=e.onSelect,b=void 0===s?d.noop:s,f=Object(m.useSelect)((function(e){var r=e("core/block-editor").getBlockRootClientId;return t||r(n)||void 0}),[n,t]);return Object(l.createElement)(Eu,{onSelect:b,rootClientId:f,clientId:n,isAppender:r,showInserterHelpPanel:o,showMostUsedBlocks:i,__experimentalSelectBlockOnInsert:a,__experimentalInsertionIndex:u})};function Pp(){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(se.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,a=o.insertAfterBlock,u=o.insertBeforeBlock,s=o.multiSelect,b=o.clearSelectedBlock,f=o.moveBlocksUp,p=o.moveBlocksDown;return Object(lo.useShortcut)("core/block-editor/move-up",Object(l.useCallback)((function(e){e.preventDefault(),f(t,r)}),[t,f]),{bindGlobal:!0,isDisabled:0===t.length}),Object(lo.useShortcut)("core/block-editor/move-down",Object(l.useCallback)((function(e){e.preventDefault(),p(t,r)}),[t,p]),{bindGlobal:!0,isDisabled:0===t.length}),Object(lo.useShortcut)("core/block-editor/duplicate",Object(l.useCallback)((function(e){e.preventDefault(),c(t)}),[t,c]),{bindGlobal:!0,isDisabled:0===t.length}),Object(lo.useShortcut)("core/block-editor/remove",Object(l.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{bindGlobal:!0,isDisabled:0===t.length}),Object(lo.useShortcut)("core/block-editor/insert-after",Object(l.useCallback)((function(e){e.preventDefault(),a(Object(d.last)(t))}),[t,a]),{bindGlobal:!0,isDisabled:0===t.length}),Object(lo.useShortcut)("core/block-editor/insert-before",Object(l.useCallback)((function(e){e.preventDefault(),u(Object(d.first)(t))}),[t,u]),{bindGlobal:!0,isDisabled:0===t.length}),Object(lo.useShortcut)("core/block-editor/delete-multi-selection",Object(l.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{isDisabled:t.length<2}),Object(lo.useShortcut)("core/block-editor/select-all",Object(l.useCallback)((function(e){e.preventDefault(),s(Object(d.first)(n),Object(d.last)(n))}),[n,s])),Object(lo.useShortcut)("core/block-editor/unselect",Object(l.useCallback)((function(e){e.preventDefault(),b(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges()}),[t,b]),{isDisabled:t.length<2}),null}Pp.Register=function(){var e=Object(m.useDispatch)(lo.store).registerShortcut;return Object(l.useEffect)((function(){e({name:"core/block-editor/duplicate",category:"block",description:Object(C.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:Object(C.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:Object(C.__)("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(C.__)("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(C.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:Object(C.__)("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(C.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:Object(C.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:Object(C.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:Object(C.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var Tp=Pp;function Np(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(l.useEffect)((function(){if(t){var n=e.current.ownerDocument,r=lt(t,n);if(r){var o=Object(mo.getScrollContainer)(r);o&&Mb()(r,o,{onlyScrollIfNeeded:!0})}}}),[t])}function Dp(){var e=Object(l.useRef)();return Np(e),Object(l.createElement)("div",{ref:e})}var Ap=new Set([zt.UP,zt.RIGHT,zt.DOWN,zt.LEFT,zt.ENTER,zt.BACKSPACE]);function Rp(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;Object(l.useEffect)((function(){var n=e.current,c=n.ownerDocument,i=c.defaultView;if(t){var a,l,u;function s(e){var t=e.target;a=i.setTimeout((function(){Object(mo.isTextField)(t)||o()}))}function d(e){var t=e.keyCode;t!==zt.ESCAPE&&t!==zt.TAB||o()}function b(){var e=i.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||o()}function f(e){var t=e.clientX,n=e.clientY;l&&u&&(l!==t||u!==n)&&o(),l=t,u=n}return n.addEventListener("focus",s),n.addEventListener("keydown",d),c.addEventListener("selectionchange",b),c.addEventListener("mousemove",f),function(){i.clearTimeout(a),n.removeEventListener("focus",s),n.removeEventListener("keydown",d),c.removeEventListener("selectionchange",b),c.removeEventListener("mousemove",f)}}function p(e){var t=e.type,o=e.target;Object(mo.isTextField)(o)&&n.contains(o)&&("keydown"!==t||function(e){var t=e.keyCode;return!e.shiftKey&&Ap.has(t)}(e))&&r()}return n.addEventListener("keypress",p),n.addEventListener("keydown",p),function(){n.removeEventListener("keypress",p),n.removeEventListener("keydown",p)}}),[t,r,o])}var Lp=function(e){var t=e.children,n=Object(l.useRef)();return Rp(n),Object(l.createElement)("div",{ref:n},t)};function Mp(){return Ju()("PreserveScrollInReorder component",{hint:"This behavior is now built-in the block list"}),null}var Fp=-1!==window.navigator.userAgent.indexOf("Trident"),Vp=new Set([zt.UP,zt.DOWN,zt.LEFT,zt.RIGHT]);function Hp(e){var t=Object(m.useSelect)((function(e){return e("core/block-editor").hasSelectedBlock()}));Object(l.useEffect)((function(){if(t){var n,r,o,c=e.current.ownerDocument,i=c.defaultView;return i.addEventListener("scroll",a,!0),i.addEventListener("resize",a,!0),e.current.addEventListener("keydown",l),e.current.addEventListener("keyup",u),e.current.addEventListener("mousedown",s),e.current.addEventListener("touchstart",s),function(){i.removeEventListener("scroll",a,!0),i.removeEventListener("resize",a,!0),e.current.removeEventListener("keydown",l),e.current.removeEventListener("keyup",u),e.current.removeEventListener("mousedown",s),e.current.removeEventListener("touchstart",s),c.removeEventListener("selectionchange",d),i.cancelAnimationFrame(n),i.cancelAnimationFrame(r)}}function a(){n||(n=i.requestAnimationFrame((function(){b(),n=null})))}function l(e){r&&i.cancelAnimationFrame(r),r=i.requestAnimationFrame((function(){u(e),r=null}))}function u(t){var n=t.keyCode;if(f())
|
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=375)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.lodash},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.wp.data},,function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.wp.primitives},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(39),o=n(30),c=n(40);function i(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}(e,t)||Object(o.a)(e,t)||Object(c.a)()}},function(e,t){e.exports=window.wp.blocks},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)}()},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.compose},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}function o(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 c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(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}function a(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 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 a(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)?a(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(47);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}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(23),o=n(38),c=n(30);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.")}()}},function(e,t){e.exports=window.regeneratorRuntime},function(e,t){e.exports=window.wp.keycodes},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.wp.richText},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}))},,function(e,t){e.exports=window.wp.url},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(42),o=n(19);function c(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(23);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}}},function(e,t){e.exports=window.wp.dom},function(e,t,n){e.exports=n(140)()},function(e,t){e.exports=window.wp.hooks},,function(e,t){e.exports=window.wp.deprecated},,,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}))},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n,r,o,c,i){try{var a=e[c](i),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).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 a(e){r(i,o,c,a,l,"next",e)}function l(e){r(i,o,c,a,l,"throw",e)}a(void 0)}))}}n.d(t,"a",(function(){return o}))},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}))},function(e,t){e.exports=window.wp.keyboardShortcuts},,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}function o(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 c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(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}function a(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 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 a(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)?a(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return l}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(12),o=n(60);function c(e){var t=Object(r.useRef)(e);return Object(o.a)((function(){t.current=e})),t}},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}))},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 a(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,t.a=function(e,t){var n,l;function u(){n=o?new WeakMap:i()}function s(){var n,r,o,c,i,u=arguments.length;for(c=new Array(u),o=0;o<u;o++)c[o]=arguments[o];for(i=t.apply(null,c),(n=l(i)).isUniqueByDependants||(n.lastDependants&&!a(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(a(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),l=o?function(e){var t,o,c,a,l,u=n,s=!0;for(t=0;t<e.length;t++){if(!(l=o=e[t])||"object"!=typeof l){s=!1;break}u.has(o)?u=u.get(o):(c=new WeakMap,u.set(o,c),u=c)}return u.has(r)||((a=i()).isUniqueByDependants=s,u.set(r,a)),u.get(r)}:function(){return n},s.getDependants=t,s.clear=u,u(),s}},function(e,t){e.exports=window.wp.notices},function(e,t){e.exports=window.wp.blob},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(12),o=n(64);function c(e,t){Object(r.useDebugValue)(e);var n=Object(r.useContext)(o.a);return null!=n[e]?n[e]:t}var i=n(45),a=n(55);function l(e){var t,n,o,l=(o=e.compose,Array.isArray(o)?o:void 0!==o?[o]:[]),u=function(t,n){if(e.useOptions&&(t=e.useOptions(t,n)),e.name&&(t=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var o="use"+e+"Options";Object(r.useDebugValue)(o);var a=c(o);return a?Object(i.a)(Object(i.a)({},t),a(t,n)):t}(e.name,t,n)),e.compose)for(var o,a=Object(i.c)(l);!(o=a()).done;)t=o.value.__useOptions(t,n);return t},s=function(t,n,o){if(void 0===t&&(t={}),void 0===n&&(n={}),void 0===o&&(o=!1),o||(t=u(t,n)),e.useProps&&(n=e.useProps(t,n)),e.name&&(n=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var o="use"+e+"Props";Object(r.useDebugValue)(o);var i=c(o);return i?i(t,n):n}(e.name,t,n)),e.compose)if(e.useComposeOptions&&(t=e.useComposeOptions(t,n)),e.useComposeProps)n=e.useComposeProps(t,n);else for(var a,s=Object(i.c)(l);!(a=s()).done;)n=(0,a.value)(t,n,!0);var d={},b=n||{};for(var f in b)void 0!==b[f]&&(d[f]=b[f]);return d};s.__useOptions=u;var d=l.reduce((function(e,t){return e.push.apply(e,t.__keys||[]),e}),[]);return s.__keys=[].concat(d,(null===(t=e.useState)||void 0===t?void 0:t.__keys)||[],e.keys||[]),s.unstable_propsAreEqual=e.propsAreEqual||(null===(n=l[0])||void 0===n?void 0:n.unstable_propsAreEqual)||a.a,s}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(12),o=n(45),c=n(79);function i(e,t){for(var n={},r={},o=0,c=Object.keys(e);o<c.length;o++){var i=c[o];t.indexOf(i)>=0?n[i]=e[i]:r[i]=e[i]}return[n,r]}var a=n(55);function l(e){var t,n=e.as,l=e.useHook,u=e.memo,s=e.propsAreEqual,d=void 0===s?null==l?void 0:l.unstable_propsAreEqual:s,b=e.keys,f=void 0===b?(null==l?void 0:l.__keys)||[]:b,p=e.useCreateElement,m=void 0===p?c.a:p,v=function(e,t){var r=e.as,c=void 0===r?n:r,a=Object(o.b)(e,["as"]);if(l){var u,s=i(a,f),d=s[0],b=s[1],p=l(d,Object(o.a)({ref:t},b)),v=p.wrapElement,O=Object(o.b)(p,["wrapElement"]),g=(null===(u=c.render)||void 0===u?void 0:u.__keys)||c.__keys,h=g&&i(a,g)[0],j=h?Object(o.a)(Object(o.a)({},O),h):O,k=m(c,j);return v?v(k):k}return m(c,Object(o.a)({ref:t},a))};return t=v,v=Object(r.forwardRef)(t),u&&(v=function(e,t){return Object(r.memo)(e,t)}(v,d)),v.__keys=f,v.unstable_propsAreEqual=d||a.a,v}},function(e,t,n){"use strict";function r(e){return e?e.ownerDocument||e:window.document}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.wp.a11y},function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(var c=0,i=n;c<i.length;c++){var a=i[c];if(e[a]!==t[a])return!1}return!0}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";function r(e){return e.target===e.currentTarget}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return O})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return h})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return S}));var r=n(14),o=n(12),c=n(60),i=n(62),a=n(63),l=n(65);function u(e){return e.slice().reverse()}function s(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function d(e,t){return e.findIndex((function(e){return!(!e.ref.current||!t.ref.current)&&s(t.ref.current,e.ref.current)}))}function b(e,t){return t?e.find((function(e){return!e.disabled&&e.id!==t})):e.find((function(e){return!e.disabled}))}function f(e,t){if(t)return null==e?void 0:e.find((function(e){return e.id===t&&!e.disabled}))}function p(e){for(var t,n=[[]],o=function(){var e=t.value,r=n.find((function(t){return!t[0]||t[0].groupId===e.groupId}));r?r.push(e):n.push([e])},c=Object(r.c)(e);!(t=c()).done;)o();return n}function m(e){for(var t,n=0,o=Object(r.c)(e);!(t=o()).done;){var c=t.value.length;c>n&&(n=c)}return n}function v(e){for(var t=p(e),n=m(t),o=[],c=0;c<n;c+=1)for(var i,a=Object(r.c)(t);!(i=a()).done;){var l=i.value;l[c]&&o.push(Object(r.b)(Object(r.b)({},l[c]),{},{groupId:l[c].groupId?""+c:void 0}))}return o}function O(e){for(var t,n=[],o=Object(r.c)(e);!(t=o()).done;){var c=t.value;n.push.apply(n,c)}return n}function g(e){for(var t,n=m(e),o=Object(r.c)(e);!(t=o()).done;){var c=t.value;if(c.length<n)for(var i=0;i<n;i+=1)c[i]||(c[i]={id:"__EMPTY_ITEM__",disabled:!0,ref:{current:null},groupId:c[i-1].groupId})}return e}function h(e,t){var n;return t||null===t?t:e.currentId||null===e.currentId?e.currentId:null===(n=b(e.items||[]))||void 0===n?void 0:n.id}var j={id:null,ref:{current:null}};function k(e,t){return e.filter((function(e){return e.groupId===t}))}var y={horizontal:"vertical",vertical:"horizontal"};function _(e,t,n){return n in e?[].concat(e.slice(0,n),[t],e.slice(n)):[].concat(e,[t])}function E(e){var t=e.slice(),n=!1;return t.sort((function(e,t){var r=e.ref.current,o=t.ref.current;return r&&o&&s(r,o)?(n=!0,-1):0})),n?t:e}function w(e,t){var n=e.unstable_virtual,o=e.rtl,c=e.orientation,i=e.items,l=e.groups,s=e.currentId,m=e.loop,C=e.wrap,S=e.pastIds,I=e.unstable_moves,B=e.initialVirtual,x=e.initialRTL,P=e.initialOrientation,T=e.initialCurrentId,N=e.initialLoop,D=e.initialWrap,A=e.hasSetCurrentId;switch(t.type){case"registerGroup":var L=t.group;if(0===l.length)return Object(r.b)(Object(r.b)({},e),{},{groups:[L]});var R=d(l,L);return Object(r.b)(Object(r.b)({},e),{},{groups:_(l,L,R)});case"unregisterGroup":var M=t.id,F=l.filter((function(e){return e.id!==M}));return F.length===l.length?e:Object(r.b)(Object(r.b)({},e),{},{groups:F});case"registerItem":var V,H=t.item,z=l.find((function(e){var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(H.ref.current)})),U=Object(r.b)({groupId:null==z?void 0:z.id},H),G=d(i,U),K=Object(r.b)(Object(r.b)({},e),{},{items:_(i,U,G)});return A||I||void 0!==T?K:Object(r.b)(Object(r.b)({},K),{},{currentId:null===(V=b(K.items))||void 0===V?void 0:V.id});case"unregisterItem":var W=t.id,q=i.filter((function(e){return e.id!==W}));if(q.length===i.length)return e;var $=S.filter((function(e){return e!==W})),Y=Object(r.b)(Object(r.b)({},e),{},{pastIds:$,items:q});if(s&&s===W){var X=h(Object(r.b)(Object(r.b)({},Y),{},{currentId:$[0]}));return Object(r.b)(Object(r.b)({},Y),{},{currentId:X})}return Y;case"move":var Q=t.id;if(void 0===Q)return e;var Z=S.filter((function(e){return e!==s&&e!==Q})),J=s?[s].concat(Z):Z,ee=Object(r.b)(Object(r.b)({},e),{},{pastIds:J});if(null===Q)return Object(r.b)(Object(r.b)({},ee),{},{unstable_moves:I+1,currentId:h(ee,Q)});var te=f(i,Q);return Object(r.b)(Object(r.b)({},ee),{},{unstable_moves:te?I+1:I,currentId:h(ee,null==te?void 0:te.id)});case"next":if(null==s)return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"first"}));var ne=o&&"vertical"!==c,re=ne?u(i):i,oe=re.find((function(e){return e.id===s}));if(!oe)return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"first"}));var ce=!!oe.groupId,ie=re.indexOf(oe),ae=re.slice(ie+1),le=k(ae,oe.groupId);if(t.allTheWay){var ue=b(ne?k(re,oe.groupId):u(le));return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==ue?void 0:ue.id}))}var se=function(e){return e&&y[e]}(ce?c||"horizontal":c),de=m&&m!==se,be=ce&&C&&C!==se,fe=t.hasNullItem||!ce&&de&&null===T;if(de){var pe=b(function(e,t,n){var r=e.findIndex((function(e){return e.id===t}));return[].concat(e.slice(r+1),n?[j]:[],e.slice(0,r))}(be&&!fe?re:k(re,oe.groupId),s,fe),s);return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==pe?void 0:pe.id}))}if(be){var me=b(fe?le:ae,s),ve=fe?(null==me?void 0:me.id)||null:null==me?void 0:me.id;return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:ve}))}var Oe=b(le,s);return w(e,!Oe&&fe?Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null}):Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==Oe?void 0:Oe.id}));case"previous":var ge=!l.length&&null===T,he=w(Object(r.b)(Object(r.b)({},e),{},{items:u(i)}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:ge}));return Object(r.b)(Object(r.b)({},he),{},{items:i});case"down":var je=v(O(g(p(i)))),ke=m&&"horizontal"!==m&&null===T,ye=w(Object(r.b)(Object(r.b)({},e),{},{orientation:"vertical",items:je}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:ke}));return Object(r.b)(Object(r.b)({},ye),{},{orientation:c,items:i});case"up":var _e=v(u(O(g(p(i))))),Ee=null===T,we=w(Object(r.b)(Object(r.b)({},e),{},{orientation:"vertical",items:_e}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:Ee}));return Object(r.b)(Object(r.b)({},we),{},{orientation:c,items:i});case"first":var Ce=b(i);return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==Ce?void 0:Ce.id}));case"last":var Se=w(Object(r.b)(Object(r.b)({},e),{},{items:u(i)}),Object(r.b)(Object(r.b)({},t),{},{type:"first"}));return Object(r.b)(Object(r.b)({},Se),{},{items:i});case"sort":return Object(r.b)(Object(r.b)({},e),{},{items:E(i),groups:E(l)});case"setVirtual":return Object(r.b)(Object(r.b)({},e),{},{unstable_virtual:Object(a.a)(t.virtual,n)});case"setRTL":return Object(r.b)(Object(r.b)({},e),{},{rtl:Object(a.a)(t.rtl,o)});case"setOrientation":return Object(r.b)(Object(r.b)({},e),{},{orientation:Object(a.a)(t.orientation,c)});case"setCurrentId":var Ie=h(Object(r.b)(Object(r.b)({},e),{},{currentId:Object(a.a)(t.currentId,s)}));return Object(r.b)(Object(r.b)({},e),{},{currentId:Ie,hasSetCurrentId:!0});case"setLoop":return Object(r.b)(Object(r.b)({},e),{},{loop:Object(a.a)(t.loop,m)});case"setWrap":return Object(r.b)(Object(r.b)({},e),{},{wrap:Object(a.a)(t.wrap,C)});case"reset":return Object(r.b)(Object(r.b)({},e),{},{unstable_virtual:B,rtl:x,orientation:P,currentId:h(Object(r.b)(Object(r.b)({},e),{},{currentId:T})),loop:N,wrap:D,unstable_moves:0,pastIds:[]});default:throw new Error}}function C(e){return Object(o.useCallback)(e,[])}function S(e){void 0===e&&(e={});var t=Object(i.a)(e),n=t.unstable_virtual,a=void 0!==n&&n,u=t.rtl,s=void 0!==u&&u,d=t.orientation,b=t.currentId,f=t.loop,p=void 0!==f&&f,m=t.wrap,v=void 0!==m&&m,O=Object(r.a)(t,["unstable_virtual","rtl","orientation","currentId","loop","wrap"]),g=Object(o.useReducer)(w,{unstable_virtual:a,rtl:s,orientation:d,items:[],groups:[],currentId:b,loop:p,wrap:v,unstable_moves:0,pastIds:[],initialVirtual:a,initialRTL:s,initialOrientation:d,initialCurrentId:b,initialLoop:p,initialWrap:v}),h=g[0],j=(h.pastIds,h.initialVirtual,h.initialRTL,h.initialOrientation,h.initialCurrentId,h.initialLoop,h.initialWrap,h.hasSetCurrentId,Object(r.a)(h,["pastIds","initialVirtual","initialRTL","initialOrientation","initialCurrentId","initialLoop","initialWrap","hasSetCurrentId"])),k=g[1],y=Object(o.useState)(!1),_=y[0],E=y[1],S=Object(l.a)(O),I=function(){var e=Object(o.useRef)(!1);return Object(c.a)((function(){return function(){e.current=!0}}),[]),e}();return Object(r.b)(Object(r.b)(Object(r.b)({},S),j),{},{unstable_hasActiveWidget:_,unstable_setHasActiveWidget:E,registerItem:C((function(e){I.current||k({type:"registerItem",item:e})})),unregisterItem:C((function(e){I.current||k({type:"unregisterItem",id:e})})),registerGroup:C((function(e){I.current||k({type:"registerGroup",group:e})})),unregisterGroup:C((function(e){I.current||k({type:"unregisterGroup",id:e})})),move:C((function(e){return k({type:"move",id:e})})),next:C((function(e){return k({type:"next",allTheWay:e})})),previous:C((function(e){return k({type:"previous",allTheWay:e})})),up:C((function(e){return k({type:"up",allTheWay:e})})),down:C((function(e){return k({type:"down",allTheWay:e})})),first:C((function(){return k({type:"first"})})),last:C((function(){return k({type:"last"})})),unstable_sort:C((function(){return k({type:"sort"})})),unstable_setVirtual:C((function(e){return k({type:"setVirtual",virtual:e})})),setRTL:C((function(e){return k({type:"setRTL",rtl:e})})),setOrientation:C((function(e){return k({type:"setOrientation",orientation:e})})),setCurrentId:C((function(e){return k({type:"setCurrentId",currentId:e})})),setLoop:C((function(e){return k({type:"setLoop",loop:e})})),setWrap:C((function(e){return k({type:"setWrap",wrap:e})})),reset:C((function(){return k({type:"reset"})}))})}var I=[].concat(l.a.__keys,["unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","unstable_moves","unstable_hasActiveWidget","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","unstable_sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","reset","unstable_setHasActiveWidget"]);S.__keys=I},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(12),o="undefined"==typeof window?r.useEffect:r.useLayoutEffect},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(53);function o(e){return Object(r.a)(e).activeElement}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(12);function o(e){return Object(r.useState)(e)[0]}},function(e,t,n){"use strict";function r(e,t){return function(e){return"function"==typeof e}(e)?e(t):e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(12),o=Object(r.createContext)({})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(12),o=n(62),c=n(67);function i(e){void 0===e&&(e={});var t=Object(o.a)(e).baseId,n=Object(r.useContext)(c.a),i=Object(r.useRef)(0),a=Object(r.useState)((function(){return t||n()}));return{baseId:a[0],unstable_setBaseId:a[1],unstable_idCountRef:i}}i.__keys=["baseId","unstable_setBaseId","unstable_idCountRef"]},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(12),o=Object(r.createContext)((function(e){return void 0===e&&(e="id"),(e?e+"-":"")+Math.random().toString(32).substr(2,6)}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(14),o=n(52),c=n(51),i=n(55),a=Object(c.a)({name:"Box",keys:["unstable_system"],propsAreEqual:function(e,t){var n=e.unstable_system,o=Object(r.a)(e,["unstable_system"]),c=t.unstable_system,a=Object(r.a)(t,["unstable_system"]);return!(n!==c&&!Object(i.a)(n,c))&&Object(i.a)(o,a)}});Object(o.a)({as:"div",useHook:a})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(12);function o(e,t){void 0===t&&(t=null),e&&("function"==typeof e?e(t):e.current=t)}function c(e,t){return Object(r.useMemo)((function(){return null==e&&null==t?null:function(n){o(e,n),o(t,n)}}),[e,t])}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(61);function o(e){var t=Object(r.a)(e);if(!t)return!1;if(e.contains(t))return!0;var n=t.getAttribute("aria-activedescendant");return!(!n||n!==e.id&&!e.querySelector("#"+n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=["button","color","file","image","reset","submit"];function o(e){if("BUTTON"===e.tagName)return!0;if("INPUT"===e.tagName){var t=e;return-1!==r.indexOf(t.type)}return!1}},function(e,t,n){"use strict";function r(e,t){return"matches"in e?e.matches(t):"msMatchesSelector"in e?e.msMatchesSelector(t):e.webkitMatchesSelector(t)}function o(e,t){if("closest"in e)return e.closest(t);do{if(r(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));var c=n(61),i="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function a(e){return r(e,i)&&function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}(e)}function l(e){for(;e&&!a(e);)e=o(e,i);return e}function u(e){return Object(c.a)(e)===e}function s(e,t){var n=void 0===t?{}:t,r=n.isActive,o=void 0===r?u:r,c=n.preventScroll;return o(e)?-1:(e.focus({preventScroll:c}),o(e)?-1:requestAnimationFrame((function(){e.focus({preventScroll:c})})))}},function(e,t,n){"use strict";function r(e){return!((t=e.currentTarget)===(n=e.target)||t.contains(n));var t,n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(14),o=n(52),c=n(51),i=n(68),a=n(12),l=n(69),u=n(73),s=(n(83),n(46)),d=n(60),b=n(72),f=n(75),p=n(61),m=n(74);function v(e){return"undefined"!=typeof window&&-1!==window.navigator.userAgent.indexOf(e)}var O=v("Mac")&&!v("Chrome")&&(v("Safari")||v("Firefox"));function g(e){Object(b.a)(e)||e.focus()}var h=Object(c.a)({name:"Tabbable",compose:i.a,keys:["disabled","focusable"],useOptions:function(e,t){var n=t.disabled;return Object(r.b)({disabled:n},e)},useProps:function(e,t){var n=t.ref,o=t.tabIndex,c=t.onClick,i=t.onMouseDown,b=t.style,v=Object(r.a)(t,["ref","tabIndex","onClick","onMouseDown","style"]),h=Object(a.useRef)(null),j=Object(s.a)(c),k=Object(s.a)(i),y=e.disabled&&!e.focusable,_=Object(a.useState)(!0),E=_[0],w=_[1],C=E?o:o||0,S=e.disabled?Object(r.b)({pointerEvents:"none"},b):b,I=function(){if(O){var e=Object(a.useState)(null),t=e[0],n=e[1];return Object(a.useEffect)((function(){t&&(g(t),n(null))}),[t]),Object(a.useCallback)((function(e){var t=e.currentTarget;if(!Object(f.a)(e)&&Object(u.a)(t)){var r=Object(p.a)(t);if(r){var o="BODY"===r.tagName,c=Object(m.b)(t.parentElement);r===c||o&&!c?n(t):c?c.addEventListener("focusin",(function(){return n(t)}),{once:!0}):r.addEventListener("blur",(function(){return g(t)}),{once:!0})}}}),[])}}();Object(d.a)((function(){var e,t=h.current;t&&"BUTTON"!==(e=t).tagName&&"INPUT"!==e.tagName&&"SELECT"!==e.tagName&&"TEXTAREA"!==e.tagName&&"A"!==e.tagName&&"AUDIO"!==e.tagName&&"VIDEO"!==e.tagName&&w(!1)}),[]);var B=Object(a.useCallback)((function(t){var n;if(e.disabled)return t.stopPropagation(),void t.preventDefault();null===(n=j.current)||void 0===n||n.call(j,t)}),[e.disabled]),x=Object(a.useCallback)((function(t){var n;if(e.disabled)return t.stopPropagation(),void t.preventDefault();null===(n=k.current)||void 0===n||n.call(k,t),t.defaultPrevented||null==I||I(t)}),[e.disabled,I]);return Object(r.b)({ref:Object(l.a)(h,n),style:S,tabIndex:y?void 0:C,disabled:!(!y||!E)||void 0,"aria-disabled":!!e.disabled||void 0,onClick:B,onMouseDown:x},v)}});Object(o.a)({as:"div",useHook:h})},function(e,t){e.exports=window.wp.htmlEntities},function(e,t,n){e.exports=function(e,t){var n,r,o=0;function c(){var c,i,a=n,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(i=0;i<l;i++)if(a.args[i]!==arguments[i]){a=a.next;continue e}return a!==n&&(a===r&&(r=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n,a.prev=null,n.prev=a,n=a),a.val}a=a.next}for(c=new Array(l),i=0;i<l;i++)c[i]=arguments[i];return a={args:c,val:e.apply(null,c)},n?(n.prev=a,a.next=n):r=a,o===t.maxSize?(r=r.prev).next=null:o++,n=a,a.val}return t=t||{},c.clear=function(){n=null,r=null,o=0},c}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(12),o=n(64),c=n(45),i=function(e,t,n){void 0===n&&(n=t.children);var i=Object(r.useContext)(o.a);return i.useCreateElement?i.useCreateElement(e,t,n):"string"==typeof e&&function(e){return"function"==typeof e}(n)?(t.children,n(Object(c.b)(t,["children"]))):Object(r.createElement)(e,t,n)}},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t,n){var r;!function(o){var c=/^\s+/,i=/\s+$/,a=0,l=o.round,u=o.min,s=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,a={r:0,g:0,b:0},l=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=U.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=U.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=U.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=U.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=U.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=U.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=U.hex8.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),a:F(t[4]),format:n?"name":"hex8"}:(t=U.hex6.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),format:n?"name":"hex"}:(t=U.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=U.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&&(G(e.r)&&G(e.g)&&G(e.b)?(t=e.r,n=e.g,r=e.b,a={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"):G(e.h)&&G(e.s)&&G(e.v)?(d=R(e.s),b=R(e.v),a=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),a=n*(1-c*t),l=n*(1-(1-c)*t),u=r%6;return{r:255*[n,a,i,i,l,n][u],g:255*[l,n,n,a,i,i][u],b:255*[i,i,l,n,n,a][u]}}(e.h,d,b),p=!0,m="hsv"):G(e.h)&&G(e.s)&&G(e.l)&&(d=R(e.s),f=R(e.l),a=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 a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=i(l,a,e+1/3),o=i(l,a,e),c=i(l,a,e-1/3)}return{r:255*r,g:255*o,b:255*c}}(e.h,d,f),p=!0,m="hsl"),e.hasOwnProperty("a")&&(l=e.a)),l=T(l),{ok:p,format:e.format||m,r:u(255,s(a.r,0)),g:u(255,s(a.g,0)),b:u(255,s(a.b,0)),a:l}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=a++}function f(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=s(e,t,n),i=u(e,t,n),a=(c+i)/2;if(c==i)r=o=0;else{var l=c-i;switch(o=a>.5?l/(2-c-i):l/(c+i),c){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,l:a}}function p(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=s(e,t,n),i=u(e,t,n),a=c,l=c-i;if(o=0===c?0:l/c,c==i)r=0;else{switch(c){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,v:a}}function m(e,t,n,r){var o=[L(l(e).toString(16)),L(l(t).toString(16)),L(l(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[L(M(r)),L(l(e).toString(16)),L(l(t).toString(16)),L(l(n).toString(16))].join("")}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 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 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=s(0,u(255,n.r-l(-t/100*255))),n.g=s(0,u(255,n.g-l(-t/100*255))),n.b=s(0,u(255,n.b-l(-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 w(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 C(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 I(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 B(e,t){t=t||6;for(var n=b(e).toHsv(),r=n.h,o=n.s,c=n.v,i=[],a=1/t;t--;)i.push(b({h:r,s:o,v:c})),c=(c+a)%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=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(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=l(360*e.h),n=l(100*e.s),r=l(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=[L(l(e).toString(16)),L(l(t).toString(16)),L(l(n).toString(16)),L(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:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*N(this._r,255))+"%",g:l(100*N(this._g,255))+"%",b:l(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%)":"rgba("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(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(O,arguments)},saturate:function(){return this._applyModification(g,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(I,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(B,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(C,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]:R(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,a,l=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"!==(a=(c.size||"small").toLowerCase())&&"large"!==a&&(a="small"),r={level:i,size:a}).level+r.size){case"AAsmall":case"AAAlarge":o=l>=4.5;break;case"AAlarge":o=l>=3;break;case"AAAsmall":o=l>=7}return o},b.mostReadable=function(e,t,n){var r,o,c,i,a=null,l=0;o=(n=n||{}).includeFallbackColors,c=n.level,i=n.size;for(var u=0;u<t.length;u++)(r=b.readability(e,t[u]))>l&&(l=r,a=b(t[u]));return b.isReadable(e,a,{level:c,size:i})||!o?a:(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=u(t,s(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 u(1,s(0,e))}function A(e){return parseInt(e,16)}function L(e){return 1==e.length?"0"+e:""+e}function R(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,U=(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 G(e){return!!U.CSS_UNIT.exec(e)}e.exports?e.exports=b:void 0===(r=function(){return b}.call(t,n,t,e))||(e.exports=r)}(Math)},,function(e,t,n){"use strict";n(97),n(12)},function(e,t,n){"use strict";function r(e){var t=void 0===e?{}:e,n=t.keyMap,r=t.onKey,o=t.stopPropagation,c=t.onKeyDown,i=t.shouldKeyDown,a=void 0===i?function(){return!0}:i,l=t.preventDefault,u=void 0===l||l;return function(e){if(n){var t,i="function"==typeof n?n(e):n,l="function"==typeof u?u(e):u,s="function"==typeof o?o(e):o;if(e.key in i){var d=i[e.key];if("function"==typeof d&&a(e))return l&&e.preventDefault(),s&&e.stopPropagation(),r&&r(e),void d(e)}c&&"current"in c?null===(t=c.current)||void 0===t||t.call(c,e):null==c||c(e)}}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(14),o=n(52),c=n(51),i=n(12),a=n(73),l=(n(83),n(46)),u=n(57),s=n(76),d=Object(c.a)({name:"Clickable",compose:s.a,keys:["unstable_clickOnEnter","unstable_clickOnSpace"],useOptions:function(e){var t=e.unstable_clickOnEnter,n=void 0===t||t,o=e.unstable_clickOnSpace,c=void 0===o||o,i=Object(r.a)(e,["unstable_clickOnEnter","unstable_clickOnSpace"]);return Object(r.b)({unstable_clickOnEnter:n,unstable_clickOnSpace:c},i)},useProps:function(e,t){var n=t.onKeyDown,o=t.onKeyUp,c=Object(r.a)(t,["onKeyDown","onKeyUp"]),s=Object(i.useState)(!1),d=s[0],b=s[1],f=Object(l.a)(n),p=Object(l.a)(o),m=Object(i.useCallback)((function(t){var n;if(null===(n=f.current)||void 0===n||n.call(f,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey&&Object(u.a)(t)){var r=e.unstable_clickOnEnter&&"Enter"===t.key,o=e.unstable_clickOnSpace&&" "===t.key;if(r||o){if(function(e){var t=e.currentTarget;return!!e.isTrusted&&(Object(a.a)(t)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"A"===t.tagName||"SELECT"===t.tagName)}(t))return;t.preventDefault(),r?t.currentTarget.click():o&&b(!0)}}}),[e.disabled,e.unstable_clickOnEnter,e.unstable_clickOnSpace]),v=Object(i.useCallback)((function(t){var n;if(null===(n=p.current)||void 0===n||n.call(p,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey){var r=e.unstable_clickOnSpace&&" "===t.key;d&&r&&(b(!1),t.currentTarget.click())}}),[e.disabled,e.unstable_clickOnSpace,d]);return Object(r.b)({"data-active":d||void 0,onKeyDown:m,onKeyUp:v},c)}});Object(o.a)({as:"button",memo:!0,useHook:d})},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(104);function o(e,t,n){return e.dispatchEvent(Object(r.a)(e,t,n))}},function(e,t,n){"use strict";function r(e){try{var t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName,r="true"===e.contentEditable;return t||n||r||!1}catch(e){return!1}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){e.value=t}n.d(t,"a",(function(){return r}))},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(14),o=n(52),c=n(51),i=n(12),a=n(67),l=n(65),u=Object(c.a)({useState:l.a,keys:["id"],useOptions:function(e,t){var n=Object(i.useContext)(a.a),o=Object(i.useState)((function(){return e.unstable_idCountRef?(e.unstable_idCountRef.current+=1,"-"+e.unstable_idCountRef.current):e.baseId?"-"+n(""):""}))[0],c=Object(i.useMemo)((function(){return e.baseId||n()}),[e.baseId,n]),l=t.id||e.id||""+c+o;return Object(r.b)(Object(r.b)({},e),{},{id:l})},useProps:function(e,t){return Object(r.b)({id:e.id},t)}});Object(o.a)({as:"div",useHook:u})},,,function(e,t,n){},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(53);function o(e,t,n){return e.dispatchEvent(function(e,t,n){if(void 0===n&&(n={}),"function"==typeof KeyboardEvent)return new KeyboardEvent(t,n);var o=Object(r.a)(e).createEvent("KeyboardEvent");return o.initKeyboardEvent(t,n.bubbles,n.cancelable,function(e){return Object(r.a)(e).defaultView||window}(e),n.key,n.location,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),o}(e,t,n))}},,,function(e,t,n){"use strict";t.__esModule=!0;var r=n(180);t.default=r.TextareaAutosize},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(53);function o(e,t,n){var o,c;if(void 0===n&&(n={}),"function"==typeof Event)return new Event(t,n);var i=Object(r.a)(e).createEvent("Event");return i.initEvent(t,null===(o=n)||void 0===o?void 0:o.bubbles,null===(c=n)||void 0===c?void 0:c.cancelable),i}},,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return E})),n.d(t,"b",(function(){return _}));var r=n(14),o=n(52),c=n(51),i=n(68),a=n(12),l=n(69),u=(n(83),n(46)),s=n(57),d=n(61),b=n(76),f=n(79),p=n(84),m=n(53),v=n(89),O=n(99),g=n(58),h="undefined"!=typeof window&&"msCrypto"in window,j="undefined"!=typeof window&&"msCrypto"in window;function k(e,t,n){var r=Object(u.a)(n);return Object(a.useCallback)((function(n){var o;if(e&&function(e){return!!Object(s.a)(e)&&!e.metaKey&&"Tab"!==e.key}(n)){var c=null==t?void 0:t.ref.current;if(c&&(Object(O.a)(c,n.type,n),n.currentTarget.contains(c)))return n.stopPropagation(),void n.preventDefault()}null===(o=r.current)||void 0===o||o.call(r,n)}),[e,t])}function y(e,t){return null==e?void 0:e.some((function(e){return!!t&&e.ref.current===t}))}var _=Object(c.a)({name:"Composite",compose:[b.a],useState:g.g,useOptions:function(e){return Object(r.b)(Object(r.b)({},e),{},{currentId:Object(g.e)(e)})},useProps:function(e,t){var n=t.ref,o=t.onFocus,c=t.onBlur,i=t.onKeyDown,b=t.onKeyUp,f=Object(r.a)(t,["ref","onFocus","onBlur","onKeyDown","onKeyUp"]),O=Object(a.useRef)(null),_=Object(g.d)(e.items,e.currentId),E=Object(a.useRef)(void 0),w=Object(u.a)(o),C=Object(u.a)(c),S=j?function(e){var t=Object(a.useRef)(null);return Object(a.useEffect)((function(){var n=Object(m.a)(e.current),r=function(e){var n=e.target;t.current=n};return n.addEventListener("focus",r,!0),function(){n.removeEventListener("focus",r,!0)}}),[]),t}(O):void 0;Object(a.useEffect)((function(){var t=O.current;t&&e.unstable_moves&&!_&&t.focus()}),[e.unstable_moves,_]);var I=k(e.unstable_virtual,_,i),B=k(e.unstable_virtual,_,b),x=Object(a.useCallback)((function(t){var n;if(e.unstable_virtual){var r,o,c=(null==S?void 0:S.current)||t.relatedTarget,i=y(e.items,c);if(Object(s.a)(t)&&!i)return null===(r=w.current)||void 0===r||r.call(w,t),void(null==_||null===(o=_.ref.current)||void 0===o||o.focus());if(i)return void t.stopPropagation()}else if(Object(s.a)(t)){var a;null===(a=e.setCurrentId)||void 0===a||a.call(e,null)}null===(n=w.current)||void 0===n||n.call(w,t)}),[e.unstable_virtual,e.items,_,e.setCurrentId]),P=Object(a.useCallback)((function(t){var n;if(e.unstable_virtual){var r,o=y(e.items,t.target),c=function(e){return h?Object(d.a)(e.target):e.relatedTarget}(t),i=y(e.items,c);if(Object(s.a)(t)&&i)return(null===(r=E.current)||void 0===r?void 0:r.ref.current)&&Object(v.a)(E.current.ref.current,"blur",t),E.current=_,void t.stopPropagation();o?E.current=_:((null==_?void 0:_.ref.current)&&Object(v.a)(_.ref.current,"blur",t),E.current=void 0)}null===(n=C.current)||void 0===n||n.call(C,t)}),[e.unstable_virtual,e.items,_]),T=Object(a.useMemo)((function(){return Object(p.a)({onKeyDown:I,stopPropagation:!0,shouldKeyDown:function(t){return Object(s.a)(t)&&null===e.currentId},keyMap:function(){var t,n="horizontal"!==e.orientation,r="vertical"!==e.orientation,o=!!(null===(t=e.groups)||void 0===t?void 0:t.length),c=e.first&&function(){return e.first()},i=e.last&&function(){return e.last()};return{ArrowUp:(o||n)&&function(){if(o){var t,n=(c=e.items,Object(g.a)(Object(g.b)(Object(g.f)(Object(g.c)(c)))));(null==n?void 0:n.id)&&(null===(t=e.move)||void 0===t||t.call(e,n.id))}else{var r;null===(r=e.last)||void 0===r||r.call(e)}var c},ArrowRight:(o||r)&&c,ArrowDown:(o||n)&&c,ArrowLeft:(o||r)&&i,Home:c,End:i,PageUp:c,PageDown:i}}})}),[I,e.currentId,e.orientation,e.groups,e.items,e.move,e.last,e.first]);return Object(r.b)({ref:Object(l.a)(O,n),id:e.baseId,onFocus:x,onBlur:P,onKeyDown:T,onKeyUp:B,"aria-activedescendant":e.unstable_virtual&&(null==_?void 0:_.id)||void 0},f)},useComposeProps:function(e,t){t=Object(i.a)(e,t,!0);var n=Object(b.a)(e,t,!0);return e.unstable_virtual||null===e.currentId?n:Object(r.b)(Object(r.b)({},t),{},{ref:n.ref})}}),E=Object(o.a)({as:"div",useHook:_,useCreateElement:function(e,t,n){return Object(f.a)(e,t,n)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return k}));var r=n(14),o=n(52),c=n(51),i=n(12),a=n(69),l=(n(83),n(46)),u=n(57),s=n(72),d=n(75),b=n(74),f=n(85),p=n(84),m=n(53),v=n(58),O=n(94),g=n(90),h=n(91);function j(e){return e.querySelector("[data-composite-item-widget]")}var k=Object(c.a)({name:"CompositeItem",compose:[f.a,O.a],useState:v.g,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return f.a.unstable_propsAreEqual(e,t);var n=e.currentId,o=e.unstable_moves,c=Object(r.a)(e,["currentId","unstable_moves"]),i=t.currentId,a=t.unstable_moves,l=Object(r.a)(t,["currentId","unstable_moves"]);if(i!==n){if(t.id===i||t.id===n)return!1}else if(o!==a)return!1;return f.a.unstable_propsAreEqual(c,l)},useOptions:function(e){return Object(r.b)(Object(r.b)({},e),{},{id:e.id,currentId:Object(v.e)(e),unstable_clickOnSpace:!e.unstable_hasActiveWidget&&e.unstable_clickOnSpace})},useProps:function(e,t){var n,o=t.ref,c=t.tabIndex,f=void 0===c?0:c,v=t.onFocus,O=t.onBlur,k=t.onKeyDown,y=t.onClick,_=Object(r.a)(t,["ref","tabIndex","onFocus","onBlur","onKeyDown","onClick"]),E=Object(i.useRef)(null),w=e.id,C=e.disabled&&!e.focusable,S=e.currentId===w,I=Object(l.a)(S),B=Object(i.useRef)(!1),x=function(e){return Object(i.useMemo)((function(){var t;return null===(t=e.items)||void 0===t?void 0:t.find((function(t){return e.id&&t.id===e.id}))}),[e.items,e.id])}(e),P=Object(l.a)(v),T=Object(l.a)(O),N=Object(l.a)(k),D=Object(l.a)(y),A=!e.unstable_virtual&&!e.unstable_hasActiveWidget&&S||!(null===(n=e.items)||void 0===n?void 0:n.length);Object(i.useEffect)((function(){var t;if(w)return null===(t=e.registerItem)||void 0===t||t.call(e,{id:w,ref:E,disabled:!!C}),function(){var t;null===(t=e.unregisterItem)||void 0===t||t.call(e,w)}}),[w,C,e.registerItem,e.unregisterItem]),Object(i.useEffect)((function(){var t=E.current;t&&e.unstable_moves&&I.current&&t.focus()}),[e.unstable_moves]);var L=Object(i.useCallback)((function(t){var n,o;if(null===(n=P.current)||void 0===n||n.call(P,t),!t.defaultPrevented&&!Object(d.a)(t)&&w&&!function(e,t){if(Object(u.a)(e))return!1;for(var n,o=Object(r.c)(t);!(n=o()).done;)if(n.value.ref.current===e.target)return!0;return!1}(t,e.items)&&(null===(o=e.setCurrentId)||void 0===o||o.call(e,w),e.unstable_virtual&&e.baseId&&Object(u.a)(t))){var c=t.target,i=Object(m.a)(c).getElementById(e.baseId);i&&(B.current=!0,Object(b.a)(i))}}),[w,e.items,e.setCurrentId,e.unstable_virtual,e.baseId]),R=Object(i.useCallback)((function(t){var n;if(e.unstable_virtual&&B.current)return B.current=!1,t.preventDefault(),void t.stopPropagation();null===(n=T.current)||void 0===n||n.call(T,t)}),[e.unstable_virtual]),M=Object(i.useCallback)((function(e){var t;if(null===(t=N.current)||void 0===t||t.call(N,e),Object(u.a)(e)&&1===e.key.length&&" "!==e.key){var n=j(e.currentTarget);if(n&&Object(g.a)(n)){n.focus();var r=e.key;window.requestAnimationFrame((function(){Object(h.a)(n,r)}))}}}),[]),F=Object(i.useMemo)((function(){return Object(p.a)({onKeyDown:M,stopPropagation:!0,shouldKeyDown:u.a,keyMap:function(){var t="horizontal"!==e.orientation,n="vertical"!==e.orientation,r=!!(null==x?void 0:x.groupId),o=function(e){var t=j(e.currentTarget);t&&Object(g.a)(t)&&Object(h.a)(t,"")},c=e.up&&function(){return e.up()},i=e.next&&function(){return e.next()},a=e.down&&function(){return e.down()},l=e.previous&&function(){return e.previous()};return{Delete:o,Backspace:o,ArrowUp:(r||t)&&c,ArrowRight:(r||n)&&i,ArrowDown:(r||t)&&a,ArrowLeft:(r||n)&&l,Home:function(t){var n,o;!r||t.ctrlKey?null===(n=e.first)||void 0===n||n.call(e):null===(o=e.previous)||void 0===o||o.call(e,!0)},End:function(t){var n,o;!r||t.ctrlKey?null===(n=e.last)||void 0===n||n.call(e):null===(o=e.next)||void 0===o||o.call(e,!0)},PageUp:function(){var t,n;r?null===(t=e.up)||void 0===t||t.call(e,!0):null===(n=e.first)||void 0===n||n.call(e)},PageDown:function(){var t,n;r?null===(t=e.down)||void 0===t||t.call(e,!0):null===(n=e.last)||void 0===n||n.call(e)}}}})}),[M,e.orientation,x,e.up,e.next,e.down,e.previous,e.first,e.last]),V=Object(i.useCallback)((function(e){var t;if(null===(t=D.current)||void 0===t||t.call(D,e),!e.defaultPrevented){var n=j(e.currentTarget);n&&!Object(s.a)(n)&&n.focus()}}),[]);return Object(r.b)({ref:Object(a.a)(E,o),id:w,tabIndex:A?f:-1,"aria-selected":!(!e.unstable_virtual||!S)||void 0,onFocus:L,onBlur:R,onKeyDown:F,onClick:V},_)}}),y=Object(o.a)({as:"button",memo:!0,useHook:k})},,,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(176)),c=r(n(177)),i=n(12),a=r(i),l=r(n(147)),u=r(n(178)),s={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(s.str(e)||s.num(e))return e===t;if(s.obj(e)&&s.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!s.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 s.und(e)||s.nul(e)?t:e}function f(e){return s.und(e)?[]:s.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 s.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(s.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return s.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var v,O,g=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 g&&e.addChild(u(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.removeChild(u(t))}))},t}return l(t,e),t}(g),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 g&&e.addChild(u(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.removeChild(u(t))}))},t}l(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 g)&&(t[n]=r instanceof g?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(g);function k(e,t){v={fn:e,transform:t}}function y(e){O=e}var _,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},w=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function C(e){_=e}var S,I=function(){return Date.now()};function B(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 O},injectColorNames:y,get requestFrame(){return E},get cancelFrame(){return w},injectFrame:function(e,t){E=e,w=t},get interpolation(){return _},injectStringInterpolator:C,get now(){return I},injectNow:function(e){I=e},get defaultElement(){return S},injectDefaultElement:B,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 l(t,e),t}(j),L=!1,R=new Set,M=function e(){if(!L)return!1;var t=I(),n=R,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,a=!1,l=0;l<i.configs.length;l++){for(var u=i.configs[l],s=void 0,d=void 0,b=0;b<u.animatedValues.length;b++){var f=u.animatedValues[b];if(!f.done){var p=u.fromValues[b],m=u.toValues[b],v=f.lastPosition,O=m instanceof g,h=Array.isArray(u.initialVelocity)?u.initialVelocity[b]:u.initialVelocity;if(O&&(m=m.getValue()),u.immediate)f.setValue(m),f.done=!0;else if("string"!=typeof p&&"string"!=typeof m){if(void 0!==u.duration)v=p+u.easing((t-f.startTime)/u.duration)*(m-p),s=t>=f.startTime+u.duration;else if(u.decay)v=p+h/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(s=Math.abs(f.lastPosition-v)<.1)&&(m=v);else{d=void 0!==f.lastTime?f.lastTime:t,h=void 0!==f.lastVelocity?f.lastVelocity:u.initialVelocity,t>d+64&&(d=t);for(var j=Math.floor(t-d),k=0;k<j;++k)v+=1*(h+=(-u.tension*(v-m)+-u.friction*h)/u.mass*1/1e3)/1e3;var y=!(!u.clamp||0===u.tension)&&(p<m?v>m:v<m),_=Math.abs(h)<=u.precision,w=0===u.tension||Math.abs(m-v)<=u.precision;s=y||_&&w,f.lastVelocity=h,f.lastTime=t}O&&!u.toValues[b].done&&(s=!1),s?(f.value!==m&&(v=m),f.done=!0):a=!0,f.setValue(v),f.lastPosition=v}else f.setValue(m),f.done=!0}}i.props.onFrame&&(i.values[u.name]=u.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(R.delete(i),i.stop(!0))}return R.size?P?P():E(e):L=!1,L};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",a=r.extrapolateRight||r.extrapolate||"extend",l=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,a,l){var u=l?l(e):e;if(u<t){if("identity"===i)return u;"clamp"===i&&(u=t)}if(u>n){if("identity"===a)return u;"clamp"===a&&(u=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?u=-u:n===1/0?u-=t:u=(u-t)/(n-t),u=c(u),r===-1/0?u=-u:o===1/0?u+=r:u=u*(o-r)+r,u)}(e,c[t],c[t+1],o[t],o[t+1],l,i,a,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}l(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}l(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}(g),z=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new H(e)})),n}l(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),U=0,G=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=U++}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,a=c(t,["delay","to"]);if(s.arr(i)||s.fun(i))this.queue.push(o({},a,{delay:r,to:i}));else if(i){var l={};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)},a),u=l[i.delay]&&l[i.delay].to;l[i.delay]=o({},l[i.delay],i,{to:o({},u,i.to)})})),this.queue=Object.values(l)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),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;s.obj(r)&&(t.merged=o({},r,t.merged)),s.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 a=o.delay,l=c(o,["delay"]),u=function(o){i===r.length-1&&n===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=s.arr(l.to)||s.fun(l.to);a?setTimeout((function(){n===t.guid&&(d?t.runAsync(l,u):t.diff(l).start(u))}),a):d?t.runAsync(l,u):t.diff(l).start(u)}))}else s.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,R.has(this)||R.add(this),L||(L=!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,R.has(this)&&R.delete(this)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(s.arr(r.to))for(var l=function(e){var t=e,c=o({},r,m(r.to[t]));s.arr(c.config)&&(c.config=c.config[t]),a=a.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},u=0;u<r.to.length;u++)l(u);else if(s.fun(r.to)){var d,b=0;a=a.then((function(){return r.to((function(e){var t=o({},r,m(e));if(s.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}))}))}a.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,a=void 0===i?{}:i,l=n.config,u=void 0===l?{}:l,d=n.reverse,m=n.attach,v=n.reset,g=n.immediate;if(d){var h=[a,c];c=h[0],a=h[1]}this.merged=o({},c,this.merged,a),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],a=e[r]||{},l=s.num(i),d=s.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!O[i],m=s.arr(i),h=!l&&!m&&!d,k=s.und(c[r])?i:c[r],y=l||m||d?i:1,E=p(u,r);j&&(y=j.animations[r].parent);var w,C=a.parent,S=a.interpolation,B=f(j?y.getPayload():y),x=i;h&&(x=_({range:[0,1],output:[i,i]})(1));var P,T=S&&S.getValue(),N=!s.und(C)&&a.animatedValues.some((function(e){return!e.done})),D=!s.equ(x,T),A=!s.equ(x,a.previous),L=!s.equ(E,a.config);if(v||A&&D||L){var R;if(l||d)C=S=a.parent||new H(k);else if(m)C=S=a.parent||new z(k);else if(h){var M=a.interpolation&&a.interpolation.calc(a.parent.value);M=void 0===M||v?k:M,a.parent?(C=a.parent).setValue(0,!1):C=new H(0);var F={output:[M,i]};a.interpolation?(S=a.interpolation,a.interpolation.updateConfig(F)):S=C.interpolate(F)}return B=f(j?y.getPayload():y),w=f(C.getPayload()),v&&!h&&C.setValue(k,!1),t.hasChanged=!0,w.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=I(),e.done=!1,e.animatedStyles.clear()})),p(g,r)&&C.setValue(h?y:i,!1),o({},e,((R={})[r]=o({},a,{name:r,parent:C,interpolation:S,animatedValues:w,toValues:B,previous:x,config:E,fromValues:f(C.getValue()),immediate:p(g,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}),R))}return D?e:(h&&(C.setValue(1,!1),S.updateConfig({output:[x,x]})),C.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}(),K=function(e,t){var n=i.useRef(!1),r=i.useRef(),o=s.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 G,i=o?p(t,r,c):t[r];return 0===r&&(n=i.ref),c.update(i),n||c.start(),c})),n]}),[e]),a=c[0],l=c[1];r.current=a,i.useImperativeHandle(l,(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 u=i.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?p(e,n,t):e[n]),l||t.start()}))}}),[e]);i.useEffect((function(){n.current?o||u(t):l||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,u,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:d},W=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,a=function(e){return e.key!==n};(s.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},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 g||(t=v.transform(t)),n.payload=t,n}return l(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})$/,ae=/^#([0-9a-fA-F]{8})$/;function le(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 ue(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=le(o,r,e+1/3),i=le(o,r,e),a=le(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function se(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))?(se(n[1])<<24|se(n[2])<<16|se(n[3])<<8|255)>>>0:(n=te.exec(t))?(se(n[1])<<24|se(n[2])<<16|se(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=ae.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|ue(de(n[1]),fe(n[2]),fe(n[3])))>>>0:(n=re.exec(t))?(ue(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,Oe=new RegExp("("+Object.keys(Q).join("|")+")","g"),ge={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||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}ge=Object.keys(ge).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}),ge);var ke={};N((function(e){return new X(e)})),B("div"),C((function(e){var t=e.output.map((function(e){return e.replace(ve,pe)})).map((function(e){return e.replace(Oe,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,a=c(t,["style","children","scrollTop","scrollLeft"]),l="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var u in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(u)){var s=0===u.indexOf("--"),d=je(u,n[u],s);"float"===u&&(u="cssFloat"),s?e.style.setProperty(u,d):e.style[u]=d}for(var b in a){var f=l?b:ke[b]||(ke[b]=b.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,a[b])}}),(function(e){return e}));var ye,_e,Ee=(ye=function(e){return i.forwardRef((function(t,n){var r=d(),l=i.useRef(!0),u=i.useRef(null),b=i.useRef(null),f=i.useCallback((function(e){var t=u.current;u.current=new A(e,(function(){b.current&&!1===v.fn(b.current,u.current.getAnimatedValue())&&r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){l.current=!1,u.current&&u.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(b,l,r)})),f(t);var p=u.current.getValue(),m=(p.scrollTop,p.scrollLeft,c(p,["scrollTop","scrollLeft"]));return a.createElement(e,o({},m,{ref:function(e){return b.current=(t=e,(r=n)&&(s.fun(r)?r(t):s.obj(r)&&(r.current=t)),t);var t,r}}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(s.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)}),we=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=we,t.a=we,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=D,t.useSpring=function(e){var t=s.fun(e),n=K(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=s.fun(t),c=p(t),a=i.useRef(),l=K(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},c,{config:p(c.config,e),attach:e>0&&function(){return a.current[e-1]}})})),u=l[0],d=l[1],b=l[2],f=i.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=a.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?[u,f,b]:u},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=$(r),l=a.lazy,u=void 0!==l&&l,s=(a.unique,a.reset),b=void 0!==s&&s,f=(a.enter,a.leave,a.update,a.onDestroyed),m=(a.keys,a.items,a.onFrame),v=a.onRest,O=a.onStart,g=a.ref,h=c(a,["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"]),a=$(t),l=a.items,u=a.keys,s=a.initial,d=a.from,b=a.enter,f=a.leave,m=a.update,v=a.trail,O=void 0===v?0:v,g=a.unique,h=a.config,j=a.order,k=void 0===j?["enter","leave","update"]:j,y=$(r),_=y.keys,E=y.items,w=o({},i.current),C=[].concat(i.deleted),S=Object.keys(w),I=new Set(S),B=new Set(u),x=u.filter((function(e){return!I.has(e)})),P=i.transitions.filter((function(e){return!e.destroyed&&!B.has(e.originalKey)})).map((function(e){return e.originalKey})),T=u.filter((function(e){return I.has(e)})),N=-O;k.length;)switch(k.shift()){case"enter":x.forEach((function(e,t){g&&C.find((function(t){return t.originalKey===e}))&&(C=C.filter((function(t){return t.originalKey!==e})));var r=u.indexOf(e),o=l[r],c=n&&void 0!==s?"initial":"enter";w[e]={slot:c,originalKey:e,key:g?String(e):W++,item:o,trail:N+=O,config:p(h,o,c),from:p(n&&void 0!==s?s||{}:d,o),to:p(b,o)}}));break;case"leave":P.forEach((function(e){var t=_.indexOf(e),n=E[t];C.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=O,config:p(h,n,"leave"),to:p(f,n)})),delete w[e]}));break;case"update":T.forEach((function(e){var t=u.indexOf(e),n=l[t];w[e]=o({},w[e],{item:n,slot:"update",trail:N+=O,config:p(h,n,"update"),to:p(m,n)})}))}var D=u.map((function(e){return w[e]}));return C.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:w,deleted:C,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,a=e.key,l=e.item;y.current.instances.has(a)||y.current.instances.set(a,new G);var s=y.current.instances.get(a),d=o({},h,{to:r,from:n,config:c,ref:g,onRest:function(n){y.current.mounted&&(e.destroyed&&(g||u||Y(y,a),f&&f(l)),!Array.from(y.current.instances).some((function(e){return!e[1].idle}))&&(g||u)&&y.current.deleted.length>0&&Y(y),v&&v(l,t,n))},onStart:O&&function(){return O(l,t)},onFrame:m&&function(e){return m(l,t,e)},delay:i,reset:b&&"enter"===t});s.update(d),y.current.paused||s.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(){s.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 a=n*t[r];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+a})})),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=K},,,,,,,function(e,t,n){"use strict";e.exports=n(184)},function(e,t){e.exports=window.wp.wordcount},,,function(e,t){e.exports=window.wp.shortcode},function(e,t,n){"use strict";var r=n(6),o=n(15),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,a=void 0===n?24:n,l=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:a,height:a},l))}},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},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},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},,,,,,function(e,t,n){"use strict";var r=n(141);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,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}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},,,,,,function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},,,,,,function(e,t){e.exports=window.wp.tokenList},,,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},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},,,,,,,,,,,,function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},,,,,,,function(e,t){function 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},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}},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}},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},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),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 a=n(12),l=n(32),u=n(181),s=n(182),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:s(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&&u(e.textarea)})):this.textarea&&u(this.textarea),this.textarea&&this.textarea.addEventListener("autosize:resized",this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener("autosize:resized",this.onResize),u.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),l=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),u=this.state.lineHeight,s=n&&u?u*n:null;return a.createElement("textarea",c({},l,{onChange:this.onChange,style:s?c({},r,{maxHeight:s}):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&&u.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(d,c({},e,{innerRef:t}))}))},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 a(e){var t=o.get(e);t&&t.update()}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t,n=null,r=null,i=null,a=function(){e.clientWidth!==r&&d()},l=function(t){window.removeEventListener("resize",a,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",l,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),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",l,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:l,update:d}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function u(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function s(){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(){s();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&&(u("scroll"),s(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(u("hidden"),s(),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},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=l,e.exports=t.default})?r.apply(t,[e,t]):r)||(e.exports=o)},function(e,t,n){var r=n(183);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 a=r(e,"font-size");i.style.fontSize=a,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i),n=i.offsetHeight,l.removeChild(i)}return n}},function(e,t){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},function(e,t,n){"use strict";var r=n(185);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,a=n.alignWithLeft,l=n.offsetTop||0,u=n.offsetLeft||0,s=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,O=void 0,g=void 0,h=void 0,j=void 0,k=void 0,y=void 0,_=void 0,E=void 0,w=void 0;b?(y=t,w=r.height(y),E=r.width(y),_={left:r.scrollLeft(y),top:r.scrollTop(y)},j={left:f.left-_.left-u,top:f.top-_.top-l},k={left:f.left+m-(_.left+E)+d,top:f.top+p-(_.top+w)+s},h=_):(v=r.offset(t),O=t.clientHeight,g=t.clientWidth,h={left:t.scrollLeft,top:t.scrollTop},j={left:f.left-(v.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-u,top:f.top-(v.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-l},k={left:f.left+m-(v.left+g+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:f.top+p-(v.top+O+(parseFloat(r.css(t,"borderBottomWidth"))||0))+s}),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===a?r.scrollLeft(t,h.left+j.left):!1===a?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||((a=void 0===a||!!a)?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+k.left)))}},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function 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 a(e){return c(e,!0)}function l(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+=a(r),t}var u=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),s=/^(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(u.test(n)&&!s.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 O(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 a;a="border"===o?o+n[i]+"Width":o+n[i],r+=parseFloat(b(e,a))||0}return r}function g(e){return null!=e&&e==e.window}var h={};function j(e,t,n){if(g(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 a=void 0!==o||c,l=o||i;if(-1===n)return a?l-O(e,["border","padding"],r):i;if(a){var u=2===n?-O(e,["border"],r):O(e,["margin"],r);return l+(1===n?0:u)}return i+O(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+=O(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 l(e);!function(e,t){"static"===_(e,"position")&&(e.style.position="relative");var n=l(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:g,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(g(e)){if(void 0===t)return i(e);window.scrollTo(t,a(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(g(e)){if(void 0===t)return a(e);window.scrollTo(i(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},h)},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},,,,,,,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},,,,,,,,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},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},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},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},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},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},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},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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(275))&&r.__esModule?r:{default:r}).default);t.characterDiff=o},function(e,t,n){"use strict";t.match=function(e,t){return l(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=s(o),c=s(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":o=u(o),c=u(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=l;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)?$/,a=/(dpi|dpcm|dppx)?$/;function l(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(r),n=t[1],i=t[2],a=t[3]||"",l={};return l.inverse=!!n&&"not"===n.toLowerCase(),l.type=i?i.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],l.expressions=a.map((function(e){var t=e.match(o),n=t[1].toLowerCase().match(c);return{modifier:n[1],feature:n[2],value:t[2]}})),l}))}function u(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function s(e){var t=parseFloat(e);switch(String(e).match(a)[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}}},function(e,t){var n=e.exports=function(e){return new r(e)};function r(e){this.value=e}function o(e,t,n){var r=[],o=[],a=!0;return function e(d){var 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){l(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(){a=!1},block:function(){p=!1}};if(!a)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 O=t.call(m,m.node);return void 0!==O&&m.update&&m.update(O),f.before&&f.before.call(m,m.node),p?("object"!=typeof m.node||null===m.node||m.circular||(o.push(m),v(),u(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&&s.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(l(e))t=[];else if("[object Date]"===a(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===a(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===a(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===a(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===a(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===a(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return u(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||!s.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||!s.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];s.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},r.prototype.map=function(e){return o(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(r=e.call(this,r,t))})),r},r.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},r.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var a=c(r);return e.push(r),t.push(a),u(i(r),(function(e){a[e]=n(r[e])})),e.pop(),t.pop(),a}return r}(this.value)};var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function a(e){return Object.prototype.toString.call(e)}var l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},u=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};u(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 s=Object.hasOwnProperty||function(e,t){return t in e}},,,,,,,,,,,,,,,,,,,,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},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},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},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},function(e,t,n){"use strict";function r(){}function o(e,t,n,r,o){for(var c=0,i=t.length,a=0,l=0;c<i;c++){var u=t[c];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,c&&t[c-1].added){var s=t[c-1];t[c-1]=t[c],t[c]=s}}else{if(!u.added&&o){var d=n.slice(a,a+u.count);d=d.map((function(e,t){var n=r[l+t];return n.length>e.length?n:e})),u.value=e.join(d)}else u.value=e.join(n.slice(a,a+u.count));a+=u.count,u.added||(l+=u.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 a(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 l=(t=this.removeEmpty(this.tokenize(t))).length,u=e.length,s=1,d=l+u,b=[{newPos:-1,components:[]}],f=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=l&&f+1>=u)return a([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*s;n<=s;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<l,v=f&&0<=p&&p<u;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>=l&&p+1>=u)return a(o(i,r.components,t,e,i.useLongestToken));b[n]=r}else b[n]=void 0}s++}if(r)!function e(){setTimeout((function(){if(s>d)return r();p()||e()}),0)}();else for(;s<=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,a=i-r,l=0;i+1<o&&a+1<c&&this.equals(t[i+1],n[a+1]);)i++,a++,l++;return l&&e.components.push({count:l}),e.newPos=i,a},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},function(e,t,n){"use strict";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},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},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"getColorClassName",(function(){return Pe})),n.d(t,"getColorObjectByAttributeValues",(function(){return Be})),n.d(t,"getColorObjectByColorValue",(function(){return xe})),n.d(t,"createCustomColorsHOC",(function(){return Wn})),n.d(t,"withColors",(function(){return qn})),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 Le})),n.d(t,"__experimentalUseGradient",(function(){return Re})),n.d(t,"getFontSize",(function(){return sn})),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 pr})),n.d(t,"AlignmentToolbar",(function(){return yr})),n.d(t,"Autocomplete",(function(){return Fr})),n.d(t,"BlockAlignmentToolbar",(function(){return z})),n.d(t,"__experimentalBlockFullHeightAligmentToolbar",(function(){return Hr})),n.d(t,"__experimentalBlockAlignmentMatrixToolbar",(function(){return zr})),n.d(t,"BlockBreadcrumb",(function(){return Pa})),n.d(t,"BlockContextProvider",(function(){return Aa})),n.d(t,"BlockControls",(function(){return w})),n.d(t,"BlockColorsStyleSelector",(function(){return Fa})),n.d(t,"BlockEdit",(function(){return za})),n.d(t,"useBlockEditContext",(function(){return h})),n.d(t,"BlockFormatControls",(function(){return qa})),n.d(t,"BlockIcon",(function(){return Lr})),n.d(t,"BlockNavigationDropdown",(function(){return Ad})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return kd})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return Xd})),n.d(t,"__experimentalBlockNavigationTree",(function(){return Pd})),n.d(t,"__experimentalBlockVariationPicker",(function(){return Zd})),n.d(t,"__experimentalBlockVariationTransforms",(function(){return tb})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return ub})),n.d(t,"ButtonBlockerAppender",(function(){return Au})),n.d(t,"ColorPalette",(function(){return fb})),n.d(t,"ColorPaletteControl",(function(){return pb})),n.d(t,"ContrastChecker",(function(){return it})),n.d(t,"__experimentalGradientPicker",(function(){return Ob})),n.d(t,"__experimentalGradientPickerControl",(function(){return gb})),n.d(t,"__experimentalGradientPickerPanel",(function(){return hb})),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 kb})),n.d(t,"InnerBlocks",(function(){return Db})),n.d(t,"__experimentalUseInnerBlocksProps",(function(){return Nb})),n.d(t,"InspectorAdvancedControls",(function(){return ee})),n.d(t,"InspectorControls",(function(){return pe})),n.d(t,"__experimentalLinkControl",(function(){return bf})),n.d(t,"__experimentalLinkControlSearchInput",(function(){return of})),n.d(t,"__experimentalLinkControlSearchResults",(function(){return qb})),n.d(t,"__experimentalLinkControlSearchItem",(function(){return Wb})),n.d(t,"LineHeightControl",(function(){return zt})),n.d(t,"MediaReplaceFlow",(function(){return Of})),n.d(t,"MediaPlaceholder",(function(){return _f})),n.d(t,"MediaUpload",(function(){return mf})),n.d(t,"MediaUploadCheck",(function(){return vf})),n.d(t,"PanelColorSettings",(function(){return Zn})),n.d(t,"PlainText",(function(){return Cf})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return If})),n.d(t,"RichText",(function(){return Yd})),n.d(t,"RichTextShortcut",(function(){return Bf})),n.d(t,"RichTextToolbarButton",(function(){return xf})),n.d(t,"__unstableRichTextInputEvent",(function(){return Pf})),n.d(t,"ToolSelector",(function(){return Nf})),n.d(t,"__experimentalUnitControl",(function(){return Df})),n.d(t,"URLInput",(function(){return Ub})),n.d(t,"URLInputButton",(function(){return Rf})),n.d(t,"URLPopover",(function(){return kf})),n.d(t,"__experimentalImageURLInputUI",(function(){return Hf})),n.d(t,"withColorContext",(function(){return bb})),n.d(t,"__experimentalBlockSettingsMenuFirstItem",(function(){return xs})),n.d(t,"__experimentalInserterMenuExtension",(function(){return yu})),n.d(t,"__experimentalPreviewOptions",(function(){return Uf})),n.d(t,"__experimentalUseResizeCanvas",(function(){return Xf})),n.d(t,"BlockInspector",(function(){return rp})),n.d(t,"BlockList",(function(){return Zs})),n.d(t,"useBlockProps",(function(){return ad})),n.d(t,"__experimentalBlock",(function(){return ap})),n.d(t,"BlockMover",(function(){return is})),n.d(t,"BlockPreview",(function(){return Kl})),n.d(t,"BlockSelectionClearer",(function(){return up})),n.d(t,"__unstableUseBlockSelectionClearer",(function(){return lp})),n.d(t,"BlockSettingsMenu",(function(){return Fs})),n.d(t,"BlockSettingsMenuControls",(function(){return Ls})),n.d(t,"BlockTitle",(function(){return xa})),n.d(t,"BlockToolbar",(function(){return Gs})),n.d(t,"CopyHandler",(function(){return _s})),n.d(t,"__unstableUseClipboardHandler",(function(){return ys})),n.d(t,"DefaultBlockAppender",(function(){return Du})),n.d(t,"__unstableUseEditorStyles",(function(){return Np})),n.d(t,"Inserter",(function(){return Nu})),n.d(t,"__experimentalLibrary",(function(){return Dp})),n.d(t,"__experimentalSearchForm",(function(){return Ll})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return Lp})),n.d(t,"MultiSelectScrollIntoView",(function(){return Mp})),n.d(t,"__unstableUseScrollMultiSelectionIntoView",(function(){return Rp})),n.d(t,"NavigableToolbar",(function(){return os})),n.d(t,"ObserveTyping",(function(){return Hp})),n.d(t,"__unstableUseTypingObserver",(function(){return Vp})),n.d(t,"PreserveScrollInReorder",(function(){return zp})),n.d(t,"SkipToSelectedBlock",(function(){return Qf})),n.d(t,"Typewriter",(function(){return Wp})),n.d(t,"__unstableUseTypewriter",(function(){return Kp})),n.d(t,"Warning",(function(){return Ol})),n.d(t,"WritingFlow",(function(){return Zu})),n.d(t,"__unstableUseCanvasClickRedirect",(function(){return $p})),n.d(t,"useBlockDisplayInformation",(function(){return Ba})),n.d(t,"BlockEditorProvider",(function(){return zl})),n.d(t,"__experimentalUseSimulatedMediaQuery",(function(){return Yf})),n.d(t,"__experimentalUseEditorFeature",(function(){return Oe})),n.d(t,"transformStyles",(function(){return Tp})),n.d(t,"validateThemeColors",(function(){return Yp})),n.d(t,"validateThemeGradients",(function(){return Xp})),n.d(t,"__experimentalGetMatchingVariation",(function(){return Jd})),n.d(t,"storeConfig",(function(){return Sa})),n.d(t,"store",(function(){return Ia})),n.d(t,"SETTINGS_DEFAULTS",(function(){return Gr}));var r={};n.r(r),n.d(r,"getBlockName",(function(){return mo})),n.d(r,"isBlockValid",(function(){return vo})),n.d(r,"getBlockAttributes",(function(){return Oo})),n.d(r,"getBlock",(function(){return go})),n.d(r,"__unstableGetBlockWithoutInnerBlocks",(function(){return ho})),n.d(r,"getBlocks",(function(){return jo})),n.d(r,"__unstableGetBlockWithBlockTree",(function(){return ko})),n.d(r,"__unstableGetBlockTree",(function(){return yo})),n.d(r,"getClientIdsOfDescendants",(function(){return _o})),n.d(r,"getClientIdsWithDescendants",(function(){return Eo})),n.d(r,"getGlobalBlockCount",(function(){return wo})),n.d(r,"getBlocksByClientId",(function(){return Co})),n.d(r,"getBlockCount",(function(){return So})),n.d(r,"getSelectionStart",(function(){return Io})),n.d(r,"getSelectionEnd",(function(){return Bo})),n.d(r,"getBlockSelectionStart",(function(){return xo})),n.d(r,"getBlockSelectionEnd",(function(){return Po})),n.d(r,"getSelectedBlockCount",(function(){return To})),n.d(r,"hasSelectedBlock",(function(){return No})),n.d(r,"getSelectedBlockClientId",(function(){return Do})),n.d(r,"getSelectedBlock",(function(){return Ao})),n.d(r,"getBlockRootClientId",(function(){return Lo})),n.d(r,"getBlockParents",(function(){return Ro})),n.d(r,"getBlockParentsByBlockName",(function(){return Mo})),n.d(r,"getBlockHierarchyRootClientId",(function(){return Fo})),n.d(r,"getLowestCommonAncestorWithSelectedBlock",(function(){return Vo})),n.d(r,"getAdjacentBlockClientId",(function(){return Ho})),n.d(r,"getPreviousBlockClientId",(function(){return zo})),n.d(r,"getNextBlockClientId",(function(){return Uo})),n.d(r,"getSelectedBlocksInitialCaretPosition",(function(){return Go})),n.d(r,"getSelectedBlockClientIds",(function(){return Ko})),n.d(r,"getMultiSelectedBlockClientIds",(function(){return Wo})),n.d(r,"getMultiSelectedBlocks",(function(){return qo})),n.d(r,"getFirstMultiSelectedBlockClientId",(function(){return $o})),n.d(r,"getLastMultiSelectedBlockClientId",(function(){return Yo})),n.d(r,"isFirstMultiSelectedBlock",(function(){return Xo})),n.d(r,"isBlockMultiSelected",(function(){return Qo})),n.d(r,"isAncestorMultiSelected",(function(){return Zo})),n.d(r,"getMultiSelectedBlocksStartClientId",(function(){return Jo})),n.d(r,"getMultiSelectedBlocksEndClientId",(function(){return ec})),n.d(r,"getBlockOrder",(function(){return tc})),n.d(r,"getBlockIndex",(function(){return nc})),n.d(r,"isBlockSelected",(function(){return rc})),n.d(r,"hasSelectedInnerBlock",(function(){return oc})),n.d(r,"isBlockWithinSelection",(function(){return cc})),n.d(r,"hasMultiSelection",(function(){return ic})),n.d(r,"isMultiSelecting",(function(){return ac})),n.d(r,"isSelectionEnabled",(function(){return lc})),n.d(r,"getBlockMode",(function(){return uc})),n.d(r,"isTyping",(function(){return sc})),n.d(r,"isDraggingBlocks",(function(){return dc})),n.d(r,"getDraggedBlockClientIds",(function(){return bc})),n.d(r,"isBlockBeingDragged",(function(){return fc})),n.d(r,"isAncestorBeingDragged",(function(){return pc})),n.d(r,"isCaretWithinFormattedText",(function(){return mc})),n.d(r,"getBlockInsertionPoint",(function(){return vc})),n.d(r,"isBlockInsertionPointVisible",(function(){return Oc})),n.d(r,"isValidTemplate",(function(){return gc})),n.d(r,"getTemplate",(function(){return hc})),n.d(r,"getTemplateLock",(function(){return jc})),n.d(r,"canInsertBlockType",(function(){return yc})),n.d(r,"canInsertBlocks",(function(){return _c})),n.d(r,"getInserterItems",(function(){return Bc})),n.d(r,"getBlockTransformItems",(function(){return xc})),n.d(r,"hasInserterItems",(function(){return Pc})),n.d(r,"__experimentalGetAllowedBlocks",(function(){return Tc})),n.d(r,"getBlockListSettings",(function(){return Nc})),n.d(r,"getSettings",(function(){return Dc})),n.d(r,"isLastBlockChangePersistent",(function(){return Ac})),n.d(r,"__experimentalGetBlockListSettingsForBlocks",(function(){return Lc})),n.d(r,"__experimentalGetParsedReusableBlock",(function(){return Rc})),n.d(r,"__unstableIsLastBlockChangeIgnored",(function(){return Mc})),n.d(r,"__experimentalGetLastBlockAttributeChanges",(function(){return Fc})),n.d(r,"isNavigationMode",(function(){return Hc})),n.d(r,"hasBlockMovingClientId",(function(){return zc})),n.d(r,"didAutomaticChange",(function(){return Uc})),n.d(r,"isBlockHighlighted",(function(){return Gc})),n.d(r,"areInnerBlocksControlled",(function(){return Kc})),n.d(r,"__experimentalGetActiveBlockIdByBlockNames",(function(){return Wc}));var o={};n.r(o),n.d(o,"resetBlocks",(function(){return yi})),n.d(o,"validateBlocksToTemplate",(function(){return _i})),n.d(o,"resetSelection",(function(){return Ei})),n.d(o,"receiveBlocks",(function(){return wi})),n.d(o,"updateBlockAttributes",(function(){return Ci})),n.d(o,"updateBlock",(function(){return Si})),n.d(o,"selectBlock",(function(){return Ii})),n.d(o,"selectPreviousBlock",(function(){return Bi})),n.d(o,"selectNextBlock",(function(){return xi})),n.d(o,"startMultiSelect",(function(){return Pi})),n.d(o,"stopMultiSelect",(function(){return Ti})),n.d(o,"multiSelect",(function(){return Ni})),n.d(o,"clearSelectedBlock",(function(){return Di})),n.d(o,"toggleSelection",(function(){return Ai})),n.d(o,"replaceBlocks",(function(){return Ri})),n.d(o,"replaceBlock",(function(){return Mi})),n.d(o,"moveBlocksDown",(function(){return Vi})),n.d(o,"moveBlocksUp",(function(){return Hi})),n.d(o,"moveBlocksToPosition",(function(){return zi})),n.d(o,"moveBlockToPosition",(function(){return Ui})),n.d(o,"insertBlock",(function(){return Gi})),n.d(o,"insertBlocks",(function(){return Ki})),n.d(o,"__unstableSetInsertionPoint",(function(){return Wi})),n.d(o,"showInsertionPoint",(function(){return qi})),n.d(o,"hideInsertionPoint",(function(){return $i})),n.d(o,"setTemplateValidity",(function(){return Yi})),n.d(o,"synchronizeTemplate",(function(){return Xi})),n.d(o,"mergeBlocks",(function(){return Qi})),n.d(o,"removeBlocks",(function(){return Zi})),n.d(o,"removeBlock",(function(){return Ji})),n.d(o,"replaceInnerBlocks",(function(){return ea})),n.d(o,"toggleBlockMode",(function(){return ta})),n.d(o,"startTyping",(function(){return na})),n.d(o,"stopTyping",(function(){return ra})),n.d(o,"startDraggingBlocks",(function(){return oa})),n.d(o,"stopDraggingBlocks",(function(){return ca})),n.d(o,"enterFormattedText",(function(){return ia})),n.d(o,"exitFormattedText",(function(){return aa})),n.d(o,"selectionChange",(function(){return la})),n.d(o,"insertDefaultBlock",(function(){return ua})),n.d(o,"updateBlockListSettings",(function(){return sa})),n.d(o,"updateSettings",(function(){return da})),n.d(o,"__unstableSaveReusableBlock",(function(){return ba})),n.d(o,"__unstableMarkLastChangeAsPersistent",(function(){return fa})),n.d(o,"__unstableMarkNextChangeAsNotPersistent",(function(){return pa})),n.d(o,"__unstableMarkAutomaticChange",(function(){return ma})),n.d(o,"__unstableMarkAutomaticChangeFinal",(function(){return va})),n.d(o,"setNavigationMode",(function(){return Oa})),n.d(o,"setBlockMovingClientId",(function(){return ga})),n.d(o,"duplicateBlocks",(function(){return ha})),n.d(o,"insertBeforeBlock",(function(){return ja})),n.d(o,"insertAfterBlock",(function(){return ka})),n.d(o,"toggleBlockHighlight",(function(){return ya})),n.d(o,"flashBlock",(function(){return _a})),n.d(o,"setHasControlledInnerBlocks",(function(){return Ea}));var c=n(22),i=n(8),a=n(6),l=n(0),u=n(11),s=n.n(u),d=n(2),b=n(13),f=n(33),p=n(10),m=n(4),v=n(3),O=Object(l.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:d.noop,clientId:null}),g=O.Provider;function h(){return Object(l.useContext)(O)}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,a=o.getMultiSelectedBlockClientIds;return!!i(n)&&a().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(l.createElement)(y,null,(function(e){var r=Object(d.isEmpty)(e)?null:e;return Object(l.createElement)(v.__experimentalToolbarContext.Provider,{value:r},Object(l.createElement)(v.ToolbarGroup,{controls:t}),n)})):null};E.Slot=function(e){var t=Object(l.useContext)(v.__experimentalToolbarContext);return Object(l.createElement)(_,Object(i.a)({},e,{fillProps:t}))};var w=E,C=n(1),S=n(7),I=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),B=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),x=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),P=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),T=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),N={type:"default"},D=Object(l.createContext)(N),A=D.Provider;function L(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 R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M={left:{icon:I,title:Object(C.__)("Align left")},center:{icon:B,title:Object(C.__)("Align center")},right:{icon:x,title:Object(C.__)("Align right")},wide:{icon:P,title:Object(C.__)("Wide width")},full:{icon:T,title:Object(C.__)("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,a=Object(m.useSelect)((function(e){return{wideControlsEnabled:(0,e("core/block-editor").getSettings)().alignWide}})).wideControlsEnabled,u=void 0!==a&&a,s=Object(l.useContext)(D);if("default"!==s.type)return null;var d=s.alignments,b=void 0===d?F:d,f=o.filter((function(e){return(u||!V.includes(e))&&b.includes(e)}));if(0===f.length)return null;var p=M[t],O=M.center;return Object(l.createElement)(v.ToolbarGroup,{popoverProps:H,isCollapsed:i,icon:p?p.icon:O.icon,label:Object(C.__)("Change alignment"),controls:f.map((function(e){return R(R({},M[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})};function U(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 G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var K=["left","center","right","wide","full"],W=["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)?K.filter((function(t){return e.includes(t)})):!0===e?K:[],!r||!0===e&&!n?d.without.apply(void 0,[t].concat(W)):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(l.createElement)(w,{key:"align-controls"},Object(l.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(l.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(l.createElement)(e,t);var c=q(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0),o),a=t.wrapperProps;return c.includes(r)&&(a=G(G({},a),{},{"data-align":r})),Object(l.createElement)(e,Object(i.a)({},t,{wrapperProps:a}))}}));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=G(G({},e.attributes),{},{align:{type:"string",enum:[].concat(K,[""])}})),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=s()("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(l.createElement)(Q,null,t):null}J.slotName="InspectorAdvancedControls",J.Slot=Z;var ee=J;function te(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 ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var re=/[\s#]/g,oe=Object(b.createHigherOrderComponent)((function(e){return function(t){return Object(p.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object(l.createElement)(l.Fragment,null,Object(l.createElement)(e,t),Object(l.createElement)(ee,null,Object(l.createElement)(v.TextControl,{className:"html-anchor-control",label:Object(C.__)("HTML anchor"),help:Object(l.createElement)(l.Fragment,null,Object(C.__)("Enter a word or two — without spaces — to make a unique web address just for this heading, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),Object(l.createElement)(v.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(C.__)("Learn more about anchors"))),value:t.attributes.anchor||"",onChange:function(e){e=e.replace(re,"-"),t.setAttributes({anchor:e})},autoComplete:"off"}))):Object(l.createElement)(e,t)}}),"withInspectorControl");function ce(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 ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(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=ne(ne({},e.attributes),{},{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",oe),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 ae=Object(b.createHigherOrderComponent)((function(e){return function(t){return Object(p.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(l.createElement)(l.Fragment,null,Object(l.createElement)(e,t),Object(l.createElement)(ee,null,Object(l.createElement)(v.TextControl,{autoComplete:"off",label:Object(C.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})},help:Object(C.__)("Separate multiple classes with spaces.")}))):Object(l.createElement)(e,t)}}),"withInspectorControl");function le(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=ie(ie({},e.attributes),{},{className:{type:"string"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",ae),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=s()(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=le(o),i=le(n),a=Object(d.difference)(i,c);a.length?e.className=a.join(" "):o&&delete e.className}return e}));var ue=n(16);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(ue.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(p.getBlockDefaultClassName)(t.name)),e}));var se=Object(v.createSlotFill)("InspectorControls"),de=se.Fill,be=se.Slot;function fe(e){var t=e.children;return j()?Object(l.createElement)(de,null,t):null}fe.Slot=be;var pe=fe,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}};function ve(e,t){for(var n in t)if(t[n]!==e[n])return!1;return!0}function Oe(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,a=(0,c.getSettings)(),l=t(p.store).getBlockType(n),u=n,s=Object(d.get)(l,["supports","__experimentalSelector"]);if(Object(d.isObject)(s)){var b=i(r)||{};for(var f in s)if(ve(b,s[f].attributes)){u=f;break}}var m="__experimentalFeatures.global.".concat(e),v="__experimentalFeatures.".concat(u,".").concat(e),O=null!==(o=Object(d.get)(a,v))&&void 0!==o?o:Object(d.get)(a,m);if(void 0!==O)return O;var g=me[e]?me[e](a):void 0;return void 0!==g?g:"typography.dropCap"===e||void 0}),[n,r,e])}var ge=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(a.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(l.createElement)(v.RangeControl,{value:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,label:Object(C.__)("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:ge(t)})}})}function ye(e){var t=Object(p.getBlockSupport)(e,Ee);return!0===t||t&&!!t.radius}function _e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Oe("border.customRadius");return!ye(t)||n}var Ee="__experimentalBorder";function we(e){var t=Ce(e),n=function(e){if("web"!==l.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,Ee);return!0===t||t&&t.radius}(e.name);return t||!n?null:Object(l.createElement)(pe,null,Object(l.createElement)(v.PanelBody,{title:Object(C.__)("Border settings")},Object(l.createElement)(ke,e)))}var Ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[_e(e)];return t.filter(Boolean).length===t.length},Se=n(81),Ie=n.n(Se),Be=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 Le(e,t){var n=Ae(e,t);return n&&n.slug}function Re(){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,u=Oe("color.gradients")||Te,s=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=s.gradient,b=s.customGradient,f=Object(m.useDispatch)("core/block-editor"),p=f.updateBlockAttributes,v=Object(l.useCallback)((function(e){var t,r,c=Le(u,e);p(i,c?(r={},Object(a.a)(r,n,c),Object(a.a)(r,o,void 0),r):(t={},Object(a.a)(t,n,void 0),Object(a.a)(t,o,e),t))}),[u,i,p]),O=Ne(d);return{gradientClass:O,gradientValue:d?De(u,d):b,setGradient:v}}var Me=n(9),Fe=n(15);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(a.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(C.__)("(Color: %s)"),Ue=Object(C.__)("(Gradient: %s)"),Ge=["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 Ke(e){var t,n,r=e.colors,o=e.gradients,c=e.label,i=e.currentTab,a=e.colorValue,u=e.gradientValue;if("color"===i){if(a){var s=xe(r,t=a),d=s&&s.name;n=Object(C.sprintf)(ze,d||t)}}else if("gradient"===i&&u){var b=Ae(o,t=u),f=b&&b.name;n=Object(C.sprintf)(Ue,f||t)}return Object(l.createElement)(l.Fragment,null,c,!!t&&Object(l.createElement)(v.ColorIndicator,{colorValue:t,"aria-label":n}))}function We(e){var t=e.colors,n=e.gradients,r=e.disableCustomColors,o=e.disableCustomGradients,c=e.className,a=e.label,u=e.onColorChange,b=e.onGradientChange,f=e.colorValue,p=e.gradientValue,m=e.clearable,O=u&&(!Object(d.isEmpty)(t)||!r),g=b&&(!Object(d.isEmpty)(n)||!o),h=Object(l.useState)(p?"gradient":!!O&&"color"),j=Object(Me.a)(h,2),k=j[0],y=j[1];return O||g?Object(l.createElement)(v.BaseControl,{className:s()("block-editor-color-gradient-control",c)},Object(l.createElement)("fieldset",null,Object(l.createElement)("legend",null,Object(l.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},Object(l.createElement)(v.BaseControl.VisualLabel,null,Object(l.createElement)(Ke,{currentTab:k,label:a,colorValue:f,gradientValue:p})))),O&&g&&Object(l.createElement)(v.ButtonGroup,{className:"block-editor-color-gradient-control__button-tabs"},Object(l.createElement)(v.Button,{isSmall:!0,isPressed:"color"===k,onClick:function(){return y("color")}},Object(C.__)("Solid")),Object(l.createElement)(v.Button,{isSmall:!0,isPressed:"gradient"===k,onClick:function(){return y("gradient")}},Object(C.__)("Gradient"))),("color"===k||!g)&&Object(l.createElement)(v.ColorPalette,Object(i.a)({value:f,onChange:g?function(e){u(e),b()}:u},{colors:t,disableCustomColors:r},{clearable:m})),("gradient"===k||!O)&&Object(l.createElement)(v.__experimentalGradientPicker,Object(i.a)({value:p,onChange:O?function(e){b(e),u()}:b},{gradients:n,disableCustomGradients:o},{clearable:m})))):null}function qe(e){var t={};return t.colors=Oe("color.palette"),t.gradients=Oe("color.gradients"),t.disableCustomColors=!Oe("color.custom"),t.disableCustomGradients=!Oe("color.customGradient"),Object(l.createElement)(We,He(He({},t),e))}var $e=function(e){return Object(d.every)(Ge,(function(t){return e.hasOwnProperty(t)}))?Object(l.createElement)(We,e):Object(l.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(a.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(C.__)("(%s: color %s)"),Ze=Object(C.__)("(%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,a=e.label,u=e.colors,s=e.gradients;if(!c&&!i)return null;if(c){var d=xe(u||t,c);o=Object(C.sprintf)(Qe,a.toLowerCase(),d&&d.name||c)}else{var b=Ae(s||n,c);o=Object(C.sprintf)(Ze,a.toLowerCase(),b&&b.name||i)}return Object(l.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,a=e.children,u=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)(u,(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(l.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},b,Object(l.createElement)(et,{colors:n,gradients:r,settings:u}));return Object(l.createElement)(v.PanelBody,Object(i.a)({className:s()("block-editor-panel-color-gradient-settings",t),title:p},f),u.map((function(e,t){return Object(l.createElement)($e,Object(i.a)({key:t},Xe({colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:c},e)))})),a)},nt=function(e){var t={};return t.colors=Oe("color.palette"),t.gradients=Oe("color.gradients"),t.disableCustomColors=!Oe("color.custom"),t.disableCustomGradients=!Oe("color.customGradient"),Object(l.createElement)(tt,Xe(Xe({},t),e))},rt=function(e){return Object(d.every)(Je,(function(t){return e.hasOwnProperty(t)}))?Object(l.createElement)(tt,e):Object(l.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(C.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):Object(C.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return Object(l.useEffect)((function(){Object(ot.speak)(Object(C.__)("This color combination may be hard for people to read."))}),[r,o]),Object(l.createElement)("div",{className:"block-editor-contrast-checker"},Object(l.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 a=Ie()(t||n),u=Ie()(i||r);return 1!==a.getAlpha()||1!==u.getAlpha()||Ie.a.isReadable(a,u,{level:"AA",size:c||!1!==c&&o>=24?"large":"small"})?null:Object(l.createElement)(ct,{backgroundColor:t,textColor:i,tinyBackgroundColor:a,tinyTextColor:u})};function at(e,t){return t.getElementById("block-"+e)}function lt(e,t){return t.closest(".block-editor-block-list__block")===e}function ut(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 st(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(l.useState)(),i=Object(Me.a)(c,2),a=i[0],u=i[1],s=Object(l.useState)(),d=Object(Me.a)(s,2),b=d[0],f=d[1];return Object(l.useEffect)((function(){if(o){var e=at(n,document);if(e){f(st(e).color);for(var t=e,r=st(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===t.parentNode.ELEMENT_NODE;)r=st(t=t.parentNode).backgroundColor;u(r)}}})),Object(l.createElement)(pe,null,Object(l.createElement)(rt,{title:Object(C.__)("Color settings"),initialOpen:!1,settings:t},o&&Object(l.createElement)(it,{backgroundColor:a,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(a.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"!==l.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,"color");return Object(d.isObject)(t)&&!!t.link},Ot=function(e){if("web"!==l.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,"color");return Object(d.isObject)(t)&&!!t.gradients},gt=function(e){var t=Object(p.getBlockSupport)(e,"color");return t&&!1!==t.text};function ht(e,t,n){var r,o,c,i,l,u;if(!mt(t))return e;var d=Ot(t),b=n.backgroundColor,f=n.textColor,p=n.gradient,m=n.style,v=Pe("background-color",b),O=Ne(p),g=Pe("color",f),h=s()(e.className,g,O,(u={},Object(a.a)(u,v,!(d&&null!=m&&null!==(r=m.color)&&void 0!==r&&r.gradient||!v)),Object(a.a)(u,"has-text-color",f||(null==m||null===(o=m.color)||void 0===o?void 0:o.text)),Object(a.a)(u,"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(a.a)(u,"has-link-color",null==m||null===(l=m.color)||void 0===l?void 0:l.link),u));return e.className=h||void 0,e}var jt=function(e,t){var n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?Be(e,n[1]).color:t};function kt(e){var t,n,r,o,c,i,u=e.name,s=e.attributes,d=Oe("color.link"),b=Oe("color.palette")||pt,f=Oe("color.gradients")||pt,m=Object(l.useRef)(s);if(Object(l.useEffect)((function(){m.current=s}),[s]),!mt(u)||"web"!==l.Platform.OS)return null;var v,O,g,h=(v=u,(O=Object(p.getBlockSupport)(v,"color"))&&!1!==O.background),j=Ot(u),k=s.style,y=s.textColor,_=s.backgroundColor,E=s.gradient;if(j&&E)g=De(f,E);else if(j){var w;g=null==k||null===(w=k.color)||void 0===w?void 0:w.gradient}var S=function(t){return function(n){var r,o,c=xe(b,n),i=t+"Color",l=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(a.a)({},t,null!=c&&c.slug?void 0:n))}),u=null!=c&&c.slug?c.slug:void 0,s=Object(a.a)({style:ge(l)},i,u);e.setAttributes(s),m.current=ft(ft({},m.current),s)}};return Object(l.createElement)(dt,{enableContrastChecking:!("web"!==l.Platform.OS||E||null!=k&&null!==(t=k.color)&&void 0!==t&&t.gradient),clientId:e.clientId,settings:[].concat(Object(ue.a)(gt(u)?[{label:Object(C.__)("Text Color"),onColorChange:S("text"),colorValue:Be(b,y,null==k||null===(n=k.color)||void 0===n?void 0:n.text).color}]:[]),Object(ue.a)(h||j?[{label:Object(C.__)("Background Color"),onColorChange:h?S("background"):void 0,colorValue:Be(b,_,null==k||null===(r=k.color)||void 0===r?void 0:r.background).color,gradientValue:g,onGradientChange:j?function(t){var n,r=Le(f,t);if(r){var o,c,i,a=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:ge(a),gradient:r}}else{var l,u,s,d=ft(ft({},null===(l=m.current)||void 0===l?void 0:l.style),{},{color:ft(ft({},null===(u=m.current)||void 0===u||null===(s=u.style)||void 0===s?void 0:s.color),{},{gradient:t})});n={style:ge(d),gradient:void 0}}e.setAttributes(n),m.current=ft(ft({},m.current),n)}:void 0}]:[]),Object(ue.a)(d&&vt(u)?[{label:Object(C.__)("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,a=t.attributes,u=a.backgroundColor,s=a.textColor,d=Oe("color.palette")||pt;if(!mt(c))return Object(l.createElement)(e,t);var b={color:s?null===(n=Be(d,s))||void 0===n?void 0:n.color:void 0,backgroundColor:u?null===(r=Be(d,u))||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(l.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"}}),Ot(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(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.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(271),wt=[{name:Object(C.__)("Underline"),value:"underline",icon:_t},{name:Object(C.__)("Strikethrough"),value:"line-through",icon:Et.a}];function Ct(e){var t=e.value,n=e.onChange;return Object(l.createElement)("fieldset",{className:"block-editor-text-decoration-control"},Object(l.createElement)("legend",null,Object(C.__)("Decoration")),Object(l.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},wt.map((function(e){return Object(l.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 It(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(a.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 Bt(e){var t,n=e.attributes.style,r=e.setAttributes;return xt(e)?null:Object(l.createElement)(Ct,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){r({style:ge(It(It({},n),{},{typography:It(It({},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=Oe("typography.customTextDecorations");return n||!r}var Pt=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.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(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.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(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.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(C.__)("Uppercase"),value:"uppercase",icon:Pt},{name:Object(C.__)("Lowercase"),value:"lowercase",icon:Tt},{name:Object(C.__)("Capitalize"),value:"capitalize",icon:Nt}];function At(e){var t=e.value,n=e.onChange;return Object(l.createElement)("fieldset",{className:"block-editor-text-transform-control"},Object(l.createElement)("legend",null,Object(C.__)("Letter case")),Object(l.createElement)("div",{className:"block-editor-text-transform-control__buttons"},Dt.map((function(e){return Object(l.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 Lt(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 Rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lt(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lt(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(l.createElement)(At,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){r({style:ge(Rt(Rt({},n),{},{typography:Rt(Rt({},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=Oe("typography.customTextTransforms");return n||!r}function Vt(e){var t=!xt(e),n=!Ft(e);return t||n?Object(l.createElement)("div",{className:"block-editor-text-decoration-and-transform"},t&&Object(l.createElement)(Bt,e),n&&Object(l.createElement)(Mt,e)):null}var Ht=n(18);function zt(e){var t=e.value,n=e.onChange,r=function(e){return void 0!==e&&""!==e}(t),o=r?t:"";return Object(l.createElement)("div",{className:"block-editor-line-height-control"},Object(l.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(C.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:o,min:0}))}function Ut(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 Gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kt(e){var t,n=e.attributes.style;return Wt(e)?null:Object(l.createElement)(zt,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:function(t){var r=Gt(Gt({},n),{},{typography:Gt(Gt({},null==n?void 0:n.typography),{},{lineHeight:t})});e.setAttributes({style:ge(r)})}})}function Wt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Oe("typography.customLineHeight");return!Object(p.hasBlockSupport)(t,"lineHeight")||n}var qt=[{name:Object(C.__)("Regular"),value:"normal"},{name:Object(C.__)("Italic"),value:"italic"}],$t=[{name:Object(C.__)("Thin"),value:"100"},{name:Object(C.__)("Extra Light"),value:"200"},{name:Object(C.__)("Light"),value:"300"},{name:Object(C.__)("Regular"),value:"400"},{name:Object(C.__)("Medium"),value:"500"},{name:Object(C.__)("Semi Bold"),value:"600"},{name:Object(C.__)("Bold"),value:"700"},{name:Object(C.__)("Extra Bold"),value:"800"},{name:Object(C.__)("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,a=i.fontStyle,u=i.fontWeight,s=r||c,d={key:"default",name:Object(C.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},b=Object(l.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(C.sprintf)(
|
8 |
/* translators: 1: Font weight name. 2: Font style name. */
|
9 |
+
Object(C.__)("%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===a&&e.style.fontWeight===u}));return Object(l.createElement)("fieldset",{className:"components-font-appearance-control"},s&&Object(l.createElement)(v.CustomSelectControl,{className:"components-font-appearance-control__select",label:r?c?Object(C.__)("Appearance"):Object(C.__)("Font style"):Object(C.__)("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(a.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 a=null==r||null===(t=r.typography)||void 0===t?void 0:t.fontStyle,u=null==r||null===(n=r.typography)||void 0===n?void 0:n.fontWeight;return Object(l.createElement)(Yt,{onChange:function(e){o({style:ge(Qt(Qt({},r),{},{typography:Qt(Qt({},null==r?void 0:r.typography),{},{fontStyle:e.fontStyle,fontWeight:e.fontWeight})}))})},hasFontStyles:c,hasFontWeights:i,value:{fontStyle:a,fontWeight:u}})}function Jt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(p.hasBlockSupport)(t,"__experimentalFontStyle"),r=Oe("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=Oe("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"]),a=Oe("typography.fontFamilies");if(o||(o=a),Object(d.isEmpty)(o))return null;var u=[{value:"",label:Object(C.__)("Default")}].concat(Object(ue.a)(o.map((function(e){var t=e.fontFamily;return{value:t,label:e.name||t}}))));return Object(l.createElement)(v.SelectControl,Object(i.a)({label:Object(C.__)("Font family"),options:u,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(a.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=Oe("typography.fontFamilies");if(an({name:n}))return null;var a=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(l.createElement)(nn,{className:"block-editor-hooks-font-family-control",fontFamilies:i,value:a,onChange:function(e){var t=Object(d.find)(i,(function(t){return t.fontFamily===e}));r({style:ge(on(on({},c),{},{typography:on(on({},c.typography||{}),{},{fontFamily:t?"var:preset|font-family|".concat(t.slug):e||void 0})}))})}})}function an(e){var t=e.name,n=Oe("typography.fontFamilies");return!n||0===n.length||!Object(p.hasBlockSupport)(t,"__experimentalFontFamily")}var ln=n(153),un=n.n(ln),sn=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=Oe("typography.fontSizes"),n=!Oe("typography.customFontSize");return Object(l.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(a.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 un.a(e.className);r.add(bn(n.fontSize));var o=r.value;return e.className=o||void 0,e}function On(e){var t,n=e.attributes,r=n.fontSize,o=n.style,c=e.setAttributes,i=gn(e),a=Oe("typography.fontSizes");if(i)return null;var u=sn(a,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize);return Object(l.createElement)(fn,{value:u.size,onChange:function(e){var t=dn(a,e).slug;c({style:ge(mn(mn({},o),{},{typography:mn(mn({},null==o?void 0:o.typography),{},{fontSize:t?void 0:e})})),fontSize:t})}})}function gn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Oe("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=Oe("typography.fontSizes"),o=t.name,c=t.attributes,i=c.fontSize,a=c.style,u=t.wrapperProps,s=mn({},t);if(Object(p.hasBlockSupport)(o,"fontSize")&&i&&(null==a||null===(n=a.typography)||void 0===n||!n.fontSize)){var d,b=sn(r,i,null==a||null===(d=a.typography)||void 0===d?void 0:d.fontSize).size;s.wrapperProps=mn(mn({},u),{},{style:mn({fontSize:b},null==u?void 0:u.style)})}return Object(l.createElement)(e,s)}}),"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),gn(e),Wt(e),an(e),xt(e),Ft(e)];return t.filter(Boolean).length===t.length}(e),n=yn(e.name);return t||!n?null:Object(l.createElement)(pe,null,Object(l.createElement)(v.PanelBody,{title:Object(C.__)("Typography")},Object(l.createElement)(cn,e),Object(l.createElement)(On,e),Object(l.createElement)(Zt,e),Object(l.createElement)(Kt,e),Object(l.createElement)(Vt,e)))}var yn=function(e){return"web"===l.Platform.OS&&jn.some((function(t){return Object(p.hasBlockSupport)(e,t)}))};function _n(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 En(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_n(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_n(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=Oe("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)?l.Platform.select({web:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:function(e){var t=En(En({},r),{},{spacing:{padding:e}});o({style:ge(t)})},onChangeShowVisualizer:function(e){var t=En(En({},r),{},{visualizers:{padding:e}});o({style:ge(t)})},label:Object(C.__)("Padding"),units:i})),native:null}):null}function Cn(e){var t=e.children,n=Object(Fe.a)(e,["children"]);return Oe("spacing.customPadding")?Object(l.createElement)(pe,n,Object(l.createElement)(v.PanelBody,{title:Object(C.__)("Spacing")},t)):null}function Sn(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?Sn(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Bn=[].concat(Object(ue.a)(jn),[Ee,"color","spacing"]),xn=function(e){return Bn.some((function(t){return Object(p.hasBlockSupport)(e,t)}))};function Pn(e){if(Object(d.startsWith)(e,"var:")){var t=e.slice("var:".length).split("|").join("--");return"var(--wp--".concat(t,")")}return e}function Tn(e,t,n){if(!xn(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)]=Pn(Object(d.get)(e,[].concat(Object(ue.a)(r),[o])))})):t[n]=Pn(Object(d.get)(e,r)))})),t}(r)),e.style),e}var Nn=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=Object(p.hasBlockSupport)(n,"spacing");return[Object(l.createElement)(kn,Object(i.a)({key:"typography"},t)),Object(l.createElement)(we,Object(i.a)({key:"border"},t)),Object(l.createElement)(kt,Object(i.a)({key:"colors"},t)),Object(l.createElement)(e,Object(i.a)({key:"edit"},t)),r&&Object(l.createElement)(Cn,{key:"spacing"},Object(l.createElement)(wn,t))]}}),"withToolbarControls");Object(f.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return xn(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",Tn),Object(f.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!xn(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),Tn(r,e,n)},e})),Object(f.addFilter)("editor.BlockEdit","core/style/with-block-controls",Nn);var Dn=n(26),An=n(27),Ln=n(19),Rn=n(28),Mn=n(29),Fn=n(21);function Vn(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 Hn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vn(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var zn=[],Un=function(e){return Object(b.createHigherOrderComponent)((function(t){return function(n){return Object(l.createElement)(t,Object(i.a)({},n,{colors:e}))}}),"withCustomColorPalette")},Gn=function(){return Object(b.createHigherOrderComponent)((function(e){return function(t){var n=Oe("color.palette")||zn;return Object(l.createElement)(e,Object(i.a)({},t,{colors:n}))}}),"withEditorColorPalette")};function Kn(e,t){var n=Object(d.reduce)(e,(function(e,t){return Hn(Hn({},e),Object(d.isString)(t)?Object(a.a)({},t,Object(d.kebabCase)(t)):t)}),{});return Object(b.compose)([t,function(e){return function(t){Object(Rn.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(Fn.a)(r);if(o){var n=Object(Fn.a)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Object(Mn.a)(this,e)});function i(e){var t;return Object(Dn.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(An.a)(i,[{key:"getMostReadableColor",value:function(e){return function(e,t){return Ie.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(a.a)(o,e,c&&c.slug?c.slug:void 0),Object(a.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(l.createElement)(e,Hn(Hn(Hn(Hn({},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=Be(o,r[c],r["custom".concat(Object(d.upperFirst)(c))]),a=t[c];return(null==a?void 0:a.color)===i.color&&a?e[c]=a:e[c]=Hn(Hn({},i),{},{class:Pe(n,i.slug)}),e}),{})}}]),i}(l.Component)}])}function Wn(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 qn(){for(var e=Gn(),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 $n=n(78),Yn=n.n($n);function Xn(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 Qn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xn(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Zn=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 Qn(Qn({},Object(Fe.a)(e,["value","onChange"])),{},{colorValue:t,onColorChange:n})}));return Object(l.createElement)(rt,Object(i.a)({settings:r,gradients:[],disableCustomGradients:!0},n))},Jn=function(e,t,n){return"function"==typeof e?e(t):!0===e?n:e};function er(e){var t=e.title,n=e.colorSettings,r=e.colorPanelProps,o=e.contrastCheckers,c=e.detectedBackgroundColor,a=e.detectedColor,u=e.panelChildren,s=e.initialOpen;return Object(l.createElement)(Zn,Object(i.a)({title:t,initialOpen:s,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=Jn(t,n,c),r=Jn(r,n,a),Object(l.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,u=o.textColor;return r=Jn(r||t,n,c),u=Jn(u||t,n,a),Object(l.createElement)(it,Object(i.a)({},o,{key:"".concat(r,"-").concat(u),backgroundColor:r,textColor:u}))}))),"function"==typeof u?u(n):u)}function tr(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 nr(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)?nr(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,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function nr(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 rr(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 or(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rr(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cr(e){return e.ownerDocument.defaultView.getComputedStyle(e)}var ir=[],ar={textColor:Object(C.__)("Text Color"),backgroundColor:Object(C.__)("Background Color")},lr=function(e){return Object(l.createElement)(pe,null,Object(l.createElement)(er,e))};function ur(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{panelTitle:Object(C.__)("Color settings")},n=t.panelTitle,r=void 0===n?Object(C.__)("Color settings"):n,o=t.colorPanelProps,c=t.contrastCheckers,i=t.panelChildren,u=t.colorDetector,b=(u=void 0===u?{}:u).targetRef,f=u.backgroundColorTargetRef,p=void 0===f?b:f,v=u.textColorTargetRef,O=void 0===v?b:v,g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],j=h(),k=j.clientId,y=Oe("color.palette")||ir,_=Object(m.useSelect)((function(e){return{attributes:(0,e("core/block-editor").getBlockAttributes)(k)}}),[k]),E=_.attributes,w=Object(m.useDispatch)("core/block-editor"),S=w.updateBlockAttributes,I=Object(l.useCallback)((function(e){return S(k,e)}),[S,k]),B=Object(l.useMemo)((function(){return Yn()((function(e,t,n,r,o,c){return function(i){var u,b=i.children,f=i.className,p=void 0===f?"":f,m=i.style,v=void 0===m?{}:m,O={};r?O=Object(a.a)({},t,o):c&&(O=Object(a.a)({},t,c));var g={className:s()(p,(u={},Object(a.a)(u,"has-".concat(Object(d.kebabCase)(r),"-").concat(Object(d.kebabCase)(t)),r),Object(a.a)(u,n||"has-".concat(Object(d.kebabCase)(e)),r||c),u)),style:or(or({},O),v)};return Object(d.isFunction)(b)?b(g):l.Children.map(b,(function(e){return Object(l.cloneElement)(e,{className:s()(e.props.className,g.className),style:or(or({},g.style),e.props.style||{})})}))}}),{maxSize:e.length})}),[e.length]),x=Object(l.useMemo)((function(){return Yn()((function(e,t){return function(n){var r=t.find((function(e){return e.color===n}));I(Object(a.a)({},r?Object(d.camelCase)("custom ".concat(e)):e,void 0)),I(Object(a.a)({},r?e:Object(d.camelCase)("custom ".concat(e)),r?r.slug:n))}}),{maxSize:e.length})}),[I,e.length]),P=Object(l.useState)(),T=Object(Me.a)(P,2),N=T[0],D=T[1],A=Object(l.useState)(),L=Object(Me.a)(A,2),R=L[0],M=L[1];return Object(l.useEffect)((function(){if(c){var e,t=!1,n=!1,r=tr(Object(d.castArray)(c));try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.backgroundColor,a=o.textColor;if(t||(t=!0===i),n||(n=!0===a),t&&n)break}}catch(e){r.e(e)}finally{r.f()}if(n&&M(cr(O.current).color),t){for(var l=p.current,u=cr(l).backgroundColor;"rgba(0, 0, 0, 0)"===u&&l.parentNode&&l.parentNode.nodeType===l.parentNode.ELEMENT_NODE;)u=cr(l=l.parentNode).backgroundColor;D(u)}}}),[e.reduce((function(e,t){return"".concat(e," | ").concat(E[t.name]," | ").concat(E[Object(d.camelCase)("custom ".concat(t.name))])}),"")].concat(Object(ue.a)(g))),Object(l.useMemo)((function(){var t={},n=e.reduce((function(e,n){"string"==typeof n&&(n={name:n});var r=or(or({},n),{},{color:E[n.name]}),o=r.name,c=r.property,i=void 0===c?o:c,a=r.className,l=r.panelLabel,u=void 0===l?n.label||ar[o]||Object(d.startCase)(o):l,s=r.componentName,b=void 0===s?Object(d.startCase)(o).replace(/\s/g,""):s,f=r.color,p=void 0===f?n.color:f,m=r.colors,v=void 0===m?y:m,O=E[Object(d.camelCase)("custom ".concat(o))],g=O?void 0:v.find((function(e){return e.slug===p}));return e[b]=B(o,i,a,p,g&&g.color,O),e[b].displayName=b,e[b].color=O||g&&g.color,e[b].slug=p,e[b].setColor=x(o,v),t[b]={value:g?g.color:E[Object(d.camelCase)("custom ".concat(o))],onChange:e[b].setColor,label:u,colors:v},v||delete t[b].colors,e}),{}),a={title:r,initialOpen:!1,colorSettings:t,colorPanelProps:o,contrastCheckers:c,detectedBackgroundColor:N,detectedColor:R,panelChildren:i};return or(or({},n),{},{ColorPanel:Object(l.createElement)(er,a),InspectorControlsColorPanel:Object(l.createElement)(lr,a)})}),[E,I,R,N].concat(Object(ue.a)(g)))}function sr(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 dr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sr(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function br(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(Fn.a)(e);if(t){var o=Object(Fn.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Mn.a)(this,n)}}var fr=[],pr=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=Oe("typography.fontSizes")||fr;return Object(l.createElement)(e,Object(i.a)({},t,{fontSizes:n}))}}),"withFontSizes"),function(e){return function(t){Object(Rn.a)(o,t);var n=br(o);function o(e){var t;return Object(Dn.a)(this,o),(t=n.call(this,e)).setters=t.createSetters(),t.state={},t}return Object(An.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(a.a)(o,e,c&&c.slug?c.slug:void 0),Object(a.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(l.createElement)(e,dr(dr(dr({},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=sn(o,c,n[t]);return e[r]=dr(dr({},i),{},{class:bn(c)}),e}),{});return dr(dr({},t),i)}}]),o}(l.Component)}]),"withFontSizes")},mr=n(272),vr=n(273),Or=n(274);function gr(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 hr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gr(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var jr=[{icon:mr.a,title:Object(C.__)("Align text left"),align:"left"},{icon:vr.a,title:Object(C.__)("Align text center"),align:"center"},{icon:Or.a,title:Object(C.__)("Align text right"),align:"right"}],kr={position:"bottom right",isAlternate:!0},yr=function(e){var t=e.value,n=e.onChange,r=e.alignmentControls,o=void 0===r?jr:r,c=e.label,i=void 0===c?Object(C.__)("Change text alignment"):c,a=e.isCollapsed,u=void 0===a||a;function s(e){return function(){return n(t===e?void 0:e)}}var b=Object(d.find)(o,(function(e){return e.align===t}));return Object(l.createElement)(v.ToolbarGroup,{isCollapsed:u,icon:b?b.icon:Object(C.isRTL)()?Or.a:mr.a,label:i,popoverProps:kr,controls:o.map((function(e){var n=e.align,r=t===n;return hr(hr({},e),{},{isActive:r,role:u?"menuitemradio":void 0,onClick:s(n)})}))})},_r=function(e){return e.name||""},Er=function(e){return e.title},wr=function(e){return e.keywords||[]},Cr=function(e){return e.category},Sr=function(){return null};function Ir(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(e=(e=Object(d.deburr)(e)).replace(/^\//,"")).toLowerCase()}var Br=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(d.words)(Ir(e))},xr=function(e,t){return Object(d.differenceWith)(e,Br(t),(function(e,t){return t.includes(e)}))},Pr=function(e,t,n,r){return 0===Br(r).length?e:Tr(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},getVariations:function(e){var t=e.variations,n=void 0===t?[]:t;return Array.from(n.reduce((function(e,t){var n=t.title,r=t.keywords,o=void 0===r?[]:r;return e.add(n),o.forEach((function(t){return e.add(t)})),e}),new Set))}})},Tr=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=Br(t);if(0===r.length)return e;var o=e.map((function(e){return[e,Nr(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 Nr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getName,o=void 0===r?_r:r,c=n.getTitle,i=void 0===c?Er:c,a=n.getKeywords,l=void 0===a?wr:a,u=n.getCategory,s=void 0===u?Cr:u,b=n.getCollection,f=void 0===b?Sr:b,p=o(e),m=i(e),v=l(e),O=s(e),g=f(e),h=Ir(t),j=Ir(m),k=0;if(h===j)k+=30;else if(j.startsWith(h))k+=20;else{var y=[p,m].concat(Object(ue.a)(v),[O,g]).join(" "),_=Object(d.words)(h),E=xr(_,y);0===E.length&&(k+=10)}return 0!==k&&p.startsWith("core/")&&k++,k}var Dr=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,function(e){var n=e.name,r=e.initialAttributes,o=e.innerBlocks,c=Object(p.createBlock)(n,r,Object(p.createBlocksFromInnerBlocksTemplate)(o));t(c)}]},Ar=n(156);function Lr(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:Ar.a});var i=Object(l.createElement)(v.Icon,{icon:n&&n.src?n.src:n}),a=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return Object(l.createElement)("span",{style:a,className:s()("block-editor-block-icon",c,{"has-colors":o})},i)}var Rr={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=Dr(n,d.noop),c=Object(Me.a)(o,3),i=c[0],a=c[1],u=c[2],s=Object(l.useMemo)((function(){return(e.trim()?Pr(i,a,u,e):Object(d.orderBy)(i,["frecency"],["desc"])).filter((function(e){return e.name!==r})).slice(0,9)}),[e,r,i,a,u]);return[Object(l.useMemo)((function(){return s.map((function(e){var t=e.title,n=e.icon,r=e.isDisabled;return{key:"block-".concat(e.id),value:e,label:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Lr,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))}),[s])]},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))}}},Mr=[],Fr=function(e){var t=h().name,n=e.completers,r=void 0===n?Mr:n;return r=Object(l.useMemo)((function(){var e=r;return t===Object(p.getDefaultBlockName)()&&(e=e.concat([Rr])),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(l.createElement)(v.Autocomplete,Object(i.a)({},e,{completers:r}))},Vr=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.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"})),Hr=function(e){var t=e.isActive,n=e.label,r=void 0===n?Object(C.__)("Toggle full height"):n,o=e.onToggle;return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{isActive:t,icon:Vr,label:r,onClick:function(){return o(!t)}}))},zr=function(e){var t=e.label,n=void 0===t?Object(C.__)("Change matrix alignment"):t,r=e.onChange,o=void 0===r?d.noop:r,c=e.value,i=void 0===c?"center":c,a=Object(l.createElement)(v.__experimentalAlignmentMatrixControl.Icon,{value:i}),u="block-editor-block-alignment-matrix-toolbar",s="".concat(u,"__popover");return Object(l.createElement)(v.Dropdown,{position:"bottom right",className:u,popoverProps:{className:s,isAlternate:!0},renderToggle:function(e){var t=e.onToggle,r=e.isOpen;return Object(l.createElement)(v.ToolbarGroup,null,Object(l.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:a,showTooltip:!0}))},renderContent:function(){return Object(l.createElement)(v.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:o,value:i})}})},Ur={insertUsage:{}},Gr={alignWide:!1,colors:[{name:Object(C.__)("Black"),slug:"black",color:"#000000"},{name:Object(C.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(C.__)("White"),slug:"white",color:"#ffffff"},{name:Object(C.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(C.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(C.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(C.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(C.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(C.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(C.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(C.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(C.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(C._x)("Small","font size name"),size:13,slug:"small"},{name:Object(C._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(C._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(C._x)("Large","font size name"),size:36,slug:"large"},{name:Object(C._x)("Huge","font size name"),size:42,slug:"huge"}],imageSizes:[{slug:"thumbnail",name:Object(C.__)("Thumbnail")},{slug:"medium",name:Object(C.__)("Medium")},{slug:"large",name:Object(C.__)("Large")},{slug:"full",name:Object(C.__)("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(C.__)("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(C.__)("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(C.__)("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(C.__)("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(C.__)("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(C.__)("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(C.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(C.__)("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(C.__)("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(C.__)("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(C.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(C.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function Kr(e,t,n){return[].concat(Object(ue.a)(e.slice(0,n)),Object(ue.a)(Object(d.castArray)(t)),Object(ue.a)(e.slice(n)))}function Wr(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(ue.a)(e);return o.splice(t,r),Kr(o,e.slice(t,t+r),n)}function qr(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 $r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qr(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Yr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(a.a)({},t,[]);return e.forEach((function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,Yr(o,r))})),n}function Xr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce((function(e,n){return Object.assign(e,Object(a.a)({},n.clientId,t),Xr(n.innerBlocks,n.clientId))}),{})}function Qr(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.identity,n={},r=Object(ue.a)(e);r.length;){var o=r.shift(),c=o.innerBlocks,i=Object(Fe.a)(o,["innerBlocks"]);r.push.apply(r,Object(ue.a)(c)),n[i.clientId]=t(i)}return n}function Zr(e){return Qr(e,(function(e){return Object(d.omit)(e,"attributes")}))}function Jr(e){return Qr(e,(function(e){return e.attributes}))}function eo(e,t){return e===t?$r({},e):t}function to(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 no=function(e){return e.reduce((function(e,t){return e[t]={},e}),{})},ro=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=$r({},t)).attributes=Object(d.mapValues)(t.attributes,(function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?$r($r({},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)(Qr(n.blocks),(function(){return{}}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":var c=Object(d.keys)(Qr(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&c.push(n.rootClientId),r.cache=$r($r({},r.cache),no(o(c)));break;case"UPDATE_BLOCK":r.cache=$r($r({},r.cache),no(o([n.clientId])));break;case"UPDATE_BLOCK_ATTRIBUTES":r.cache=$r($r({},r.cache),no(o(n.clientIds)));break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var i=no(o(n.replacedClientIds));r.cache=$r($r($r({},Object(d.omit)(r.cache,n.replacedClientIds)),Object(d.omit)(i,n.replacedClientIds)),no(Object(d.keys)(Qr(n.blocks))));break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":r.cache=$r($r({},Object(d.omit)(r.cache,n.removedClientIds)),no(Object(d.difference)(o(n.clientIds),n.clientIds)));break;case"MOVE_BLOCKS_TO_POSITION":var a=Object(ue.a)(n.clientIds);n.fromRootClientId&&a.push(n.fromRootClientId),n.toRootClientId&&a.push(n.toRootClientId),r.cache=$r($r({},r.cache),no(o(a)));break;case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":var l=[];n.rootClientId&&l.push(n.rootClientId),r.cache=$r($r({},r.cache),no(o(l)));break;case"SAVE_REUSABLE_BLOCK_SUCCESS":var u=Object(d.keys)(Object(d.omitBy)(r.attributes,(function(e,t){return"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId})));r.cache=$r($r({},r.cache),no(o(u)))}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(ue.a)(r)),(c=r).push.apply(c,Object(ue.a)(t.order[r[o]])))}return r};if(t)switch(n.type){case"REMOVE_BLOCKS":n=$r($r({},n),{},{type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(n.clientIds)});break;case"REPLACE_BLOCKS":n=$r($r({},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(ue.a)(n.blocks);o.length;){var c=o.shift(),i=c.innerBlocks,a=Object(Fe.a)(c,["innerBlocks"]);o.push.apply(o,Object(ue.a)(i)),t.controlledInnerBlocks[a.clientId]&&(r[a.clientId]=!0)}var l=t;t.order[n.rootClientId]&&(l=e(l,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order[n.rootClientId]}));var u=l;return n.blocks.length&&((u=e(u,$r($r({},n),{},{type:"INSERT_BLOCKS",index:0}))).order=$r($r({},u.order),Object(d.reduce)(r,(function(e,n,r){return t.order[r]&&(e[r]=t.order[r]),e}),{}))),u}}),(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(ue.a)(n),[o],Object(ue.a)(e(t,o)))}),[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(d.pickBy)(t.controlledInnerBlocks));return $r($r({},t),{},{byClientId:$r($r({},Object(d.omit)(t.byClientId,r)),Zr(n.blocks)),attributes:$r($r({},Object(d.omit)(t.attributes,r)),Jr(n.blocks)),order:$r($r({},Object(d.omit)(t.order,r)),Object(d.omit)(Yr(n.blocks),o)),parents:$r($r({},Object(d.omit)(t.parents,r)),Xr(n.blocks)),cache:$r($r({},Object(d.omit)(t.cache,r)),Object(d.omit)(Object(d.mapValues)(Qr(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 a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;var l=null===(a=null==r?void 0:r.isPersistentChange)||void 0===a||a;return r.isPersistentChange===l?r:$r($r({},c),{},{isPersistentChange:l})}return c=$r($r({},c),{},{isPersistentChange:i?!n:!to(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 Zr(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return $r($r({},e),Zr(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:$r($r({},e),{},Object(a.a)({},t.clientId,$r($r({},e[t.clientId]),n)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?$r($r({},Object(d.omit)(e,t.replacedClientIds)),Zr(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 Jr(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return $r($r({},e),Jr(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?$r($r({},e),{},Object(a.a)({},t.clientId,$r($r({},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 $r($r({},n),{},Object(a.a)({},r,Object(d.reduce)(t.attributes,(function(t,n,o){return n!==t[o]&&((t=eo(e[r],t))[o]=n),t}),e[r])))}),{});return t.clientIds.every((function(t){return n[t]===e[t]}))?e:$r($r({},e),n);case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?$r($r({},Object(d.omit)(e,t.replacedClientIds)),Jr(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 Yr(t.blocks);case"RECEIVE_BLOCKS":return $r($r({},e),Object(d.omit)(Yr(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=e[r]||[],c=Yr(t.blocks,r),i=t.index,l=void 0===i?o.length:i;return $r($r($r({},e),c),{},Object(a.a)({},r,Kr(o,c[r],l)));case"MOVE_BLOCKS_TO_POSITION":var u,s=t.fromRootClientId,b=void 0===s?"":s,f=t.toRootClientId,p=void 0===f?"":f,m=t.clientIds,v=t.index,O=void 0===v?e[p].length:v;if(b===p){var g=e[p],h=g.indexOf(m[0]);return $r($r({},e),{},Object(a.a)({},p,Wr(e[p],h,O,m.length)))}return $r($r({},e),{},(u={},Object(a.a)(u,b,d.without.apply(void 0,[e[b]].concat(Object(ue.a)(m)))),Object(a.a)(u,p,Kr(e[p],m,O)),u));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 w=E.indexOf(_);return $r($r({},e),{},Object(a.a)({},y,Wr(E,w,w-1,j.length)));case"MOVE_BLOCKS_DOWN":var C=t.clientIds,S=t.rootClientId,I=void 0===S?"":S,B=Object(d.first)(C),x=Object(d.last)(C),P=e[I];if(!P.length||x===Object(d.last)(P))return e;var T=P.indexOf(B);return $r($r({},e),{},Object(a.a)({},I,Wr(P,T,T+1,C.length)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var N=t.clientIds;if(!t.blocks)return e;var D=Yr(t.blocks);return Object(d.flow)([function(e){return Object(d.omit)(e,t.replacedClientIds)},function(e){return $r($r({},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(ue.a)(e),Object(ue.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(ue.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 Xr(t.blocks);case"RECEIVE_BLOCKS":return $r($r({},e),Xr(t.blocks));case"INSERT_BLOCKS":return $r($r({},e),Xr(t.blocks,t.rootClientId||""));case"MOVE_BLOCKS_TO_POSITION":return $r($r({},e),t.clientIds.reduce((function(e,n){return e[n]=t.toRootClientId||"",e}),{}));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return $r($r({},Object(d.omit)(e,t.replacedClientIds)),Xr(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?$r($r({},e),{},Object(a.a)({},r,o)):e}});function oo(){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 co(e,t,n){switch(t.type){case"CLEAR_SELECTED_BLOCK":case"SELECT_BLOCK":case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":return n}return e}var io=Object(m.combineReducers)({blocks:ro,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},selectionStart:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SELECTION_CHANGE":return{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset};case"RESET_SELECTION":return t.selectionStart;case"MULTI_SELECT":return{clientId:t.start}}return oo(e,t)},selectionEnd:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SELECTION_CHANGE":return{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset};case"RESET_SELECTION":return t.selectionEnd;case"MULTI_SELECT":return{clientId:t.end}}return oo(e,t)},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 $r($r({},e),{},Object(a.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:$r($r({},e),{},Object(a.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 co(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 co(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 $r($r({},e),{},{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Gr,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return $r($r({},e),t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ur,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),$r($r({},e),{},{insertUsage:$r($r({},e.insertUsage),{},Object(a.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(a.a)({},t.clientId,t.updates.attributes);case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((function(e,n){return $r($r({},e),{},Object(a.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}}),ao=n(48);function lo(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 uo(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)?uo(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,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function uo(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 so(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 bo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?so(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):so(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fo=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(l.createElement)(v.G,null,Object(l.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"}))),po=[];function mo(e,t){var n=e.blocks.byClientId[t];if("web"!==l.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 vo(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}function Oo(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}var go=Object(ao.a)((function(e,t){var n=e.blocks.byClientId[t];return n?bo(bo({},n),{},{attributes:Oo(e,t),innerBlocks:Kc(e,t)?po:jo(e,t)}):null}),(function(e,t){return[e.blocks.cache[t]]})),ho=Object(ao.a)((function(e,t){var n=e.blocks.byClientId[t];return n?bo(bo({},n),{},{attributes:Oo(e,t)}):null}),(function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t]]})),jo=Object(ao.a)((function(e,t){return Object(d.map)(tc(e,t),(function(t){return go(e,t)}))}),(function(e,t){return Object(d.map)(e.blocks.order[t||""],(function(t){return e.blocks.cache[t]}))})),ko=Object(ao.a)((function(e,t){var n=e.blocks.byClientId[t];return n?bo(bo({},n),{},{attributes:Oo(e,t),innerBlocks:yo(e,t)}):null}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),yo=Object(ao.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(tc(e,t),(function(t){return ko(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),_o=function e(t,n){return Object(d.flatMap)(n,(function(n){var r=tc(t,n);return[].concat(Object(ue.a)(r),Object(ue.a)(e(t,r)))}))},Eo=Object(ao.a)((function(e){var t=tc(e);return[].concat(Object(ue.a)(t),Object(ue.a)(_o(e,t)))}),(function(e){return[e.blocks.order]})),wo=Object(ao.a)((function(e,t){var n=Eo(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]})),Co=Object(ao.a)((function(e,t){return Object(d.map)(Object(d.castArray)(t),(function(t){return go(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function So(e,t){return tc(e,t).length}function Io(e){return e.selectionStart}function Bo(e){return e.selectionEnd}function xo(e){return e.selectionStart.clientId}function Po(e){return e.selectionEnd.clientId}function To(e){return Wo(e).length||(e.selectionStart.clientId?1:0)}function No(e){var t=e.selectionStart,n=e.selectionEnd;return!!t.clientId&&t.clientId===n.clientId}function Do(e){var t=e.selectionStart,n=e.selectionEnd,r=t.clientId;return r&&r===n.clientId?r:null}function Ao(e){var t=Do(e);return t?go(e,t):null}function Lo(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}var Ro=Object(ao.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]})),Mo=Object(ao.a)((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Ro(e,t,r);return Object(d.map)(Object(d.filter)(Object(d.map)(o,(function(t){return{id:t,name:mo(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 Fo(e,t){var n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function Vo(e,t){for(var n,r=Do(e),o=[].concat(Object(ue.a)(Ro(e,t)),[t]),c=[].concat(Object(ue.a)(Ro(e,r)),[r]),i=Math.min(o.length,c.length),a=0;a<i&&o[a]===c[a];a++)n=o[a];return n}function Ho(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Do(e)),void 0===t&&(t=n<0?$o(e):Yo(e)),!t)return null;var r=Lo(e,t);if(null===r)return null;var o=e.blocks.order,c=o[r],i=c.indexOf(t),a=i+1*n;return a<0||a===c.length?null:c[a]}function zo(e,t){return Ho(e,t,-1)}function Uo(e,t){return Ho(e,t,1)}function Go(e){return e.initialPosition}var Ko=Object(ao.a)((function(e){var t=e.selectionStart,n=e.selectionEnd;if(void 0===t.clientId||void 0===n.clientId)return po;if(t.clientId===n.clientId)return[t.clientId];var r=Lo(e,t.clientId);if(null===r)return po;var o=tc(e,r),c=o.indexOf(t.clientId),i=o.indexOf(n.clientId);return c>i?o.slice(i,c+1):o.slice(c,i+1)}),(function(e){return[e.blocks.order,e.selectionStart.clientId,e.selectionEnd.clientId]}));function Wo(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?po:Ko(e)}var qo=Object(ao.a)((function(e){var t=Wo(e);return t.length?t.map((function(t){return go(e,t)})):po}),(function(e){return[].concat(Object(ue.a)(Ko.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])}));function $o(e){return Object(d.first)(Wo(e))||null}function Yo(e){return Object(d.last)(Wo(e))||null}function Xo(e,t){return $o(e)===t}function Qo(e,t){return-1!==Wo(e).indexOf(t)}var Zo=Object(ao.a)((function(e,t){for(var n=t,r=!1;n&&!r;)r=Qo(e,n=Lo(e,n));return r}),(function(e){return[e.blocks.order,e.selectionStart.clientId,e.selectionEnd.clientId]}));function Jo(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:t.clientId||null}function ec(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:n.clientId||null}function tc(e,t){return e.blocks.order[t||""]||po}function nc(e,t,n){return tc(e,n).indexOf(t)}function rc(e,t){var n=e.selectionStart,r=e.selectionEnd;return n.clientId===r.clientId&&n.clientId===t}function oc(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(d.some)(tc(e,t),(function(t){return rc(e,t)||Qo(e,t)||n&&oc(e,t,n)}))}function cc(e,t){if(!t)return!1;var n=Wo(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function ic(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId!==n.clientId}function ac(e){return e.isMultiSelecting}function lc(e){return e.isSelectionEnabled}function uc(e,t){return e.blocksMode[t]||"visual"}function sc(e){return e.isTyping}function dc(e){return!!e.draggedBlocks.length}function bc(e){return e.draggedBlocks}function fc(e,t){return e.draggedBlocks.includes(t)}function pc(e,t){if(!dc(e))return!1;var n=Ro(e,t);return Object(d.some)(n,(function(t){return fc(e,t)}))}function mc(e){return e.isCaretWithinFormattedText}function vc(e){var t,n,r=e.insertionPoint,o=e.selectionEnd;if(null!==r)return r;var c=o.clientId;return c?(t=Lo(e,c)||void 0,n=nc(e,o.clientId,t)+1):n=tc(e).length,{rootClientId:t,index:n}}function Oc(e){return e.insertionPointVisibility}function gc(e){return e.template.isValid}function hc(e){return e.settings.template}function jc(e,t){if(!t)return e.settings.templateLock;var n=Nc(e,t);return n?n.templateLock:null}var kc=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(d.isBoolean)(e)?e:Object(d.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},o=Object(p.getBlockType)(t);if(!o)return!1;var c=Dc(e),i=c.allowedBlockTypes,a=r(i,t,!0);if(!a)return!1;var l=!!jc(e,n);if(l)return!1;var u=Nc(e,n);if(n&&void 0===u)return!1;var s=null==u?void 0:u.allowedBlocks,b=r(s,t),f=o.parent,m=mo(e,n),v=r(f,m);return null!==b&&null!==v?b||v:null!==b?b:null===v||v},yc=Object(ao.a)(kc,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function _c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((function(t){return yc(e,mo(e,t),n)}))}function Ec(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 wc=function(e,t,n){return!!Object(p.hasBlockSupport)(t,"inserter",!0)&&kc(e,t.name,n)},Cc=function(e){return function(t){return bo(bo({},e),{},{id:"".concat(e.id,"-").concat(t.name),icon:t.icon||e.icon,title:t.title||e.title,description:t.description||e.description,example:t.hasOwnProperty("example")?t.example:e.example,initialAttributes:bo(bo({},e.initialAttributes),t.attributes),innerBlocks:t.innerBlocks,keywords:t.keywords||e.keywords})}},Sc=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}},Ic=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)(Co(e,Eo(e)),{name:t.name}));var c=Ec(e,n)||{},i=c.time,a=c.count,l=void 0===a?0:a,u={id:n,name:t.name,title:t.title,icon:t.icon,isDisabled:o,frecency:Sc(i,l)};if("transform"===r)return u;var s=t.variations.filter((function(e){var t=e.scope;return!t||t.includes("inserter")}));return bo(bo({},u),{},{initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:s,example:t.example,utility:1})}},Bc=Object(ao.a)((function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=Ic(e,{buildScope:"inserter"}),o=function(t){var n,r="core/block/".concat(t.id),o=Rc(e,t.id);1===o.length&&(n=Object(p.getBlockType)(o[0].name));var c=Ec(e,r)||{},i=c.time,a=c.count,l=Sc(i,void 0===a?0:a);return{id:r,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n?n.icon:fo,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:l}},c=Object(p.getBlockTypes)().filter((function(t){return wc(e,t,n)})).map(r),i=kc(e,"core/block",n)?Vc(e).map(o):[],a=c.filter((function(e){var t=e.variations;return!(void 0===t?[]:t).some((function(e){return e.isDefault}))})),l=[],u=lo(c);try{for(u.s();!(t=u.n()).done;){var s=t.value,d=s.variations,b=void 0===d?[]:d;if(b.length){var f=Cc(s);l.push.apply(l,Object(ue.a)(b.map(f)))}}}catch(e){u.e(e)}finally{u.f()}return[].concat(Object(ue.a)(a),l,Object(ue.a)(i))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Vc(e),Object(p.getBlockTypes)()]})),xc=Object(ao.a)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=Ic(e,{buildScope:"transform"}),o=Object(p.getBlockTypes)().filter((function(t){return wc(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}),[]),a=Object(d.orderBy)(i,(function(e){return c[e.name].frecency}),"desc");return a}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]})),Pc=Object(ao.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 wc(e,n,t)}));if(n)return!0;var r=kc(e,"core/block",t)&&Vc(e).length>0;return r}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Vc(e),Object(p.getBlockTypes)()]})),Tc=Object(ao.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 wc(e,n,t)}))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]}));function Nc(e,t){return e.blockListSettings[t]}function Dc(e){return e.settings}function Ac(e){return e.blocks.isPersistentChange}var Lc=Object(ao.a)((function(e,t){return Object(d.filter)(e.blockListSettings,(function(e,n){return t.includes(n)}))}),(function(e){return[e.blockListSettings]})),Rc=Object(ao.a)((function(e,t){var n=Object(d.find)(Vc(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[Vc(e)]}));function Mc(e){return e.blocks.isIgnoredChange}function Fc(e){return e.lastBlockAttributesChange}function Vc(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:po}function Hc(e){return e.isNavigationMode}function zc(e){return e.hasBlockMovingClientId}function Uc(e){return!!e.automaticChangeStatus}function Gc(e,t){return e.highlightedBlock===t}function Kc(e,t){return!!e.blocks.controlledInnerBlocks[t]}var Wc=Object(ao.a)((function(e,t){if(!t.length)return null;var n=Do(e);if(t.includes(mo(e,n)))return n;var r=Wo(e),o=Mo(e,n||r[0],t);return o?Object(d.last)(o):null}),(function(e,t){return[e.selectionStart.clientId,e.selectionEnd.clientId,t]})),qc=n(42),$c=n(17),Yc=n.n($c),Xc={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 Qc(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 Zc(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)?Zc(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,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function Zc(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 Jc(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 ei(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jc(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ti=Yc.a.mark(ki),ni=Yc.a.mark(yi),ri=Yc.a.mark(_i),oi=Yc.a.mark(Bi),ci=Yc.a.mark(xi),ii=Yc.a.mark(Ni),ai=Yc.a.mark(Ri),li=Yc.a.mark(zi),ui=Yc.a.mark(Ui),si=Yc.a.mark(Ki),di=Yc.a.mark(Xi),bi=Yc.a.mark(Qi),fi=Yc.a.mark(Zi),pi=Yc.a.mark(ma),mi=Yc.a.mark(Oa),vi=Yc.a.mark(ga),Oi=Yc.a.mark(ha),gi=Yc.a.mark(ja),hi=Yc.a.mark(ka),ji=Yc.a.mark(_a);function ki(){return Yc.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,ua();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),ti)}function yi(e){return Yc.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(_i(e),"t0",3);case 3:return t.abrupt("return",t.t0);case 4:case"end":return t.stop()}}),ni)}function _i(e){var t,n,r,o;return Yc.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,Yi(r);case 13:return c.abrupt("return",r);case 14:case"end":return c.stop()}}),ri)}function Ei(e,t){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t}}function wi(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function Ci(e,t){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Object(d.castArray)(e),attributes:t}}function Si(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Ii(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function Bi(e){var t;return Yc.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,Ii(t,-1);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),oi)}function xi(e){var t;return Yc.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,Ii(t);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),ci)}function Pi(){return{type:"START_MULTI_SELECT"}}function Ti(){return{type:"STOP_MULTI_SELECT"}}function Ni(e,t){var n;return Yc.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(C.sprintf)(
|
10 |
+
/* translators: %s: number of selected blocks */
|
11 |
+
Object(C._n)("%s block selected.","%s blocks selected.",n),n),"assertive");case 6:case"end":return r.stop()}}),ii)}function Di(){return{type:"CLEAR_SELECTED_BLOCK"}}function Ai(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Li(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,a=o[n];return ei(ei({},e),{},{attributes:ei(ei({},i),{},{className:"".concat(r||""," is-style-").concat(a).trim()})})}))}function Ri(e,t,n,r,o){var c,i,a;return Yc.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return e=Object(d.castArray)(e),l.t0=Li,l.t1=Object(d.castArray)(t),l.next=5,m.controls.select("core/block-editor","getSettings");case 5:return l.t2=l.sent,t=(0,l.t0)(l.t1,l.t2),l.next=9,m.controls.select("core/block-editor","getBlockRootClientId",Object(d.first)(e));case 9:c=l.sent,i=0;case 11:if(!(i<t.length)){l.next=21;break}return a=t[i],l.next=15,m.controls.select("core/block-editor","canInsertBlockType",a.name,c);case 15:if(l.sent){l.next=18;break}return l.abrupt("return");case 18:i++,l.next=11;break;case 21:return l.next=23,{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:r,meta:o};case 23:return l.delegateYield(ki(),"t3",24);case 24:case"end":return l.stop()}}),ai)}function Mi(e,t){return Ri(e,t)}function Fi(e){return function(t,n){return{clientIds:Object(d.castArray)(t),type:e,rootClientId:n}}}var Vi=Fi("MOVE_BLOCKS_DOWN"),Hi=Fi("MOVE_BLOCKS_UP");function zi(e){var t,n,r,o,c,i=arguments;return Yc.a.wrap((function(a){for(;;)switch(a.prev=a.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,a.next=5,m.controls.select("core/block-editor","getTemplateLock",t);case 5:if("all"!==(o=a.sent)){a.next=8;break}return a.abrupt("return");case 8:if(c={type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r},t!==n){a.next=13;break}return a.next=12,c;case 12:return a.abrupt("return");case 13:if("insert"!==o){a.next=15;break}return a.abrupt("return");case 15:return a.next=17,m.controls.select("core/block-editor","canInsertBlocks",e,n);case 17:if(!a.sent){a.next=21;break}return a.next=21,c;case 21:case"end":return a.stop()}}),li)}function Ui(e){var t,n,r,o=arguments;return Yc.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,zi([e],t,n,r);case 5:case"end":return c.stop()}}),ui)}function Gi(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Ki([e],t,n,r)}function Ki(e,t,n){var r,o,c,i,a,l,u=arguments;return Yc.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return r=!(u.length>3&&void 0!==u[3])||u[3],o=u.length>4?u[4]:void 0,s.t0=Li,s.t1=Object(d.castArray)(e),s.next=6,m.controls.select("core/block-editor","getSettings");case 6:s.t2=s.sent,e=(0,s.t0)(s.t1,s.t2),c=[],i=Qc(e),s.prev=10,i.s();case 12:if((a=i.n()).done){s.next=20;break}return l=a.value,s.next=16,m.controls.select("core/block-editor","canInsertBlockType",l.name,n);case 16:s.sent&&c.push(l);case 18:s.next=12;break;case 20:s.next=25;break;case 22:s.prev=22,s.t3=s.catch(10),i.e(s.t3);case 25:return s.prev=25,i.f(),s.finish(25);case 28:if(!c.length){s.next=30;break}return s.abrupt("return",{type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,meta:o});case 30:case"end":return s.stop()}}),si,null,[[10,22,25,28]])}function Wi(e,t){return{type:"SET_INSERTION_POINT",rootClientId:e,index:t}}function qi(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function $i(){return{type:"HIDE_INSERTION_POINT"}}function Yi(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function Xi(){var e,t,n;return Yc.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,yi(n);case 11:return r.abrupt("return",r.sent);case 12:case"end":return r.stop()}}),di)}function Qi(e,t){var n,r,o,i,a,l,u,s,b,f,v,O,g,h,j,k,y,_,E,w,C,S,I,B,x,P,T,N,D,A,L,R,M,F;return Yc.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,(a=Object(p.getBlockType)(i.name)).merge){V.next=12;break}return V.next=11,Ii(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 l=V.sent,u=Object(p.getBlockType)(l.name),V.next=18,m.controls.select("core/block-editor","getSelectionStart");case 18:if(s=V.sent,b=s.clientId,f=s.attributeKey,v=s.offset,O=(b===r?a:u).attributes[f],g=(b===r||b===o)&&void 0!==f&&void 0!==v&&!!O,O||("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(qc.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)(l),g&&(_=(y=b===r?j:k).attributes[f],E=O.multiline,w=O.__unstableMultilineWrapperTags,C=O.__unstablePreserveWhiteSpace,S=Object(c.insert)(Object(c.create)({html:_,multilineTag:E,multilineWrapperTags:w,preserveWhiteSpace:C}),h,v,v),y.attributes[f]=Object(c.toHTMLString)({value:S,multilineTag:E,preserveWhiteSpace:C})),(I=i.name===l.name?[k]:Object(p.switchToBlockType)(k,i.name))&&I.length){V.next=33;break}return V.abrupt("return");case 33:if(B=a.merge(j.attributes,I[0].attributes),!g){V.next=45;break}return x=Object(d.findKey)(B,(function(e){return"string"==typeof e&&-1!==e.indexOf(h)})),P=B[x],T=a.attributes[x],N=T.multiline,D=T.__unstableMultilineWrapperTags,A=T.__unstablePreserveWhiteSpace,L=Object(c.create)({html:P,multilineTag:N,multilineWrapperTags:D,preserveWhiteSpace:A}),R=L.text.indexOf(h),M=Object(c.remove)(L,R,R+1),F=Object(c.toHTMLString)({value:M,multilineTag:N,preserveWhiteSpace:A}),B[x]=F,V.next=45,la(i.clientId,x,R,R);case 45:return V.delegateYield(Ri([i.clientId,l.clientId],[ei(ei({},i),{},{attributes:ei(ei({},i.attributes),B)})].concat(Object(ue.a)(I.slice(1)))),"t0",46);case 46:case"end":return V.stop()}}),bi)}function Zi(e){var t,n,r,o,c=arguments;return Yc.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,Bi(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(ki(),"t0",24);case 24:return o=i.t0,i.abrupt("return",[r||o]);case 26:case"end":return i.stop()}}),fi)}function Ji(e,t){return Zi([e],t)}function ea(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 ta(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function na(){return{type:"START_TYPING"}}function ra(){return{type:"STOP_TYPING"}}function oa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function ca(){return{type:"STOP_DRAGGING_BLOCKS"}}function ia(){return{type:"ENTER_FORMATTED_TEXT"}}function aa(){return{type:"EXIT_FORMATTED_TEXT"}}function la(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function ua(e,t,n){var r=Object(p.getDefaultBlockName)();if(r)return Gi(Object(p.createBlock)(r,e),n,t)}function sa(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function da(e){return{type:"UPDATE_SETTINGS",settings:e}}function ba(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function fa(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function pa(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function ma(){return Yc.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()}}),pi)}function va(){return{type:"MARK_AUTOMATIC_CHANGE_FINAL"}}function Oa(){var e,t=arguments;return Yc.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(C.__)("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(C.__)("You are currently in edit mode. To return to the navigation mode, press Escape."));case 4:case"end":return n.stop()}}),mi)}function ga(){var e,t=arguments;return Yc.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(C.__)("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()}}),vi)}function ha(e){var t,n,r,o,c,i,a=arguments;return Yc.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(t=!(a.length>1&&void 0!==a[1])||a[1],e||e.length){l.next=3;break}return l.abrupt("return");case 3:return l.next=5,m.controls.select("core/block-editor","getBlocksByClientId",e);case 5:return n=l.sent,l.next=8,m.controls.select("core/block-editor","getBlockRootClientId",e[0]);case 8:if(r=l.sent,!Object(d.some)(n,(function(e){return!e}))){l.next=11;break}return l.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)}))){l.next=14;break}return l.abrupt("return");case 14:return l.next=16,m.controls.select("core/block-editor","getBlockIndex",Object(d.last)(Object(d.castArray)(e)),r);case 16:return c=l.sent,i=n.map((function(e){return Object(p.cloneBlock)(e)})),l.next=20,Ki(i,c+1,r,t);case 20:if(!(i.length>1&&t)){l.next=23;break}return l.next=23,Ni(Object(d.first)(i).clientId,Object(d.last)(i).clientId);case 23:return l.abrupt("return",i.map((function(e){return e.clientId})));case 24:case"end":return l.stop()}}),Oi)}function ja(e){var t,n;return Yc.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,ua({},t,n);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),gi)}function ka(e){var t,n;return Yc.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,ua({},t,n+1);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),hi)}function ya(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function _a(e){return Yc.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ya(e,!0);case 2:return t.next=4,{type:"SLEEP",duration:150};case 4:return t.next=6,ya(e,!1);case 6:case"end":return t.stop()}}),ji)}function Ea(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function wa(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 Ca(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wa(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Sa={reducer:io,selectors:r,actions:o,controls:Xc},Ia=Object(m.createReduxStore)("core/block-editor",Ca(Ca({},Sa),{},{persist:["preferences"]}));function Ba(e){return Object(m.useSelect)((function(t){if(!e)return null;var n=t(Ia),r=n.getBlockName,o=n.getBlockAttributes,c=t(p.store),i=c.getBlockType,a=c.getBlockVariations,l=r(e),u=i(l);if(!u)return null;var s=a(l),d={title:u.title,icon:u.icon,description:u.description};if(null==s||!s.length)return d;var b=o(e),f=s.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||u.title,icon:f.icon||u.icon,description:f.description||u.description}:d}),[e])}function xa(e){var t=e.clientId,n=Object(m.useSelect)((function(e){if(!t)return{};var n=e("core/block-editor"),r=n.getBlockName;return{attributes:(0,n.getBlockAttributes)(t),name:r(t)}}),[t]),r=n.attributes,o=n.name,c=Ba(t);if(!o||!c)return null;var i=Object(p.getBlockType)(o),a=Object(p.__experimentalGetBlockLabel)(i,r);return a!==i.title?"".concat(i.title,": ").concat(Object(d.truncate)(a,{length:15})):c.title}Object(m.registerStore)("core/block-editor",Ca(Ca({},Sa),{},{persist:["preferences"]}));var Pa=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(l.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":Object(C.__)("Block breadcrumb")},Object(l.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&Object(l.createElement)(v.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:n},Object(C.__)("Document")),!i&&Object(C.__)("Document")),c.map((function(e){return Object(l.createElement)("li",{key:e},Object(l.createElement)(v.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:function(){return t(e)}},Object(l.createElement)(xa,{clientId:e})))})),!!o&&Object(l.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},Object(l.createElement)(xa,{clientId:o})))};function Ta(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 Na(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ta(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ta(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Da=Object(l.createContext)({});function Aa(e){var t=e.value,n=e.children,r=Object(l.useContext)(Da),o=Object(l.useMemo)((function(){return Na(Na({},r),t)}),[r,t]);return Object(l.createElement)(Da.Provider,{value:o,children:n})}var La=Da,Ra=function(){return Object(l.createElement)(v.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Object(l.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"}))},Ma=function(e){var t=e.style,n=e.className;return Object(l.createElement)("div",{className:"block-library-colors-selector__icon-container"},Object(l.createElement)("div",{className:"".concat(n," block-library-colors-selector__state-selection"),style:t},Object(l.createElement)(Ra,null)))},Fa=function(e){var t,n,r,o=e.children,c=Object(Fe.a)(e,["children"]);return Object(l.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(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:Object(C.__)("Open Colors Selector"),onClick:t,onKeyDown:function(e){o||e.keyCode!==Ht.DOWN||(e.preventDefault(),e.stopPropagation(),t())},icon:Object(l.createElement)(r,null,Object(l.createElement)(n,null,Object(l.createElement)(Ma,null)))}))}),renderContent:function(){return o}})},Va={},Ha=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(l.useContext)(La),a=Object(l.useMemo)((function(){return o&&o.usesContext?Object(d.pick)(c,o.usesContext):Va}),[o,c]);if(!o)return null;var u=o.edit||o.save;if(o.apiVersion>1||Object(p.hasBlockSupport)(o,"lightBlockWrapper",!1))return Object(l.createElement)(u,Object(i.a)({},e,{context:a}));var b=Object(p.hasBlockSupport)(o,"className",!0)?Object(p.getBlockDefaultClassName)(r):null,f=s()(b,n.className);return Object(l.createElement)(u,Object(i.a)({},e,{context:a,className:f}))}));function za(e){var t={name:e.name,isSelected:e.isSelected,clientId:e.clientId,onFocus:e.onFocus,onCaretVerticalPositionChange:e.onCaretVerticalPositionChange};return Object(l.createElement)(g,{value:Object(l.useMemo)((function(){return t}),Object.values(t))},Object(l.createElement)(Ha,e))}var Ua=Object(v.createSlotFill)("BlockFormatControls"),Ga=Ua.Fill,Ka=Ua.Slot,Wa=function(e){return h().isSelected?Object(l.createElement)(Ga,null,(function(t){var n=Object(d.isEmpty)(t)?null:t;return Object(l.createElement)(v.__experimentalToolbarContext.Provider,{value:n},e.children)})):null};Wa.Slot=function(e){var t=Object(l.useContext)(v.__experimentalToolbarContext);return Object(l.createElement)(Ka,Object(i.a)({},e,{fillProps:t}))};var qa=Wa,$a=n(43),Ya=n(41),Xa=n(205),Qa=n(119),Za=n(31),Ja=function(e){return e+1},el=function(e){return{top:e.offsetTop,left:e.offsetLeft}},tl=function(e,t,n,r,o){var c=Object(b.useReducedMotion)()||!r,i=Object(l.useReducer)(Ja,0),a=Object(Me.a)(i,2),u=a[0],s=a[1],d=Object(l.useReducer)(Ja,0),f=Object(Me.a)(d,2),p=f[0],m=f[1],v=Object(l.useState)({x:0,y:0}),O=Object(Me.a)(v,2),g=O[0],h=O[1],j=Object(l.useMemo)((function(){return e.current?el(e.current):null}),[o]),k=Object(l.useMemo)((function(){if(!n||!e.current)return function(){};var t=Object(Za.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(l.useLayoutEffect)((function(){u&&m()}),[u]),Object(l.useLayoutEffect)((function(){if(j)if(c)k();else{e.current.style.transform="";var t=el(e.current);s(),h({x:Math.round(j.left-t.left),y:Math.round(j.top-t.top)})}}),[o]),y.x=0,y.y=0,Object(Qa.useSpring)({from:{x:g.x,y:g.y},to:{x:0,y:0},reset:u!==p,config:{mass:5,tension:2e3,friction:200},immediate:c,onFrame:y})},nl=Object(Qa.animated)(v.__experimentalTreeGridRow);function rl(e){var t=e.isSelected,n=e.position,r=e.level,o=e.rowCount,c=e.children,a=e.className,u=e.path,d=Object(Fe.a)(e,["isSelected","position","level","rowCount","children","className","path"]),b=Object(l.useRef)(null),f=u.join("_"),p=tl(b,t,!1,!0,f);return Object(l.createElement)(nl,Object(i.a)({ref:b,style:p,className:s()("block-editor-block-navigation-leaf",a),level:r,positionInSet:n,setSize:o},d),c)}var ol=n(202),cl=n(203),il=n(204),al=n(179);var ll=function(e,t){return"up"===e?"horizontal"===t?Object(C.isRTL)()?ol.a:cl.a:il.a:"down"===e?"horizontal"===t?Object(C.isRTL)()?cl.a:ol.a:al.a:null},ul=function(e,t){return"up"===e?"horizontal"===t?Object(C.isRTL)()?Object(C.__)("Move right"):Object(C.__)("Move left"):Object(C.__)("Move up"):"down"===e?"horizontal"===t?Object(C.isRTL)()?Object(C.__)("Move left"):Object(C.__)("Move right"):Object(C.__)("Move down"):null},sl=Object(l.forwardRef)((function(e,t){var n=e.clientIds,r=e.direction,o=e.orientation,c=Object(Fe.a)(e,["clientIds","direction","orientation"]),a=Object(b.useInstanceId)(sl),u=Object(d.castArray)(n).length,f=Object(m.useSelect)((function(e){var t=e("core/block-editor"),c=t.getBlockIndex,i=t.getBlockRootClientId,a=t.getBlockOrder,l=t.getBlock,u=t.getBlockListSettings,s=Object(d.castArray)(n),b=Object(d.first)(s),f=i(b),m=c(b,f),v=c(Object(d.last)(s),f),O=a(f),g=l(b),h=0===m,j=v===O.length-1,k=(u(f)||{}).orientation;return{blockType:g?Object(p.getBlockType)(g.name):null,isDisabled:"up"===r?h:j,rootClientId:f,firstIndex:m,isFirst:h,isLast:j,orientation:o||k}}),[n,r]),O=f.blockType,g=f.isDisabled,h=f.rootClientId,j=f.isFirst,k=f.isLast,y=f.firstIndex,_=f.orientation,E=void 0===_?"vertical":_,w=Object(m.useDispatch)("core/block-editor"),S=w.moveBlocksDown,I=w.moveBlocksUp,B="up"===r?I:S,x="block-editor-block-mover-button__description-".concat(a);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.Button,Object(i.a)({ref:t,className:s()("block-editor-block-mover-button","is-".concat(r,"-button")),icon:ll(r,E),label:ul(r,E),"aria-describedby":x},c,{onClick:g?null:function(e){B(n,h),c.onClick&&c.onClick(e)},"aria-disabled":g})),Object(l.createElement)("span",{id:x,className:"block-editor-block-mover-button__description"},function(e,t,n,r,o,c,i){var a=n+1,l=function(e){return"up"===e?"horizontal"===i?Object(C.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===i?Object(C.isRTL)()?"left":"right":"down":null};if(e>1)return function(e,t,n,r,o){var c=t+1;return o<0&&n?Object(C.__)("Blocks cannot be moved up as they are already at the top"):o>0&&r?Object(C.__)("Blocks cannot be moved down as they are already at the bottom"):o<0&&!n?Object(C.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
|
12 |
Object(C._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(C.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
|
13 |
Object(C._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(C.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
|
14 |
+
Object(C.__)("Block %s is the only block, and cannot be moved"),t);if(c>0&&!o){var u=l("down");if("down"===u)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
15 |
+
Object(C.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if("left"===u)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
16 |
+
Object(C.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if("right"===u)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
17 |
+
Object(C.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(c>0&&o){var s=l("down");if("down"===s)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
18 |
+
Object(C.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===s)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
19 |
+
Object(C.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===s)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
20 |
+
Object(C.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(c<0&&!r){var d=l("up");if("up"===d)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
21 |
+
Object(C.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if("left"===d)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
22 |
+
Object(C.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if("right"===d)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
23 |
+
Object(C.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(c<0&&r){var b=l("up");if("up"===b)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
24 |
+
Object(C.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===b)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
25 |
+
Object(C.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===b)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
26 |
+
Object(C.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(u,O&&O.title,y,j,k,"up"===r?-1:1,E)))})),dl=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(sl,Object(i.a)({direction:"up",ref:t},e))})),bl=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(sl,Object(i.a)({direction:"down",ref:t},e))}));function fl(e){var t=e.level,n=e.isLastRow,r=e.terminatedLevels;return Object(d.times)(t-1,(function(e){var o=e+2,c=o===t;return Object(l.createElement)("div",{key:e,"aria-hidden":"true",className:s()("block-editor-block-navigator-descender-line",{"has-item":c,"is-last-row":n,"is-terminated":r.includes(o)})})}))}var pl=Object(l.createContext)({__experimentalFeatures:!1}),ml=function(){return Object(l.useContext)(pl)},vl=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),Ol=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(l.createElement)("div",{className:s()(t,"block-editor-warning")},Object(l.createElement)("div",{className:"block-editor-warning__contents"},Object(l.createElement)("p",{className:"block-editor-warning__message"},r),(l.Children.count(n)>0||o)&&Object(l.createElement)("div",{className:"block-editor-warning__actions"},l.Children.count(n)>0&&l.Children.map(n,(function(e,t){return Object(l.createElement)("span",{key:t,className:"block-editor-warning__action"},e)})),o&&Object(l.createElement)(v.DropdownMenu,{className:"block-editor-warning__secondary",icon:vl,label:Object(C.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(function(){return Object(l.createElement)(v.MenuGroup,null,o.map((function(e,t){return Object(l.createElement)(v.MenuItem,{onClick:e.onClick,key:t},e.title)})))})))))},gl=n(249),hl=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,c=e.actionText,i=e.className;return Object(l.createElement)("div",{className:i},Object(l.createElement)("div",{className:"block-editor-block-compare__content"},Object(l.createElement)("h2",{className:"block-editor-block-compare__heading"},t),Object(l.createElement)("div",{className:"block-editor-block-compare__html"},n),Object(l.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},r)),Object(l.createElement)("div",{className:"block-editor-block-compare__action"},Object(l.createElement)(v.Button,{isSecondary:!0,tabIndex:"0",onClick:o},c)))},jl=function(e){var t,n,r,o,c=e.block,i=e.onKeep,a=e.onConvert,u=e.convertor,b=e.convertButtonText,f={rawContent:c.originalContent,renderedContent:Object(p.getSaveElement)(c.name,c.attributes)},m=(t=u(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(gl.diffChars)(e,t).map((function(e,t){var n=s()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return Object(l.createElement)("span",{key:t,className:n},e.value)}))}(f.rawContent,m.rawContent);return Object(l.createElement)("div",{className:"block-editor-block-compare__wrapper"},Object(l.createElement)(hl,{title:Object(C.__)("Current"),className:"block-editor-block-compare__current",action:i,actionText:Object(C.__)("Convert to HTML"),rawContent:f.rawContent,renderedContent:f.renderedContent}),Object(l.createElement)(hl,{title:Object(C.__)("After Conversion"),className:"block-editor-block-compare__converted",action:a,actionText:b,rawContent:v,renderedContent:m.renderedContent}))},kl=function(e){return Object(p.rawHandler)({HTML:e.originalContent})},yl=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,kl(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"),a=Object(l.useState)(!1),u=Object(Me.a)(a,2),s=u[0],d=u[1],b=Object(l.useCallback)((function(){return d(!0)}),[]),f=Object(l.useCallback)((function(){return d(!1)}),[]),m=Object(l.useMemo)((function(){return[{
|
27 |
// translators: Button to fix block content
|
28 |
+
title:Object(C._x)("Resolve","imperative verb"),onClick:b},i&&{title:Object(C.__)("Convert to HTML"),onClick:t},{title:Object(C.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)}),[b,t,r]);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Ol,{actions:[Object(l.createElement)(v.Button,{key:"recover",onClick:o,isPrimary:!0},Object(C.__)("Attempt Block Recovery"))],secondaryActions:m},Object(C.__)("This block contains unexpected or invalid content.")),s&&Object(l.createElement)(v.Modal,{title:// translators: Dialog title to fix block content
|
29 |
+
Object(C.__)("Resolve Block"),onRequestClose:f,className:"block-editor-block-compare"},Object(l.createElement)(jl,{block:c,onKeep:t,onConvert:n,convertor:kl,convertButtonText:Object(C.__)("Convert to Blocks")})))})),_l=Object(l.createElement)(Ol,{className:"block-editor-block-list__block-crash-warning"},Object(C.__)("This block has encountered an error and cannot be previewed.")),El=function(){return _l};var wl=function(e){Object(Rn.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(Fn.a)(t);if(n){var o=Object(Fn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Mn.a)(this,e)});function o(){var e;return Object(Dn.a)(this,o),(e=r.apply(this,arguments)).state={hasError:!1},e}return Object(An.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}(l.Component),Cl=n(102),Sl=n.n(Cl),Il=function(e){var t=e.clientId,n=Object(l.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]),a=Object(m.useDispatch)("core/block-editor").updateBlock;return Object(l.useEffect)((function(){c(Object(p.getBlockContent)(i))}),[i]),Object(l.createElement)(Sl.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),l=!o||Object(p.isValidBlockContent)(e,n,r);a(t,{attributes:n,originalContent:r,isValid:l}),o||c({content:r})},onChange:function(e){return c(e.target.value)}})},Bl=n(77),xl=n(157),Pl=[Object(l.createInterpolateElement)(Object(C.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:Object(l.createElement)("kbd",null)}),Object(l.createInterpolateElement)(Object(C.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:Object(l.createElement)("kbd",null)}),Object(l.createInterpolateElement)(Object(C.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:Object(l.createElement)("kbd",null)}),Object(C.__)("Drag files into the editor to automatically insert media blocks."),Object(C.__)("Change a block's type by pressing the block icon on the toolbar.")],Tl=function(){var e=Object(l.useState)(Math.floor(Math.random()*Pl.length)),t=Object(Me.a)(e,1)[0];return Object(l.createElement)(v.Tip,null,Pl[t])},Nl=n(132),Dl=n(131),Al=n(201),Ll=function e(t){var n=t.className,r=t.onChange,o=t.value,c=t.placeholder,i=Object(b.useInstanceId)(e),a=Object(l.useRef)();return Object(l.createElement)("div",{className:s()("block-editor-inserter__search",n)},Object(l.createElement)(v.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-".concat(i)},c),Object(l.createElement)("input",{ref:a,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(l.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(l.createElement)(v.Button,{icon:Nl.a,label:Object(C.__)("Reset search"),onClick:function(){r(""),a.current.focus()}}),!o&&Object(l.createElement)(Dl.a,{icon:Al.a})))},Rl=n(35),Ml=n.n(Rl),Fl=function(e){var t=e.title,n=e.icon,r=e.description,o=e.blockType;return o&&(Ml()("`blockType` property in `BlockCard component`",{alternative:"`title, icon and description` properties"}),t=o.title,n=o.icon,r=o.description),Object(l.createElement)("div",{className:"block-editor-block-card"},Object(l.createElement)(Lr,{icon:n,showColors:!0}),Object(l.createElement)("div",{className:"block-editor-block-card__content"},Object(l.createElement)("h2",{className:"block-editor-block-card__title"},t),Object(l.createElement)("span",{className:"block-editor-block-card__description"},r)))};function Vl(e){var t=e.clientId,n=void 0===t?null:t,r=e.value,o=e.selectionStart,c=e.selectionEnd,i=e.onChange,a=void 0===i?d.noop:i,u=e.onInput,s=void 0===u?d.noop:u,b=Object(m.useRegistry)(),f=b.dispatch("core/block-editor"),v=f.resetBlocks,O=f.resetSelection,g=f.replaceInnerBlocks,h=f.setHasControlledInnerBlocks,j=f.__unstableMarkNextChangeAsNotPersistent,k=b.select("core/block-editor"),y=k.getBlockName,_=k.getBlocks,E=Object(l.useRef)({incoming:null,outgoing:[]}),w=Object(l.useRef)(!1),C=Object(l.useRef)(s),S=Object(l.useRef)(a);Object(l.useEffect)((function(){C.current=s,S.current=a}),[s,a]),Object(l.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)}));w.current&&(E.current.incoming=e),g(n,e)}else w.current&&(E.current.incoming=r),v(r)}(),o&&c&&O(o,c))}),[r,n]),Object(l.useEffect)((function(){var e=b.select("core/block-editor"),t=e.getSelectionStart,r=e.getSelectionEnd,o=e.isLastBlockChangePersistent,c=e.__unstableIsLastBlockChangeIgnored,i=_(n),a=o(),l=!1;w.current=!0;var u=b.subscribe((function(){if(null===n||null!==y(n)){var e=o(),u=_(n),s=u!==i;if(i=u,s&&(E.current.incoming||c()))return E.current.incoming=null,void(a=e);(s||l&&!s&&e&&!a)&&(a=e,E.current.outgoing.push(i),(a?S.current:C.current)(i,{selectionStart:t(),selectionEnd:r()})),l=s}}));return function(){return u()}}),[b,n])}var Hl,zl=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(l.createElement)(e,Object(i.a)({registry:o},c));var a=Object(l.useState)(null),u=Object(Me.a)(a,2),s=u[0],d=u[1];return Object(l.useEffect)((function(){var e=Object(m.createRegistry)({},o);e.registerStore("core/block-editor",Sa),d(e)}),[o]),s?Object(l.createElement)(m.RegistryProvider,{value:s},Object(l.createElement)(e,Object(i.a)({registry:s},c))):null}))}),"withRegistryProvider")((function(e){var t=e.children,n=e.settings,r=Object(m.useDispatch)("core/block-editor").updateSettings;return Object(l.useEffect)((function(){r(n)}),[n]),Vl(e),t}));function Ul(e){var t=e.onClick;return Object(l.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},Object(l.createElement)(v.Disabled,null,Object(l.createElement)(Zs,null)))}var Gl=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,a=Object(b.useResizeObserver)(),u=Object(Me.a)(a,2),s=u[0],d=u[1].height;Hl=Hl||Object(b.pure)(Zs);var f=(i-2*n)/t;return Object(l.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:d*f+2*n}},c,Object(l.createElement)(v.Disabled,{style:{transform:"scale(".concat(f,")"),width:t,left:n,right:n,top:n},className:"block-editor-block-preview__content"},s,Object(l.createElement)(Hl,null)))},Kl=Object(l.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,a=void 0!==i&&i,u=e.__experimentalOnClick,s=Object(m.useSelect)((function(e){return e("core/block-editor").getSettings()}),[]),b=Object(l.useMemo)((function(){return Object(d.castArray)(t)}),[t]);return t&&0!==t.length?Object(l.createElement)(zl,{value:b,settings:s},a?Object(l.createElement)(Ul,{onClick:u}):Object(l.createElement)(Gl,{viewportWidth:c,__experimentalPadding:r})):null}));function Wl(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 ql(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wl(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $l=function(e){var t,n,r=e.item,o=r.name,c=r.title,i=r.icon,a=r.description,u=r.initialAttributes,s=Object(p.getBlockType)(o),d=Object(p.isReusableBlock)(r);return Object(l.createElement)("div",{className:"block-editor-inserter__preview-container"},Object(l.createElement)("div",{className:"block-editor-inserter__preview"},d||s.example?Object(l.createElement)("div",{className:"block-editor-inserter__preview-content"},Object(l.createElement)(Kl,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=s.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:s.example?Object(p.getBlockFromExample)(r.name,{attributes:ql(ql({},s.example.attributes),u),innerBlocks:s.example.innerBlocks}):Object(p.createBlock)(o,u)})):Object(l.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},Object(C.__)("No Preview Available."))),!d&&Object(l.createElement)(Fl,{title:c,icon:i,description:a}))},Yl=n(58),Xl=n(115),Ql=n(116),Zl=Object(l.createElement)(S.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(l.createElement)(S.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function Jl(e){var t=e.count,n=e.icon;return Object(l.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},Object(l.createElement)("div",{className:"block-editor-block-draggable-chip"},Object(l.createElement)(v.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},Object(l.createElement)(v.FlexItem,null,n?Object(l.createElement)(Lr,{icon:n}):Object(C.sprintf)(
|
|
|
|
|
30 |
/* translators: %d: Number of blocks. */
|
31 |
+
Object(C._n)("%d block","%d blocks",t),t)),Object(l.createElement)(v.FlexItem,null,Object(l.createElement)(Lr,{icon:Zl})))))}var eu=function(e){var t=e.isEnabled,n=e.blocks,r=e.icon,o=e.children,c={type:"inserter",blocks:n};return Object(l.createElement)(v.Draggable,{transferData:c,__experimentalDragComponent:Object(l.createElement)(Jl,{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})}))},tu=function(e){var t=e.className,n=e.composite,r=e.item,o=e.onSelect,c=e.onHover,a=e.isDraggable,u=Object(Fe.a)(e,["className","composite","item","onSelect","onHover","isDraggable"]),d=Object(l.useRef)(!1),b=r.icon?{backgroundColor:r.icon.background,color:r.icon.foreground}:{},f=Object(l.useMemo)((function(){return[Object(p.createBlock)(r.name,r.initialAttributes,Object(p.createBlocksFromInnerBlocksTemplate)(r.innerBlocks))]}),[r.name,r.initialAttributes,r.initialAttributes]);return Object(l.createElement)(eu,{isEnabled:a&&!r.disabled,blocks:f,icon:r.icon},(function(e){var a=e.draggable,f=e.onDragStart,p=e.onDragEnd;return Object(l.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:a,onDragStart:function(e){d.current=!0,f&&(c(null),f(e))},onDragEnd:function(e){d.current=!1,p&&p(e)}},Object(l.createElement)(Ql.a,Object(i.a)({role:"option",as:v.Button},n,{className:s()("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},u),Object(l.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:b},Object(l.createElement)(Lr,{icon:r.icon,showColors:!0})),Object(l.createElement)("span",{className:"block-editor-block-types-list__item-title"},r.title)))}))},nu=function(e){var t=e.items,n=void 0===t?[]:t,r=e.onSelect,o=e.onHover,c=void 0===o?function(){}:o,a=e.children,u=e.label,s=e.isDraggable,d=void 0===s||s,b=Object(Yl.g)(),f=n.reduce((function(e,t){return e+"--"+t.id}),"");return Object(l.useEffect)((function(){b.unstable_sort()}),[b.unstable_sort,f]),Object(l.createElement)(Xl.a,Object(i.a)({},b,{role:"listbox",className:"block-editor-block-types-list","aria-label":u}),n.map((function(e){return Object(l.createElement)(tu,{key:e.id,item:e,className:Object(p.getBlockMenuDefaultClassName)(e.id),onSelect:r,onHover:c,composite:b,isDraggable:d})})),a)};function ru(e){var t=e.rootClientId,n=e.children,r=Object(m.useSelect)((function(e){var n=(0,e(p.store).getBlockType)((0,e("core/block-editor").getBlockName)(t));return{rootBlockTitle:n&&n.title,rootBlockIcon:n&&n.icon}})),o=r.rootBlockTitle,c=r.rootBlockIcon;return Object(l.createElement)("div",{className:"block-editor-inserter__child-blocks"},(c||o)&&Object(l.createElement)("div",{className:"block-editor-inserter__parent-block-header"},Object(l.createElement)(Lr,{icon:c,showColors:!0}),o&&Object(l.createElement)("h2",null,o)),n)}var ou=function(e){var t=e.title,n=e.icon,r=e.children;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-inserter__panel-header"},Object(l.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),Object(l.createElement)(v.Icon,{icon:n})),Object(l.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};function cu(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 iu=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.showMostUsedBlocks,c=Dr(t,n),i=Object(Me.a)(c,4),u=i[0],s=i[1],b=i[2],f=i[3],v=Object(m.useSelect)((function(e){var n=e("core/block-editor").getBlockName;return!!(0,e(p.store).getChildBlockNames)(n(t)).length}),[t]),O=Object(l.useMemo)((function(){return Object(d.orderBy)(u,["frecency"],["desc"]).slice(0,6)}),[u]),g=Object(l.useMemo)((function(){return u.filter((function(e){return!e.category}))}),[u]),h=Object(l.useMemo)((function(){var e=function(e){return Object(d.findIndex)(s,(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")}))(u)}),[u,s]),j=Object(l.useMemo)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cu(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cu(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]=u.filter((function(e){return function(e){return e.name.split("/")[0]}(e)===t})),0===e[t].length&&delete e[t]})),e}),[u,b]);return Object(l.useEffect)((function(){return function(){return r(null)}}),[]),Object(l.createElement)("div",null,v&&Object(l.createElement)(ru,{rootClientId:t},Object(l.createElement)(nu,{items:u,onSelect:f,onHover:r,label:Object(C.__)("Child Blocks")})),o&&!v&&!!O.length&&Object(l.createElement)(ou,{title:Object(C._x)("Most used","blocks")},Object(l.createElement)(nu,{items:O,onSelect:f,onHover:r,label:Object(C._x)("Most used","blocks")})),!v&&Object(d.map)(s,(function(e){var t=h[e.slug];return t&&t.length?Object(l.createElement)(ou,{key:e.slug,title:e.title,icon:e.icon},Object(l.createElement)(nu,{items:t,onSelect:f,onHover:r,label:e.title})):null})),!v&&!!g.length&&Object(l.createElement)(ou,{className:"block-editor-inserter__uncategorized-blocks-panel",title:Object(C.__)("Uncategorized")},Object(l.createElement)(nu,{items:g,onSelect:f,onHover:r,label:Object(C.__)("Uncategorized")})),!v&&Object(d.map)(b,(function(e,t){var n=j[t];return n&&n.length?Object(l.createElement)(ou,{key:t,title:e.title,icon:e.icon},Object(l.createElement)(nu,{items:n,onSelect:f,onHover:r,label:e.title})):null})))},au=function(e){var t,n=e.selectedCategory,r=e.patternCategories,o=e.onClickCategory,c=e.children;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:s()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns")},Object(l.createElement)(v.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:Object(C.__)("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(l.createElement)("div",{className:"block-editor-inserter__panel-content"},c))},lu=n(49),uu=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)(lu.store).createSuccessNotice;return[r,n,Object(l.useCallback)((function(t,n){e(Object(d.map)(n,(function(e){return Object(p.cloneBlock)(e)})),t.name),o(Object(C.sprintf)(
|
32 |
/* translators: %s: block pattern title. */
|
33 |
+
Object(C.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function su(e){var t=e.isDraggable,n=e.pattern,r=e.onClick,o=n.content,c=n.viewportWidth,i=Object(l.useMemo)((function(){return Object(p.parse)(o)}),[o]),a=Object(b.useInstanceId)(su),u="block-editor-block-patterns-list__item-description-".concat(a);return Object(l.createElement)(eu,{isEnabled:t,blocks:i},(function(e){var t=e.draggable,o=e.onDragStart,a=e.onDragEnd;return Object(l.createElement)("div",{className:"block-editor-block-patterns-list__item",role:"button",onClick:function(){return r(n,i)},onKeyDown:function(e){Ht.ENTER!==e.keyCode&&Ht.SPACE!==e.keyCode||r(n,i)},tabIndex:0,"aria-label":n.title,"aria-describedby":n.description?u:void 0,draggable:t,onDragStart:o,onDragEnd:a},Object(l.createElement)(Kl,{blocks:i,viewportWidth:c}),Object(l.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&Object(l.createElement)(v.VisuallyHidden,{id:u},n.description))}))}function du(){return Object(l.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var bu=function(e){var t=e.isDraggable,n=e.blockPatterns,r=e.shownPatterns,o=e.onClickPattern;return n.map((function(e){return r.includes(e)?Object(l.createElement)(su,{key:e.name,pattern:e,onClick:o,isDraggable:t}):Object(l.createElement)(du,{key:e.name})}))};function fu(e){var t=e.onInsert,n=e.selectedCategory,r=e.onClickCategory,o=uu(t),c=Object(Me.a)(o,3),i=c[0],a=c[1],u=c[2],s=Object(l.useMemo)((function(){return a.filter((function(e){return i.some((function(t){return t.categories.includes(e.name)}))}))}),[i,a]),f=n||s[0];Object(l.useEffect)((function(){i.some((function(e){return p(e)===1/0}))&&!s.find((function(e){return"uncategorized"===e.name}))&&s.push({name:"uncategorized",label:Object(C._x)("Uncategorized")})}),[s,i]);var p=Object(l.useCallback)((function(e){if(!e.categories||!e.categories.length)return 1/0;var t=Object(d.fromPairs)(s.map((function(e,t){return[e.name,t]})));return Math.min.apply(Math,Object(ue.a)(e.categories.map((function(e){return void 0!==t[e]?t[e]:1/0}))))}),[s]),m=Object(l.useMemo)((function(){return i.filter((function(e){return"uncategorized"===f.name?p(e)===1/0:e.categories&&e.categories.includes(f.name)}))}),[i,f]),v=Object(l.useMemo)((function(){return m.sort((function(e,t){return p(e)-p(t)}))}),[m,p]),O=Object(b.useAsyncList)(v);return Object(l.createElement)(l.Fragment,null,!!m.length&&Object(l.createElement)(au,{title:f.title,selectedCategory:f,patternCategories:s,onClickCategory:r},Object(l.createElement)(bu,{shownPatterns:O,blockPatterns:m,onClickPattern:u,isDraggable:!0})))}var pu=function(e){var t=e.onInsert,n=e.onClickCategory,r=e.selectedCategory;return Object(l.createElement)(fu,{selectedCategory:r,onInsert:t,onClickCategory:n})},mu=n(25),vu=function(){return Object(l.createElement)("div",{className:"block-editor-inserter__no-results"},Object(l.createElement)(Dl.a,{className:"block-editor-inserter__no-results-icon",icon:Ar.a}),Object(l.createElement)("p",null,Object(C.__)("No results found.")))};function Ou(e){var t=e.onHover,n=e.onInsert,r=e.rootClientId,o=Dr(r,n),c=Object(Me.a)(o,4),i=c[0],a=c[3],u=Object(l.useMemo)((function(){return i.filter((function(e){return"reusable"===e.category}))}),[i]);return 0===u.length?Object(l.createElement)(vu,null):Object(l.createElement)(ou,{title:Object(C.__)("Reusable blocks")},Object(l.createElement)(nu,{items:u,onSelect:a,onHover:t,label:Object(C.__)("Reusable blocks")}))}var gu=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Ou,{onHover:r,onInsert:n,rootClientId:t}),Object(l.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},Object(l.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:Object(mu.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(C.__)("Manage all reusable blocks"))))},hu=Object(v.createSlotFill)("__experimentalInserterMenuExtension"),ju=hu.Fill,ku=hu.Slot;ju.Slot=ku;var yu=ju,_u=function(e){var t=e.rootClientId,n=e.insertionIndex,r=e.clientId,o=e.isAppender,c=e.selectBlockOnInsert,i=e.onSelect,a=Object(m.useSelect)((function(e){var c,i,a=e("core/block-editor"),l=a.getSelectedBlock,u=a.getBlockIndex,s=a.getBlockOrder,d=a.getBlockInsertionPoint;if(t||n||r||o)c=t,i=n||(r?u(r,c):s(c).length);else{var b=d();c=b.rootClientId,i=b.index}return{selectedBlock:l(),destinationRootClientId:c,destinationIndex:i}}),[t,n,r,o]),l=a.selectedBlock,u=a.destinationRootClientId,s=a.destinationIndex,d=Object(m.useDispatch)("core/block-editor"),b=d.replaceBlocks,f=d.insertBlocks,v=d.showInsertionPoint,O=d.hideInsertionPoint;return[u,function(e,t){if(!o&&l&&Object(p.isUnmodifiedDefaultBlock)(l)?b(l.clientId,e,null,null,t):f(e,s,u,c,t),!c){
|
34 |
// translators: %d: the name of the block that has been added
|
35 |
+
var n=Object(C._n)("%d block added.","%d blocks added.",e.length);Object(ot.speak)(n)}i&&i()},function(e){e?v(u,s):O()}]},Eu=function(e){var t=e.filterValue,n=e.onSelect,r=e.onHover,o=e.rootClientId,c=e.clientId,i=e.isAppender,a=e.selectBlockOnInsert,u=e.maxBlockPatterns,s=e.maxBlockTypes,f=e.showBlockDirectory,p=void 0!==f&&f,m=e.isDraggable,O=void 0===m||m,g=Object(b.useDebounce)(ot.speak,500),h=_u({onSelect:n,rootClientId:o,clientId:c,isAppender:i,selectBlockOnInsert:a}),j=Object(Me.a)(h,2),k=j[0],y=j[1],_=Dr(k,y),E=Object(Me.a)(_,4),w=E[0],S=E[1],I=E[2],B=E[3],x=uu(y),P=Object(Me.a)(x,3),T=P[0],N=P[2],D=Object(l.useMemo)((function(){var e=Pr(Object(d.orderBy)(w,["frecency"],["desc"]),S,I,t);return void 0!==s?e.slice(0,s):e}),[t,w,S,I,s]),A=Object(l.useMemo)((function(){var e=Tr(T,t);return void 0!==u?e.slice(0,u):e}),[t,T,u]);Object(l.useEffect)((function(){if(t){var e=D.length+A.length,n=Object(C.sprintf)(
|
36 |
/* translators: %d: number of results. */
|
37 |
+
Object(C._n)("%d result found.","%d results found.",e),e);g(n)}}),[t,g]);var L=Object(b.useAsyncList)(A),R=!Object(d.isEmpty)(D)||!Object(d.isEmpty)(A);return Object(l.createElement)(l.Fragment,null,!p&&!R&&Object(l.createElement)(vu,null),!!D.length&&Object(l.createElement)(ou,{title:Object(l.createElement)(v.VisuallyHidden,null,Object(C.__)("Blocks"))},Object(l.createElement)(nu,{items:D,onSelect:B,onHover:r,label:Object(C.__)("Blocks"),isDraggable:O})),!!D.length&&!!A.length&&Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!A.length&&Object(l.createElement)(ou,{title:Object(l.createElement)(v.VisuallyHidden,null,Object(C.__)("Block Patterns"))},Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},Object(l.createElement)(bu,{shownPatterns:L,blockPatterns:A,onClickPattern:N,isDraggable:O}))),p&&Object(l.createElement)(yu.Slot,{fillProps:{onSelect:B,onHover:r,filterValue:t,hasItems:R}},(function(e){return e.length?e:R?null:Object(l.createElement)(vu,null)})))},wu={name:"blocks",
|
38 |
/* translators: Blocks tab title in the block inserter. */
|
39 |
+
title:Object(C.__)("Blocks")},Cu={name:"patterns",
|
40 |
/* translators: Patterns tab title in the block inserter. */
|
41 |
+
title:Object(C.__)("Patterns")},Su={name:"reusable",
|
42 |
/* translators: Reusable blocks tab title in the block inserter. */
|
43 |
+
title:Object(C.__)("Reusable")},Iu=function(e){var t=e.children,n=e.showPatterns,r=void 0!==n&&n,o=e.showReusableBlocks,c=void 0!==o&&o,i=e.onSelect,a=[wu];return r&&a.push(Cu),c&&a.push(Su),Object(l.createElement)(v.TabPanel,{className:"block-editor-inserter__tabs",tabs:a,onSelect:i},t)},Bu=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.__experimentalSelectBlockOnInsert,c=e.__experimentalInsertionIndex,i=e.onSelect,a=e.showInserterHelpPanel,u=e.showMostUsedBlocks,s=Object(l.useState)(""),d=Object(Me.a)(s,2),b=d[0],f=d[1],p=Object(l.useState)(null),O=Object(Me.a)(p,2),g=O[0],h=O[1],j=Object(l.useState)(null),k=Object(Me.a)(j,2),y=k[0],_=k[1],E=_u({rootClientId:t,clientId:n,isAppender:r,selectBlockOnInsert:o,insertionIndex:c}),w=Object(Me.a)(E,3),S=w[0],I=w[1],B=w[2],x=Object(m.useSelect)((function(e){var t=e("core/block-editor").getSettings(),n=t.__experimentalBlockPatterns,r=t.__experimentalReusableBlocks;return{hasPatterns:!(null==n||!n.length),hasReusableBlocks:!(null==r||!r.length)}}),[]),P=x.hasPatterns,T=x.hasReusableBlocks,N=!S&&P,D=function(e){I(e),i()},A=function(e){B(!!e),h(e)},L=Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-inserter__block-list"},Object(l.createElement)(iu,{rootClientId:S,onInsert:D,onHover:A,showMostUsedBlocks:u})),a&&Object(l.createElement)("div",{className:"block-editor-inserter__tips"},Object(l.createElement)(v.VisuallyHidden,{as:"h2"},Object(C.__)("A tip for using the block editor")),Object(l.createElement)(Tl,null))),R=Object(l.createElement)(pu,{onInsert:function(e,t){I(e,{patternName:t}),i()},onClickCategory:function(e){_(e)},selectedCategory:y}),M=Object(l.createElement)(gu,{rootClientId:S,onInsert:D,onHover:A});return Object(l.createElement)("div",{className:"block-editor-inserter__menu"},Object(l.createElement)("div",{className:"block-editor-inserter__main-area"},Object(l.createElement)("div",{className:"block-editor-inserter__content"},Object(l.createElement)(Ll,{onChange:function(e){g&&h(null),f(e)},value:b,placeholder:Object(C.__)("Search")}),!!b&&Object(l.createElement)(Eu,{filterValue:b,onSelect:i,onHover:A,rootClientId:t,clientId:n,isAppender:r,selectBlockOnInsert:o,showBlockDirectory:!0}),!b&&(N||T)&&Object(l.createElement)(Iu,{showPatterns:N,showReusableBlocks:T},(function(e){return"blocks"===e.name?L:"patterns"===e.name?R:M})),!b&&!N&&!T&&L)),a&&g&&Object(l.createElement)($l,{item:g}))};function xu(e){var t=e.onSelect,n=e.rootClientId,r=e.clientId,o=e.isAppender,c=e.selectBlockOnInsert,i=Object(l.useState)(""),a=Object(Me.a)(i,2),u=a[0],d=a[1],b=_u({onSelect:t,rootClientId:n,clientId:r,isAppender:o,selectBlockOnInsert:c}),f=Object(Me.a)(b,2),p=f[0],O=f[1],g=Dr(p,O),h=Object(Me.a)(g,1)[0],j=uu(O),k=Object(Me.a)(j,1)[0],y=!p&&k.length&&!!u,_=y&&k.length>6||h.length>6,E=Object(m.useSelect)((function(e){var t=e("core/block-editor"),o=t.getSettings,c=t.getBlockIndex;return{setInserterIsOpened:o().__experimentalSetIsInserterOpened,blockIndex:c(r,n)}}),[r,n]),w=E.setInserterIsOpened,S=E.blockIndex;Object(l.useEffect)((function(){w&&w(!1)}),[w]);var I=Object(m.useDispatch)("core/block-editor").__unstableSetInsertionPoint;return Object(l.createElement)("div",{className:s()("block-editor-inserter__quick-inserter",{"has-search":_,"has-expand":w})},_&&Object(l.createElement)(Ll,{value:u,onChange:function(e){d(e)},placeholder:Object(C.__)("Search for a block")}),Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},Object(l.createElement)(Eu,{filterValue:u,onSelect:t,rootClientId:n,clientId:r,isAppender:o,selectBlockOnInsert:c,maxBlockPatterns:y?2:0,maxBlockTypes:6,isDraggable:!1})),w&&Object(l.createElement)(v.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:function(){I(n,S),w(!0)},"aria-label":Object(C.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},Object(C.__)("Browse all")))}var Pu=function(e){var t,n=e.onToggle,r=e.disabled,o=e.isOpen,c=e.blockTitle,a=e.hasSingleBlockType,u=e.toggleProps,s=void 0===u?{}:u;t=a?Object(C.sprintf)(// translators: %s: the name of the block when there is only one
|
44 |
+
Object(C._x)("Add %s","directly add the only allowed block"),c):Object(C._x)("Add block","Generic label for block inserter button");var d=s.onClick,b=Object(Fe.a)(s,["onClick"]);return Object(l.createElement)(v.Button,Object(i.a)({icon:xl.a,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),d&&d(e)},className:"block-editor-inserter__toggle","aria-haspopup":!a&&"true","aria-expanded":!a&&o,disabled:r},b))},Tu=function(e){Object(Rn.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(Fn.a)(t);if(n){var o=Object(Fn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Mn.a)(this,e)});function o(){var e;return Object(Dn.a)(this,o),(e=r.apply(this,arguments)).onToggle=e.onToggle.bind(Object(Ln.a)(e)),e.renderToggle=e.renderToggle.bind(Object(Ln.a)(e)),e.renderContent=e.renderContent.bind(Object(Ln.a)(e)),e}return Object(An.a)(o,[{key:"onToggle",value:function(e){var t=this.props.onToggle;t&&t(e)}},{key:"renderToggle",value:function(e){var t=e.onToggle,n=e.isOpen,r=this.props,o=r.disabled,c=r.blockTitle,i=r.hasSingleBlockType,a=r.toggleProps,l=r.hasItems,u=r.renderToggle;return(void 0===u?Pu:u)({onToggle:t,isOpen:n,disabled:o||!l,blockTitle:c,hasSingleBlockType:i,toggleProps:a})}},{key:"renderContent",value:function(e){var t=e.onClose,n=this.props,r=n.rootClientId,o=n.clientId,c=n.isAppender,i=n.showInserterHelpPanel,a=n.__experimentalSelectBlockOnInsert;return n.__experimentalIsQuick?Object(l.createElement)(xu,{onSelect:t,rootClientId:r,clientId:o,isAppender:c,selectBlockOnInsert:a}):Object(l.createElement)(Bu,{onSelect:t,rootClientId:r,clientId:o,isAppender:c,showInserterHelpPanel:i,__experimentalSelectBlockOnInsert:a})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.hasSingleBlockType,r=e.insertOnlyAllowedBlock,o=e.__experimentalIsQuick;return n?this.renderToggle({onToggle:r}):Object(l.createElement)(v.Dropdown,{className:"block-editor-inserter",contentClassName:s()("block-editor-inserter__popover",{"is-quick":o}),position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:Object(C.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent})}}]),o}(l.Component),Nu=Object(b.compose)([Object(m.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/block-editor"),c=o.getBlockRootClientId,i=o.hasInserterItems,a=o.__experimentalGetAllowedBlocks,l=e(p.store).getBlockVariations,u=a(r=r||c(n)||void 0),s=1===Object(d.size)(u)&&0===Object(d.size)(l(u[0].name,"inserter")),b=!1;return s&&(b=u[0]),{hasItems:i(r),hasSingleBlockType:s,blockTitle:b?b.title:"",allowedBlockType:b,rootClientId:r}})),Object(m.withDispatch)((function(e,t,n){var r=n.select;return{insertOnlyAllowedBlock:function(){var n=t.rootClientId,o=t.clientId,c=t.isAppender,i=t.hasSingleBlockType,a=t.allowedBlockType,l=t.__experimentalSelectBlockOnInsert;if(i&&((0,e("core/block-editor").insertBlock)(Object(p.createBlock)(a.name),function(){var e=r("core/block-editor"),t=e.getBlockIndex,i=e.getBlockSelectionEnd,a=e.getBlockOrder;if(o)return t(o,n);var l=i();return!c&&l?t(l,n)+1:a(n).length}(),n,l),!l)){var u=Object(C.sprintf)(// translators: %s: the name of the block that has been added
|
45 |
+
Object(C.__)("%s block added"),a.title);Object(ot.speak)(u)}}}})),Object(b.ifCondition)((function(e){var t=e.hasItems,n=e.isAppender,r=e.rootClientId,o=e.clientId;return t||!n&&!r&&!o}))])(Tu),Du=Object(b.compose)(Object(m.withSelect)((function(e,t){var n=e("core/block-editor"),r=n.getBlockCount,o=n.getBlockName,c=n.isBlockValid,i=n.getSettings,a=n.getTemplateLock,l=!r(t.rootClientId),u=o(t.lastBlockClientId)===Object(p.getDefaultBlockName)(),s=c(t.lastBlockClientId),d=i().bodyPlaceholder;return{isVisible:l||!u||!s,showPrompt:l,isLocked:!!a(t.rootClientId),placeholder:d}})),Object(m.withDispatch)((function(e,t){var n=e("core/block-editor"),r=n.insertDefaultBlock,o=n.startTyping;return{onAppend:function(){var e=t.rootClientId;r(void 0,e),o()}}})))((function(e){var t=e.isLocked,n=e.isVisible,r=e.onAppend,o=e.showPrompt,c=e.placeholder,i=e.rootClientId;if(t||!n)return null;var a=Object(Bl.decodeEntities)(c)||Object(C.__)("Start writing or type / to choose a block");return Object(l.createElement)("div",{"data-root-client-id":i||"",className:"wp-block block-editor-default-block-appender"},Object(l.createElement)(Sl.a,{role:"button","aria-label":Object(C.__)("Add block"),className:"block-editor-default-block-appender__content",readOnly:!0,onFocus:r,value:o?a:""}),Object(l.createElement)(Nu,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))})),Au=Object(l.forwardRef)((function(e,t){var n=e.rootClientId,r=e.className,o=e.__experimentalSelectBlockOnInsert,c=e.onFocus,i=e.tabIndex;return Object(l.createElement)(Nu,{position:"bottom center",rootClientId:n,__experimentalSelectBlockOnInsert:o,__experimentalIsQuick:!0,renderToggle:function(e){var n,o=e.onToggle,a=e.disabled,u=e.isOpen,d=e.blockTitle,b=e.hasSingleBlockType;n=b?Object(C.sprintf)(// translators: %s: the name of the block when there is only one
|
46 |
+
Object(C._x)("Add %s","directly add the only allowed block"),d):Object(C._x)("Add block","Generic label for block inserter button");var f=!b,p=Object(l.createElement)(v.Button,{ref:t,onFocus:c,tabIndex:i,className:s()(r,"block-editor-button-block-appender"),onClick:o,"aria-haspopup":f?"true":void 0,"aria-expanded":f?u:void 0,disabled:a,label:n},!b&&Object(l.createElement)(v.VisuallyHidden,{as:"span"},n),Object(l.createElement)(Dl.a,{icon:xl.a}));return(f||b)&&(p=Object(l.createElement)(v.Tooltip,{text:n},p)),p},isAppender:!0})}));function Lu(e){e.stopPropagation()}Object(l.createContext)();var Ru=Object(m.withSelect)((function(e,t){var n=t.rootClientId,r=e("core/block-editor"),o=r.getBlockOrder,c=r.canInsertBlockType,i=r.getTemplateLock,a=r.getSelectedBlockClientId;return{isLocked:!!i(n),blockClientIds:o(n),canInsertDefaultBlock:c(Object(p.getDefaultBlockName)(),n),selectedBlockClientId:a()}}))((function(e){var t,n=e.blockClientIds,r=e.rootClientId,o=e.canInsertDefaultBlock,c=e.isLocked,i=e.renderAppender,a=e.className,u=e.selectedBlockClientId,b=e.tagName,f=void 0===b?"div":b;if(c||!1===i)return null;if(i)t=Object(l.createElement)(i,null);else{var p=!r,m=u===r,v=u&&!n.includes(u);if(!p&&!m&&(!u||v))return null;t=o?Object(l.createElement)(Du,{rootClientId:r,lastBlockClientId:Object(d.last)(n)}):Object(l.createElement)(Au,{rootClientId:r,className:"block-list-appender__toggle"})}return Object(l.createElement)(f,{tabIndex:-1,onFocus:Lu,className:s()("block-list-appender","wp-block",a)},t)}));function Mu(e,t,n,r,o,c,i){return function(a){var l=function(e){var t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(a),u=l.srcRootClientId,s=l.srcClientIds,d=l.type,b=l.blocks;if("inserter"===d&&(i(),c(b,t,e,!1)),"block"===d){var f=n(s[0],u);if(u===e&&f===t)return;if(s.includes(e)||r(s).some((function(t){return t===e})))return;var p=u===e,m=s.length;o(s,u,e,p&&f<t?t-m:t)}}}function Fu(e,t,n,r,o){return function(c){if(n){var i=Object(p.findTransform)(Object(p.getBlockTransforms)("from"),(function(e){return"files"===e.type&&e.isMatch(c)}));if(i){var a=i.transform(c,r);o(a,t,e)}}}}function Vu(e,t,n){return function(r){var o=Object(p.pasteHandler)({HTML:r,mode:"BLOCKS"});o.length&&n(o,t,e)}}function Hu(e,t){var n=Object(m.useSelect)((function(e){var t=e("core/block-editor");return{getBlockIndex:t.getBlockIndex,getClientIdsOfDescendants:t.getClientIdsOfDescendants,hasUploadPermissions:(0,t.getSettings)().mediaUpload}}),[]),r=n.getBlockIndex,o=n.getClientIdsOfDescendants,c=n.hasUploadPermissions,i=Object(m.useDispatch)("core/block-editor"),a=i.insertBlocks,l=i.moveBlocksToPosition,u=i.updateBlockAttributes;return{onDrop:Mu(e,t,r,o,l,a,i.clearSelectedBlock),onFilesDrop:Fu(e,t,c,u,a),onHTMLDrop:Vu(e,t,a)}}function zu(e,t,n){var r,o="top"===n||"bottom"===n,c=e.x,i=e.y,a=o?c:i,l=o?i:c,u=o?t.left:t.top,s=o?t.right:t.bottom,d=t[n];return r=a>=u&&a<=s?a:a<s?u:s,Math.sqrt(Math.pow(a-r,2)+Math.pow(l-d,2))}function Uu(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((function(o){var c=zu(e,t,o);(void 0===n||c<n)&&(n=c,r=o)})),[n,r]}function Gu(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 Ku=Object(l.forwardRef)((function(e,t){var n=e.selectedClientId,r=e.isReverse,o=e.containerRef,c=e.noCapture,i=e.hasMultiSelection,a=e.multiSelectionContainer,u=Object(m.useSelect)((function(e){return e("core/block-editor").isNavigationMode()})),s=Object(m.useDispatch)("core/block-editor").setNavigationMode;return Object(l.createElement)("div",{ref:t,tabIndex:u?void 0:"0",onFocus:function(){if(c.current)c.current=null;else if(n){var e=at(n,t.current.ownerDocument);if(r){var l=Za.focus.tabbable.find(e);(Object(d.last)(l)||e).focus()}else e.focus()}else{if(i)return void a.current.focus();s(!0);var u=Za.focus.tabbable.find(o.current);u.length&&(r?Object(d.last)(u).focus():Object(d.first)(u).focus())}},style:{position:"fixed"}})}));function Wu(e,t){for(var n="start"===t?"firstChild":"lastChild",r="start"===t?"nextSibling":"previousSibling";e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[r];)e=e[r];return e}function qu(e){var t=e("core/block-editor"),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.getMultiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.getSelectedBlockClientId;return{isSelectionEnabled:n(),isMultiSelecting:r(),multiSelectedBlockClientIds:o(),hasMultiSelection:c(),getBlockParents:i,selectedBlockClientId:a()}}function $u(e,t){Array.from(e.querySelectorAll(".rich-text")).forEach((function(e){t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}var Yu=Object(l.createContext)();function Xu(e,t,n,r){var o,c=Za.focus.focusable.find(n);return t&&(c=Object(d.reverse)(c)),c=c.slice(c.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),Object(d.find)(c,(function t(n,c,i){if(!Za.focus.tabbable.isTabbableIndex(n))return!1;if(r){var a=n.getBoundingClientRect();if(a.left>=o.right||a.right<=o.left)return!1}if(Object(Za.isTextField)(n))return!0;if(!n.classList.contains("block-editor-block-list__block"))return!1;if((l=n).classList.contains("block-editor-block-list__layout")||l.querySelector(".block-editor-block-list__layout"))return!0;var l;if(n.contains(e))return!1;for(var u,s=1;(u=i[c+s])&&n.contains(u);s++)if(t(u,c+s,i))return!1;return!0}))}function Qu(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksStartClientId,o=t.getMultiSelectedBlocksEndClientId,c=t.getPreviousBlockClientId,i=t.getNextBlockClientId,a=t.getFirstMultiSelectedBlockClientId,l=t.getLastMultiSelectedBlockClientId,u=t.hasMultiSelection,s=t.getBlockOrder,b=t.isNavigationMode,f=t.isSelectionEnabled,p=t.getBlockSelectionStart,m=t.isMultiSelecting,v=t.getSettings,O=n(),g=r(),h=o(),j=s();return{selectedBlockClientId:O,selectionStartClientId:g,selectionBeforeEndClientId:c(h||O),selectionAfterEndClientId:i(h||O),selectedFirstClientId:a(),selectedLastClientId:l(),hasMultiSelection:u(),firstBlock:Object(d.first)(j),lastBlock:Object(d.last)(j),isNavigationMode:b(),isSelectionEnabled:f(),blockSelectionStart:p(),isMultiSelecting:m(),keepCaretInsideBlock:v().keepCaretInsideBlock}}function Zu(e){var t=e.children,n=Object(l.useRef)(),r=Object(l.useRef)(),o=Object(l.useRef)(),c=Object(l.useRef)(),i=Object(l.useRef)(),a=Object(l.useRef)(),u=Object(l.useRef)(),b=function(e){var t=Object(m.useSelect)(qu,[]),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.multiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.selectedBlockClientId,u=Object(m.useDispatch)("core/block-editor"),s=u.startMultiSelect,d=u.stopMultiSelect,b=u.multiSelect,f=u.selectBlock,p=Object(l.useRef)(),v=Object(l.useRef)(),O=Object(l.useRef)();Object(l.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;if(c&&!r){var i=o.length;if(!(i<2)){var l=o[0],u=o[i-1],s=at(l,t),d=at(u,t),b=n.getSelection(),f=t.createRange();s=Wu(s,"start"),d=Wu(d,"end"),f.setStartBefore(s),f.setEndAfter(d),b.removeAllRanges(),b.addRange(f)}}else{if(!a||r)return;var p=n.getSelection();if(p.rangeCount&&!p.isCollapsed){var m=at(a,t),v=p.getRangeAt(0),O=v.startContainer,g=v.endContainer;!m||m.contains(O)&&m.contains(g)||p.removeAllRanges()}}}),[c,r,o,f,a]);var g=Object(l.useCallback)((function(t){var n=t.isSelectionEnd,r=e.current.ownerDocument.defaultView.getSelection();if(r.rangeCount&&!r.isCollapsed){var o=ut(r.focusNode);if(v.current===o){if(f(o),n&&($u(e.current,!0),r.rangeCount)){var c=r.getRangeAt(0).commonAncestorContainer;O.current.contains(c)&&O.current.focus()}}else{var a=[].concat(Object(ue.a)(i(v.current)),[v.current]),l=[].concat(Object(ue.a)(i(o)),[o]),u=Math.min(a.length,l.length)-1;b(a[u],l[u])}}else $u(e.current,!0)}),[f,i,b]),h=Object(l.useCallback)((function(){var t=e.current.ownerDocument,n=t.defaultView;t.removeEventListener("selectionchange",g),n.removeEventListener("mouseup",h),p.current=n.requestAnimationFrame((function(){g({isSelectionEnd:!0}),d()}))}),[g,d]);return Object(l.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;return function(){t.removeEventListener("selectionchange",g),n.removeEventListener("mouseup",h),n.cancelAnimationFrame(p.current)}}),[g,h]),Object(l.useCallback)((function(t){if(n){var r=e.current.ownerDocument,o=r.defaultView;v.current=t,O.current=r.activeElement,s(),r.addEventListener("selectionchange",g),o.addEventListener("mouseup",h),$u(e.current,!1)}}),[n,s,h])}(n),f=Object(m.useSelect)(Qu,[]),p=f.selectedBlockClientId,v=f.selectionStartClientId,O=f.selectionBeforeEndClientId,g=f.selectionAfterEndClientId,h=f.selectedFirstClientId,j=f.selectedLastClientId,k=f.hasMultiSelection,y=f.firstBlock,_=f.lastBlock,E=f.isNavigationMode,w=f.isSelectionEnabled,S=f.blockSelectionStart,I=f.isMultiSelecting,B=f.keepCaretInsideBlock,x=Object(m.useDispatch)("core/block-editor"),P=x.multiSelect,T=x.selectBlock,N=x.setNavigationMode;function D(e){var t=e?O:g;t&&P(v||p,t)}function A(e){var t=e?h:j;t&&T(t)}Object(l.useEffect)((function(){k&&!I&&c.current.focus()}),[k,I]);var L=s()("block-editor-writing-flow",{"is-navigate-mode":E});return Object(l.createElement)(Yu.Provider,{value:b},Object(l.createElement)(Ku,{ref:r,selectedClientId:p,containerRef:n,noCapture:a,hasMultiSelection:k,multiSelectionContainer:c}),Object(l.createElement)("div",{ref:c,tabIndex:k?"0":void 0,"aria-label":k?Object(C.__)("Multiple selected blocks"):void 0,style:{position:"fixed"},onKeyDown:function(e){var t=e.keyCode,n=e.shiftKey,c=t===Ht.UP,i=t===Ht.DOWN,l=t===Ht.LEFT,u=t===Ht.RIGHT,s=c||l,d=l||u||c||i;t===Ht.TAB?(a.current=!0,n?r.current.focus():o.current.focus()):d&&((n?D:A)(s),e.preventDefault())}}),Object(l.createElement)("div",{ref:n,className:L,onKeyDown:function(e){var t=e.keyCode,c=e.target;if(n.current.contains(c)){var l=t===Ht.UP,s=t===Ht.DOWN,b=t===Ht.LEFT,f=t===Ht.RIGHT,m=t===Ht.TAB,v=t===Ht.ESCAPE,h=l||b,j=b||f,k=l||s,E=j||k,w=e.shiftKey,C=w||e.ctrlKey||e.altKey||e.metaKey,S=k?Za.isVerticalEdge:Za.isHorizontalEdge,I=n.current.ownerDocument,x=I.defaultView;if(p)if(m){var T=at(p,I);if(w){if(c===T)return a.current=!0,void r.current.focus()}else{var A=Za.focus.tabbable.find(T);if(c===(Object(d.last)(A)||T))return a.current=!0,void o.current.focus()}}else v&&N(!0);if(k?u.current||(u.current=Object(Za.computeCaretRect)(x)):u.current=null,!E)return Ht.isKeyboardEvent.primary(e)&&(i.current=Object(Za.isEntirelySelected)(c)),void(Ht.isKeyboardEvent.primary(e,"a")&&((c.isContentEditable?i.current:Object(Za.isEntirelySelected)(c))&&(P(y,_),e.preventDefault()),i.current=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===Ht.UP||t===Ht.DOWN)&&!n)return!0;var r=e.tagName;return"INPUT"!==r&&"TEXTAREA"!==r}(c,t,C)){var L,R="rtl"===(L=c).ownerDocument.defaultView.getComputedStyle(L).direction?!h:h;if(w)(h&&O||!h&&g)&&function(e,t){var r,o,c=Xu(e,t,n.current);return!(c&&(r=e,o=c,r.closest(".block-editor-block-list__block")===o.closest(".block-editor-block-list__block")))}(c,h)&&S(c,h)&&(D(h),e.preventDefault());else if(k&&Object(Za.isVerticalEdge)(c,h)&&!B){var M=Xu(c,h,n.current,!0);M&&(Object(Za.placeCaretAtVerticalEdge)(M,h,u.current),e.preventDefault())}else if(j&&x.getSelection().isCollapsed&&Object(Za.isHorizontalEdge)(c,R)&&!B){var F=Xu(c,R,n.current);Object(Za.placeCaretAtHorizontalEdge)(F,R),e.preventDefault()}}}},onMouseDown:function(e){u.current=null;var t=e.target.ownerDocument;if(E&&p&<(at(p,t),e.target)&&N(!1),w&&0===e.button){var n=ut(e.target);n&&(e.shiftKey?S!==n&&(P(S,n),e.preventDefault()):k&&T(n))}}},t),Object(l.createElement)(Ku,{ref:o,selectedClientId:p,containerRef:n,noCapture:a,hasMultiSelection:k,multiSelectionContainer:c,isReverse:!0}))}function Ju(e){var t=e.clientId,n=e.setIsInserterForced,r=e.containerRef,o=Object(l.useRef)(),c=Object(m.useSelect)((function(e){var n=e("core/block-editor"),r=n.getMultiSelectedBlockClientIds,o=n.getSelectedBlockClientId,c=n.hasMultiSelection;if((0,n.getSettings)().hasReducedUI)return!0;var i=r(),a=o();return c()?i.includes(t):t===a}),[t]);return Object(l.createElement)("div",{ref:o,onFocus:function(){return n(!0)},onBlur:function(){return n(!1)},onClick:function(e){var n=e.clientX,c=e.clientY,i=e.target;if(i===o.current){var a=r.current.ownerDocument,l=i.getBoundingClientRect(),u=c<l.top+l.height/2,s=at(t,a),d=Xu(s,!0,u?r.current:s)||s,b=new window.DOMRect(n,c,0,16);Object(Za.placeCaretAtVerticalEdge)(d,u,b,!1)}},tabIndex:-1,className:s()("block-editor-block-list__insertion-point-inserter",{"is-inserter-hidden":c})},Object(l.createElement)(Nu,{position:"bottom center",clientId:t,__experimentalIsQuick:!0}))}function es(e){var t=e.clientId,n=e.rootClientId,r=e.isInserterShown,o=e.isInserterForced,c=e.setIsInserterForced,i=e.containerRef,a=e.showInsertionPoint,u=Object(m.useSelect)((function(e){var r=e("core/block-editor").getBlockOrder,o=i.current.ownerDocument;return at(t||Object(d.last)(r(n)),o)}),[t,n]),b=t?"top":"bottom",f=s()("block-editor-block-list__insertion-point",{"is-insert-after":!t});return Object(l.createElement)(v.Popover,{noArrow:!0,animate:!1,anchorRef:u,position:"".concat(b," right left"),focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:"block-toolbar",__unstableForcePosition:!0},Object(l.createElement)("div",{className:f,style:{width:null==u?void 0:u.offsetWidth}},(a||r||o)&&Object(l.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}),(r||o)&&Object(l.createElement)(Ju,{clientId:t,setIsInserterForced:c,containerRef:i})))}function ts(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksEndClientId,o=t.getPreviousBlockClientId,c=t.getNextBlockClientId,i=t.hasBlockMovingClientId,a=t.getBlockIndex,l=t.getBlockRootClientId,u=t.getClientIdsOfDescendants,s=t.canInsertBlockType,d=t.getBlockName,b=n(),f=r();return{selectedBlockClientId:b,selectionBeforeEndClientId:o(f||b),selectionAfterEndClientId:c(f||b),hasBlockMovingClientId:i,getBlockIndex:a,getBlockRootClientId:l,getClientIdsOfDescendants:u,canInsertBlockType:s,getBlockName:d}}var ns=function(e){var t=e.clientId,n=e.rootClientId,r=e.blockElement,o=Object(m.useSelect)((function(e){var r,o=e("core/block-editor"),c=o.__unstableGetBlockWithoutInnerBlocks,i=o.getBlockIndex,a=o.hasBlockMovingClientId,l=o.getBlockListSettings,u=i(t,n),s=c(t);return{index:u,name:s.name,attributes:s.attributes,blockMovingMode:a(),orientation:null===(r=l(n))||void 0===r?void 0:r.orientation}}),[t,n]),c=o.index,i=o.name,a=o.attributes,u=o.blockMovingMode,d=o.orientation,b=Object(m.useDispatch)("core/block-editor"),f=b.setNavigationMode,O=b.removeBlock,g=Object(l.useRef)();Object(l.useEffect)((function(){g.current.focus(),window.navigator.platform.indexOf("Win")>-1&&Object(ot.speak)(N)}),[]);var h=Object(m.useSelect)(ts,[]),j=h.selectedBlockClientId,k=h.selectionBeforeEndClientId,y=h.selectionAfterEndClientId,_=h.hasBlockMovingClientId,E=h.getBlockIndex,w=h.getBlockRootClientId,C=h.getClientIdsOfDescendants,S=Object(m.useDispatch)("core/block-editor"),I=S.selectBlock,B=S.clearSelectedBlock,x=S.setBlockMovingClientId,P=S.moveBlockToPosition,T=Object(p.getBlockType)(i),N=Object(p.__experimentalGetAccessibleBlockLabel)(T,a,c+1,d),D=s()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!u});return Object(l.createElement)("div",{className:D},Object(l.createElement)(v.Button,{ref:g,onClick:function(){return f(!1)},onKeyDown:function(e){var n=e.keyCode,o=n===Ht.UP,c=n===Ht.DOWN,i=n===Ht.LEFT,a=n===Ht.RIGHT,l=n===Ht.TAB,u=n===Ht.ESCAPE,s=n===Ht.ENTER,d=n===Ht.SPACE,b=e.shiftKey;if(n===Ht.BACKSPACE||n===Ht.DELETE)return O(t),void e.preventDefault();var f,p=l&&b||o,m=l&&!b||c,v=i,g=a;if(p)f=k;else if(m)f=y;else if(v){var h;f=null!==(h=w(j))&&void 0!==h?h:j}else if(g){var S;f=null!==(S=C([j])[0])&&void 0!==S?S:j}var T=_();if(u&&T&&x(null),(s||d)&&T){var N=w(T),D=w(j),A=E(T,N),L=E(j,D);A<L&&N===D&&(L-=1),P(T,N,D,L),I(T),x(null)}if(m||p||v||g)if(f)e.preventDefault(),I(f);else if(l&&j){var R;(R=m?Za.focus.tabbable.findNext(r):Za.focus.tabbable.findPrevious(r))&&(e.preventDefault(),R.focus(),B())}},label:N},Object(l.createElement)(xa,{clientId:t})))};function rs(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var os=function(e){var t=e.children,n=e.focusOnMount,r=e.__experimentalInitialIndex,o=e.__experimentalOnIndexChange,c=Object(Fe.a)(e,["children","focusOnMount","__experimentalInitialIndex","__experimentalOnIndexChange"]),a=Object(l.useRef)(),u=function(e){var t=Object(l.useState)(!0),n=Object(Me.a)(t,2),r=n[0],o=n[1],c=Object(l.useCallback)((function(){var t=!Za.focus.tabbable.find(e.current).some((function(e){return!("toolbarItem"in e.dataset)}));t||Ml()("Using custom components as toolbar controls",{alternative:"ToolbarItem or ToolbarButton components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),o(t)}),[]);return Object(l.useLayoutEffect)((function(){var t=new window.MutationObserver(c);return t.observe(e.current,{childList:!0,subtree:!0}),function(){return t.disconnect()}}),[r]),r}(a);return function(e,t,n,r,o){var c=Object(l.useState)(t),i=Object(Me.a)(c,1)[0],a=Object(l.useState)(r),u=Object(Me.a)(a,1)[0],s=Object(l.useCallback)((function(){var t,n,r;t=e.current,n=Za.focus.tabbable.find(t),(r=Object(Me.a)(n,1)[0])&&r.focus()}),[]);Object($a.useShortcut)("core/block-editor/focus-toolbar",s,{bindGlobal:!0,eventName:"keydown"}),Object(l.useEffect)((function(){i&&s()}),[n,i,s]),Object(l.useEffect)((function(){var t=0;return u&&!i&&(t=window.requestAnimationFrame((function(){var t,n=rs(e.current),r=u||0;n[r]&&(t=e.current).contains(t.ownerDocument.activeElement)&&n[r].focus()}))),function(){if(window.cancelAnimationFrame(t),o){var n=rs(e.current).findIndex((function(e){return 0===e.tabIndex}));o(n)}}}),[u,i])}(a,n,u,r,o),u?Object(l.createElement)(v.Toolbar,Object(i.a)({label:c["aria-label"],ref:a},c),t):Object(l.createElement)(v.NavigableMenu,Object(i.a)({orientation:"horizontal",role:"toolbar",ref:a},c),t)},cs=function(e){var t,n,r,o,c=e.children,i=e.clientIds,a=e.cloneClassname,u=e.onDragStart,s=e.onDragEnd,d=e.elementId,b=Object(m.useSelect)((function(e){var t,n=e("core/block-editor"),r=n.getBlockRootClientId,o=n.getTemplateLock,c=n.getBlockName,a=r(i[0]),l=a?o(a):null,u=c(i[0]);return{srcRootClientId:a,isDraggable:"all"!==l,icon:null===(t=Object(p.getBlockType)(u))||void 0===t?void 0:t.icon}}),[i]),f=b.srcRootClientId,O=b.isDraggable,g=b.icon,h=Object(l.useRef)(!1),j=(t=Object(l.useRef)(null),n=Object(l.useRef)(null),r=Object(l.useRef)(null),o=Object(l.useRef)(null),Object(l.useEffect)((function(){return function(){o.current&&(clearInterval(o.current),o.current=null)}}),[]),[Object(l.useCallback)((function(e){t.current=e.clientY,r.current=Object(Za.getScrollContainer)(e.target),o.current=setInterval((function(){if(r.current&&n.current){var e=r.current.scrollTop+n.current;r.current.scroll({top:e})}}),25)}),[]),Object(l.useCallback)((function(e){if(r.current){var o=r.current.offsetHeight,c=t.current-r.current.offsetTop,i=e.clientY-r.current.offsetTop;if(e.clientY>c){var a=Math.max(o-c-50,0),l=Math.max(i-c-50,0)/a;n.current=25*l}else if(e.clientY<c){var u=Math.max(c-50,0),s=Math.max(c-i-50,0)/u;n.current=-25*s}else n.current=0}}),[]),function(){t.current=null,r.current=null,o.current&&(clearInterval(o.current),o.current=null)}]),k=Object(Me.a)(j,3),y=k[0],_=k[1],E=k[2],w=Object(m.useDispatch)("core/block-editor"),C=w.startDraggingBlocks,S=w.stopDraggingBlocks;if(Object(l.useEffect)((function(){return function(){h.current&&S()}}),[]),!O)return c({isDraggable:!1});var I={type:"block",srcClientIds:i,srcRootClientId:f};return Object(l.createElement)(v.Draggable,{cloneClassname:a,elementId:d,transferData:I,onDragStart:function(e){C(i),h.current=!0,y(e),u&&u()},onDragOver:_,onDragEnd:function(){S(),h.current=!1,E(),s&&s()},__experimentalDragComponent:Object(l.createElement)(Jl,{count:i.length,icon:g})},(function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return c({draggable:!0,onDragStart:t,onDragEnd:n})}))},is=Object(m.withSelect)((function(e,t){var n,r=t.clientIds,o=e("core/block-editor"),c=o.getBlock,i=o.getBlockIndex,a=o.getBlockListSettings,l=o.getTemplateLock,u=o.getBlockOrder,s=o.getBlockRootClientId,b=Object(d.castArray)(r),f=Object(d.first)(b),m=c(f),v=s(Object(d.first)(b)),O=i(f,v),g=0===O,h=i(Object(d.last)(b),v)===u(v).length-1;return{blockType:m?Object(p.getBlockType)(m.name):null,isLocked:"all"===l(v),rootClientId:v,firstIndex:O,isFirst:g,isLast:h,orientation:null===(n=a(v))||void 0===n?void 0:n.orientation}}))((function(e){var t=e.isFirst,n=e.isLast,r=e.clientIds,o=e.isLocked,c=e.isHidden,a=e.rootClientId,u=e.orientation,d=e.hideDragHandle,b=Object(l.useState)(!1),f=Object(Me.a)(b,2),p=f[0],m=f[1],O=function(){return m(!0)},g=function(){return m(!1)};if(o||t&&n&&!a)return null;var h=1===r.length?Object(C.__)("Drag block"):Object(C.__)("Drag blocks");return Object(l.createElement)("div",{className:s()("block-editor-block-mover",{"is-visible":p||!c,"is-horizontal":"horizontal"===u})},!d&&Object(l.createElement)(cs,{clientIds:r,cloneClassname:"block-editor-block-mover__drag-clone"},(function(e){return Object(l.createElement)(v.Button,Object(i.a)({icon:Zl,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:h,tabIndex:"-1"},e))})),Object(l.createElement)(v.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},Object(l.createElement)(v.ToolbarItem,{onFocus:O,onBlur:g},(function(e){return Object(l.createElement)(dl,Object(i.a)({clientIds:r},e))})),Object(l.createElement)(v.ToolbarItem,{onFocus:O,onBlur:g},(function(e){return Object(l.createElement)(bl,Object(i.a)({clientIds:r},e))}))))}));function as(){var e=Object(m.useDispatch)("core/block-editor").selectBlock,t=Object(m.useSelect)((function(e){var t=e("core/block-editor"),r=t.getBlockName,o=t.getBlockParents,c=t.getSelectedBlockClientId,i=e(p.store).hasBlockSupport,a=o(c()),l=a[a.length-1],u=r(l);return{parentBlockType:Object(p.getBlockType)(u),firstParentClientId:l,shouldHide:!i(n,"__experimentalParentSelector",!0)}}),[]),n=t.parentBlockType,r=t.firstParentClientId;return t.shouldHide?null:void 0!==r?Object(l.createElement)("div",{className:"block-editor-block-parent-selector",key:r},Object(l.createElement)(v.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:function(){return e(r)},label:Object(C.sprintf)(
|
47 |
/* translators: %s: Name of the block's parent. */
|
48 |
+
Object(C.__)("Select parent (%s)"),n.title),showTooltip:!0,icon:Object(l.createElement)(Lr,{icon:n.icon})})):null}var ls=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 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.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));function us(e){var t=e.blocks;return Object(l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},Object(l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},Object(l.createElement)(v.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},Object(l.createElement)("div",{className:"block-editor-block-switcher__preview"},Object(l.createElement)("div",{className:"block-editor-block-switcher__preview-title"},Object(C.__)("Preview")),Object(l.createElement)(Kl,{viewportWidth:500,blocks:t})))))}var ss=function(e){var t=e.className,n=e.possibleBlockTransformations,r=e.onSelect,o=e.blocks,c=Object(l.useState)(),i=Object(Me.a)(c,2),a=i[0],u=i[1];return Object(l.createElement)(v.MenuGroup,{label:Object(C.__)("Transform to"),className:t},a&&Object(l.createElement)(us,{blocks:Object(p.switchToBlockType)(o,a)}),n.map((function(e){var t=e.name,n=e.icon,o=e.title,c=e.isDisabled;return Object(l.createElement)(v.MenuItem,{key:t,className:Object(p.getBlockMenuDefaultClassName)(t),onClick:function(e){e.preventDefault(),r(t)},disabled:c,onMouseLeave:function(){return u(null)},onMouseEnter:function(){return u(t)}},Object(l.createElement)(Lr,{icon:n,showColors:!0}),o)})))};function ds(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 bs(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 fs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bs(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ps(e){var t=e.genericPreviewBlock,n=e.style,r=e.isActive,o=e.onBlur,c=e.onHover,i=e.onSelect,a=e.styleClassName,u=e.itemRole,d=Object(l.useMemo)((function(){return fs(fs({},t),{},{attributes:fs(fs({},t.attributes),{},{className:a})})}),[t,a]);return Object(l.createElement)("div",{key:n.name,className:s()("block-editor-block-styles__item",{"is-active":r}),onClick:function(){return i()},onKeyDown:function(e){Ht.ENTER!==e.keyCode&&Ht.SPACE!==e.keyCode||(e.preventDefault(),i())},onMouseEnter:c,onMouseLeave:o,role:u||"button",tabIndex:"0","aria-label":n.label||n.name},Object(l.createElement)("div",{className:"block-editor-block-styles__item-preview"},Object(l.createElement)(Kl,{viewportWidth:500,blocks:d})),Object(l.createElement)("div",{className:"block-editor-block-styles__item-label"},n.label||n.name))}var ms=function(e){var t=e.clientId,n=e.onSwitch,r=void 0===n?d.noop:n,o=e.onHoverClassName,c=void 0===o?d.noop:o,i=e.itemRole,a=Object(m.useSelect)((function(e){var n=e("core/block-editor").getBlock,r=e(p.store).getBlockStyles,o=n(t);return{block:o,type:Object(p.getBlockType)(o.name),styles:r(o.name),className:o.attributes.className||""}}),[t]),u=a.styles,s=a.block,b=a.type,f=a.className,v=Object(m.useDispatch)("core/block-editor").updateBlockAttributes,O=function(e,t){return Object(l.useMemo)((function(){return t.example?Object(p.getBlockFromExample)(e.name,{attributes:t.example.attributes,innerBlocks:t.example.innerBlocks}):Object(p.cloneBlock)(e)}),[t.example?e.name:e,t])}(s,b);if(!u||0===u.length)return null;var g=Object(d.find)(u,"isDefault")?u:[{name:"default",label:Object(C._x)("Default","block style"),isDefault:!0}].concat(Object(ue.a)(u)),h=function(e,t){var n,r=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 ds(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)?ds(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,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(new un.a(t).values());try{for(r.s();!(n=r.n()).done;){var o=n.value;if(-1!==o.indexOf("is-style-")){var c=o.substring(9),i=Object(d.find)(e,{name:c});if(i)return i}}}catch(e){r.e(e)}finally{r.f()}return Object(d.find)(e,"isDefault")}(g,f);return Object(l.createElement)("div",{className:"block-editor-block-styles"},g.map((function(e){var n=function(e,t,n){var r=new un.a(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}(f,h,e);return Object(l.createElement)(ps,{genericPreviewBlock:O,className:f,isActive:h===e,key:e.name,onSelect:function(){v(t,{className:n}),c(null),r()},onBlur:function(){return c(null)},onHover:function(){return c(n)},style:e,styleClassName:n,itemRole:i})})))};function vs(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 Os(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vs(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gs(e){var t=e.hoveredBlock,n=t.name,r=t.clientId,o=e.onSwitch,c=Object(l.useState)(),i=Object(Me.a)(c,2),a=i[0],u=i[1],s=Object(m.useSelect)((function(e){return e("core/blocks").getBlockType(n)}),[n]);return Object(l.createElement)(v.MenuGroup,{label:Object(C.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},a&&Object(l.createElement)(us,{blocks:s.example?Object(p.getBlockFromExample)(s.name,{attributes:Os(Os({},s.example.attributes),{},{className:a}),innerBlocks:s.example.innerBlocks}):Object(p.cloneBlock)(s,{className:a})}),Object(l.createElement)(ms,{clientId:r,onSwitch:o,onHoverClassName:u,itemRole:"menuitem"}))}var hs=function(e){var t=e.clientIds,n=Object(m.useDispatch)("core/block-editor").replaceBlocks,r=Object(m.useSelect)((function(e){var n,r=e("core/block-editor"),o=r.getBlocksByClientId,c=r.getBlockRootClientId,i=r.getBlockTransformItems,a=e(p.store),l=a.getBlockStyles,u=a.getBlockType,s=c(Object(d.castArray)(t)[0]),b=o(t),f=1===(null==b?void 0:b.length),m=null!=b&&b.length?b[0]:null,v=f&&l(m.name),O=1===Object(d.uniq)((b||[]).map((function(e){return e.name}))).length;return{blocks:b,possibleBlockTransformations:b&&i(b,s),hasBlockStyles:!(null==v||!v.length),icon:O?null===(n=u(m.name))||void 0===n?void 0:n.icon:ls}}),[t]),o=r.blocks,c=r.possibleBlockTransformations,i=r.hasBlockStyles,a=r.icon;if(null==o||!o.length)return null;var u=!!c.length;if(!i&&!u)return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:Object(C.__)("Block icon"),icon:Object(l.createElement)(Lr,{icon:a,showColors:!0})}));var s=1===o.length?Object(C.__)("Change block type or style"):Object(C.sprintf)(
|
49 |
/* translators: %s: number of blocks. */
|
50 |
+
Object(C._n)("Change type of %d block","Change type of %d blocks",o.length),o.length);return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarItem,null,(function(e){return Object(l.createElement)(v.DropdownMenu,{className:"block-editor-block-switcher",label:s,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:Object(l.createElement)(Lr,{icon:a,className:"block-editor-block-switcher__toggle",showColors:!0}),toggleProps:e,menuProps:{orientation:"both"}},(function(e){var r=e.onClose;return(i||u)&&Object(l.createElement)("div",{className:"block-editor-block-switcher__container"},u&&Object(l.createElement)(ss,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:c,blocks:o,onSelect:function(e){!function(e){n(t,Object(p.switchToBlockType)(o,e))}(e),r()}}),i&&Object(l.createElement)(gs,{hoveredBlock:o[0],onSwitch:r}))}))})))},js=n(50);function ks(){var e=Object(m.useSelect)((function(e){return e("core/block-editor")}),[]).getBlockName,t=Object(m.useSelect)((function(e){return e(p.store)}),[]).getBlockType,n=Object(m.useDispatch)(lu.store).createSuccessNotice;return Object(l.useCallback)((function(r,o){var c="";if(1===o.length){var i=o[0],a=t(e(i)).title;c="copy"===r?Object(C.sprintf)(// Translators: Name of the block being copied, e.g. "Paragraph".
|
51 |
Object(C.__)('Copied "%s" to clipboard.'),a):Object(C.sprintf)(// Translators: Name of the block being cut, e.g. "Paragraph".
|
52 |
Object(C.__)('Moved "%s" to clipboard.'),a)}else c="copy"===r?Object(C.sprintf)(// Translators: %d: Number of blocks being copied.
|
53 |
Object(C._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):Object(C.sprintf)(// Translators: %d: Number of blocks being cut.
|
54 |
+
Object(C._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(c,{type:"snackbar"})}),[])}function ys(e){var t=Object(m.useSelect)((function(e){return e("core/block-editor")}),[]),n=t.getBlocksByClientId,r=t.getSelectedBlockClientIds,o=t.hasMultiSelection,c=t.getSettings,i=Object(m.useDispatch)("core/block-editor"),a=i.flashBlock,u=i.removeBlocks,s=i.replaceBlocks,d=ks();Object(l.useEffect)((function(){function t(t){var i=r();if(0!==i.length){if(!o()){var l=t.target.ownerDocument;if("copy"===t.type||"cut"===t.type?Object(Za.documentHasUncollapsedSelection)(l):Object(Za.documentHasSelection)(l))return}if(e.current.contains(t.target)){if(t.preventDefault(),"copy"===t.type||"cut"===t.type){1===i.length&&a(i[0]),d(t.type,i);var b=n(i),f=Object(p.serialize)(b);t.clipboardData.setData("text/plain",f),t.clipboardData.setData("text/html",f)}if("cut"===t.type)u(i);else if("paste"===t.type){var m=c().__experimentalCanUserUseUnfilteredHTML,v=function(e){var t=e.clipboardData,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}var o=Object(Za.getFilesFromDataTransfer)(t).filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)}));return o.length&&!r&&(r=o.map((function(e){return'<img src="'.concat(Object(js.createBlobURL)(e),'">')})).join(""),n=""),{html:r,plainText:n}}(t),O=v.plainText,g=v.html,h=Object(p.pasteHandler)({HTML:g,plainText:O,mode:"BLOCKS",canUserUseUnfilteredHTML:m});s(i,h,h.length-1,-1)}}}}return e.current.addEventListener("copy",t),e.current.addEventListener("cut",t),e.current.addEventListener("paste",t),function(){e.current.removeEventListener("copy",t),e.current.removeEventListener("cut",t),e.current.removeEventListener("paste",t)}}),[])}var _s=function(e){var t=e.children,n=Object(l.useRef)();return ys(n),Object(l.createElement)("div",{ref:n},t)};function Es(e){var t=e.clientIds,n=e.children,r=e.__experimentalUpdateSelection,o=Object(m.useSelect)((function(e){return e("core/block-editor")}),[]),c=o.canInsertBlockType,i=o.getBlockRootClientId,a=o.getBlocksByClientId,l=o.getTemplateLock,u=Object(m.useSelect)((function(e){return e(p.store)}),[]),s=u.getDefaultBlockName,b=u.getGroupingBlockName,f=a(t),v=i(t[0]),O=Object(d.every)(f,(function(e){return!!e&&Object(p.hasBlockSupport)(e.name,"multiple",!0)&&c(e.name,v)})),g=c(s(),v),h=Object(m.useDispatch)("core/block-editor"),j=h.removeBlocks,k=h.replaceBlocks,y=h.duplicateBlocks,_=h.insertAfterBlock,E=h.insertBeforeBlock,w=h.flashBlock,C=h.setBlockMovingClientId,S=h.setNavigationMode,I=h.selectBlock,B=ks();return n({canDuplicate:O,canInsertDefaultBlock:g,isLocked:!!l(v),rootClientId:v,blocks:f,onDuplicate:function(){return y(t,r)},onRemove:function(){return j(t,r)},onInsertBefore:function(){E(Object(d.first)(Object(d.castArray)(t)))},onInsertAfter:function(){_(Object(d.last)(Object(d.castArray)(t)))},onMoveTo:function(){S(!0),I(t[0]),C(t[0])},onGroup:function(){if(f.length){var e=b(),n=Object(p.switchToBlockType)(f,e);n&&k(t,n)}},onUngroup:function(){if(f.length){var e=f[0].innerBlocks;e.length&&k(t,e)}},onCopy:function(){var e=f.map((function(e){return e.clientId}));1===f.length&&w(e[0]),B("copy",e)}})}var ws=Object(b.compose)([Object(m.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor"),o=r.getBlock,c=r.getBlockMode,i=r.getSettings,a=o(n),l=i().codeEditingEnabled;return{mode:c(n),blockType:a?Object(p.getBlockType)(a.name):null,isCodeEditingEnabled:l}})),Object(m.withDispatch)((function(e,t){var n=t.onToggle,r=void 0===n?d.noop:n,o=t.clientId;return{onToggleMode:function(){e("core/block-editor").toggleBlockMode(o),r()}}}))])((function(e){var t=e.blockType,n=e.mode,r=e.onToggleMode,o=e.small,c=void 0!==o&&o,i=e.isCodeEditingEnabled,a=void 0===i||i;if(!Object(p.hasBlockSupport)(t,"html",!0)||!a)return null;var u="visual"===n?Object(C.__)("Edit as HTML"):Object(C.__)("Edit visually");return Object(l.createElement)(v.MenuItem,{onClick:r},!c&&u)})),Cs=Object(b.compose)(Object(m.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor").getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),Object(m.withDispatch)((function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Object(p.rawHandler)({HTML:Object(p.getBlockContent)(n)}))}}})))((function(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(C.__)("Convert to Blocks");return Object(l.createElement)(v.MenuItem,{onClick:n},!r&&o)})),Ss=Object(v.createSlotFill)("__experimentalBlockSettingsMenuFirstItem"),Is=Ss.Fill,Bs=Ss.Slot;Is.Slot=Bs;var xs=Is;function Ps(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 Ts(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ps(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ps(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ns=Object(v.createSlotFill)("BlockSettingsMenuControls"),Ds=Ns.Fill,As=Ns.Slot;Ds.Slot=function(e){var t=e.fillProps,n=e.clientIds,r=void 0===n?null:n,o=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlocksByClientId,o=t.getSelectedBlockClientIds,c=null!==r?r:o();return Object(d.map)(Object(d.compact)(n(c)),(function(e){return e.name}))}),[r]);return Object(l.createElement)(As,{fillProps:Ts(Ts({},t),{},{selectedBlocks:o})},(function(e){return!Object(d.isEmpty)(e)&&Object(l.createElement)(v.MenuGroup,null,e)}))};var Ls=Ds,Rs={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0},Ms=function(e){var t=e.clientIds,n=e.__experimentalSelectBlock,r=e.children,o=Object(Fe.a)(e,["clientIds","__experimentalSelectBlock","children"]),c=Object(d.castArray)(t),a=c.length,u=c[0],s=Object(m.useSelect)((function(e){var t=e($a.store).getShortcutRepresentation;return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),b=Object(l.useCallback)(n?function(){var e=Object(Ya.a)(Yc.a.mark((function e(t){var r;return Yc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:(r=e.sent)&&r[0]&&n(r[0]);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}():d.noop,[n]),f=1===a?Object(C.__)("Remove block"):Object(C.__)("Remove blocks");return Object(l.createElement)(Es,{clientIds:t,__experimentalUpdateSelection:!n},(function(e){var n=e.canDuplicate,c=e.canInsertDefaultBlock,m=e.isLocked,O=e.onDuplicate,g=e.onInsertAfter,h=e.onInsertBefore,j=e.onRemove,k=e.onCopy,y=e.onMoveTo,_=e.blocks;return Object(l.createElement)(v.DropdownMenu,Object(i.a)({icon:Xa.a,label:Object(C.__)("More options"),className:"block-editor-block-settings-menu",popoverProps:Rs,noIcons:!0},o),(function(e){var o=e.onClose;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(xs.Slot,{fillProps:{onClose:o}}),1===a&&Object(l.createElement)(Cs,{clientId:u}),Object(l.createElement)(v.ClipboardButton,{text:function(){return Object(p.serialize)(_)},role:"menuitem",className:"components-menu-item__button",onCopy:k},Object(C.__)("Copy")),n&&Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,O,b),shortcut:s.duplicate},Object(C.__)("Duplicate")),c&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,h),shortcut:s.insertBefore},Object(C.__)("Insert Before")),Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,g),shortcut:s.insertAfter},Object(C.__)("Insert After"))),!m&&Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,y)},Object(C.__)("Move To")),1===a&&Object(l.createElement)(ws,{clientId:u,onToggle:o})),Object(l.createElement)(Ls.Slot,{fillProps:{onClose:o},clientIds:t}),"function"==typeof r?r({onClose:o}):l.Children.map((function(e){return Object(l.cloneElement)(e,{onClose:o})})),Object(l.createElement)(v.MenuGroup,null,!m&&Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,j,b),shortcut:s.remove},f)))}))}))},Fs=function(e){var t=e.clientIds,n=Object(Fe.a)(e,["clientIds"]);return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarItem,null,(function(e){return Object(l.createElement)(Ms,Object(i.a)({clientIds:t,toggleProps:e},n))})))},Vs=window,Hs=Vs.clearTimeout,zs=Vs.setTimeout;function Us(e){var t=e.ref,n=e.isFocused,r=e.debounceTimeout,o=void 0===r?200:r,c=e.onChange,i=void 0===c?d.noop:c,a=Object(l.useState)(!1),u=Object(Me.a)(a,2),s=u[0],b=u[1],f=Object(l.useRef)(),p=function(e){null!=t&&t.current&&b(e),i(e)},m=function(){var e=f.current;e&&Hs&&Hs(e)};return Object(l.useEffect)((function(){return function(){return m()}}),[]),{showMovers:s,debouncedShowMovers:function(e){e&&e.stopPropagation(),m(),s||p(!0)},debouncedHideMovers:function(e){e&&e.stopPropagation(),m(),f.current=zs((function(){var e;e=(null==t?void 0:t.current)&&t.current.matches(":hover"),!n&&!e&&p(!1)}),o)}}}function Gs(e){var t=e.hideDragHandle,n=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getBlockMode,o=t.getSelectedBlockClientIds,c=t.isBlockValid,i=t.getBlockRootClientId,a=t.getSettings,l=o(),u=l[0],s=i(u),d=a();return{blockClientIds:l,blockClientId:u,blockType:u&&Object(p.getBlockType)(n(u)),hasFixedToolbar:d.hasFixedToolbar,hasReducedUI:d.hasReducedUI,rootClientId:s,isValid:l.every((function(e){return c(e)})),isVisual:l.every((function(e){return"visual"===r(e)}))}}),[]),r=n.blockClientIds,o=n.blockClientId,c=n.blockType,a=n.hasFixedToolbar,u=n.hasReducedUI,f=n.isValid,O=n.isVisual,g=Object(m.useDispatch)("core/block-editor").toggleBlockHighlight,h=Object(l.useRef)(),j=function(e){var t=e.ref,n=e.debounceTimeout,r=void 0===n?200:n,o=e.onChange,c=void 0===o?d.noop:o,i=Object(l.useState)(!1),a=Object(Me.a)(i,2),u=a[0],s=a[1],b=Us({ref:t,debounceTimeout:r,isFocused:u,onChange:c}),f=b.showMovers,p=b.debouncedShowMovers,m=b.debouncedHideMovers,v=Object(l.useRef)(!1),O=function(){return(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement)};return Object(l.useEffect)((function(){var e=t.current,n=function(){O()&&(s(!0),p())},r=function(){O()||(s(!1),m())};return e&&!v.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),v.current=!0),function(){e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,v,s,p,m]),{showMovers:f,gestures:{onMouseMove:p,onMouseLeave:m}}}({ref:h,onChange:function(e){e&&u||g(o,e)}}),k=j.showMovers,y=j.gestures,_=Object(b.useViewportMatch)("medium","<")||a;if(c&&!Object(p.hasBlockSupport)(c,"__experimentalToolbar",!0))return null;var E=_||k;if(0===r.length)return null;var C=f&&O,S=r.length>1,I=s()("block-editor-block-toolbar",E&&"is-showing-movers");return Object(l.createElement)("div",{className:I},Object(l.createElement)("div",Object(i.a)({ref:h},y),!S&&Object(l.createElement)("div",{className:"block-editor-block-toolbar__block-parent-selector-wrapper"},Object(l.createElement)(as,{clientIds:r})),(C||S)&&Object(l.createElement)(v.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},Object(l.createElement)(hs,{clientIds:r}),Object(l.createElement)(is,{clientIds:r,hideDragHandle:t||u}))),C&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(w.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"}),Object(l.createElement)(qa.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"})),Object(l.createElement)(Fs,{clientIds:r}))}var Ks=function(e){var t=e.focusOnMount,n=Object(Fe.a)(e,["focusOnMount"]),r=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getSelectedBlockClientIds,o=e(p.store).getBlockType,c=r()[0];return{blockType:c&&o(n(c))}}),[]).blockType;return r&&!Object(p.hasBlockSupport)(r,"__experimentalToolbar",!0)?null:Object(l.createElement)("div",{className:"block-editor-block-contextual-toolbar-wrapper"},Object(l.createElement)(os,Object(i.a)({focusOnMount:t,className:"block-editor-block-contextual-toolbar"
|
55 |
+
/* translators: accessibility text for the block toolbar */,"aria-label":Object(C.__)("Block tools")},n),Object(l.createElement)(Gs,null)))};function Ws(e){var t=e("core/block-editor"),n=t.isNavigationMode,r=t.isMultiSelecting,o=t.hasMultiSelection,c=t.isTyping,i=t.isCaretWithinFormattedText,a=t.getSettings,l=t.getLastMultiSelectedBlockClientId;return{isNavigationMode:n(),isMultiSelecting:r(),isTyping:c(),isCaretWithinFormattedText:i(),hasMultiSelection:o(),hasFixedToolbar:a().hasFixedToolbar,lastClientId:l()}}function qs(e){var t=e.clientId,n=e.rootClientId,r=e.isValid,o=e.isEmptyDefaultBlock,c=e.capturingClientId,i=Object(m.useSelect)(Ws,[]),a=i.isNavigationMode,u=i.isMultiSelecting,d=i.isTyping,f=i.isCaretWithinFormattedText,p=i.hasMultiSelection,O=i.hasFixedToolbar,g=i.lastClientId,h=Object(b.useViewportMatch)("medium"),j=Object(l.useState)(!1),k=Object(Me.a)(j,2),y=k[0],_=k[1],E=Object(l.useState)(!1),w=Object(Me.a)(E,2),C=w[0],S=w[1],I=Object(l.useContext)(Xs),B=!d&&!a&&o&&r,x=a,P=!a&&!O&&h&&!B&&!u&&(!d||f),T=!(a||P||O||o);Object($a.useShortcut)("core/block-editor/focus-toolbar",Object(l.useCallback)((function(){_(!0)}),[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!T});var N=Object(l.useRef)();if(Object(l.useEffect)((function(){N.current=void 0}),[t]),!(x||P||y||B))return null;var D=I[t];if(!D)return null;var A=D.ownerDocument;c&&(D=at(c,A));var L=D;if(p){var R=I[g];if(!R)return null;L={top:D,bottom:R}}var M=B?"top left right":"top right left",F=B?void 0:Object(Za.getScrollContainer)(D)||A.body;return Object(l.createElement)(v.Popover,{noArrow:!0,animate:!1,position:M,focusOnMount:!1,anchorRef:L,className:"block-editor-block-list__block-popover",__unstableStickyBoundaryElement:F,__unstableSlotName:"block-toolbar",__unstableBoundaryParent:!0,__unstableObserveElement:D,onFocusOutside:function(){_(!1)},shouldAnchorIncludePadding:!0},(P||y)&&Object(l.createElement)("div",{onFocus:function(){S(!0)},onBlur:function(){S(!1)},tabIndex:-1,className:s()("block-editor-block-list__block-popover-inserter",{"is-visible":C})},Object(l.createElement)(Nu,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(P||y)&&Object(l.createElement)(Ks,{focusOnMount:y,__experimentalInitialIndex:N.current,__experimentalOnIndexChange:function(e){N.current=e}}),x&&Object(l.createElement)(ns,{clientId:t,rootClientId:n,blockElement:D}),B&&Object(l.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},Object(l.createElement)(Nu,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function $s(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getFirstMultiSelectedBlockClientId,o=t.getBlockRootClientId,c=t.__unstableGetBlockWithoutInnerBlocks,i=t.getBlockParents,a=t.__experimentalGetBlockListSettingsForBlocks,l=n()||r();if(l){var u,s=c(l)||{},b=s.name,f=s.attributes,m=void 0===f?{}:f,v=s.isValid,O=i(l),g=a(O),h=Object(d.findIndex)(g,["__experimentalCaptureToolbars",!0]);return-1!==h&&(u=O[h]),{clientId:l,rootClientId:o(l),name:b,isValid:v,isEmptyDefaultBlock:b&&Object(p.isUnmodifiedDefaultBlock)({name:b,attributes:m}),capturingClientId:u}}}function Ys(){var e=Object(m.useSelect)($s,[]);if(!e)return null;var t=e.clientId,n=e.rootClientId,r=e.name,o=e.isValid,c=e.isEmptyDefaultBlock,i=e.capturingClientId;return r?Object(l.createElement)(qs,{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:c,capturingClientId:i}):null}var Xs=Object(l.createContext)(),Qs=Object(l.createContext)();function Zs(e){var t=e.className,n=Object(l.useRef)(),r=Object(l.useState)({}),o=Object(Me.a)(r,2),c=o[0],i=o[1],a=function(e){var t=Object(l.useState)(!1),n=Object(Me.a)(t,2),r=n[0],o=n[1],c=Object(l.useState)(!1),i=Object(Me.a)(c,2),a=i[0],u=i[1],s=Object(l.useState)(null),d=Object(Me.a)(s,2),b=d[0],f=d[1],p=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.isMultiSelecting,r=t.isBlockInsertionPointVisible,o=t.getBlockInsertionPoint,c=t.getBlockOrder,i=o(),a=c(i.rootClientId);return{isMultiSelecting:n(),isInserterVisible:r(),selectedClientId:a[i.index],selectedRootClientId:i.rootClientId}}),[]),v=p.isMultiSelecting,O=p.isInserterVisible,g=p.selectedClientId,h=p.selectedRootClientId,j=Object(l.useCallback)((function(e){if(e.target.classList.contains("block-editor-block-list__layout")){var t=e.target.getBoundingClientRect(),n=e.clientY-t.top,c=Array.from(e.target.children).find((function(e){return e.offsetTop>n}));if(c&&(c.id||(c=c.firstElementChild))){var i=c.id.slice("block-".length);if(i){var a=c.getBoundingClientRect();e.clientX>a.right||e.clientX<a.left?r&&o(!1):(o(!0),f(i))}}}else r&&o(!1)}),[r,o,f]),k=!a&&!v;return Object(l.useEffect)((function(){if(k)return e.current.addEventListener("mousemove",j),function(){e.current.removeEventListener("mousemove",j)}}),[k,j]),!v&&(r||a||O)&&Object(l.createElement)(es,{clientId:O?g:b,rootClientId:h,isInserterShown:r,isInserterForced:a,setIsInserterForced:u,containerRef:e,showInsertionPoint:O})}(n);return Object(l.createElement)(Xs.Provider,{value:c},a,Object(l.createElement)(Ys,null),Object(l.createElement)("div",{ref:n,className:s()("block-editor-block-list__layout is-root-container",t)},Object(l.createElement)(Qs.Provider,{value:i},Object(l.createElement)(ed,{wrapperRef:n}))))}function Js(e){var t=e.placeholder,n=e.rootClientId,r=e.renderAppender,o=e.__experimentalAppenderTagName,c=e.wrapperRef,i=Object(m.useSelect)((function(e){var t,r=e("core/block-editor"),o=r.getBlockOrder,c=r.getBlockListSettings,i=r.getSettings,a=r.getSelectedBlockClientId,l=r.getMultiSelectedBlockClientIds,u=r.hasMultiSelection,s=r.getGlobalBlockCount,d=r.isTyping,b=(0,r.__experimentalGetActiveBlockIdByBlockNames)(i().__experimentalSpotlightEntityBlocks);return{blockClientIds:o(n),selectedBlockClientId:a(),multiSelectedBlockClientIds:l(),orientation:null===(t=c(n))||void 0===t?void 0:t.orientation,hasMultiSelection:u(),enableAnimation:!d()&&s()<=200,activeEntityBlockId:b}}),[n]),u=i.blockClientIds,d=i.selectedBlockClientId,b=i.multiSelectedBlockClientIds,f=i.orientation,p=i.hasMultiSelection,O=i.enableAnimation,g=i.activeEntityBlockId,h=function(e){var t=e.element,n=e.rootClientId,r=void 0===n?"":n,o=Object(l.useState)(null),c=Object(Me.a)(o,2),i=c[0],u=c[1],s=Object(m.useSelect)((function(e){var t,n=e("core/block-editor"),o=n.getBlockListSettings;return{isLockedAll:"all"===(0,n.getTemplateLock)(r),orientation:null===(t=o(r))||void 0===t?void 0:t.orientation}}),[r]),d=s.isLockedAll,b=s.orientation,f=Hu(r,i),p=Object(v.__unstableUseDropZone)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gu(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({element:t,isDisabled:d,withPosition:!0},f)).position;if(Object(l.useEffect)((function(){if(p){var e=function(e,t,n){var r,o,c="horizontal"===n?["left","right"]:["top","bottom"];return e.forEach((function(n,i){if(n.classList.contains("wp-block")){var a=n.getBoundingClientRect(),l=Uu(t,a,c),u=Object(Me.a)(l,2),s=u[0],d=u[1];if(void 0===o||s<o){var b="bottom"===d||"right"===d,f=b?1:0,p=b&&e[i+1]&&e[i+1].classList.contains("is-dragging");o=s,r=i+(f+=p?1:0)}}})),r}(Array.from(t.current.children),p,b);u(void 0===e?0:e)}}),[p]),p)return i}({element:c,rootClientId:n}),j=h===u.length;return Object(l.createElement)(l.Fragment,null,u.map((function(e,t){var r=p?b.includes(e):d===e,o=h===t;return Object(l.createElement)(m.AsyncModeProvider,{key:e,value:!r},Object(l.createElement)(pd,{rootClientId:n,clientId:e,index:t,enableAnimation:O,className:s()({"is-drop-target":o,"is-dropping-horizontally":o&&"horizontal"===f,"has-active-entity":g}),activeEntityBlockId:g}))})),u.length<1&&t,Object(l.createElement)(Ru,{tagName:o,rootClientId:n,renderAppender:r,className:s()({"is-drop-target":j,"is-dropping-horizontally":j&&"horizontal"===f})}))}function ed(e){return Object(l.createElement)(m.AsyncModeProvider,{value:!1},Object(l.createElement)(Js,e))}function td(e,t){var n=function(e){return Object(m.useSelect)((function(t){var n=t("core/block-editor"),r=n.getSelectedBlocksInitialCaretPosition,o=n.isMultiSelecting,c=n.isNavigationMode;if((0,n.isBlockSelected)(e)&&!o()&&!c())return r()||0}),[e])}(t);Object(l.useEffect)((function(){if(void 0!==n){var t=e.current.ownerDocument;if(!t.activeElement||!lt(e.current,t.activeElement)){var r=Za.focus.tabbable.find(e.current).filter((function(t){return Object(Za.isTextField)(t)&<(e.current,t)&&!t.closest(".block-list-appender")})),o=-1===n,c=(o?d.last:d.first)(r)||e.current;Object(Za.placeCaretAtHorizontalEdge)(c,o)}}}),[n])}function nd(e){var t=Object(l.useState)(!1),n=Object(Me.a)(t,2),r=n[0],o=n[1],c=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.isNavigationMode,r=t.getSettings;return{isNavigationMode:n(),isOutlineMode:r().outlineMode}}),[]),i=c.isNavigationMode,a=c.isOutlineMode;return Object(l.useEffect)((function(){function t(t,n){function r(e){e.defaultPrevented||(e.preventDefault(),o(n))}return e.current.addEventListener(t,r),function(){e.current.removeEventListener(t,r)}}return r?t("mouseout",!1):a||i?t("mouseover",!0):void 0}),[i,a,r,o]),r}function rd(e){return Object(m.useSelect)((function(t){var n=t("core/block-editor"),r=n.hasBlockMovingClientId,o=n.canInsertBlockType,c=n.getBlockName,i=n.getBlockRootClientId;if((0,n.isBlockSelected)(e)){var a=r();if(a)return s()("is-block-moving-mode",{"can-insert-moving-block":o(c(a),i(e))})}}),[e])}function od(e,t){var n=Object(l.useContext)(Yu),r=Object(m.useSelect)((function(e){var n=e("core/block-editor"),r=n.isBlockSelected,o=n.getBlockRootClientId,c=n.getBlockIndex;return{isSelected:r(t),rootClientId:o(t),index:c(t)}}),[t]),o=r.isSelected,c=r.rootClientId,i=r.index,a=Object(m.useDispatch)("core/block-editor"),u=a.insertDefaultBlock,s=a.removeBlock,d=a.selectBlock;Object(l.useEffect)((function(){if(!o){function r(n){lt(e.current,n.target)&&d(t)}return e.current.addEventListener("focusin",r),function(){e.current.removeEventListener("focusin",r)}}function a(n){var r=n.keyCode,o=n.target;r!==Ht.ENTER&&r!==Ht.BACKSPACE&&r!==Ht.DELETE||o!==e.current||Object(Za.isTextField)(o)||(n.preventDefault(),r===Ht.ENTER?u({},c,i+1):s(t))}function l(e){1===e.buttons&&n(t)}function b(e){e.preventDefault()}return e.current.addEventListener("keydown",a),e.current.addEventListener("mouseleave",l),e.current.addEventListener("dragstart",b),function(){e.current.removeEventListener("mouseleave",l),e.current.removeEventListener("keydown",a),e.current.removeEventListener("dragstart",b)}}),[o,c,i,n,u,s,d])}function cd(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 id(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ad(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.__unstableIsHtml,r=Object(l.useRef)(),o=e.ref||r,c=Object(l.useContext)(Qs),i=Object(l.useContext)(sd),u=i.clientId,b=i.isSelected,f=i.isFirstMultiSelected,p=i.isLastMultiSelected,m=i.isPartOfMultiSelection,v=i.enableAnimation,O=i.index,g=i.className,h=i.name,j=i.mode,k=i.blockTitle,y=i.wrapperProps,_=void 0===y?{}:y;Object(l.useEffect)((function(){if(b||f||p){var e=o.current;return c((function(t){return id(id({},t),{},Object(a.a)({},u,e))})),function(){c((function(e){return Object(d.omit)(e,u)}))}}}),[b,f,p]),Object(l.useEffect)((function(){var e=o.current;c((function(t){return t[u]&&t[u]!==e?id(id({},t),{},Object(a.a)({},u,e)):t}))}));// translators: %s: Type of block (i.e. Text, Image etc)
|
56 |
+
var E=Object(C.sprintf)(Object(C.__)("Block: %s"),k);td(o,u),od(o,u),tl(o,b||m,b||f,v,O);var w=nd(o),S=rd(u),I="html"!==j||n?"":"-visual";return id(id(id({},_),e),{},{ref:o,id:"block-".concat(u).concat(I),tabIndex:0,role:"group","aria-label":E,"data-block":u,"data-type":h,"data-title":k,className:s()(g,e.className,_.className,S,{"is-hovered":w}),style:id(id({},_.style),e.style)})}function ld(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 ud(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ld(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ld(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}ad.save=p.__unstableGetBlockProps;var sd=Object(l.createContext)();function dd(e){var t=e.children,n=e.isHtml,r=Object(Fe.a)(e,["children","isHtml"]);return Object(l.createElement)("div",ad(r,{__unstableIsHtml:n}),t)}var bd=Object(m.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/block-editor"),c=o.isBlockSelected,i=o.isAncestorMultiSelected,a=o.isBlockMultiSelected,l=o.isFirstMultiSelectedBlock,u=o.getLastMultiSelectedBlockClientId,s=o.isTyping,d=o.getBlockMode,b=o.isSelectionEnabled,f=o.hasSelectedInnerBlock,p=o.getTemplateLock,m=o.__unstableGetBlockWithoutInnerBlocks,v=o.getMultiSelectedBlockClientIds,O=m(n),g=c(n),h=p(r),j=f(n,!0),k=O||{},y=k.name,_=k.attributes,E=k.isValid,w=l(n);return{isMultiSelected:a(n),isPartOfMultiSelection:a(n)||i(n),isFirstMultiSelected:w,isLastMultiSelected:u()===n,multiSelectedClientIds:w?v():void 0,isTypingWithinBlock:(g||j)&&s(),mode:d(n),isSelectionEnabled:b(),isLocked:!!h,block:O,name:y,attributes:_,isValid:E,isSelected:g,isAncestorOfSelectedBlock:j}})),fd=Object(m.withDispatch)((function(e,t,n){var r=n.select,o=e("core/block-editor"),c=o.updateBlockAttributes,i=o.insertBlocks,a=o.mergeBlocks,l=o.replaceBlocks,u=o.toggleSelection,s=o.__unstableMarkLastChangeAsPersistent;return{setAttributes:function(e){var n=t.clientId,r=t.isFirstMultiSelected,o=t.multiSelectedClientIds;c(r?o:[n],e)},onInsertBlocks:function(e,n){var r=t.rootClientId;i(e,n,r)},onInsertBlocksAfter:function(e){var n=t.clientId,o=t.rootClientId,c=(0,r("core/block-editor").getBlockIndex)(n,o);i(e,c+1,o)},onMerge:function(e){var n=t.clientId,o=r("core/block-editor"),c=o.getPreviousBlockClientId,i=o.getNextBlockClientId;if(e){var l=i(n);l&&a(n,l)}else{var u=c(n);u&&a(u,n)}},onReplace:function(e,n,r){e.length&&!Object(p.isUnmodifiedDefaultBlock)(e[e.length-1])&&s(),l([t.clientId],e,n,r)},toggleSelection:function(e){u(e)}}})),pd=Object(b.compose)(b.pure,bd,fd,Object(b.ifCondition)((function(e){return!!e.block})),Object(v.withFilters)("editor.BlockListBlock"))((function(e){var t,n,r,o=e.mode,c=e.isLocked,a=e.clientId,u=e.isSelected,f=e.isMultiSelected,v=e.isPartOfMultiSelection,O=e.isFirstMultiSelected,g=e.isLastMultiSelected,h=e.isTypingWithinBlock,j=e.isAncestorOfSelectedBlock,k=e.isSelectionEnabled,y=e.className,_=e.name,E=e.isValid,w=e.attributes,C=e.wrapperProps,S=e.setAttributes,I=e.onReplace,B=e.onInsertBlocksAfter,x=e.onMerge,P=e.toggleSelection,T=e.index,N=e.enableAnimation,D=e.activeEntityBlockId,A=Object(b.useViewportMatch)("medium"),L=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.isBlockBeingDragged,r=t.isBlockHighlighted,o=t.getSettings;return{isDragging:n(a),isHighlighted:r(a),isFocusMode:o().focusMode,isOutlineMode:o().outlineMode}}),[a]),R=L.isDragging,M=L.isHighlighted,F=L.isFocusMode,V=L.isOutlineMode,H=Object(m.useDispatch)("core/block-editor").removeBlock,z=Object(l.useCallback)((function(){return H(a)}),[a]),U=Object(l.useState)(!1),G=Object(Me.a)(U,2),K=G[0],W=G[1],q=Object(p.getBlockType)(_),$=q.apiVersion>1||Object(p.hasBlockSupport)(q,"lightBlockWrapper",!1),Y=_===Object(p.getUnregisteredTypeHandlerName)();q.getEditWrapperProps&&(t=C,n=q.getEditWrapperProps(w),r=ud(ud({},t),n),t&&n&&t.className&&n.className&&(r.className=s()(t.className,n.className)),t&&n&&t.style&&n.style&&(r.style=ud(ud({},t.style),n.style)),C=r);var X=$&&Object(p.hasBlockSupport)(q,"className",!0)?Object(p.getBlockDefaultClassName)(_):null,Q=$?w.className:null,Z=C&&!!C["data-align"],J=s()(X,Q,"block-editor-block-list__block",{"wp-block":!Z,"has-warning":!E||!!K||Y,"is-selected":u&&!R,"is-highlighted":M,"is-multi-selected":f,"is-reusable":Object(p.isReusableBlock)(q),"is-dragging":R,"is-typing":h,"is-focused":F&&A&&(u||j),"is-focus-mode":F&&A,"is-outline-mode":V,"has-child-selected":j&&!R,"is-active-entity":D===a},y),ee=Object(l.createElement)(za,{name:_,isSelected:u,attributes:w,setAttributes:S,insertBlocksAfter:c?void 0:B,onReplace:c?void 0:I,onRemove:c?void 0:z,mergeBlocks:c?void 0:x,clientId:a,isSelectionEnabled:k,toggleSelection:P});if(Z){var te={"data-align":C["data-align"]};ee=Object(l.createElement)("div",Object(i.a)({className:"wp-block"},te),ee)}var ne,re={clientId:a,isSelected:u,isFirstMultiSelected:O,isLastMultiSelected:g,isPartOfMultiSelection:v,enableAnimation:N,index:T,className:J,isLocked:c,name:_,mode:o,blockTitle:q.title,wrapperProps:Object(d.omit)(C,["data-align"])},oe=Object(l.useMemo)((function(){return re}),Object.values(re));return ne=E?"html"===o?Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{style:{display:"none"}},ee),Object(l.createElement)(dd,{isHtml:!0},Object(l.createElement)(Il,{clientId:a}))):$?ee:Object(l.createElement)(dd,C,ee):Object(l.createElement)(dd,null,Object(l.createElement)(yl,{clientId:a}),Object(l.createElement)("div",null,Object(p.getSaveElement)(q,w))),Object(l.createElement)(sd.Provider,{value:oe},Object(l.createElement)(wl,{onError:function(){return W(!0)}},ne),!!K&&Object(l.createElement)(dd,null,Object(l.createElement)(El,null)))})),md=function(e,t,n){return Object(C.sprintf)(
|
57 |
/* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
|
58 |
+
Object(C.__)("Block %1$d of %2$d, Level %3$d"),e,t,n)},vd=Object(l.forwardRef)((function e(t,n){var r=t.className,o=t.block,c=o.clientId,i=o.name,a=o.attributes,u=t.isSelected,d=t.onClick,f=t.position,m=t.siblingBlockCount,O=t.level,g=t.tabIndex,h=t.onFocus,j=t.onDragStart,k=t.onDragEnd,y=t.draggable,_=Ba(c),E=Object(b.useInstanceId)(e),w="block-navigation-block-select-button__".concat(E),S=Object(p.getBlockType)(i),I=Object(p.__experimentalGetBlockLabel)(S,a),B=I!==S.title?I:null==_?void 0:_.title,x=md(f,m,O);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.Button,{className:s()("block-editor-block-navigation-block-select-button",r),onClick:d,"aria-describedby":w,ref:n,tabIndex:g,onFocus:h,onDragStart:j,onDragEnd:k,draggable:y},Object(l.createElement)(Lr,{icon:_.icon,showColors:!0}),B,u&&Object(l.createElement)(v.VisuallyHidden,null,Object(C.__)("(selected block)"))),Object(l.createElement)("div",{className:"block-editor-block-navigation-block-select-button__description",id:w},x))}));function Od(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 gd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Od(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Od(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var hd=function(e){return"BlockNavigationBlock-".concat(e)},jd=Object(l.forwardRef)((function e(t,n){var r=Object(b.useInstanceId)(e),o=t.block.clientId;return Object(l.createElement)(v.Slot,{name:hd(o)},(function(e){if(!e.length)return Object(l.createElement)(vd,Object(i.a)({ref:n},t));var o=t.className,c=t.block,a=t.isSelected,u=t.position,d=t.siblingBlockCount,b=t.level,f=t.tabIndex,m=t.onFocus,O=c.name,g=Object(p.getBlockType)(O),h="block-navigation-block-slot__".concat(r),j=md(u,d,b),k={tabIndex:f,onFocus:m,ref:n,"aria-describedby":h};return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:s()("block-editor-block-navigation-block-slot",o)},Object(l.createElement)(Lr,{icon:g.icon,showColors:!0}),l.Children.map(e,(function(e){return Object(l.cloneElement)(e,gd(gd({},e.props),k))})),a&&Object(l.createElement)(v.VisuallyHidden,null,Object(C.__)("(selected block)")),Object(l.createElement)("div",{className:"block-editor-block-navigation-block-slot__description",id:h},j)))}))})),kd=function(e){var t=Object(l.useContext)(sd).clientId;return Object(l.createElement)(v.Fill,Object(i.a)({},e,{name:hd(t)}))},yd=Object(l.forwardRef)((function(e,t){var n=e.onClick,r=e.block,o=e.isSelected,c=e.position,a=e.siblingBlockCount,u=e.level,d=Object(Fe.a)(e,["onClick","block","isSelected","position","siblingBlockCount","level"]),b=ml(),f=b.__experimentalFeatures,p=b.blockDropTarget,v=void 0===p?{}:p,O=r.clientId,g=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockRootClientId,r=t.hasBlockMovingClientId,o=t.getSelectedBlockClientId;return{rootClientId:n(O)||"",blockMovingClientId:r(),selectedBlockInBlockEditor:o()}}),[O]),h=g.rootClientId,j=g.blockMovingClientId,k=g.selectedBlockInBlockEditor,y=j&&k===O,_=v.rootClientId,E=v.clientId,w=v.dropPosition,C=_===h&&E===O&&"top"===w,S=_===h&&E===O&&"bottom"===w,I=_===O&&"inside"===w,B=s()("block-editor-block-navigation-block-contents",{"is-dropping-before":C||y,"is-dropping-after":S,"is-dropping-to-inner-blocks":I});return Object(l.createElement)(cs,{clientIds:[r.clientId],elementId:"block-navigation-block-".concat(r.clientId)},(function(e){var s=e.draggable,b=e.onDragStart,p=e.onDragEnd;return f?Object(l.createElement)(jd,Object(i.a)({ref:t,className:B,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:a,level:u,draggable:s&&f,onDragStart:b,onDragEnd:p},d)):Object(l.createElement)(vd,Object(i.a)({ref:t,className:B,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:a,level:u,draggable:s&&f,onDragStart:b,onDragEnd:p},d))}))}));function _d(e){var t=e.block,n=e.isSelected,r=e.onClick,o=e.position,c=e.level,i=e.rowCount,a=e.siblingBlockCount,u=e.showBlockMovers,d=e.terminatedLevels,b=e.path,f=Object(l.useRef)(null),p=Object(l.useState)(!1),O=Object(Me.a)(p,2),g=O[0],h=O[1],j=Object(l.useState)(!1),k=Object(Me.a)(j,2),y=k[0],_=k[1],E=t.clientId,w=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.isBlockBeingDragged,r=t.isAncestorBeingDragged;return n(E)||r(E)}),[E]),S=Object(m.useDispatch)("core/block-editor").selectBlock,I=u&&a>0,B=g||y,x=s()("block-editor-block-navigation-block__mover-cell",{"is-visible":B}),P=ml().__experimentalFeatures,T=s()("block-editor-block-navigation-block__menu-cell",{"is-visible":B});return Object(l.useEffect)((function(){P&&n&&f.current.focus()}),[P,n]),Object(l.createElement)(rl,{className:s()({"is-selected":n,"is-dragging":w}),onMouseEnter:function(){return h(!0)},onMouseLeave:function(){return h(!1)},onFocus:function(){return _(!0)},onBlur:function(){return _(!1)},level:c,position:o,rowCount:i,path:b,id:"block-navigation-block-".concat(E),"data-block":E},Object(l.createElement)(v.__experimentalTreeGridCell,{className:"block-editor-block-navigation-block__contents-cell",colSpan:I?void 0:2,ref:f},(function(e){var u=e.ref,s=e.tabIndex,b=e.onFocus;return Object(l.createElement)("div",{className:"block-editor-block-navigation-block__contents-container"},Object(l.createElement)(fl,{level:c,isLastRow:o===i,terminatedLevels:d}),Object(l.createElement)(yd,{block:t,onClick:function(){return r(t.clientId)},isSelected:n,position:o,siblingBlockCount:a,level:c,ref:u,tabIndex:s,onFocus:b}))})),I&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.__experimentalTreeGridCell,{className:x,withoutGridItem:!0},Object(l.createElement)(v.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(l.createElement)(dl,{orientation:"vertical",clientIds:[E],ref:t,tabIndex:n,onFocus:r})})),Object(l.createElement)(v.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(l.createElement)(bl,{orientation:"vertical",clientIds:[E],ref:t,tabIndex:n,onFocus:r})})))),P&&Object(l.createElement)(v.__experimentalTreeGridCell,{className:T},(function(e){var t=e.ref,n=e.tabIndex,o=e.onFocus;return Object(l.createElement)(Ms,{clientIds:[E],icon:Xa.a,toggleProps:{ref:t,tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:r},(function(e){var t=e.onClose;return Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(v.MenuItem,{onClick:Object(Ya.a)(Yc.a.mark((function e(){return Yc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S(null);case 2:return e.next=4,S(E);case 4:t();case 5:case"end":return e.stop()}}),e)})))},Object(C.__)("Go to block")))}))})))}function Ed(e){var t=e.parentBlockClientId,n=e.position,r=e.level,o=e.rowCount,c=e.terminatedLevels,i=e.path,a=Object(m.useSelect)((function(e){var n=e("core/block-editor"),r=n.isBlockBeingDragged,o=n.isAncestorBeingDragged;return r(t)||o(t)}),[t]),u=Object(b.useInstanceId)(Ed),d="block-navigation-appender-row__description_".concat(u),f=Object(C.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(C.__)("Add block at position %1$d, Level %2$d"),n,r);return Object(l.createElement)(rl,{className:s()({"is-dragging":a}),level:r,position:n,rowCount:o,path:i},Object(l.createElement)(v.__experimentalTreeGridCell,{className:"block-editor-block-navigation-appender__cell",colSpan:"3"},(function(e){var i=e.ref,a=e.tabIndex,u=e.onFocus;return Object(l.createElement)("div",{className:"block-editor-block-navigation-appender__container"},Object(l.createElement)(fl,{level:r,isLastRow:n===o,terminatedLevels:c}),Object(l.createElement)(Nu,{rootClientId:t,__experimentalIsQuick:!0,__experimentalSelectBlockOnInsert:!1,"aria-describedby":d,toggleProps:{ref:i,tabIndex:a,onFocus:u}}),Object(l.createElement)("div",{className:"block-editor-block-navigation-appender__description",id:d},f))})))}function wd(e){var t=e.blocks,n=e.selectBlock,r=e.selectedBlockClientId,o=e.showAppender,c=e.showBlockMovers,i=e.showNestedBlocks,a=e.parentBlockClientId,u=e.level,s=void 0===u?1:u,b=e.terminatedLevels,f=void 0===b?[]:b,p=e.path,m=void 0===p?[]:p,v=!a,O=Object(d.compact)(t),g=function(e){return o&&!v&&r===e},h=g(a),j=O.length,k=h?j+1:j,y=k;return Object(l.createElement)(l.Fragment,null,Object(d.map)(O,(function(e,t){var a=e.clientId,u=e.innerBlocks,d=t+1,b=k===d?[].concat(Object(ue.a)(f),[s]):f,p=[].concat(Object(ue.a)(m),[d]),v=i&&!!u&&!!u.length,O=g(a);return Object(l.createElement)(l.Fragment,{key:a},Object(l.createElement)(_d,{block:e,onClick:n,isSelected:r===a,level:s,position:d,rowCount:k,siblingBlockCount:j,showBlockMovers:c,terminatedLevels:f,path:p}),(v||O)&&Object(l.createElement)(wd,{blocks:u,selectedBlockClientId:r,selectBlock:n,showAppender:o,showBlockMovers:c,showNestedBlocks:i,parentBlockClientId:a,level:s+1,terminatedLevels:b,path:p}))})),h&&Object(l.createElement)(Ed,{parentBlockClientId:a,position:k,rowCount:y,level:s,terminatedLevels:f,path:[].concat(Object(ue.a)(m),[y])}))}function Cd(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 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 Id(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}wd.defaultProps={selectBlock:function(){}};var Bd=["top","bottom"];function xd(e){var t=Object(l.useState)(),n=Object(Me.a)(t,2),r=n[0],o=void 0===r?{}:r,c=n[1],i=Hu(o.rootClientId,o.blockIndex),u=Object(v.__unstableUseDropZone)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({element:e,withPosition:!0},i)),s=u.position,d=u.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,a=r.getDraggedBlockClientIds,u=r.canInsertBlocks,s=Object(l.useRef)(),d=!!t;return Object(l.useEffect)((function(){if(e.current&&d){var t="default"===n,r=t?a():void 0,l=Array.from(e.current.querySelectorAll("[data-block]"));s.current=l.map((function(e){var n=e.dataset.block,a=o(n);return{clientId:n,rootClientId:a,blockIndex:c(n,a),element:e,isDraggedBlock:!!t&&r.includes(n),innerBlockCount:i(n),canInsertDraggedBlocksAsSibling:!t||u(r,a),canInsertDraggedBlocksAsChild:!t||u(r,n)}}))}}),[e,d,n,u,i,c,o,a]),s}(e,s,d);if(Object(l.useEffect)((function(){if(s){var e=function(e,t){var n,r,o,c,i,a=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 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,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;if(!l.isDraggedBlock){var u=l.element.getBoundingClientRect(),s=Uu(t,u,Bd),d=Object(Me.a)(s,2),b=d[0],f=d[1],p=Id(t,u);if(void 0===o||b<o||p){o=b;var m=e.indexOf(l),v=e[m-1];if("top"===f&&v&&v.rootClientId===l.rootClientId&&!v.isDraggedBlock?(r=v,n="bottom",c=v.element.getBoundingClientRect()):(r=l,n=f,c=u),p)break}}}}catch(e){a.e(e)}finally{a.f()}if(r){var O="bottom"===n;if(O&&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 g=O?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+g,dropPosition:n}}}}(b.current,s);e&&c(e)}}),[b,s]),s)return o}function Pd(e){var t=e.__experimentalFeatures,n=Object(Fe.a)(e,["__experimentalFeatures"]),r=Object(l.useRef)(),o=xd(r);t||(o=void 0);var c=Object(l.useMemo)((function(){return{__experimentalFeatures:t,blockDropTarget:o}}),[t,o]);return Object(l.createElement)(v.__experimentalTreeGrid,{className:"block-editor-block-navigation-tree","aria-label":Object(C.__)("Block navigation structure"),ref:r},Object(l.createElement)(pl.Provider,{value:c},Object(l.createElement)(wd,n)))}var Td=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(l.createElement)("div",{className:"block-editor-block-navigation__container"},Object(l.createElement)("p",{className:"block-editor-block-navigation__label"},Object(C.__)("List view")),i&&Object(l.createElement)(Pd,{blocks:[t],selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c,showNestedBlocks:!0}),!i&&Object(l.createElement)(Pd,{blocks:n,selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c}))})),Nd=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},Object(l.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 Dd(e){var t=e.isEnabled,n=e.onToggle,r=e.isOpen,o=e.innerRef,c=Object(Fe.a)(e,["isEnabled","onToggle","isOpen","innerRef"]);Object($a.useShortcut)("core/edit-post/toggle-block-navigation",Object(l.useCallback)(n,[n]),{bindGlobal:!0,isDisabled:!t});var a=Object(m.useSelect)((function(e){return e($a.store).getShortcutRepresentation("core/edit-post/toggle-block-navigation")}),[]);return Object(l.createElement)(v.Button,Object(i.a)({},c,{ref:o,icon:Nd,"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(C.__)("Outline"),className:"block-editor-block-navigation",shortcut:a,"aria-disabled":!t}))}var Ad=Object(l.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(l.createElement)(v.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(l.createElement)(Dd,Object(i.a)({},o,{innerRef:t,isOpen:n,onToggle:r,isEnabled:c}))},renderContent:function(e){var t=e.onClose;return Object(l.createElement)(Td,{onSelect:t,__experimentalFeatures:r})}})})),Ld=n(130),Rd=[Ht.rawShortcut.primary("z"),Ht.rawShortcut.primaryShift("z"),Ht.rawShortcut.primary("y")],Md=Object(l.createElement)(v.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(d.fromPairs)(Rd.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),Fd=function(){return Md};function Vd(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(js.createBlobURL)(e),'">')})).join("")}var Hd={position:"bottom right",isAlternate:!0},zd=function(){return Object(l.createElement)("div",{className:"block-editor-format-toolbar"},Object(l.createElement)(v.ToolbarGroup,null,["bold","italic","link","text-color"].map((function(e){return Object(l.createElement)(v.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object(l.createElement)(v.Slot,{name:"RichText.ToolbarControls"},(function(e){return 0!==e.length&&Object(l.createElement)(v.ToolbarItem,null,(function(t){return Object(l.createElement)(v.DropdownMenu,{icon:al.a,label:Object(C.__)("More rich text controls"),toggleProps:t,controls:Object(d.orderBy)(e.map((function(e){return Object(Me.a)(e,1)[0].props})),"title"),popoverProps:Hd})}))}))))},Ud=function(e){var t=e.inline,n=e.anchorRef;return t?Object(l.createElement)(v.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar"},Object(l.createElement)(zd,null)):Object(l.createElement)(qa,null,Object(l.createElement)(zd,null))};function Gd(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?Gd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Wd(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function qd(e){var t=e.allowedFormats,n=e.formattingControls;return e.disableFormats?qd.EMPTY_ARRAY:t||n?t||(Ml()("wp.blockEditor.RichText formattingControls prop",{alternative:"allowedFormats"}),n.map((function(e){return"core/".concat(e)}))):void 0}qd.EMPTY_ARRAY=[];var $d=Object(l.forwardRef)((function e(t,n){var r=t.children,o=t.tagName,a=t.value,u=t.onChange,d=t.isSelected,f=t.multiline,v=t.inlineToolbar,O=t.wrapperClassName,g=t.autocompleters,j=t.onReplace,k=t.placeholder,y=t.keepPlaceholderOnFocus,_=t.allowedFormats,E=t.formattingControls,w=t.withoutInteractiveFormatting,C=t.onRemove,S=t.onMerge,I=t.onSplit,B=t.__unstableOnSplitAtEnd,x=t.__unstableOnSplitMiddle,P=t.identifier,T=t.preserveWhiteSpace,N=t.__unstablePastePlainText,D=t.__unstableEmbedURLOnPaste,A=t.__unstableDisableFormats,L=t.disableLineBreaks,R=t.unstableOnFocus,M=t.__unstableAllowPrefixTransformations,F=t.__unstableMultilineRootTag,V=t.__unstableMobileNoFocusOnMount,H=t.deleteEnter,z=t.placeholderTextColor,U=t.textAlign,G=t.selectionColor,K=t.tagsToEliminate,W=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(l.useRef)(),ce=n||oe,ie=h(),ae=ie.clientId,le=ie.onCaretVerticalPositionChange,se=ie.isSelected,de=Object(m.useSelect)((function(e){var t,n=e("core/block-editor"),r=n.isCaretWithinFormattedText,o=n.getSelectionStart,c=n.getSelectionEnd,i=n.getSettings,a=n.didAutomaticChange,u=n.__unstableGetBlockWithoutInnerBlocks,s=n.isMultiSelecting,b=n.hasMultiSelection,f=o(),m=c(),v=i().__experimentalUndo;void 0===d?t=f.clientId===ae&&f.attributeKey===P:d&&(t=f.clientId===ae);var O={};if("native"===l.Platform.OS){var g=ae&&u(ae);O={shouldBlurOnUnmount:g&&t&&Object(p.isUnmodifiedDefaultBlock)(g)}}return Kd({isCaretWithinFormattedText:r(),selectionStart:t?f.offset:void 0,selectionEnd:t?m.offset:void 0,isSelected:t,didAutomaticChange:a(),disabled:s()||b(),undo:v},O)})),be=de.isCaretWithinFormattedText,fe=de.selectionStart,pe=de.selectionEnd,me=de.isSelected,ve=de.didAutomaticChange,Oe=de.disabled,ge=de.undo,he=de.shouldBlurOnUnmount,je=Object(m.useDispatch)("core/block-editor"),ke=je.__unstableMarkLastChangeAsPersistent,ye=je.enterFormattedText,_e=je.exitFormattedText,Ee=je.selectionChange,we=je.__unstableMarkAutomaticChange,Ce=Wd(f),Se=qd({allowedFormats:_,formattingControls:E,disableFormats:A}),Ie=!Se||Se.length>0,Be=a,xe=u;Array.isArray(a)&&(Be=p.children.toHTML(a),xe=function(e){return u(p.children.fromDOM(Object(c.__unstableCreateElement)(document,e).childNodes))});var Pe=Object(l.useCallback)((function(e,t){Ee(ae,P,e,t)}),[ae,P]),Te=Object(l.useCallback)((function(e){var t=e.value,n=e.isReverse;S&&S(!n),C&&Object(c.isEmpty)(t)&&n&&C(!n)}),[S,C]),Ne=Object(l.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(j&&I){var n=[],r=Object(c.split)(e),o=Object(Me.a)(r,2),i=o[0],a=o[1],l=t.length>0,u=-1;l&&Object(c.isEmpty)(i)||(n.push(I(Object(c.toHTMLString)({value:i,multilineTag:Ce}))),u+=1),l?(n.push.apply(n,Object(ue.a)(t)),u+=t.length):x&&n.push(x()),(l||x)&&Object(c.isEmpty)(a)||n.push(I(Object(c.toHTMLString)({value:a,multilineTag:Ce})));var s=l?u:1,d=l?-1:null;j(n,s,d)}}),[j,I,Ce,x]),De=Object(l.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.shiftKey,o=j&&I;if(j){var i=Object(p.getBlockTransforms)("from").filter((function(e){return"enter"===e.type})),a=Object(p.findTransform)(i,(function(e){return e.regExp.test(t.text)}));a&&(j([a.transform({content:t.text})]),we())}if(f)r?L||n(Object(c.insert)(t,"\n")):o&&Object(c.__unstableIsEmptyLine)(t)?Ne(t):n(Object(c.__unstableInsertLineSeparator)(t));else{var l=t.text,u=t.start,s=t.end,d=B&&u===s&&s===l.length;r||!o&&!d?L||n(Object(c.insert)(t,"\n")):!o&&d?B():o&&Ne(t)}}),[j,I,we,f,Ne,B]),Ae=Object(l.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.html,i=e.plainText,a=e.files,l=e.activeFormats;if(N)n(Object(c.insert)(t,Object(c.create)({text:i})));else{if(a&&a.length&&!r){var u=Object(p.pasteHandler)({HTML:Vd(a),mode:"BLOCKS",tagName:o,preserveWhiteSpace:T});return window.console.log("Received items:\n\n",a),void(j&&Object(c.isEmpty)(t)?j(u):Ne(t,u))}var s,d=j&&I?"AUTO":"INLINE";"AUTO"===d&&Object(c.isEmpty)(t)&&(s=i,Object(Ld.regexp)(".*").test(s))&&(d="BLOCKS"),D&&Object(c.isEmpty)(t)&&Object(mu.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(l.length)for(var v=m.formats.length;v--;)m.formats[v]=[].concat(Object(ue.a)(l),Object(ue.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,I,Ne,D,f,T,N]),Le=Object(l.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})),a=Object(p.findTransform)(i,(function(e){var t=e.prefix;return o===t}));if(a){var l=t(Object(c.slice)(e,n,r.length)),u=a.transform(l);j([u]),we()}}}}),[j,we]),Re=Object(l.createElement)(c.__experimentalRichText,{clientId:ae,identifier:P,ref:ce,value:Be,onChange:xe,selectionStart:fe,selectionEnd:pe,onSelectionChange:Pe,tagName:o,placeholder:k,allowedFormats:Se,withoutInteractiveFormatting:w,onEnter:De,onDelete:Te,onPaste:Ae,__unstableIsSelected:me,__unstableInputRule:Le,__unstableMultilineTag:Ce,__unstableIsCaretWithinFormattedText:be,__unstableOnEnterFormattedText:ye,__unstableOnExitFormattedText:_e,__unstableOnCreateUndoLevel:ke,__unstableMarkAutomaticChange:we,__unstableDidAutomaticChange:ve,__unstableUndo:ge,__unstableDisableFormats:A,preserveWhiteSpace:T,disabled:Oe,unstableOnFocus:R,__unstableAllowPrefixTransformations:M,__unstableMultilineRootTag:F,onCaretVerticalPositionChange:le,blockIsSelected:void 0!==d?d:se,shouldBlurOnUnmount:he,__unstableMobileNoFocusOnMount:V,deleteEnter:H,placeholderTextColor:z,textAlign:U,selectionColor:G,tagsToEliminate:K,rootTagsToEliminate:W,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,a=e.editableProps,u=e.editableTagName;return Object(l.createElement)(l.Fragment,null,r&&r({value:n,onChange:o,onFocus:c}),t&&Ie&&Object(l.createElement)(Ud,{inline:v,anchorRef:ce.current}),t&&Object(l.createElement)(Fd,null),Object(l.createElement)(Fr,{onReplace:j,completers:g,record:n,onChange:o,isSelected:t,contentRef:ce},(function(e){var t=e.listBoxId,n=e.activeId,r=e.onKeyDown;return Object(l.createElement)(u,Object(i.a)({},a,ne,{style:ne.style?Kd(Kd({},ne.style),a.style):a.style,className:s()("block-editor-rich-text__editable",ne.className,a.className,{"keep-placeholder-on-focus":y}),"aria-autocomplete":t?"list":void 0,"aria-owns":t,"aria-activedescendant":n,onKeyDown:function(e){r(e),a.onKeyDown(e)}}))})))}));return O?(Ml()("wp.blockEditor.RichText wrapperClassName prop",{alternative:"className prop or create your own wrapper div"}),Object(l.createElement)("div",{className:s()("block-editor-rich-text",O)},Re)):Re}));$d.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=Wd(r);!t&&c&&(t="<".concat(c,"></").concat(c,">"));var i=Object(l.createElement)(l.RawHTML,null,t);return n?Object(l.createElement)(n,Object(d.omit)(o,["format"]),i):i},$d.isEmpty=function(e){return!e||0===e.length},$d.Content.defaultProps={format:"string",value:""};var Yd=$d;function Xd(e){var t=e.value,n=e.onChange;return Object(l.createElement)(kd,null,Object(l.createElement)(Yd,{value:t,onChange:n,placeholder:Object(C.__)("Navigation item"),keepPlaceholderOnFocus:!0,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var Qd=n(276),Zd=function(e){var t=e.icon,n=void 0===t?Qd.a:t,r=e.label,o=void 0===r?Object(C.__)("Choose variation"):r,c=e.instructions,i=void 0===c?Object(C.__)("Select a variation to start with."):c,a=e.variations,u=e.onSelect,d=e.allowSkip,b=s()("block-editor-block-variation-picker",{"has-many-variations":a.length>4});return Object(l.createElement)(v.Placeholder,{icon:n,label:o,instructions:i,className:b},Object(l.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(C.__)("Block variations")},a.map((function(e){return Object(l.createElement)("li",{key:e.name},Object(l.createElement)(v.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:function(){return u(e)},className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(l.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))}))),d&&Object(l.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(l.createElement)(v.Button,{isLink:!0,onClick:function(){return u()}},Object(C.__)("Skip"))))},Jd=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 eb(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 tb=function(e){var t=e.blockClientId,n=Object(l.useState)(),r=Object(Me.a)(n,2),o=r[0],c=r[1],i=Object(m.useDispatch)("core/block-editor").updateBlockAttributes,u=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]),s=u.variations,d=u.blockAttributes;if(Object(l.useEffect)((function(){var e;c(null===(e=Jd(d,s))||void 0===e?void 0:e.name)}),[d,s]),null==s||!s.length)return null;var b=s.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?eb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},s.find((function(t){return t.name===e})).attributes))},O="block-editor-block-variation-transforms";return Object(l.createElement)(v.DropdownMenu,{className:O,label:Object(C.__)("Transform to variation"),text:Object(C.__)("Transform to variation"),popoverProps:{position:"bottom center",className:"".concat(O,"__popover")},icon:al.a,toggleProps:{iconPosition:"right"}},(function(){return Object(l.createElement)("div",{className:"".concat(O,"__container")},Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(v.MenuItemsChoice,{choices:b,value:o,onSelect:f})))}))},nb=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),rb=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"}));function ob(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 cb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ob(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ob(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ib={top:{icon:Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(C._x)("Align top","Block vertical alignment setting")},center:{icon:rb,title:Object(C._x)("Align middle","Block vertical alignment setting")},bottom:{icon:nb,title:Object(C._x)("Align bottom","Block vertical alignment setting")}},ab=["top","center","bottom"],lb={isAlternate:!0},ub=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?ab:r,c=e.isCollapsed,i=void 0===c||c,a=ib[t],u=ib.top;return Object(l.createElement)(v.ToolbarGroup,{popoverProps:lb,isCollapsed:i,icon:a?a.icon:u.icon,label:Object(C._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((function(e){return cb(cb({},ib[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})};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 db(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(a.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 bb=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=Oe("color.palette"),r=!Oe("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(l.createElement)(e,db(db({},t),{},{colors:o,disableCustomColors:c,hasColorsToChoose:i}))}}),"withColorContext"),fb=bb(v.ColorPalette);function pb(e){var t=e.onChange,n=e.value,r=Object(Fe.a)(e,["onChange","value"]);return Object(l.createElement)($e,Object(i.a)({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var mb=[];function vb(e){var t=Oe("color.gradients")||mb,n=!Oe("color.customGradient");return Object(l.createElement)(v.__experimentalGradientPicker,Object(i.a)({gradients:void 0!==e.gradients?e.gradient:t,disableCustomGradients:void 0!==e.disableCustomGradients?e.disableCustomGradients:n},e))}var Ob=function(e){var t=void 0!==e.gradients&&void 0!==e.disableCustomGradients?v.__experimentalGradientPicker:vb;return Object(l.createElement)(t,e)};function gb(e){var t=e.className,n=e.value,r=e.onChange,o=e.label,c=void 0===o?Object(C.__)("Gradient Presets"):o,a=Object(Fe.a)(e,["className","value","onChange","label"]),u=Oe("color.gradients"),b=!Oe("color.customGradient");return Object(d.isEmpty)(u)&&b?null:Object(l.createElement)(v.BaseControl,{className:s()("block-editor-gradient-picker-control",t)},Object(l.createElement)(v.BaseControl.VisualLabel,null,c),Object(l.createElement)(Ob,Object(i.a)({value:n,onChange:r,className:"block-editor-gradient-picker-control__gradient-picker-presets",gradients:u,disableCustomGradients:b},a)))}function hb(e){var t=Oe("color.gradients");return Object(d.isEmpty)(t)?null:Object(l.createElement)(v.PanelBody,{title:Object(C.__)("Gradient")},Object(l.createElement)(gb,e))}var jb=[25,50,75,100];function kb(e){var t,n,r=e.imageWidth,o=e.imageHeight,c=e.imageSizeOptions,i=void 0===c?[]:c,a=e.isResizable,u=void 0===a||a,s=e.slug,b=e.width,f=e.height,p=e.onChange,m=e.onChangeImage,O=void 0===m?d.noop:m;function g(e,t){return function(){p({width:e,height:t})}}return Object(l.createElement)(l.Fragment,null,!Object(d.isEmpty)(i)&&Object(l.createElement)(v.SelectControl,{label:Object(C.__)("Image size"),value:s,options:i,onChange:O}),u&&Object(l.createElement)("div",{className:"block-editor-image-size-control"},Object(l.createElement)("p",{className:"block-editor-image-size-control__row"},Object(C.__)("Image dimensions")),Object(l.createElement)("div",{className:"block-editor-image-size-control__row"},Object(l.createElement)(v.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:Object(C.__)("Width"),value:null!==(t=null!=b?b:r)&&void 0!==t?t:"",min:1,onChange:function(e){return p({width:parseInt(e,10)})}}),Object(l.createElement)(v.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:Object(C.__)("Height"),value:null!==(n=null!=f?f:o)&&void 0!==n?n:"",min:1,onChange:function(e){return p({height:parseInt(e,10)})}})),Object(l.createElement)("div",{className:"block-editor-image-size-control__row"},Object(l.createElement)(v.ButtonGroup,{"aria-label":Object(C.__)("Image size presets")},jb.map((function(e){var t=Math.round(r*(e/100)),n=Math.round(o*(e/100)),c=b===t&&f===n;return Object(l.createElement)(v.Button,{key:e,isSmall:!0,isPrimary:c,isPressed:c,onClick:g(t,n)},e,"%")}))),Object(l.createElement)(v.Button,{isSmall:!0,onClick:g()},Object(C.__)("Reset")))))}var yb=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=h().clientId;return Object(l.createElement)(e,Object(i.a)({},t,{clientId:n}))}}),"withClientId"),_b=yb((function(e){var t=e.clientId,n=e.showSeparator,r=e.isFloating,o=e.onAddBlock;return Object(l.createElement)(Au,{rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})})),Eb=Object(b.compose)([yb,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(l.createElement)(Du,{rootClientId:t,lastBlockClientId:n})})),wb=n(80),Cb=n.n(wb),Sb=new WeakMap;function Ib(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 Bb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ib(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ib(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xb(e){var t=e.clientId,n=e.allowedBlocks,r=e.template,o=e.templateLock,c=e.wrapperRef,i=e.templateInsertUpdatesSelection,a=e.__experimentalCaptureToolbars,u=e.__experimentalAppenderTagName,s=e.renderAppender,b=e.orientation,f=e.placeholder,v=e.__experimentalLayout,O=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]),a=i.blockListSettings,u=i.parentLock;Object(l.useLayoutEffect)((function(){var i={allowedBlocks:t,templateLock:void 0===n?u:n};void 0!==r&&(i.__experimentalCaptureToolbars=r),void 0!==o&&(i.orientation=o),Cb()(a,i)||c(e,i)}),[e,a,t,n,u,r,o,c])}(t,n,o,a,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(l.useRef)(null);Object(l.useLayoutEffect)((function(){if((0===c.length||"all"===n)&&!Object(d.isEqual)(t,i.current)){i.current=t;var a=Object(p.synchronizeBlocksWithTemplate)(c,t);Object(d.isEqual)(a,c)||o(e,a,0===c.length&&r&&0!==a.length)}}),[c,n,e])}(t,r,o,i);var g=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){Sb.has(t)||Sb.set(t,new WeakMap);var n=Sb.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(l.createElement)(A,{value:O},Object(l.createElement)(Aa,{value:g},Object(l.createElement)(ed,{rootClientId:t,renderAppender:s,__experimentalAppenderTagName:u,wrapperRef:c,placeholder:f})))}function Pb(e){return Vl(e),Object(l.createElement)(xb,e)}var Tb=Object(l.forwardRef)((function(e,t){var n=Nb({ref:t},e);return Object(l.createElement)("div",{className:"block-editor-inner-blocks"},Object(l.createElement)("div",n))}));function Nb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(l.useRef)(),r=h(),o=r.clientId,c=Object(b.useViewportMatch)("medium","<"),a=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.isBlockSelected,i=t.hasSelectedInnerBlock,a=(0,t.isNavigationMode)()||c;return"core/template"!==n(o)&&!r(o)&&!i(o,!0)&&a}),[o,c]),u=e.ref||n,d=t.value&&t.onChange?Pb:xb;return Bb(Bb({},e),{},{ref:u,className:s()(e.className,"block-editor-block-list__layout",{"has-overlay":a}),children:Object(l.createElement)(d,Object(i.a)({},t,{clientId:o,wrapperRef:u}))})}Tb.DefaultBlockAppender=Eb,Tb.ButtonBlockAppender=_b,Tb.Content=Object(p.withBlockContentContext)((function(e){var t=e.BlockContent;return Object(l.createElement)(t,null)}));var Db=Tb,Ab=n(206);function Lb(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 Rb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Mb=[{id:"opensInNewTab",title:Object(C.__)("Open in new tab")}],Fb=function(e){var t=e.value,n=e.onChange,r=void 0===n?d.noop:n,o=e.settings,c=void 0===o?Mb:o;if(!c||!c.length)return null;var i=function(e){return function(n){r(Rb(Rb({},t),{},Object(a.a)({},e.id,n)))}},u=c.map((function(e){return Object(l.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(l.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(l.createElement)(v.VisuallyHidden,{as:"legend"},Object(C.__)("Currently selected link settings")),u)},Vb=n(126),Hb=n.n(Vb);var zb=function(e){Object(Rn.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(Fn.a)(t);if(n){var o=Object(Fn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Mn.a)(this,e)});function o(e){var t;return Object(Dn.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(l.createRef)(),t.inputRef=Object(l.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(An.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,Hb()(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(mu.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(C.sprintf)(
|
62 |
/* translators: %s: number of results. */
|
63 |
+
Object(C._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(C.__)("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 a=r?r-1:o.length-1;this.setState({selectedSuggestion:a});break;case Ht.DOWN:e.stopPropagation(),e.preventDefault();var l=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:l});break;case Ht.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak(Object(C.__)("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(l.createElement)(l.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(C.__)("Paste URL or type to search"):c,a=e.__experimentalRenderControl,u=e.value,d=void 0===u?"":u,b=this.state,f=b.loading,p=b.showSuggestions,m=b.selectedSuggestion,O=b.suggestionsListboxId,g=b.suggestionOptionIdPrefix,h={id:"url-input-control-".concat(o),label:t,className:s()("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(C.__)("URL"),"aria-expanded":p,"aria-autocomplete":"list","aria-owns":O,"aria-activedescendant":null!==m?"".concat(g,"-").concat(m):void 0,ref:this.inputRef};return a?a(h,j,f):Object(l.createElement)(v.BaseControl,h,Object(l.createElement)("input",j),f&&Object(l.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,a=t.__experimentalShowInitialSuggestions,u=void 0!==a&&a,b=this.state,f=b.showSuggestions,p=b.suggestions,m=b.selectedSuggestion,O=b.suggestionsListboxId,g=b.suggestionOptionIdPrefix,h=b.loading,j={id:O,ref:this.autocompleteRef,role:"listbox"},k=function(t,n){return{role:"option",tabIndex:"-1",id:"".concat(g,"-").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:u&&!(c&&c.length)}):!Object(d.isFunction)(r)&&f&&p.length?Object(l.createElement)(v.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(l.createElement)("div",Object(i.a)({},j,{className:s()("block-editor-url-input__suggestions","".concat(n,"__suggestions"))}),p.map((function(t,n){return Object(l.createElement)(v.Button,Object(i.a)({},k(0,n),{key:t.id,className:s()("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,a=t.showSuggestions,l=n&&n.length;return i||l||(a=!1),!0===o&&(a=!1),{showSuggestions:a,suggestionsListboxId:"block-editor-url-input-suggestions-".concat(r),suggestionOptionIdPrefix:"block-editor-url-input-suggestion-".concat(r)}}}]),o}(l.Component),Ub=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}})))(zb),Gb=function(e){var t,n=e.searchTerm,r=e.onClick,o=e.itemProps,c=e.isSelected,a=e.buttonText;return n?(t=a?Object(d.isFunction)(a)?a(n):a:Object(l.createInterpolateElement)(Object(C.sprintf)(
|
64 |
/* translators: %s: search term. */
|
65 |
+
Object(C.__)("Create: <mark>%s</mark>"),n),{mark:Object(l.createElement)("mark",null)}),Object(l.createElement)(v.Button,Object(i.a)({},o,{className:s()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":c}),onClick:r}),Object(l.createElement)(Dl.a,{className:"block-editor-link-control__search-item-icon",icon:xl.a}),Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null},Kb=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(l.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"})),Wb=function(e){var t=e.itemProps,n=e.suggestion,r=e.isSelected,o=void 0!==r&&r,c=e.onClick,a=e.isURL,u=void 0!==a&&a,d=e.searchTerm,b=void 0===d?"":d,f=e.shouldShowType,p=void 0!==f&&f;return Object(l.createElement)(v.Button,Object(i.a)({},t,{onClick:c,className:s()("block-editor-link-control__search-item",{"is-selected":o,"is-url":u,"is-entity":!u})}),u&&Object(l.createElement)(Dl.a,{className:"block-editor-link-control__search-item-icon",icon:Kb}),Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(l.createElement)(v.TextHighlight,{text:n.title,highlight:b})),Object(l.createElement)("span",{"aria-hidden":!u,className:"block-editor-link-control__search-item-info"},!u&&(Object(mu.filterURLForDisplay)(Object(mu.safeDecodeURI)(n.url))||""),u&&Object(C.__)("Press ENTER to add this link"))),p&&n.type&&Object(l.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===n.type?"tag":n.type))};function qb(e){var t=e.instanceId,n=e.withCreateSuggestion,r=e.currentInputValue,o=e.handleSuggestionClick,c=e.suggestionsListProps,a=e.buildSuggestionItemProps,u=e.suggestions,d=e.selectedSuggestion,b=e.isLoading,f=e.isInitialSuggestions,p=e.createSuggestionButtonText,m=e.suggestionsQuery,O=s()("block-editor-link-control__search-results",{"is-loading":b}),g=["url","mailto","tel","internal"],h=1===u.length&&g.includes(u[0].type.toLowerCase()),j=n&&!h&&!f,k=!(null!=m&&m.type),y="block-editor-link-control-search-results-label-".concat(t),_=f?Object(C.__)("Recently updated"):Object(C.sprintf)(
|
66 |
/* translators: %s: search term. */
|
67 |
+
Object(C.__)('Search results for "%s"'),r),E=Object(l.createElement)(f?l.Fragment:v.VisuallyHidden,{},Object(l.createElement)("span",{className:"block-editor-link-control__search-results-label",id:y},_));return Object(l.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},E,Object(l.createElement)("div",Object(i.a)({},c,{className:O,"aria-labelledby":y}),u.map((function(e,t){return j&&"__CREATE__"===e.type?Object(l.createElement)(Gb,{searchTerm:r,buttonText:p,onClick:function(){return o(e)},key:e.type,itemProps:a(e,t),isSelected:t===d}):"__CREATE__"===e.type?null:Object(l.createElement)(Wb,{key:"".concat(e.id,"-").concat(e.type),itemProps:a(e,t),suggestion:e,index:t,onClick:function(){o(e)},isSelected:t===d,isURL:g.includes(e.type.toLowerCase()),searchTerm:r,shouldShowType:k})}))))}function $b(e){var t=Object(d.startsWith)(e,"#");return Object(mu.isURL)(e)||e&&e.includes("www.")||t}function Yb(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 Xb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qb=function(){return Promise.resolve([])},Zb=function(e){var t="URL",n=Object(mu.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(mu.prependHTTP)(e):e,type:t}])},Jb=function(){var e=Object(Ya.a)(Yc.a.mark((function e(t,n,r,o,c,i){var a,l,u;return Yc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.isInitialSuggestions,e.next=3,Promise.all([r(t,n),o(t)]);case 3:if(l=e.sent,u=!t.includes(" "),l=u&&i&&!a?l[0].concat(l[1]):l[0],!a){e.next=8;break}return e.abrupt("return",l);case 8:return e.abrupt("return",$b(t)||!c?l:l.concat({title:t,url:t,type:"__CREATE__"}));case 9:case"end":return e.stop()}}),e)})));return function(t,n,r,o,c,i){return e.apply(this,arguments)}}();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(a.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=Promise.resolve([]),rf=Object(l.forwardRef)((function(e,t){var n=e.value,r=e.children,o=e.currentLink,c=void 0===o?{}:o,i=e.className,a=void 0===i?null:i,u=e.placeholder,s=void 0===u?null:u,f=e.withCreateSuggestion,p=void 0!==f&&f,v=e.onCreateSuggestion,O=void 0===v?d.noop:v,g=e.onChange,h=void 0===g?d.noop:g,j=e.onSelect,k=void 0===j?d.noop:j,y=e.showSuggestions,_=void 0===y||y,E=e.renderSuggestions,w=void 0===E?function(e){return Object(l.createElement)(qb,e)}:E,S=e.fetchSuggestions,I=void 0===S?null:S,B=e.allowDirectEntry,x=void 0===B||B,P=e.showInitialSuggestions,T=void 0!==P&&P,N=e.suggestionsQuery,D=void 0===N?{}:N,A=e.withURLSuggestion,L=void 0===A||A,R=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?Zb:Qb;return Object(l.useCallback)((function(t,i){var a=i.isInitialSuggestions;return $b(t)?c(t,{isInitialSuggestions:a}):Jb(t,Xb(Xb({},e),{},{isInitialSuggestions:a}),o,c,n,r)}),[c,o,n])}(D,x,p,L),F=_?I||M:nf,V=Object(b.useInstanceId)(rf),H=Object(l.useState)(),z=Object(Me.a)(H,2),U=z[0],G=z[1],K=function(){var e=Object(Ya.a)(Yc.a.mark((function e(t){var n,r;return Yc.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,O(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(tf(tf({},Object(d.omit)(c,"id","url")),n),n);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();return Object(l.createElement)("form",{onSubmit:function(e){e.preventDefault(),K(U||{url:n})}},Object(l.createElement)(Ub,{className:a,value:n,onChange:function(e,t){h(e),G(t)},placeholder:null!=s?s:Object(C.__)("Search or type url"),__experimentalRenderSuggestions:_?function(e){return w(tf(tf({},e),{},{instanceId:V,withCreateSuggestion:p,currentInputValue:n,createSuggestionButtonText:R,suggestionsQuery:D,handleSuggestionClick:function(t){e.handleSuggestionClick&&e.handleSuggestionClick(t),K(t)}}))}:null,__experimentalFetchLinkSuggestions:F,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:T,ref:t}),r)})),of=rf,cf=Object(v.createSlotFill)("BlockEditorLinkControlViewer"),af=cf.Slot,lf=cf.Fill;function uf(e){var t=e.value,n=e.onEditClick,r=t&&Object(mu.filterURLForDisplay)(Object(mu.safeDecodeURI)(t.url),16)||"";return Object(l.createElement)("div",{"aria-label":Object(C.__)("Currently selected"),"aria-selected":"true",className:s()("block-editor-link-control__search-item",{"is-current":!0})},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)(v.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},t&&t.title||r),t&&t.title&&Object(l.createElement)("span",{className:"block-editor-link-control__search-item-info"},r)),Object(l.createElement)(v.Button,{isSecondary:!0,onClick:function(){return n()},className:"block-editor-link-control__search-item-action"},Object(C.__)("Edit")),Object(l.createElement)(af,{fillProps:t}))}var sf=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 df(e){var t=e.searchInputPlaceholder,n=e.value,r=e.settings,o=e.onChange,c=void 0===o?d.noop:o,i=e.noDirectEntry,a=void 0!==i&&i,u=e.showSuggestions,s=void 0===u||u,b=e.showInitialSuggestions,f=e.forceIsEditingLink,p=e.createSuggestion,m=e.withCreateSuggestion,O=e.inputValue,g=void 0===O?"":O,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(l.useRef)(!0),w=Object(l.useRef)(),S=Object(l.useState)(n&&n.url||""),I=Object(Me.a)(S,2),B=I[0],x=I[1],P=g||B,T=Object(l.useState)(void 0!==f?f:!n||!n.url),N=Object(Me.a)(T,2),D=N[0],A=N[1],L=Object(l.useRef)(!1);Object(l.useEffect)((function(){void 0!==f&&f!==D&&A(f)}),[f]),Object(l.useEffect)((function(){E.current?E.current=!1:(w.current.contains(w.current.ownerDocument.activeElement)||(Za.focus.focusable.find(w.current)[0]||w.current).focus(),L.current=!1)}),[D]);var R=function(e){var t=Object(l.useRef)(),n=Object(l.useState)(!1),r=Object(Me.a)(n,2),o=r[0],c=r[1],i=Object(l.useState)(null),a=Object(Me.a)(i,2),u=a[0],s=a[1],d=function(){var n=Object(Ya.a)(Yc.a.mark((function n(r){return Yc.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!0),s(null),n.prev=2,t.current=sf(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 s(n.t0.message||Object(C.__)("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(e){return n.apply(this,arguments)}}();return Object(l.useEffect)((function(){return function(){t.current&&t.current.cancel()}}),[]),{createPage:d,isCreatingPage:o,errorMessage:u}}(p),M=R.createPage,F=R.isCreatingPage,V=R.errorMessage;return Object(l.createElement)("div",{tabIndex:-1,ref:w,className:"block-editor-link-control"},F&&Object(l.createElement)("div",{className:"block-editor-link-control__loading"},Object(l.createElement)(v.Spinner,null)," ",Object(C.__)("Creating"),"…"),(D||!n)&&!F&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(l.createElement)(of,{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),L.current=!(null===(t=w.current)||void 0===t||!t.contains(w.current.ownerDocument.activeElement)),A(!1)},showInitialSuggestions:b,allowDirectEntry:!a,showSuggestions:s,suggestionsQuery:j,withURLSuggestion:!y,createSuggestionButtonText:_},Object(l.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(l.createElement)(v.Button,{type:"submit",label:Object(C.__)("Submit"),icon:Ab.a,className:"block-editor-link-control__search-submit"})))),V&&Object(l.createElement)(v.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},V)),n&&!D&&!F&&Object(l.createElement)(uf,{value:n,onEditClick:function(){return A(!0)}}),Object(l.createElement)(Fb,{value:n,settings:r,onChange:c}))}df.ViewerFill=lf;var bf=df,ff=n(277),pf=n(207),mf=Object(v.withFilters)("editor.MediaUpload")((function(){return null})),vf=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},Of=Object(b.compose)([Object(m.withDispatch)((function(e){var t=e(lu.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,a=e.onFilesUpload,u=void 0===a?d.noop:a,s=e.name,b=void 0===s?Object(C.__)("Replace"):s,f=e.createNotice,p=e.removeNotice,O=Object(l.useState)(t),g=Object(Me.a)(O,2),h=g[0],j=g[1],k=Object(m.useSelect)((function(e){return e("core/block-editor").getSettings().mediaUpload}),[]),y=Object(l.createRef)(),_=Object(d.uniqueId)("block-editor/media-replace-flow/error-notice/"),E=function(e){var t=document.createElement("div");t.innerHTML=Object(l.renderToString)(e);var n=t.textContent||t.innerText||"";setTimeout((function(){f("error",n,{speak:!0,id:_,isDismissible:!0})}),1e3)},w=function(e){c(e),j(e.url),Object(ot.speak)(Object(C.__)("The media file has been replaced")),p(_)},S=function(e){e.keyCode===Ht.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(l.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(l.createElement)(v.ToolbarGroup,{className:"media-replace-flow"},Object(l.createElement)(v.ToolbarButton,{ref:y,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:S},b))},renderContent:function(e){return e.onClose,Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(l.createElement)(mf,{value:n,onSelect:function(e){return w(e)},allowedTypes:r,render:function(e){var t=e.open;return Object(l.createElement)(v.MenuItem,{icon:ff.a,onClick:t},Object(C.__)("Open Media Library"))}}),Object(l.createElement)(vf,null,Object(l.createElement)(v.FormFileUpload,{onChange:function(e){!function(e){var t=e.target.files;u(t),k({allowedTypes:r,filesList:t,onFileChange:function(e){var t=Object(Me.a)(e,1)[0];w(t)},onError:E})}(e)},accept:o,render:function(e){var t=e.openFileDialog;return Object(l.createElement)(v.MenuItem,{icon:pf.a,onClick:function(){t()}},Object(C.__)("Upload"))}}))),i&&Object(l.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(l.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(C.__)("Current media URL:")),Object(l.createElement)(bf,{value:{url:h},settings:[],showSuggestions:!1,onChange:function(e){var t=e.url;j(t),i(t),y.current.focus()}})))}})})),gf=n(193);function hf(e){var t=e.url,n=e.urlLabel,r=e.className,o=s()(r,"block-editor-url-popover__link-viewer-url");return t?Object(l.createElement)(v.ExternalLink,{className:o,href:t},n||Object(mu.filterURLForDisplay)(Object(mu.safeDecodeURI)(t))):Object(l.createElement)("span",{className:o})}function jf(e){var t=e.additionalControls,n=e.children,r=e.renderSettings,o=e.position,c=void 0===o?"bottom center":o,a=e.focusOnMount,u=void 0===a?"firstElement":a,s=Object(Fe.a)(e,["additionalControls","children","renderSettings","position","focusOnMount"]),d=Object(l.useState)(!1),b=Object(Me.a)(d,2),f=b[0],p=b[1],m=!!r&&f;return Object(l.createElement)(v.Popover,Object(i.a)({className:"block-editor-url-popover",focusOnMount:u,position:c},s),Object(l.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(l.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&Object(l.createElement)(v.Button,{className:"block-editor-url-popover__settings-toggle",icon:al.a,label:Object(C.__)("Link settings"),onClick:function(){p(!f)},"aria-expanded":f})),m&&Object(l.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!m&&Object(l.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}jf.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(l.createElement)("form",Object(i.a)({className:s()("block-editor-url-popover__link-editor",n)},c),Object(l.createElement)(Ub,{value:o,onChange:r,autocompleteRef:t}),Object(l.createElement)(v.Button,{icon:Ab.a,label:Object(C.__)("Apply"),type:"submit"}))},jf.LinkViewer=function(e){var t=e.className,n=e.linkClassName,r=e.onEditLinkClick,o=e.url,c=e.urlLabel,a=Object(Fe.a)(e,["className","linkClassName","onEditLinkClick","url","urlLabel"]);return Object(l.createElement)("div",Object(i.a)({className:s()("block-editor-url-popover__link-viewer",t)},a),Object(l.createElement)(hf,{url:o,urlLabel:c,className:n}),r&&Object(l.createElement)(v.Button,{icon:gf.a,label:Object(C.__)("Edit"),onClick:r}))};var kf=jf,yf=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(l.createElement)(kf,{onClose:o},Object(l.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},Object(l.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(C.__)("URL"),placeholder:Object(C.__)("Paste or type URL"),onChange:n,value:t}),Object(l.createElement)(v.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Ab.a,label:Object(C.__)("Apply"),type:"submit"})))},_f=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,a=void 0===i?{}:i,u=e.mediaPreview,b=e.notices,f=e.isAppender,p=e.accept,O=e.addToGallery,g=e.multiple,h=void 0!==g&&g,j=e.dropZoneUIOnly,k=e.disableDropZone,y=e.disableMediaButtons,_=e.onError,E=e.onSelect,w=e.onCancel,S=e.onSelectURL,I=e.onDoubleClick,B=e.onFilesPreUpload,x=void 0===B?d.noop:B,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(l.useState)(""),L=Object(Me.a)(A,2),R=L[0],M=L[1],F=Object(l.useState)(!1),V=Object(Me.a)(F,2),H=V[0],z=V[1];Object(l.useEffect)((function(){var e;M(null!==(e=null==n?void 0:n.src)&&void 0!==e?e:"")}),[null==n?void 0:n.src]);var U=function(e){M(e.target.value)},G=function(){z(!0)},K=function(){z(!1)},W=function(e){e.preventDefault(),R&&S&&(S(R),K())},q=function(e){var t;if(x(e),h)if(O){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=a.instructions,i=a.title;if(D||S||(n=Object(C.__)("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,O=m&&"audio"===p,g=m&&"image"===p,h=m&&"video"===p;void 0===n&&D&&(n=Object(C.__)("Upload a media file or pick one from your media library."),O?n=Object(C.__)("Upload an audio file, pick one from your media library, or add one with a URL."):g?n=Object(C.__)("Upload an image file, pick one from your media library, or add one with a URL."):h&&(n=Object(C.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===i&&(i=Object(C.__)("Media"),O?i=Object(C.__)("Audio"):g?i=Object(C.__)("Image"):h&&(i=Object(C.__)("Video")))}var j=s()("block-editor-media-placeholder",o,{"is-appender":f});return Object(l.createElement)(v.Placeholder,{icon:c,label:i,instructions:n,className:j,notices:b,onClick:t,onDoubleClick:I,preview:u},e,N)},X=function(){return k?null:Object(l.createElement)(v.DropZone,{onFilesDrop:q,onHTMLDrop:T})},Q=function(){return w&&Object(l.createElement)(v.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(C.__)("Cancel"),isLink:!0,onClick:w},Object(C.__)("Cancel"))},Z=function(){return S&&Object(l.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(l.createElement)(v.Button,{className:"block-editor-media-placeholder__button",onClick:G,isPressed:H,isTertiary:!0},Object(C.__)("Insert from URL")),H&&Object(l.createElement)(yf,{src:R,onChange:U,onSubmit:W,onClose:K}))};return j||y?(j&&Ml()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{alternative:"disableMediaButtons"}),Object(l.createElement)(vf,null,X())):Object(l.createElement)(vf,{fallback:Y(Z())},function(){var e=Object(l.createElement)(mf,{addToGallery:O,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(l.createElement)(v.Button,{isTertiary:!0,onClick:function(e){e.stopPropagation(),t()}},Object(C.__)("Media Library"))}});if(D&&f)return Object(l.createElement)(l.Fragment,null,X(),Object(l.createElement)(v.FormFileUpload,{onChange:$,accept:p,multiple:h,render:function(t){var n=t.openFileDialog,r=Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.Button,{isPrimary:!0,className:s()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(C.__)("Upload")),e,Z(),Q());return Y(r,n)}}));if(D){var t=Object(l.createElement)(l.Fragment,null,X(),Object(l.createElement)(v.FormFileUpload,{isPrimary:!0,className:s()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:$,accept:p,multiple:h},Object(C.__)("Upload")),e,Z(),Q());return Y(t)}return Y(e)}())})),Ef=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(Yd,Object(i.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))}));Ef.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(l.createElement)(o,c,n)};var wf=Ef,Cf=Object(l.forwardRef)((function(e,t){var n=e.__experimentalVersion,r=Object(Fe.a)(e,["__experimentalVersion"]);if(2===n)return Object(l.createElement)(wf,Object(i.a)({ref:t},r));var o=r.className,c=r.onChange,a=Object(Fe.a)(r,["className","onChange"]);return Object(l.createElement)(Sl.a,Object(i.a)({ref:t,className:s()("block-editor-plain-text",o),onChange:function(e){return c(e.target.value)}},a))}));function Sf(e){var t=e.property,n=e.viewport,r=e.desc,o=Object(b.useInstanceId)(Sf),c=r||Object(C.sprintf)(
|
68 |
/* translators: 1: property name. 2: viewport name. */
|
69 |
+
Object(C._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(l.createElement)(l.Fragment,null,Object(l.createElement)("span",{"aria-describedby":"rbc-desc-".concat(o)},n.label),Object(l.createElement)(v.VisuallyHidden,{as:"span",id:"rbc-desc-".concat(o)},c))}var If=function(e){var t=e.title,n=e.property,r=e.toggleLabel,o=e.onIsResponsiveChange,c=e.renderDefaultControl,i=e.renderResponsiveControls,a=e.isResponsive,u=void 0!==a&&a,d=e.defaultLabel,b=void 0===d?{id:"all",
|
70 |
/* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
|
71 |
label:Object(C.__)("All")}:d,f=e.viewports,p=void 0===f?[{id:"small",label:Object(C.__)("Small screens")},{id:"medium",label:Object(C.__)("Medium screens")},{id:"large",label:Object(C.__)("Large screens")}]:f;if(!t||!n||!c)return null;var m=r||Object(C.sprintf)(
|
72 |
/* 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) */
|
73 |
+
Object(C.__)("Use the same %s on all screensizes."),n),O=Object(C.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),g=c(Object(l.createElement)(Sf,{property:n,viewport:b}),b);
|
74 |
+
/* translators: 'Help text for the responsive mode toggle control.' */return Object(l.createElement)("fieldset",{className:"block-editor-responsive-block-control"},Object(l.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),Object(l.createElement)("div",{className:"block-editor-responsive-block-control__inner"},Object(l.createElement)(v.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:m,checked:!u,onChange:o,help:O}),Object(l.createElement)("div",{className:s()("block-editor-responsive-block-control__group",{"is-responsive":u})},!u&&g,u&&(i?i(p):p.map((function(e){return Object(l.createElement)(l.Fragment,{key:e.id},c(Object(l.createElement)(Sf,{property:n,viewport:e}),e))}))))))};function Bf(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 xf(e){var t,n=e.name,r=e.shortcutType,o=e.shortcutCharacter,c=Object(Fe.a)(e,["name","shortcutType","shortcutCharacter"]),a="RichText.ToolbarControls";return n&&(a+=".".concat(n)),r&&o&&(t=Ht.displayShortcut[r](o)),Object(l.createElement)(v.Fill,{name:a},Object(l.createElement)(v.ToolbarButton,Object(i.a)({},c,{shortcut:t})))}var Pf=function(e){Object(Rn.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(Fn.a)(t);if(n){var o=Object(Fn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Mn.a)(this,e)});function o(){var e;return Object(Dn.a)(this,o),(e=r.apply(this,arguments)).onInput=e.onInput.bind(Object(Ln.a)(e)),e}return Object(An.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}(l.Component),Tf=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(l.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"})),Nf=Object(l.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(l.createElement)(v.Dropdown,{renderToggle:function(r){var o=r.isOpen,c=r.onToggle;return Object(l.createElement)(v.Button,Object(i.a)({},e,{ref:t,icon:n?Tf:gf.a,"aria-expanded":o,"aria-haspopup":"true",onClick:c
|
75 |
+
/* translators: button label text should, if possible, be under 16 characters. */,label:Object(C.__)("Modes")}))},position:"bottom right",renderContent:function(){return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.NavigableMenu,{role:"menu","aria-label":Object(C.__)("Modes")},Object(l.createElement)(v.MenuItemsChoice,{value:n?"select":"edit",onSelect:o,choices:[{value:"edit",label:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Dl.a,{icon:gf.a}),Object(C.__)("Edit"))},{value:"select",label:Object(l.createElement)(l.Fragment,null,Tf,Object(C.__)("Select"))}]})),Object(l.createElement)("div",{className:"block-editor-tool-selector__help"},Object(C.__)("Tools offer different interactions for block selection & editing. To select, press Escape, to go back to editing, press Enter.")))}})}));function Df(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)}))}(Oe("spacing.units")||[],e);return 0!==t.length&&t}(t);return Object(l.createElement)(v.__experimentalUnitControl,Object(i.a)({units:r},n))}var Af=n(186),Lf=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.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 Rf=function(e){Object(Rn.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(Fn.a)(t);if(n){var o=Object(Fn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Mn.a)(this,e)});function o(){var e;return Object(Dn.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(An.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(C.__)("Edit link"):Object(C.__)("Insert link");return Object(l.createElement)("div",{className:"block-editor-url-input__button"},Object(l.createElement)(v.Button,{icon:Af.a,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!t}),r&&Object(l.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},Object(l.createElement)("div",{className:"block-editor-url-input__button-modal-line"},Object(l.createElement)(v.Button,{className:"block-editor-url-input__back",icon:Lf,label:Object(C.__)("Close"),onClick:this.toggle}),Object(l.createElement)(Ub,{value:t||"",onChange:n}),Object(l.createElement)(v.Button,{icon:Ab.a,label:Object(C.__)("Submit"),type:"submit"}))))}}]),o}(l.Component),Mf=n(133),Ff=["noreferrer","noopener"],Vf=Object(l.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(l.createElement)(v.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(l.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(l.createElement)(v.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),Hf=function(e){var t=e.linkDestination,n=e.onChangeUrl,r=e.url,o=e.mediaType,c=void 0===o?"image":o,i=e.mediaUrl,a=e.mediaLink,u=e.linkTarget,s=e.linkClass,b=e.rel,f=Object(l.useState)(!1),p=Object(Me.a)(f,2),m=p[0],O=p[1],g=Object(l.useCallback)((function(){O(!0)})),h=Object(l.useState)(!1),j=Object(Me.a)(h,2),k=j[0],y=j[1],_=Object(l.useState)(null),E=Object(Me.a)(_,2),w=E[0],S=E[1],I=Object(l.useRef)(null),B=Object(l.useCallback)((function(){"media"!==t&&"attachment"!==t||S(""),y(!0)})),x=Object(l.useCallback)((function(){y(!1)})),P=Object(l.useCallback)((function(){S(null),x(),O(!1)})),T=function(e){var t=e;return void 0===e||Object(d.isEmpty)(t)||Object(d.isEmpty)(t)||(Object(d.each)(Ff,(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(l.useCallback)((function(){return function(e){var t=I.current;t&&t.contains(e.target)||(O(!1),S(null),x())}})),D=Object(l.useCallback)((function(){return function(e){w&&n({href:w}),x(),S(null),e.preventDefault()}})),A=Object(l.useCallback)((function(){n({linkDestination:"none",href:""})})),L=function(){var e=[{linkDestination:"media",title:Object(C.__)("Media File"),url:"image"===c?i:void 0,icon:Vf}];return"image"===c&&a&&e.push({linkDestination:"attachment",title:Object(C.__)("Attachment Page"),url:"image"===c?a:void 0,icon:Object(l.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(l.createElement)(v.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(l.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},R=Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.ToggleControl,{label:Object(C.__)("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"===u}),Object(l.createElement)(v.TextControl,{label:Object(C.__)("Link Rel"),value:T(b)||"",onChange:function(e){n({rel:e})}}),Object(l.createElement)(v.TextControl,{label:Object(C.__)("Link CSS Class"),value:s||"",onChange:function(e){n({linkClass:e})}})),M=null!==w?w:r,F=(Object(d.find)(L(),["linkDestination",t])||{}).title;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.ToolbarButton,{icon:Af.a,className:"components-toolbar__control",label:r?Object(C.__)("Edit link"):Object(C.__)("Insert link"),"aria-expanded":m,onClick:g}),m&&Object(l.createElement)(kf,{onFocusOutside:N(),onClose:P,renderSettings:function(){return R},additionalControls:!M&&Object(l.createElement)(v.NavigableMenu,null,Object(d.map)(L(),(function(e){return Object(l.createElement)(v.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:function(){var t,r,o;S(null),t=e.url,o=L(),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(l.createElement)(kf.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:M,onChangeInputValue:S,onSubmit:D(),autocompleteRef:I}),r&&!k&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(kf.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:r,onEditLinkClick:B,urlLabel:F}),Object(l.createElement)(v.Button,{icon:Mf.a,label:Object(C.__)("Remove link"),onClick:A}))))},zf=n(134);function Uf(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 a={className:s()(n,"block-editor-post-preview__dropdown-content"),position:"bottom left"},u={isTertiary:!0,className:"block-editor-post-preview__button-toggle",disabled:!o,
|
76 |
/* translators: button label text should, if possible, be under 16 characters. */
|
77 |
+
children:Object(C.__)("Preview")};return Object(l.createElement)(v.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:a,toggleProps:u,icon:null},(function(){return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Desktop")},icon:"Desktop"===c&&zf.a},Object(C.__)("Desktop")),Object(l.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Tablet")},icon:"Tablet"===c&&zf.a},Object(C.__)("Tablet")),Object(l.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Mobile")},icon:"Mobile"===c&&zf.a},Object(C.__)("Mobile"))),t)}))}var Gf=n(250),Kf=/\((min|max)-width:[^\(]*?\)/g;function Wf(e){return!!e.media&&!!e.media.mediaText.match(Kf)}function qf(e,t,n){e.deleteRule(n),e.insertRule(t,n)}function $f(e,t){return e.replace(Kf,(function(e){return Object(Gf.match)(e,{type:"screen",width:t})?"(min-width:0px)":"(min-width:999999px)"}))}function Yf(e,t){Object(l.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(mu.getProtocol)(e.href)===window.location.protocol&&Object(mu.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 a=n.cssRules[c];if((a.type===window.CSSRule.STYLE_RULE||a.type===window.CSSRule.MEDIA_RULE)&&(!o&&a.cssText.match(new RegExp("#start-".concat(e)))&&(o=!0),o&&a.cssText.match(new RegExp("#end-".concat(e)))&&(o=!1),o&&Wf(a))){var l=a.cssText;i[r]||(i[r]=[]),i[r][c]=l,qf(n,$f(l,t),c)}}})),function(){i.forEach((function(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];r&&qf(c[t],r,n)}}))}}}),[t])}function Xf(e){var t=Object(l.useState)(window.innerWidth),n=Object(Me.a)(t,2),r=n[0],o=n[1];Object(l.useEffect)((function(){if("Desktop"!==e){var t=function(){return o(window.innerWidth)};return window.addEventListener("resize",t),function(){window.removeEventListener("resize",t)}}}),[e]);var c=function(e){var t;switch(e){case"Tablet":t=780;break;case"Mobile":t=360;break;default:return null}return t<r?t:r};return Yf("resizable-editor-section",c(e)),function(e){var t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:c(e),margin:(window.innerHeight<800?36:72)+"px auto",flexGrow:0,height:t,minHeight:t,maxHeight:t,overflowY:"auto"};default:return null}}(e)}var Qf=Object(m.withSelect)((function(e){return{selectedBlockClientId:e("core/block-editor").getBlockSelectionStart()}}))((function(e){var t=e.selectedBlockClientId;return t&&Object(l.createElement)(v.Button,{isSecondary:!0,className:"block-editor-skip-to-selected-block",onClick:function(){at(t,document).focus()}},Object(C.__)("Skip to the selected block"))})),Zf=n(127),Jf=Object(m.withSelect)((function(e){return{blocks:(0,e("core/block-editor").getMultiSelectedBlocks)()}}))((function(e){var t=e.blocks,n=Object(Zf.count)(Object(p.serialize)(t),"words");return Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},Object(l.createElement)(Lr,{icon:ls,showColors:!0}),Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},Object(C.sprintf)(
|
78 |
/* translators: %d: number of blocks */
|
79 |
Object(C._n)("%d block","%d blocks",t.length),t.length)),Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},Object(C.sprintf)(
|
80 |
/* translators: %d: number of words */
|
|