Version Description
Download this release
Release Info
Developer | youknowriad |
Plugin | Gutenberg |
Version | 8.6.0 |
Comparing to | |
See all releases |
Code changes from version 8.5.1 to 8.6.0
- README.md +5 -4
- build/a11y/index.asset.php +0 -1
- build/a11y/index.min.asset.php +1 -0
- build/a11y/{index.js → index.min.js} +1 -1
- build/annotations/{index.asset.php → index.min.asset.php} +1 -1
- build/annotations/{index.js → index.min.js} +1 -1
- build/api-fetch/index.asset.php +0 -1
- build/api-fetch/index.js +0 -1
- build/api-fetch/index.min.asset.php +1 -0
- build/api-fetch/index.min.js +1 -0
- build/autop/index.js +0 -1
- build/autop/{index.asset.php → index.min.asset.php} +1 -1
- build/autop/index.min.js +1 -0
- build/blob/{index.asset.php → index.min.asset.php} +1 -1
- build/blob/{index.js → index.min.js} +1 -1
- build/block-directory/{index.asset.php → index.min.asset.php} +1 -1
- build/block-directory/{index.js → index.min.js} +6 -6
- build/block-editor/index.asset.php +0 -1
- build/block-editor/index.js +0 -78
- build/block-editor/index.min.asset.php +1 -0
- build/block-editor/index.min.js +78 -0
- build/block-editor/style-rtl.css +0 -1
README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
# Gutenberg
|
|
|
2 |
[![Build Status](https://img.shields.io/travis/com/WordPress/gutenberg/master.svg)](https://travis-ci.com/WordPress/gutenberg)
|
3 |
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org)
|
4 |
|
@@ -18,17 +19,17 @@ Get hands on: check out the [block editor live demo](https://wordpress.org/guten
|
|
18 |
|
19 |
### Using Gutenberg
|
20 |
|
21 |
-
-
|
22 |
|
23 |
-
-
|
24 |
|
25 |
-
-
|
26 |
|
27 |
### Developing for Gutenberg
|
28 |
|
29 |
Extending and customizing is at the heart of the WordPress platform, this is no different for the Gutenberg project. The editor and future products can be extended by third-party developers using plugins.
|
30 |
|
31 |
-
|
32 |
|
33 |
### Contribute to Gutenberg
|
34 |
|
1 |
# Gutenberg
|
2 |
+
|
3 |
[![Build Status](https://img.shields.io/travis/com/WordPress/gutenberg/master.svg)](https://travis-ci.com/WordPress/gutenberg)
|
4 |
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org)
|
5 |
|
19 |
|
20 |
### Using Gutenberg
|
21 |
|
22 |
+
- **Download:** To use the latest release of the Gutenberg plugin on your WordPress site: install from the plugins page in wp-admin, or [download from the WordPress.org plugins repository](https://wordpress.org/plugins/gutenberg/).
|
23 |
|
24 |
+
- **User Documentation:** See the [WordPress Editor documentation](https://wordpress.org/support/article/wordpress-editor/) for detailed docs on using the editor as an author creating posts and pages.
|
25 |
|
26 |
+
- **User Support:** If you have run into an issue, you should check the [Support Forums first](https://wordpress.org/support/forums/). The forums are a great place to get help. If you have a bug to report, please [submit it to the Gutenberg repository](https://github.com/wordpress/gutenberg/issues). Please search prior to creating a new bug to confirm its not a duplicate.
|
27 |
|
28 |
### Developing for Gutenberg
|
29 |
|
30 |
Extending and customizing is at the heart of the WordPress platform, this is no different for the Gutenberg project. The editor and future products can be extended by third-party developers using plugins.
|
31 |
|
32 |
+
Review the [Create a Block tutorial](/docs/designers-developers/developers/tutorials/create-block/readme.md) for the fastest way to get started extending the block editor. See the [Developer Documentation](https://developer.wordpress.org/block-editor/developers/) for extensive tutorials, documentation, and API references.
|
33 |
|
34 |
### Contribute to Gutenberg
|
35 |
|
build/a11y/index.asset.php
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'bc2435a1e24a54c0b3148751f3ce3dde');
|
|
build/a11y/index.min.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '788ce771194bac3544249cd1d537ec31');
|
build/a11y/{index.js → index.min.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
this.wp=this.wp||{},this.wp.a11y=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=
|
1 |
+
this.wp=this.wp||{},this.wp.a11y=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=424)}({1:function(t,e){!function(){t.exports=this.wp.i18n}()},253:function(t,e){!function(){t.exports=this.wp.domReady}()},424:function(t,e,n){"use strict";n.r(e),n.d(e,"setup",(function(){return p})),n.d(e,"speak",(function(){return d}));var r=n(253),i=n.n(r),o=n(1);function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"polite",e=document.createElement("div");e.id="a11y-speak-".concat(t),e.className="a11y-speak-region",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("aria-live",t),e.setAttribute("aria-relevant","additions text"),e.setAttribute("aria-atomic","true");var n=document,r=n.body;return r&&r.appendChild(e),e}var u="";function p(){var t=document.getElementById("a11y-speak-intro-text"),e=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");null===t&&function(){var t=document.createElement("p");t.id="a11y-speak-intro-text",t.className="a11y-speak-intro-text",t.textContent=Object(o.__)("Notifications"),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("hidden","hidden");var e=document.body;e&&e.appendChild(t)}(),null===e&&a("assertive"),null===n&&a("polite")}function d(t,e){!function(){for(var t=document.getElementsByClassName("a11y-speak-region"),e=document.getElementById("a11y-speak-intro-text"),n=0;n<t.length;n++)t[n].textContent="";e&&e.setAttribute("hidden","hidden")}(),t=function(t){return t=t.replace(/<[^<>]+>/g," "),u===t&&(t+=" "),u=t,t}(t);var n=document.getElementById("a11y-speak-intro-text"),r=document.getElementById("a11y-speak-assertive"),i=document.getElementById("a11y-speak-polite");r&&"assertive"===e?r.textContent=t:i&&(i.textContent=t),n&&n.removeAttribute("hidden")}i()(p)}});
|
build/annotations/{index.asset.php → index.min.asset.php}
RENAMED
@@ -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' => '904da23b9476a63e6e2dceb8c53a98ea');
|
build/annotations/{index.js → index.min.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
this.wp=this.wp||{},this.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=396)}({1:function(t,n){!function(){t.exports=this.wp.i18n}()},14:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var r=e(41);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(27);var o=e(35),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.")}()}},183: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=[],u=0;u<256;++u)i[u]=(u+256).toString(16).substr(1);var c=function(t,n){var e=n||0,r=i;return[r[t[e++]],r[t[e++]],r[t[e++]],r[t[e++]],"-",r[t[e++]],r[t[e++]],"-",r[t[e++]],r[t[e++]],"-",r[t[e++]],r[t[e++]],"-",r[t[e++]],r[t[e++]],r[t[e++]],r[t[e++]],r[t[e++]],r[t[e++]]].join("")};n.a=function(t,n,e){var r=n&&e||0;"string"==typeof t&&(n="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||a)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,n)for(var i=0;i<16;++i)n[r+i]=o[i];return n||c(o)}},2:function(t,n){!function(){t.exports=this.lodash}()},25:function(t,n){!function(){t.exports=this.wp.richText}()},27: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(27);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(e):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Object(r.a)(t,n):void 0}}},32:function(t,n){!function(){t.exports=this.wp.hooks}()},35: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}))},396:function(t,n,e){"use strict";e.r(n);var r={};e.r(r),e.d(r,"__experimentalGetAnnotationsForBlock",(function(){return m})),e.d(r,"__experimentalGetAllAnnotationsForBlock",(function(){return g})),e.d(r,"__experimentalGetAnnotationsForRichText",(function(){return h})),e.d(r,"__experimentalGetAnnotations",(function(){return j}));var o={};e.r(o),e.d(o,"__experimentalAddAnnotation",(function(){return x})),e.d(o,"__experimentalRemoveAnnotation",(function(){return _})),e.d(o,"__experimentalUpdateAnnotationRange",(function(){return w})),e.d(o,"__experimentalRemoveAnnotationsBySource",(function(){return N}));var a=e(4),i=e(16),u=e(5),c=e(2);function l(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 f(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?l(Object(e),!0).forEach((function(n){Object(u.a)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):l(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function s(t,n){var e=t.filter(n);return t.length===e.length?t:e}function d(t){return Object(c.isNumber)(t.start)&&Object(c.isNumber)(t.end)&&t.start<=t.end}var p=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&&!d(o.range))return n;var a=null!==(t=null==n?void 0:n[r])&&void 0!==t?t:[];return f({},n,Object(u.a)({},r,[].concat(Object(i.a)(a),[o])));case"ANNOTATION_REMOVE":return Object(c.mapValues)(n,(function(t){return s(t,(function(t){return t.id!==e.annotationId}))}));case"ANNOTATION_UPDATE_RANGE":return Object(c.mapValues)(n,(function(t){var n=!1,r=t.map((function(t){return t.id===e.annotationId?(n=!0,f({},t,{range:{start:e.start,end:e.end}})):t}));return n?r:t}));case"ANNOTATION_REMOVE_SOURCE":return Object(c.mapValues)(n,(function(t){return s(t,(function(t){return t.source!==e.source}))}))}return n},v=e(14),b=e(44);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}var y=[],m=Object(b.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:y]}));function g(t,n){var e;return null!==(e=null==t?void 0:t[n])&&void 0!==e?e:y}var h=Object(b.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){return function(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(u.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}({},t.range,{},Object(v.a)(t,["range"]))}))}),(function(t,n){var e;return[null!==(e=null==t?void 0:t[n])&&void 0!==e?e:y]}));function j(t){return Object(c.flatMap)(t,(function(t){return t}))}var A=e(183);function x(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(A.a)():f,blockClientId:n,richTextIdentifier:r,source:l,selector:u};return"range"===u&&(s.range=a),s}function _(t){return{type:"ANNOTATION_REMOVE",annotationId:t}}function w(t,n,e){return{type:"ANNOTATION_UPDATE_RANGE",annotationId:t,start:n,end:e}}function N(t){return{type:"ANNOTATION_REMOVE_SOURCE",source:t}}Object(a.registerStore)("core/annotations",{reducer:p,selectors:r,actions:o});var T=e(25),P=e(1);var E={name:"core/annotation",title:Object(P.__)("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(T.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})}}},I=E.name,R=Object(v.a)(E,["name"]);Object(T.registerFormatType)(I,R);var S=e(32);Object(S.addFilter)("editor.BlockListBlock","core/annotations",(function(t){return Object(a.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)}))},4:function(t,n){!function(){t.exports=this.wp.data}()},41: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}))},44: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(o=t[n],!(c=o)||"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}},5: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 |
+
this.wp=this.wp||{},this.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=417)}({1:function(t,n){!function(){t.exports=this.wp.i18n}()},14:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var r=e(41);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(27);var o=e(35),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.")}()}},192: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=[],u=0;u<256;++u)i[u]=(u+256).toString(16).substr(1);var c=function(t,n){var e=n||0,r=i;return[r[t[e++]],r[t[e++]],r[t[e++]],r[t[e++]],"-",r[t[e++]],r[t[e++]],"-",r[t[e++]],r[t[e++]],"-",r[t[e++]],r[t[e++]],"-",r[t[e++]],r[t[e++]],r[t[e++]],r[t[e++]],r[t[e++]],r[t[e++]]].join("")};n.a=function(t,n,e){var r=n&&e||0;"string"==typeof t&&(n="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||a)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,n)for(var i=0;i<16;++i)n[r+i]=o[i];return n||c(o)}},2:function(t,n){!function(){t.exports=this.lodash}()},26:function(t,n){!function(){t.exports=this.wp.richText}()},27: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(27);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(e):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Object(r.a)(t,n):void 0}}},32:function(t,n){!function(){t.exports=this.wp.hooks}()},35: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}))},4:function(t,n){!function(){t.exports=this.wp.data}()},41: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}))},417:function(t,n,e){"use strict";e.r(n);var r={};e.r(r),e.d(r,"__experimentalGetAnnotationsForBlock",(function(){return m})),e.d(r,"__experimentalGetAllAnnotationsForBlock",(function(){return g})),e.d(r,"__experimentalGetAnnotationsForRichText",(function(){return h})),e.d(r,"__experimentalGetAnnotations",(function(){return j}));var o={};e.r(o),e.d(o,"__experimentalAddAnnotation",(function(){return x})),e.d(o,"__experimentalRemoveAnnotation",(function(){return _})),e.d(o,"__experimentalUpdateAnnotationRange",(function(){return w})),e.d(o,"__experimentalRemoveAnnotationsBySource",(function(){return N}));var a=e(4),i=e(17),u=e(5),c=e(2);function l(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 f(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?l(Object(e),!0).forEach((function(n){Object(u.a)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):l(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function s(t,n){var e=t.filter(n);return t.length===e.length?t:e}function d(t){return Object(c.isNumber)(t.start)&&Object(c.isNumber)(t.end)&&t.start<=t.end}var p=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&&!d(o.range))return n;var a=null!==(t=null==n?void 0:n[r])&&void 0!==t?t:[];return f({},n,Object(u.a)({},r,[].concat(Object(i.a)(a),[o])));case"ANNOTATION_REMOVE":return Object(c.mapValues)(n,(function(t){return s(t,(function(t){return t.id!==e.annotationId}))}));case"ANNOTATION_UPDATE_RANGE":return Object(c.mapValues)(n,(function(t){var n=!1,r=t.map((function(t){return t.id===e.annotationId?(n=!0,f({},t,{range:{start:e.start,end:e.end}})):t}));return n?r:t}));case"ANNOTATION_REMOVE_SOURCE":return Object(c.mapValues)(n,(function(t){return s(t,(function(t){return t.source!==e.source}))}))}return n},v=e(14),b=e(44);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}var y=[],m=Object(b.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:y]}));function g(t,n){var e;return null!==(e=null==t?void 0:t[n])&&void 0!==e?e:y}var h=Object(b.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){return function(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(u.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}({},t.range,{},Object(v.a)(t,["range"]))}))}),(function(t,n){var e;return[null!==(e=null==t?void 0:t[n])&&void 0!==e?e:y]}));function j(t){return Object(c.flatMap)(t,(function(t){return t}))}var A=e(192);function x(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(A.a)():f,blockClientId:n,richTextIdentifier:r,source:l,selector:u};return"range"===u&&(s.range=a),s}function _(t){return{type:"ANNOTATION_REMOVE",annotationId:t}}function w(t,n,e){return{type:"ANNOTATION_UPDATE_RANGE",annotationId:t,start:n,end:e}}function N(t){return{type:"ANNOTATION_REMOVE_SOURCE",source:t}}Object(a.registerStore)("core/annotations",{reducer:p,selectors:r,actions:o});var T=e(26),P=e(1);var E={name:"core/annotation",title:Object(P.__)("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(T.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})}}},I=E.name,R=Object(v.a)(E,["name"]);Object(T.registerFormatType)(I,R);var S=e(32);Object(S.addFilter)("editor.BlockListBlock","core/annotations",(function(t){return Object(a.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)}))},44: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(o=t[n],!(c=o)||"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}},5: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
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'd784eded836f915ff9c8eb39c3cdf2ac');
|
|
build/api-fetch/index.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
this.wp=this.wp||{},this.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=394)}({1:function(e,t){!function(){e.exports=this.wp.i18n}()},14:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(41);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}},22:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},28:function(e,t){!function(){e.exports=this.wp.url}()},394:function(e,t,r){"use strict";r.r(t);var n=r(5),o=r(14),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 a(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}var u=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())return r(e);return r(a({},e,{headers:a({},o,{"X-WP-Nonce":t.nonce})}))}return t.nonce=e,t};function s(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}var p=function(e,t){var r,o,c=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(r=e.namespace.replace(/^\/|\/$/g,""),c=(o=e.endpoint.replace(/^\//,""))?r+"/"+o:r),delete e.namespace,delete e.endpoint,t(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{path:c}))};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}var l=function(e){return function(t,r){return p(t,(function(t){var o,c=t.url,i=t.path;return"string"==typeof i&&(o=e,-1!==e.indexOf("?")&&(i=i.replace("?","&")),i=i.replace(/^\//,""),"string"==typeof o&&-1!==o.indexOf("?")&&(i=i.replace("?","&")),c=o+i),r(function(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}({},t,{url:c}))}))}};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=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(o&&"GET"===c&&t[i])return Promise.resolve(t[i].body);if("OPTIONS"===c&&t[c]&&t[c][i])return Promise.resolve(t[c][i])}return r(e)}},d=r(22),j=r.n(d),y=r(43),h=r(28);function v(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 g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var P=function(e){return e.json?e.json():Promise.reject(e)},w=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},m=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},x=function(){var e=Object(y.a)(j.a.mark((function e(t,r){var n,c,i,a,u,s;return j.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(m(t)){e.next=4;break}return e.abrupt("return",r(t));case 4:return e.next=6,F(g({},(f={per_page:100},l=void 0,O=void 0,l=(p=t).path,O=p.url,g({},Object(o.a)(p,["path","url"]),{url:O&&Object(h.addQueryArgs)(O,f),path:l&&Object(h.addQueryArgs)(l,f)})),{parse:!1}));case 6:return n=e.sent,e.next=9,P(n);case 9:if(c=e.sent,Array.isArray(c)){e.next=12;break}return e.abrupt("return",c);case 12:if(i=w(n)){e.next=15;break}return e.abrupt("return",c);case 15:a=[].concat(c);case 16:if(!i){e.next=27;break}return e.next=19,F(g({},t,{path:void 0,url:i,parse:!1}));case 19:return u=e.sent,e.next=22,P(u);case 22:s=e.sent,a=a.concat(s),i=w(u),e.next=16;break;case 27:return e.abrupt("return",a);case 28:case"end":return e.stop()}var p,f,l,O}),e)})));return function(t,r){return e.apply(this,arguments)}}();function D(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 _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?D(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var S=new Set(["PATCH","PUT","DELETE"]);var E=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},k=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}))},T=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(E(e,t)).catch((function(e){return A(e,t)}))};function A(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return k(e).then((function(e){var t={code:"unknown_error",message:Object(c.__)("An unknown error occurred.")};throw e||t}))}function M(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}var C=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(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},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)})):A(n,e.parse)})).then((function(t){return T(t,e.parse)}))};function Q(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?Q(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var L={Accept:"application/json, */*;q=0.1"},U={credentials:"include"},G=[function(e,t){return"string"!=typeof e.url||Object(h.hasQueryArg)(e.url,"_locale")||(e.url=Object(h.addQueryArgs)(e.url,{_locale:"user"})),"string"!=typeof e.path||Object(h.hasQueryArg)(e.path,"_locale")||(e.path=Object(h.addQueryArgs)(e.path,{_locale:"user"})),t(e,t)},p,function(e,t){var r=e.method,n=void 0===r?"GET":r;return S.has(n.toUpperCase())&&(e=_({},e,{headers:_({},e.headers,{"X-HTTP-Method-Override":n,"Content-Type":"application/json"}),method:"POST"})),t(e,t)},x];var H=function(e){if(e.status>=200&&e.status<300)return e;throw e},I=function(e){var t=e.url,r=e.path,n=e.data,i=e.parse,a=void 0===i||i,u=Object(o.a)(e,["url","path","data","parse"]),s=e.body,p=e.headers;return p=N({},L,{},p),n&&(s=JSON.stringify(n),p["Content-Type"]="application/json"),window.fetch(t||r,N({},U,{},u,{body:s,headers:p})).then((function(e){return Promise.resolve(e).then(H).catch((function(e){return A(e,a)})).then((function(e){return T(e,a)}))}),(function(){throw{code:"fetch_error",message:Object(c.__)("You are probably offline.")}}))};function R(e){var t=[].concat(G,[I]);return new Promise((function(r,n){(function e(r){return function(n){var o=t[r];return r===t.length-1?o(n):o(n,e(r+1))}})(0)(e).then(r).catch((function(t){if("rest_cookie_invalid_nonce"!==t.code)return n(t);window.fetch(R.nonceEndpoint).then(H).then((function(e){return e.text()})).then((function(t){R.nonceMiddleware.nonce=t,R(e).then(r).catch(n)})).catch(n)}))}))}R.use=function(e){G.unshift(e)},R.setFetchHandler=function(e){I=e},R.createNonceMiddleware=u,R.createPreloadingMiddleware=b,R.createRootURLMiddleware=l,R.fetchAllMiddleware=x,R.mediaUploadMiddleware=C;var F=t.default=R},41: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}))},43:function(e,t,r){"use strict";function n(e,t,r,n,o,c,i){try{var a=e[c](i),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).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 a(e){n(i,o,c,a,u,"next",e)}function u(e){n(i,o,c,a,u,"throw",e)}a(void 0)}))}}r.d(t,"a",(function(){return o}))},5:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))}}).default;
|
|
build/api-fetch/index.min.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'c4b35d19ac9429999d6396be3ffc2895');
|
build/api-fetch/index.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
this.wp=this.wp||{},this.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=415)}({1:function(e,t){!function(){e.exports=this.wp.i18n}()},14:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(41);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}},20:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},28:function(e,t){!function(){e.exports=this.wp.url}()},41: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}))},415:function(e,t,r){"use strict";r.r(t);var n=r(5),o=r(14),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 a(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}var u=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())return r(e);return r(a({},e,{headers:a({},o,{"X-WP-Nonce":t.nonce})}))}return t.nonce=e,t};function s(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}var p=function(e,t){var r,o,c=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(r=e.namespace.replace(/^\/|\/$/g,""),c=(o=e.endpoint.replace(/^\//,""))?r+"/"+o:r),delete e.namespace,delete e.endpoint,t(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{path:c}))};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}var l=function(e){return function(t,r){return p(t,(function(t){var o,c=t.url,i=t.path;return"string"==typeof i&&(o=e,-1!==e.indexOf("?")&&(i=i.replace("?","&")),i=i.replace(/^\//,""),"string"==typeof o&&-1!==o.indexOf("?")&&(i=i.replace("?","&")),c=o+i),r(function(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}({},t,{url:c}))}))}};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=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])return Promise.resolve(o?t[i].body:new window.Response(JSON.stringify(t[i].body),{status:200,statusText:"OK",headers:t[i].headers}));if("OPTIONS"===c&&t[c]&&t[c][i])return Promise.resolve(t[c][i])}return r(e)}},d=r(20),j=r.n(d),y=r(43),h=r(28);function v(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 g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(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)},P=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},m=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},x=function(){var e=Object(y.a)(j.a.mark((function e(t,r){var n,c,i,a,u,s;return j.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(m(t)){e.next=4;break}return e.abrupt("return",r(t));case 4:return e.next=6,J(g({},(f={per_page:100},l=void 0,O=void 0,l=(p=t).path,O=p.url,g({},Object(o.a)(p,["path","url"]),{url:O&&Object(h.addQueryArgs)(O,f),path:l&&Object(h.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=P(n)){e.next=15;break}return e.abrupt("return",c);case 15:a=[].concat(c);case 16:if(!i){e.next=27;break}return e.next=19,J(g({},t,{path:void 0,url:i,parse:!1}));case 19:return u=e.sent,e.next=22,w(u);case 22:s=e.sent,a=a.concat(s),i=P(u),e.next=16;break;case 27:return e.abrupt("return",a);case 28:case"end":return e.stop()}var p,f,l,O}),e)})));return function(t,r){return e.apply(this,arguments)}}();function D(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?D(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var _=new Set(["PATCH","PUT","DELETE"]);var E=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},k=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}))},T=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(E(e,t)).catch((function(e){return A(e,t)}))};function A(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return k(e).then((function(e){var t={code:"unknown_error",message:Object(c.__)("An unknown error occurred.")};throw e||t}))}function M(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}var C=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(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},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)})):A(n,e.parse)})).then((function(t){return T(t,e.parse)}))};function N(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 Q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var L={Accept:"application/json, */*;q=0.1"},R={credentials:"include"},U=[function(e,t){return"string"!=typeof e.url||Object(h.hasQueryArg)(e.url,"_locale")||(e.url=Object(h.addQueryArgs)(e.url,{_locale:"user"})),"string"!=typeof e.path||Object(h.hasQueryArg)(e.path,"_locale")||(e.path=Object(h.addQueryArgs)(e.path,{_locale:"user"})),t(e,t)},p,function(e,t){var r=e.method,n=void 0===r?"GET":r;return _.has(n.toUpperCase())&&(e=S({},e,{headers:S({},e.headers,{"X-HTTP-Method-Override":n,"Content-Type":"application/json"}),method:"POST"})),t(e,t)},x];var G=function(e){if(e.status>=200&&e.status<300)return e;throw e},H=function(e){var t=e.url,r=e.path,n=e.data,i=e.parse,a=void 0===i||i,u=Object(o.a)(e,["url","path","data","parse"]),s=e.body,p=e.headers;return p=Q({},L,{},p),n&&(s=JSON.stringify(n),p["Content-Type"]="application/json"),window.fetch(t||r,Q({},R,{},u,{body:s,headers:p})).then((function(e){return Promise.resolve(e).then(G).catch((function(e){return A(e,a)})).then((function(e){return T(e,a)}))}),(function(){throw{code:"fetch_error",message:Object(c.__)("You are probably offline.")}}))};function I(e){var t=[].concat(U,[H]);return new Promise((function(r,n){(function e(r){return function(n){var o=t[r];return r===t.length-1?o(n):o(n,e(r+1))}})(0)(e).then(r).catch((function(t){if("rest_cookie_invalid_nonce"!==t.code)return n(t);window.fetch(I.nonceEndpoint).then(G).then((function(e){return e.text()})).then((function(t){I.nonceMiddleware.nonce=t,I(e).then(r).catch(n)})).catch(n)}))}))}I.use=function(e){U.unshift(e)},I.setFetchHandler=function(e){H=e},I.createNonceMiddleware=u,I.createPreloadingMiddleware=b,I.createRootURLMiddleware=l,I.fetchAllMiddleware=x,I.mediaUploadMiddleware=C;var J=t.default=I},43:function(e,t,r){"use strict";function n(e,t,r,n,o,c,i){try{var a=e[c](i),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).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 a(e){n(i,o,c,a,u,"next",e)}function u(e){n(i,o,c,a,u,"throw",e)}a(void 0)}))}}r.d(t,"a",(function(){return o}))},5:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))}}).default;
|
build/autop/index.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
this.wp=this.wp||{},this.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=262)}({12:function(e,r,n){"use strict";n.d(r,"a",(function(){return a}));var t=n(36);var p=n(29),c=n(37);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,i=e[Symbol.iterator]();!(t=(a=i.next()).done)&&(n.push(a.value),!r||n.length!==r);t=!0);}catch(e){p=!0,c=e}finally{try{t||null==i.return||i.return()}finally{if(p)throw c}}return n}}(e,r)||Object(p.a)(e,r)||Object(c.a)()}},262:function(e,r,n){"use strict";n.r(r),n.d(r,"autop",(function(){return a})),n.d(r,"removep",(function(){return i}));var t=n(12),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 i=0;i<c.length;i++){var o=c[i];if(-1!==n[a].indexOf(o)){n[a]=n[a].replace(new RegExp(o,"g"),r[o]),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 i=0;i<p.length;i++){var o=p[i],l=o.indexOf("<pre");if(-1!==l){var u="<pre wp-pre-tag-"+i+"></pre>";n.push([u,o.substr(l)+"</pre>"]),e+=o.substr(0,l)+u}else e+=o}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 i(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):""}},27: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}))},29:function(e,r,n){"use strict";n.d(r,"a",(function(){return p}));var t=n(27);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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(t.a)(e,r):void 0}}},36:function(e,r,n){"use strict";function t(e){if(Array.isArray(e))return e}n.d(r,"a",(function(){return t}))},37: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}))}});
|
|
build/autop/{index.asset.php → index.min.asset.php}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '0a17b4ae9dd2a15176f61688e5be048a');
|
build/autop/index.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
this.wp=this.wp||{},this.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=276)}({12:function(e,r,n){"use strict";n.d(r,"a",(function(){return a}));var t=n(36);var p=n(29),c=n(37);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,i=e[Symbol.iterator]();!(t=(a=i.next()).done)&&(n.push(a.value),!r||n.length!==r);t=!0);}catch(e){p=!0,c=e}finally{try{t||null==i.return||i.return()}finally{if(p)throw c}}return n}}(e,r)||Object(p.a)(e,r)||Object(c.a)()}},27: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}))},276:function(e,r,n){"use strict";n.r(r),n.d(r,"autop",(function(){return a})),n.d(r,"removep",(function(){return i}));var t=n(12),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 i=0;i<c.length;i++){var o=c[i];if(-1!==n[a].indexOf(o)){n[a]=n[a].replace(new RegExp(o,"g"),r[o]),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 i=0;i<p.length;i++){var o=p[i],l=o.indexOf("<pre");if(-1!==l){var u="<pre wp-pre-tag-"+i+"></pre>";n.push([u,o.substr(l)+"</pre>"]),e+=o.substr(0,l)+u}else e+=o}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 i(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):""}},29:function(e,r,n){"use strict";n.d(r,"a",(function(){return p}));var t=n(27);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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(t.a)(e,r):void 0}}},36:function(e,r,n){"use strict";function t(e){if(Array.isArray(e))return e}n.d(r,"a",(function(){return t}))},37: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}))}});
|
build/blob/{index.asset.php → index.min.asset.php}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '5fc7889ae102cc60466b2a346038940c');
|
build/blob/{index.js → index.min.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
this.wp=this.wp||{},this.wp.blob=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=
|
1 |
+
this.wp=this.wp||{},this.wp.blob=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=277)}({277:function(e,t,n){"use strict";n.r(t),n.d(t,"createBlobURL",(function(){return f})),n.d(t,"getBlobByURL",(function(){return c})),n.d(t,"revokeBlobURL",(function(){return l})),n.d(t,"isBlobURL",(function(){return d}));var r=window.URL,o=r.createObjectURL,u=r.revokeObjectURL,i={};function f(e){var t=o(e);return i[t]=e,t}function c(e){return i[e]}function l(e){i[e]&&u(e),delete i[e]}function d(e){return!(!e||!e.indexOf)&&0===e.indexOf("blob:")}}});
|
build/block-directory/{index.asset.php → index.min.asset.php}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'bfbfe09468096b77ac2b9048c8facf3b');
|
build/block-directory/{index.js → index.min.js}
RENAMED
@@ -1,19 +1,19 @@
|
|
1 |
-
this.wp=this.wp||{},this.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){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},11:function(e,t){!function(){e.exports=this.wp.blocks}()},12:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(36);var c=n(29),o=n(37);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,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(c)throw o}}return n}}(e,t)||Object(c.a)(e,t)||Object(o.a)()}},120:function(e,t,n){"use strict";var r=n(5),c=n(14),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,l=void 0===n?24:n,i=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:l,height:l},i))}},14:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(41);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}},16:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(27);var c=n(35),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.")}()}},166: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},167: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){!function(){e.exports=this.lodash}()},22:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},241:function(e,t){!function(){e.exports=this.wp.editPost}()},264: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},27: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}))},28:function(e,t){!function(){e.exports=this.wp.url}()},29:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(27);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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},3:function(e,t){!function(){e.exports=this.wp.components}()},34:function(e,t){!function(){e.exports=this.wp.dataControls}()},35: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}))},36:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},37: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);var r={};n.r(r),n.d(r,"isRequestingDownloadableBlocks",(function(){return O})),n.d(r,"getDownloadableBlocks",(function(){return p})),n.d(r,"getInstalledBlockTypes",(function(){return m})),n.d(r,"getNewBlockTypes",(function(){return j})),n.d(r,"getUnusedBlockTypes",(function(){return y})),n.d(r,"isInstalling",(function(){return h})),n.d(r,"getErrorNotices",(function(){return k})),n.d(r,"getErrorNoticeForBlock",(function(){return g}));var c={};n.r(c),n.d(c,"fetchDownloadableBlocks",(function(){return D})),n.d(c,"receiveDownloadableBlocks",(function(){return L})),n.d(c,"installBlockType",(function(){return C})),n.d(c,"uninstallBlockType",(function(){return A})),n.d(c,"addInstalledBlockType",(function(){return R})),n.d(c,"removeInstalledBlockType",(function(){return M})),n.d(c,"setIsInstalling",(function(){return F})),n.d(c,"setErrorNotice",(function(){return z})),n.d(c,"clearErrorNotice",(function(){return V}));n(69);var o=n(5),a=n(4),l=n(34),i=n(16),s=n(2);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 b(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(o.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 d=Object(a.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 b({},e,Object(o.a)({},t.filterValue,{isRequesting:!0}));case"RECEIVE_DOWNLOADABLE_BLOCKS":return b({},e,Object(o.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 b({},e,{installedBlockTypes:[].concat(Object(i.a)(e.installedBlockTypes),[t.item])});case"REMOVE_INSTALLED_BLOCK_TYPE":return b({},e,{installedBlockTypes:e.installedBlockTypes.filter((function(e){return e.name!==t.item.name}))});case"SET_INSTALLING_BLOCK":return b({},e,{isInstalling:b({},e.isInstalling,Object(o.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 b({},e,Object(o.a)({},t.blockId,{message:t.message,isFatal:t.isFatal}));case"CLEAR_ERROR_NOTICE":return Object(s.omit)(e,t.blockId)}return e}});function f(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(f(e,t[n].innerBlocks))return!0;return!1}function O(e,t){return!(!e.downloadableBlocks[t]||!e.downloadableBlocks[t].isRequesting)&&e.downloadableBlocks[t].isRequesting}function p(e,t){return e.downloadableBlocks[t]&&e.downloadableBlocks[t].results?e.downloadableBlocks[t].results:[]}function m(e){return e.blockManagement.installedBlockTypes}var j=Object(a.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks(),r=m(t),c=[];return r.forEach((function(e){f(e,n)&&c.push(e)})),c}})),y=Object(a.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks(),r=m(t),c=[];return r.forEach((function(e){f(e,n)||c.push(e)})),c}}));function h(e,t){return e.blockManagement.isInstalling[t]||!1}function k(e){return e.errorNotices}function g(e,t){return e.errorNotices[t]}var v=n(22),w=n.n(v),E=n(1),_=n(28);function P(e){return{type:"LOAD_ASSETS",assets:e}}var S={LOAD_ASSETS:function(e){var t=e.assets.map((function(e){return null!==Object(_.getPath)(e).match(/\.js$/)?function(e){return e&&/\.js$/.test(Object(_.getPath)(e))?new Promise((function(t,n){var r=document.querySelector('script[src="'.concat(e,'"]'));r&&r.parentNode.removeChild(r);var c=document.createElement("script");c.src=e,c.onload=function(){return t(!0)},c.onerror=function(){return n(new Error("Error loading script."))},document.body.appendChild(c)})):Promise.reject(new Error("No script found."))}(e):function(e){return e&&/\.css$/.test(Object(_.getPath)(e))?new Promise((function(t,n){var r=document.createElement("link");r.rel="stylesheet",r.href=e,r.onload=function(){return t(!0)},r.onerror=function(){return n(new Error("Error loading style."))},document.body.appendChild(r)})):Promise.reject(new Error("No style found."))}(e)}));return Promise.all(t)}};function B(e){if(!e)return!1;var t=e.links["wp:plugin"]||e.links.self;return!(!t||!t.length)&&t[0].href}var N=w.a.mark(C),x=w.a.mark(A);function T(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 I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){Object(o.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function L(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}function C(e){var t,n,r,c,o,a,i,s,u,b;return w.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.id,n=e.assets,r=!1,d.next=4,V(t);case 4:if(d.prev=4,Array.isArray(n)&&n.length){d.next=7;break}throw new Error(Object(E.__)("Block has no assets."));case 7:return d.next=9,F(e.id,!0);case 9:if(c=B(e),o={},!c){d.next=16;break}return d.next=14,Object(l.apiFetch)({url:c,data:{status:"active"},method:"PUT"});case 14:d.next=20;break;case 16:return d.next=18,Object(l.apiFetch)({path:"wp/v2/plugins",data:{slug:e.id,status:"active"},method:"POST"});case 18:a=d.sent,o=a._links;case 20:return d.next=22,R(I({},e,{links:I({},e.links,{},o)}));case 22:return d.next=24,P(n);case 24:return d.next=26,Object(l.select)("core/blocks","getBlockTypes");case 26:if((i=d.sent).length&&i.filter((function(t){return t.name===e.name})).length){d.next=29;break}throw new Error(Object(E.__)("Error registering block. Try reloading the page."));case 29:r=!0,d.next=40;break;case 32:return d.prev=32,d.t0=d.catch(4),s=d.t0.message||Object(E.__)("An error occurred."),u=d.t0 instanceof Error,(b={folder_exists:Object(E.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:Object(E.__)("Error installing block. You can reload the page and try again.")})[d.t0.code]&&(u=!0,s=b[d.t0.code]),d.next=40,z(t,s,u);case 40:return d.next=42,F(e.id,!1);case 42:return d.abrupt("return",r);case 43:case"end":return d.stop()}}),N,null,[[4,32]])}function A(e){return w.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(l.apiFetch)({url:B(e),data:{status:"inactive"},method:"PUT"});case 3:return t.next=5,Object(l.apiFetch)({url:B(e),method:"DELETE"});case 5:return t.next=7,M(e);case 7:t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(0),t.next=13,Object(l.dispatch)("core/notices","createErrorNotice",t.t0.message||Object(E.__)("An error occurred."));case 13:case"end":return t.stop()}}),x,null,[[0,9]])}function R(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function M(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function F(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function z(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 V(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var K={getDownloadableBlocks:w.a.mark((function e(t){var n,r;return w.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,D(t);case 5:return e.next=7,Object(l.apiFetch)({path:"wp/v2/block-directory/search?term=".concat(t)});case 7:return n=e.sent,r=n.map((function(e){return Object(s.mapKeys)(e,(function(e,t){return Object(s.camelCase)(t)}))})),e.next=11,L(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 $(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 H={reducer:d,selectors:r,actions:c,controls:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){Object(o.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},l.controls,{},S),resolvers:K},U=(Object(a.registerStore)("core/block-directory",H),n(0)),W=n(51),q=n(11);function G(){var e=Object(a.useDispatch)("core/block-directory").uninstallBlockType,t=Object(a.useSelect)((function(e){var t=e("core/editor"),n=t.isAutosavingPost;return(0,t.isSavingPost)()&&!n()}),[]),n=Object(a.useSelect)((function(e){return e("core/block-directory").getUnusedBlockTypes()}),[]);return Object(U.useEffect)((function(){t&&n.length&&n.forEach((function(t){e(t),Object(q.unregisterBlockType)(t.name)}))}),[t]),null}var Y=n(12),J=n(6),Q=n(9),X=n(3);var Z=function(e){var t=e.author,n=e.authorBlockCount,r=e.authorBlockRating;return Object(U.createElement)(U.Fragment,null,Object(U.createElement)("span",{className:"block-directory-downloadable-block-author-info__content-author"},Object(E.sprintf)(
|
2 |
/* translators: %s: author name. */
|
3 |
Object(E.__)("Authored by %s"),t)),Object(U.createElement)("span",{className:"block-directory-downloadable-block-author-info__content"},r>0?Object(E.sprintf)(
|
4 |
/* translators: 1: number of blocks. 2: average rating. */
|
5 |
Object(E._n)("This author has %1$d block, with an average rating of %2$d.","This author has %1$d blocks, with an average rating of %2$d.",n),n,r):Object(E.sprintf)(
|
6 |
/* translators: 1: number of blocks. */
|
7 |
-
Object(E._n)("This author has %1$d block.","This author has %1$d blocks.",n),n)))},ee=n(
|
8 |
/* translators: %s: number of stars. */
|
9 |
Object(E.__)("%s out of 5 stars"),n)},Object(s.times)(r,(function(e){return Object(U.createElement)(ee.a,{key:"full_stars_".concat(e),icon:te.a,size:16})})),Object(s.times)(c,(function(e){return Object(U.createElement)(ee.a,{key:"half_stars_".concat(e),icon:re,size:16})})),Object(s.times)(o,(function(e){return Object(U.createElement)(ee.a,{key:"empty_stars_".concat(e),icon:ce.a,size:16})})))},ae=function(e){var t=e.rating,n=e.ratingCount;return Object(U.createElement)("div",{className:"block-directory-block-ratings"},Object(U.createElement)(oe,{rating:t}),Object(U.createElement)("span",{className:"block-directory-block-ratings__rating-count","aria-label":Object(E.sprintf)(// translators: %d: number of ratings (number).
|
10 |
Object(E._n)("%d total rating","%d total ratings",n),n)},"(",n,")"))};var le=function(e){var t=e.icon,n=e.title;return Object(U.createElement)("div",{className:"block-directory-downloadable-block-icon"},null!==t.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)?Object(U.createElement)("img",{src:t,alt:Object(E.sprintf)(// translators: %s: Name of the plugin e.g: "Akismet".
|
11 |
-
Object(E.__)("%s block icon"),n)}):Object(U.createElement)(J.BlockIcon,{icon:t,showColors:!0}))};var ie=function(e){var t=e.icon,n=e.title,r=e.rating,c=e.ratingCount,o=e.isLoading,a=void 0!==o&&o,l=e.isInstallable,i=void 0===l||l,s=e.onClick;return Object(U.createElement)("div",{className:"block-directory-downloadable-block-header__row"},Object(U.createElement)(le,{icon:t,title:n}),Object(U.createElement)("div",{className:"block-directory-downloadable-block-header__column"},Object(U.createElement)("h2",{className:"block-directory-downloadable-block-header__title"},n),Object(U.createElement)(ae,{rating:r,ratingCount:c})),Object(U.createElement)(X.Button,{isSecondary:!0,isBusy:a,disabled:a||!i,onClick:function(e){e.preventDefault(),!a&&i&&s()}},a?Object(E.__)("Adding…"):Object(E.__)("Add block")))},se=Object(U.createElement)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(U.createElement)(ne.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"})),ue=n(
|
12 |
/* translators: %s: number of active installations. */
|
13 |
Object(E._n)("%d active installation","%d active installations",n),n)),Object(U.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(U.createElement)(ee.a,{className:"block-directory-downloadable-block-info__icon",icon:ue.a}),// translators: %s: Humanized date of last update e.g: "2 months ago".
|
14 |
-
Object(E.sprintf)(Object(E.__)("Updated %s"),r)))},de=function(e){var t=e.block,n=e.onClick,r=Object(a.useSelect)((function(e){return e("core/block-directory").getErrorNoticeForBlock(t.id)}),[t]);return r?Object(U.createElement)(X.Notice,{status:"error",isDismissible:!1,className:"block-directory-downloadable-block-notice"},Object(U.createElement)("div",{className:"block-directory-downloadable-block-notice__content"},r.message),Object(U.createElement)(X.Button,{isSmall:!0,isPrimary:!0,onClick:function(){if(r.isFatal)return window.location.reload(),!1;n(t)}},r.isFatal?Object(E.__)("Reload"):Object(E.__)("Retry"))):null};function fe(e){var t=e.item,n=e.onClick,r=Object(a.useSelect)((function(e){var n=e("core/block-directory"),r=n.isInstalling,c=(0,n.getErrorNoticeForBlock)(t.id),o=c&&c.isFatal;return{isLoading:r(t.id),isInstallable:!o}}),[t]),c=r.isLoading,o=r.isInstallable,l=t.icon,i=t.title,s=t.description,u=t.rating,b=t.activeInstalls,d=t.ratingCount,f=t.author,O=t.humanizedUpdated,p=t.authorBlockCount,m=t.authorBlockRating;return Object(U.createElement)("li",{className:"block-directory-downloadable-block-list-item"},Object(U.createElement)("article",{className:"block-directory-downloadable-block-list-item__panel"},Object(U.createElement)("header",{className:"block-directory-downloadable-block-list-item__header"},Object(U.createElement)(ie,{icon:l,onClick:n,title:i,rating:u,ratingCount:d,isLoading:c,isInstallable:o})),Object(U.createElement)("section",{className:"block-directory-downloadable-block-list-item__body"},Object(U.createElement)(de,{onClick:n,block:t}),Object(U.createElement)(be,{activeInstalls:b,description:s,humanizedUpdated:O})),Object(U.createElement)("footer",{className:"block-directory-downloadable-block-list-item__footer"},Object(U.createElement)(Z,{author:f,authorBlockCount:p,authorBlockRating:m}))))}var Oe=function(e){var t=e.items,n=e.onHover,r=void 0===n?s.noop:n,c=e.onSelect,o=Object(a.useDispatch)("core/block-directory").installBlockType;return t.length?Object(U.createElement)("ul",{role:"list",className:"block-directory-downloadable-blocks-list"},t.map((function(e){return Object(U.createElement)(fe,{key:e.id,onClick:function(){o(e).then((function(t){t&&c(e)})),r(null)},item:e})}))):null};var pe=Object(Q.compose)([X.withSpokenMessages,Object(a.withSelect)((function(e,t){var n=t.filterValue,r=e("core/block-directory"),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,o=e.isLoading,a=e.isWaiting,l=e.debouncedSpeak;return!1===c?(l(Object(E.__)("No blocks found in your library.
|
15 |
/* translators: %s: number of available blocks. */
|
16 |
-
Object(E._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(U.createElement)(U.Fragment,null,Object(U.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description"},Object(E.__)("No blocks found in your library. These blocks can be downloaded and installed:")),Object(U.createElement)(Oe,{items:t,onSelect:n,onHover:r}))):Object(U.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(E.__)("No blocks found in your library."))}));var me=function(){var e=Object(U.useState)(""),t=Object(Y.a)(e,2),n=t[0],r=t[1],c=Object(s.debounce)(r,400);return Object(U.createElement)(J.__experimentalInserterMenuExtension,null,(function(e){var t=e.onSelect,r=e.onHover,o=e.filterValue;return e.hasItems||!o?null:(n!==o&&c(o),Object(U.createElement)(pe,{onSelect:t,onHover:r,filterValue:n,isWaiting:o!==n}))}))},je=n(
|
17 |
/* translators: %s: Name of the block author. */
|
18 |
Object(E.__)("By %s"),c))))}))):null}function he(){var e=Object(a.useSelect)((function(e){return e("core/block-directory").getNewBlockTypes()}),[]);return e.length?Object(U.createElement)(je.PluginPrePublishPanel,{icon:"block-default",title:Object(E.sprintf)(// translators: %d: number of blocks (number).
|
19 |
-
Object(E._n)("Added: %d block","Added: %d blocks",e.length),e.length),initialOpen:!0},Object(U.createElement)("p",{className:"installed-blocks-pre-publish-panel__copy"},Object(E._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)),Object(U.createElement)(ye,{items:e})):null}Object(W.registerPlugin)("block-directory",{render:function(){return Object(U.createElement)(U.Fragment,null,Object(U.createElement)(G,null),Object(U.createElement)(me,null),Object(U.createElement)(he,null))}})},
|
1 |
+
this.wp=this.wp||{},this.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=406)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},11:function(e,t){!function(){e.exports=this.wp.blocks}()},12:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(36);var c=n(29),o=n(37);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,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(c)throw o}}return n}}(e,t)||Object(c.a)(e,t)||Object(o.a)()}},129:function(e,t,n){"use strict";var r=n(5),c=n(14),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,l=void 0===n?24:n,i=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:l,height:l},i))}},14:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(41);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}},17:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(27);var c=n(35),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.")}()}},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,{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},176: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){!function(){e.exports=this.lodash}()},20:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},254:function(e,t){!function(){e.exports=this.wp.editPost}()},27: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}))},278: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},28:function(e,t){!function(){e.exports=this.wp.url}()},29:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(27);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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},3:function(e,t){!function(){e.exports=this.wp.components}()},34:function(e,t){!function(){e.exports=this.wp.dataControls}()},35: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}))},36:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},37: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}))},4:function(e,t){!function(){e.exports=this.wp.data}()},406:function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"isRequestingDownloadableBlocks",(function(){return O})),n.d(r,"getDownloadableBlocks",(function(){return p})),n.d(r,"getInstalledBlockTypes",(function(){return m})),n.d(r,"getNewBlockTypes",(function(){return j})),n.d(r,"getUnusedBlockTypes",(function(){return y})),n.d(r,"isInstalling",(function(){return h})),n.d(r,"getErrorNotices",(function(){return g})),n.d(r,"getErrorNoticeForBlock",(function(){return k}));var c={};n.r(c),n.d(c,"fetchDownloadableBlocks",(function(){return D})),n.d(c,"receiveDownloadableBlocks",(function(){return L})),n.d(c,"installBlockType",(function(){return C})),n.d(c,"uninstallBlockType",(function(){return A})),n.d(c,"addInstalledBlockType",(function(){return R})),n.d(c,"removeInstalledBlockType",(function(){return M})),n.d(c,"setIsInstalling",(function(){return F})),n.d(c,"setErrorNotice",(function(){return z})),n.d(c,"clearErrorNotice",(function(){return V}));n(80);var o=n(5),a=n(4),l=n(34),i=n(17),s=n(2);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 b(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(o.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 d=Object(a.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 b({},e,Object(o.a)({},t.filterValue,{isRequesting:!0}));case"RECEIVE_DOWNLOADABLE_BLOCKS":return b({},e,Object(o.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 b({},e,{installedBlockTypes:[].concat(Object(i.a)(e.installedBlockTypes),[t.item])});case"REMOVE_INSTALLED_BLOCK_TYPE":return b({},e,{installedBlockTypes:e.installedBlockTypes.filter((function(e){return e.name!==t.item.name}))});case"SET_INSTALLING_BLOCK":return b({},e,{isInstalling:b({},e.isInstalling,Object(o.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 b({},e,Object(o.a)({},t.blockId,{message:t.message,isFatal:t.isFatal}));case"CLEAR_ERROR_NOTICE":return Object(s.omit)(e,t.blockId)}return e}});function f(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(f(e,t[n].innerBlocks))return!0;return!1}function O(e,t){return!(!e.downloadableBlocks[t]||!e.downloadableBlocks[t].isRequesting)&&e.downloadableBlocks[t].isRequesting}function p(e,t){return e.downloadableBlocks[t]&&e.downloadableBlocks[t].results?e.downloadableBlocks[t].results:[]}function m(e){return e.blockManagement.installedBlockTypes}var j=Object(a.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks(),r=m(t),c=[];return r.forEach((function(e){f(e,n)&&c.push(e)})),c}})),y=Object(a.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks(),r=m(t),c=[];return r.forEach((function(e){f(e,n)||c.push(e)})),c}}));function h(e,t){return e.blockManagement.isInstalling[t]||!1}function g(e){return e.errorNotices}function k(e,t){return e.errorNotices[t]}var v=n(20),w=n.n(v),E=n(1),_=n(28);function S(e){return{type:"LOAD_ASSETS",assets:e}}var B={LOAD_ASSETS:function(e){var t=e.assets.map((function(e){return null!==Object(_.getPath)(e).match(/\.js$/)?function(e){return e&&/\.js$/.test(Object(_.getPath)(e))?new Promise((function(t,n){var r=document.querySelector('script[src="'.concat(e,'"]'));r&&r.parentNode.removeChild(r);var c=document.createElement("script");c.src=e,c.onload=function(){return t(!0)},c.onerror=function(){return n(new Error("Error loading script."))},document.body.appendChild(c)})):Promise.reject(new Error("No script found."))}(e):function(e){return e&&/\.css$/.test(Object(_.getPath)(e))?new Promise((function(t,n){var r=document.createElement("link");r.rel="stylesheet",r.href=e,r.onload=function(){return t(!0)},r.onerror=function(){return n(new Error("Error loading style."))},document.body.appendChild(r)})):Promise.reject(new Error("No style found."))}(e)}));return Promise.all(t)}};function P(e){if(!e)return!1;var t=e.links["wp:plugin"]||e.links.self;return!(!t||!t.length)&&t[0].href}var N=w.a.mark(C),x=w.a.mark(A);function T(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 I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){Object(o.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function L(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}function C(e){var t,n,r,c,o,a,i,s,u,b;return w.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.id,n=e.assets,r=!1,d.next=4,V(t);case 4:if(d.prev=4,Array.isArray(n)&&n.length){d.next=7;break}throw new Error(Object(E.__)("Block has no assets."));case 7:return d.next=9,F(e.id,!0);case 9:if(c=P(e),o={},!c){d.next=16;break}return d.next=14,Object(l.apiFetch)({url:c,data:{status:"active"},method:"PUT"});case 14:d.next=20;break;case 16:return d.next=18,Object(l.apiFetch)({path:"wp/v2/plugins",data:{slug:e.id,status:"active"},method:"POST"});case 18:a=d.sent,o=a._links;case 20:return d.next=22,R(I({},e,{links:I({},e.links,{},o)}));case 22:return d.next=24,S(n);case 24:return d.next=26,Object(l.select)("core/blocks","getBlockTypes");case 26:if((i=d.sent).length&&i.filter((function(t){return t.name===e.name})).length){d.next=29;break}throw new Error(Object(E.__)("Error registering block. Try reloading the page."));case 29:r=!0,d.next=40;break;case 32:return d.prev=32,d.t0=d.catch(4),s=d.t0.message||Object(E.__)("An error occurred."),u=d.t0 instanceof Error,(b={folder_exists:Object(E.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:Object(E.__)("Error installing block. You can reload the page and try again.")})[d.t0.code]&&(u=!0,s=b[d.t0.code]),d.next=40,z(t,s,u);case 40:return d.next=42,F(e.id,!1);case 42:return d.abrupt("return",r);case 43:case"end":return d.stop()}}),N,null,[[4,32]])}function A(e){return w.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(l.apiFetch)({url:P(e),data:{status:"inactive"},method:"PUT"});case 3:return t.next=5,Object(l.apiFetch)({url:P(e),method:"DELETE"});case 5:return t.next=7,M(e);case 7:t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(0),t.next=13,Object(l.dispatch)("core/notices","createErrorNotice",t.t0.message||Object(E.__)("An error occurred."));case 13:case"end":return t.stop()}}),x,null,[[0,9]])}function R(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function M(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function F(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function z(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 V(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var K={getDownloadableBlocks:w.a.mark((function e(t){var n,r;return w.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,D(t);case 5:return e.next=7,Object(l.apiFetch)({path:"wp/v2/block-directory/search?term=".concat(t)});case 7:return n=e.sent,r=n.map((function(e){return Object(s.mapKeys)(e,(function(e,t){return Object(s.camelCase)(t)}))})),e.next=11,L(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 $(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 H={reducer:d,selectors:r,actions:c,controls:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){Object(o.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},l.controls,{},B),resolvers:K},U=(Object(a.registerStore)("core/block-directory",H),n(0)),W=n(61),q=n(11);function G(){var e=Object(a.useDispatch)("core/block-directory").uninstallBlockType,t=Object(a.useSelect)((function(e){var t=e("core/editor"),n=t.isAutosavingPost;return(0,t.isSavingPost)()&&!n()}),[]),n=Object(a.useSelect)((function(e){return e("core/block-directory").getUnusedBlockTypes()}),[]);return Object(U.useEffect)((function(){t&&n.length&&n.forEach((function(t){e(t),Object(q.unregisterBlockType)(t.name)}))}),[t]),null}var Y=n(12),J=n(6),Q=n(9),X=n(3);var Z=function(e){var t=e.author,n=e.authorBlockCount,r=e.authorBlockRating;return Object(U.createElement)(U.Fragment,null,Object(U.createElement)("span",{className:"block-directory-downloadable-block-author-info__content-author"},Object(E.sprintf)(
|
2 |
/* translators: %s: author name. */
|
3 |
Object(E.__)("Authored by %s"),t)),Object(U.createElement)("span",{className:"block-directory-downloadable-block-author-info__content"},r>0?Object(E.sprintf)(
|
4 |
/* translators: 1: number of blocks. 2: average rating. */
|
5 |
Object(E._n)("This author has %1$d block, with an average rating of %2$d.","This author has %1$d blocks, with an average rating of %2$d.",n),n,r):Object(E.sprintf)(
|
6 |
/* translators: 1: number of blocks. */
|
7 |
+
Object(E._n)("This author has %1$d block.","This author has %1$d blocks.",n),n)))},ee=n(129),te=n(175),ne=n(7),re=Object(U.createElement)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(U.createElement)(ne.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"})),ce=n(176);var oe=function(e){var t=e.rating,n=.5*Math.round(t/.5),r=Math.floor(t),c=Math.ceil(t-r),o=5-(r+c);return Object(U.createElement)("div",{"aria-label":Object(E.sprintf)(
|
8 |
/* translators: %s: number of stars. */
|
9 |
Object(E.__)("%s out of 5 stars"),n)},Object(s.times)(r,(function(e){return Object(U.createElement)(ee.a,{key:"full_stars_".concat(e),icon:te.a,size:16})})),Object(s.times)(c,(function(e){return Object(U.createElement)(ee.a,{key:"half_stars_".concat(e),icon:re,size:16})})),Object(s.times)(o,(function(e){return Object(U.createElement)(ee.a,{key:"empty_stars_".concat(e),icon:ce.a,size:16})})))},ae=function(e){var t=e.rating,n=e.ratingCount;return Object(U.createElement)("div",{className:"block-directory-block-ratings"},Object(U.createElement)(oe,{rating:t}),Object(U.createElement)("span",{className:"block-directory-block-ratings__rating-count","aria-label":Object(E.sprintf)(// translators: %d: number of ratings (number).
|
10 |
Object(E._n)("%d total rating","%d total ratings",n),n)},"(",n,")"))};var le=function(e){var t=e.icon,n=e.title;return Object(U.createElement)("div",{className:"block-directory-downloadable-block-icon"},null!==t.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)?Object(U.createElement)("img",{src:t,alt:Object(E.sprintf)(// translators: %s: Name of the plugin e.g: "Akismet".
|
11 |
+
Object(E.__)("%s block icon"),n)}):Object(U.createElement)(J.BlockIcon,{icon:t,showColors:!0}))};var ie=function(e){var t=e.icon,n=e.title,r=e.rating,c=e.ratingCount,o=e.isLoading,a=void 0!==o&&o,l=e.isInstallable,i=void 0===l||l,s=e.onClick;return Object(U.createElement)("div",{className:"block-directory-downloadable-block-header__row"},Object(U.createElement)(le,{icon:t,title:n}),Object(U.createElement)("div",{className:"block-directory-downloadable-block-header__column"},Object(U.createElement)("h2",{className:"block-directory-downloadable-block-header__title"},n),Object(U.createElement)(ae,{rating:r,ratingCount:c})),Object(U.createElement)(X.Button,{isSecondary:!0,isBusy:a,disabled:a||!i,onClick:function(e){e.preventDefault(),!a&&i&&s()}},a?Object(E.__)("Adding…"):Object(E.__)("Add block")))},se=Object(U.createElement)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(U.createElement)(ne.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"})),ue=n(278);var be=function(e){var t=e.description,n=e.activeInstalls,r=e.humanizedUpdated;return Object(U.createElement)(U.Fragment,null,Object(U.createElement)("p",{className:"block-directory-downloadable-block-info__content"},t),Object(U.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(U.createElement)(ee.a,{className:"block-directory-downloadable-block-info__icon",icon:se}),Object(E.sprintf)(
|
12 |
/* translators: %s: number of active installations. */
|
13 |
Object(E._n)("%d active installation","%d active installations",n),n)),Object(U.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(U.createElement)(ee.a,{className:"block-directory-downloadable-block-info__icon",icon:ue.a}),// translators: %s: Humanized date of last update e.g: "2 months ago".
|
14 |
+
Object(E.sprintf)(Object(E.__)("Updated %s"),r)))},de=function(e){var t=e.block,n=e.onClick,r=Object(a.useSelect)((function(e){return e("core/block-directory").getErrorNoticeForBlock(t.id)}),[t]);return r?Object(U.createElement)(X.Notice,{status:"error",isDismissible:!1,className:"block-directory-downloadable-block-notice"},Object(U.createElement)("div",{className:"block-directory-downloadable-block-notice__content"},r.message),Object(U.createElement)(X.Button,{isSmall:!0,isPrimary:!0,onClick:function(){if(r.isFatal)return window.location.reload(),!1;n(t)}},r.isFatal?Object(E.__)("Reload"):Object(E.__)("Retry"))):null};function fe(e){var t=e.item,n=e.onClick,r=Object(a.useSelect)((function(e){var n=e("core/block-directory"),r=n.isInstalling,c=(0,n.getErrorNoticeForBlock)(t.id),o=c&&c.isFatal;return{isLoading:r(t.id),isInstallable:!o}}),[t]),c=r.isLoading,o=r.isInstallable,l=t.icon,i=t.title,s=t.description,u=t.rating,b=t.activeInstalls,d=t.ratingCount,f=t.author,O=t.humanizedUpdated,p=t.authorBlockCount,m=t.authorBlockRating;return Object(U.createElement)("li",{className:"block-directory-downloadable-block-list-item"},Object(U.createElement)("article",{className:"block-directory-downloadable-block-list-item__panel"},Object(U.createElement)("header",{className:"block-directory-downloadable-block-list-item__header"},Object(U.createElement)(ie,{icon:l,onClick:n,title:i,rating:u,ratingCount:d,isLoading:c,isInstallable:o})),Object(U.createElement)("section",{className:"block-directory-downloadable-block-list-item__body"},Object(U.createElement)(de,{onClick:n,block:t}),Object(U.createElement)(be,{activeInstalls:b,description:s,humanizedUpdated:O})),Object(U.createElement)("footer",{className:"block-directory-downloadable-block-list-item__footer"},Object(U.createElement)(Z,{author:f,authorBlockCount:p,authorBlockRating:m}))))}var Oe=function(e){var t=e.items,n=e.onHover,r=void 0===n?s.noop:n,c=e.onSelect,o=Object(a.useDispatch)("core/block-directory").installBlockType;return t.length?Object(U.createElement)("ul",{role:"list",className:"block-directory-downloadable-blocks-list"},t.map((function(e){return Object(U.createElement)(fe,{key:e.id,onClick:function(){o(e).then((function(t){t&&c(e)})),r(null)},item:e})}))):null};var pe=Object(Q.compose)([X.withSpokenMessages,Object(a.withSelect)((function(e,t){var n=t.filterValue,r=e("core/block-directory"),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,o=e.isLoading,a=e.isWaiting,l=e.debouncedSpeak;return!1===c?(l(Object(E.__)("No blocks found in your library.")),Object(U.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(E.__)("No blocks found in your library."))):void 0===c||o||a?Object(U.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(U.createElement)(X.Spinner,null)):t.length?(l(Object(E.sprintf)(
|
15 |
/* translators: %s: number of available blocks. */
|
16 |
+
Object(E._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(U.createElement)(U.Fragment,null,Object(U.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description"},Object(E.__)("No blocks found in your library. These blocks can be downloaded and installed:")),Object(U.createElement)(Oe,{items:t,onSelect:n,onHover:r}))):Object(U.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(E.__)("No blocks found in your library."))}));var me=function(){var e=Object(U.useState)(""),t=Object(Y.a)(e,2),n=t[0],r=t[1],c=Object(s.debounce)(r,400);return Object(U.createElement)(J.__experimentalInserterMenuExtension,null,(function(e){var t=e.onSelect,r=e.onHover,o=e.filterValue;return e.hasItems||!o?null:(n!==o&&c(o),Object(U.createElement)(pe,{onSelect:t,onHover:r,filterValue:n,isWaiting:o!==n}))}))},je=n(254);function ye(e){var t=e.items;return t.length?Object(U.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(U.createElement)("li",{key:n,className:"block-directory-compact-list__item"},Object(U.createElement)(le,{icon:t,title:r}),Object(U.createElement)("div",{className:"block-directory-compact-list__item-details"},Object(U.createElement)("div",{className:"block-directory-compact-list__item-title"},r),Object(U.createElement)("div",{className:"block-directory-compact-list__item-author"},Object(E.sprintf)(
|
17 |
/* translators: %s: Name of the block author. */
|
18 |
Object(E.__)("By %s"),c))))}))):null}function he(){var e=Object(a.useSelect)((function(e){return e("core/block-directory").getNewBlockTypes()}),[]);return e.length?Object(U.createElement)(je.PluginPrePublishPanel,{icon:"block-default",title:Object(E.sprintf)(// translators: %d: number of blocks (number).
|
19 |
+
Object(E._n)("Added: %d block","Added: %d blocks",e.length),e.length),initialOpen:!0},Object(U.createElement)("p",{className:"installed-blocks-pre-publish-panel__copy"},Object(E._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)),Object(U.createElement)(ye,{items:e})):null}Object(W.registerPlugin)("block-directory",{render:function(){return Object(U.createElement)(U.Fragment,null,Object(U.createElement)(G,null),Object(U.createElement)(me,null),Object(U.createElement)(he,null))}})},41:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,c={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(c[n]=e[n]);return c}n.d(t,"a",(function(){return r}))},5:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},6:function(e,t){!function(){e.exports=this.wp.blockEditor}()},61:function(e,t){!function(){e.exports=this.wp.plugins}()},7:function(e,t){!function(){e.exports=this.wp.primitives}()},80:function(e,t){!function(){e.exports=this.wp.notices}()},9:function(e,t){!function(){e.exports=this.wp.compose}()}});
|
build/block-editor/index.asset.php
DELETED
@@ -1 +0,0 @@
|
|
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-viewport', 'wp-wordcount'), 'version' => '6f34730784b208bedad3cc7b8449762b');
|
|
build/block-editor/index.js
DELETED
@@ -1,78 +0,0 @@
|
|
1 |
-
this.wp=this.wp||{},this.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=378)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.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){!function(){e.exports=this.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){!function(){e.exports=this.wp.compose}()},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){!function(){e.exports=this.wp.blocks}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(36);var o=n(29),c=n(37);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,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";n.d(t,"a",(function(){return o}));var r=n(41);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";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(27);var o=n(35),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){!function(){e.exports=this.React}()},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t){!function(){e.exports=this.wp.keycodes}()},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){!function(){e.exports=this.regeneratorRuntime}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(40),o=n(13);function c(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},,function(e,t){!function(){e.exports=this.wp.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){!function(){e.exports=this.wp.url}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(27);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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){e.exports=n(130)()},function(e,t){!function(){e.exports=this.wp.dom}()},function(e,t){!function(){e.exports=this.wp.hooks}()},,,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){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,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){!function(){e.exports=this.wp.deprecated}()},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";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 s(){n=o?new WeakMap:i()}function u(){var n,r,o,c,i,s=arguments.length;for(c=new Array(s),o=0;o<s;o++)c[o]=arguments[o];for(i=t.apply(null,c),(n=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,s=n,u=!0;for(t=0;t<e.length;t++){if(o=e[t],!(l=o)||"object"!=typeof l){u=!1;break}s.has(o)?s=s.get(o):(c=new WeakMap,s.set(o,c),s=c)}return s.has(r)||((a=i()).isUniqueByDependants=u,s.set(r,a)),s.get(r)}:function(){return n},u.getDependants=t,u.clear=s,s(),u}},function(e,t){!function(){e.exports=this.wp.blob}()},,,function(e,t){!function(){e.exports=this.wp.keyboardShortcuts}()},,function(e,t){!function(){e.exports=this.wp.a11y}()},,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){!function(){e.exports=this.wp.isShallowEqual}()},,,,,function(e,t,n){var r;!function(o){var c=/^\s+/,i=/\s+$/,a=0,l=o.round,s=o.min,u=o.max,d=o.random;function b(e,t){if(t=t||{},(e=e||"")instanceof b)return e;if(!(this instanceof b))return new b(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,a=null,l=null,d=!1,b=!1;"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"};if(t=U.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=U.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=U.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=U.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=U.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=U.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=U.hex8.exec(e))return{r:M(t[1]),g:M(t[2]),b:M(t[3]),a:F(t[4]),format:n?"name":"hex8"};if(t=U.hex6.exec(e))return{r:M(t[1]),g:M(t[2]),b:M(t[3]),format:n?"name":"hex"};if(t=U.hex4.exec(e))return{r:M(t[1]+""+t[1]),g:M(t[2]+""+t[2]),b:M(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=U.hex3.exec(e))return{r:M(t[1]+""+t[1]),g:M(t[2]+""+t[2]),b:M(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(G(e.r)&&G(e.g)&&G(e.b)?(f=e.r,p=e.g,m=e.b,t={r:255*N(f,255),g:255*N(p,255),b:255*N(m,255)},d=!0,b="%"===String(e.r).substr(-1)?"prgb":"rgb"):G(e.h)&&G(e.s)&&G(e.v)?(r=L(e.s),a=L(e.v),t=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),s=r%6;return{r:255*[n,a,i,i,l,n][s],g:255*[l,n,n,a,i,i][s],b:255*[i,i,l,n,n,a][s]}}(e.h,r,a),d=!0,b="hsv"):G(e.h)&&G(e.s)&&G(e.l)&&(r=L(e.s),l=L(e.l),t=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,r,l),d=!0,b="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,m;return n=T(n),{ok:d,format:e.format||b,r:s(255,u(t.r,0)),g:s(255,u(t.g,0)),b:s(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=a++}function f(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=u(e,t,n),i=s(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=u(e,t,n),i=s(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=[D(l(e).toString(16)),D(l(t).toString(16)),D(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 O(e,t,n,r){return[D(A(r)),D(l(e).toString(16)),D(l(t).toString(16)),D(l(n).toString(16))].join("")}function v(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s-=t/100,n.s=R(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=R(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=R(n.l),b(n)}function k(e,t){t=0===t?0:t||10;var n=b(e).toRgb();return n.r=u(0,s(255,n.r-l(-t/100*255))),n.g=u(0,s(255,n.g-l(-t/100*255))),n.b=u(0,s(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=R(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 S(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 w(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+72)%360,s:t.s,l:t.l}),b({h:(n+216)%360,s:t.s,l:t.l})]}function B(e,t,n){t=t||6,n=n||30;var r=b(e).toHsl(),o=360/n,c=[b(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,c.push(b(r));return c}function I(e,t){t=t||6;for(var n=b(e).toHsv(),r=n.h,o=n.s,c=n.v,i=[],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=[D(l(e).toString(16)),D(l(t).toString(16)),D(l(n).toString(16)),D(A(r))];if(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))return c[0].charAt(0)+c[1].charAt(0)+c[2].charAt(0)+c[3].charAt(0);return 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="#"+O(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=b(e);n="#"+O(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(v,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(B,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(S,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=b.readability(e,t);switch(o=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=c>=4.5;break;case"AAlarge":o=c>=3;break;case"AAAsmall":o=c>=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 s=0;s<t.length;s++)(r=b.readability(e,t[s]))>l&&(l=r,a=b(t[s]));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=s(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function R(e){return s(1,u(0,e))}function M(e){return parseInt(e,16)}function D(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function A(e){return o.round(255*parseFloat(e)).toString(16)}function F(e){return M(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){!function(){e.exports=this.wp.htmlEntities}()},,,,,,,,,function(e,t){!function(){e.exports=this.wp.notices}()},,,,,,,,function(e,t){!function(){e.exports=this.wp.viewport}()},,,,,,,,,,,,function(e,t,n){"use strict";t.__esModule=!0;var r=n(171);t.default=r.default},,,,,,,,,,,,,,function(e,t,n){e.exports=function(){"use strict";return function(e){var t={};return function e(t,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)e(t,n[r]);else for(r in n)t[r]=(t[r]||[]).concat(n[r])}(t,e),function(e){return function(n){return function(r){var o,c,i=t[r.type],a=n(r);if(i)for(o=0;o<i.length;o++)(c=i[o](r,e))&&e.dispatch(c);return 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(168)),c=r(n(169)),i=n(17),a=r(i),l=r(n(138)),s=r(n(170)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(){var e=i.useState(!1)[1];return i.useCallback((function(){return e((function(e){return!e}))}),[])}function b(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return u.fun(e)?e.apply(void 0,n):e}function m(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return u.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var O,v,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(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.removeChild(s(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(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.removeChild(s(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){O={fn:e,transform:t}}function y(e){v=e}var _,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},S=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function C(e){_=e}var w,B=function(){return Date.now()};function I(e){w=e}var x,P,T=function(e){return e.current};function N(e){x=e}var R=Object.freeze({get applyAnimatedValues(){return O},injectApplyAnimatedValues:k,get colorNames(){return v},injectColorNames:y,get requestFrame(){return E},get cancelFrame(){return S},injectFrame:function(e,t){E=e,S=t},get interpolation(){return _},injectStringInterpolator:C,get now(){return B},injectNow:function(e){B=e},get defaultElement(){return w},injectDefaultElement:I,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return x},injectCreateAnimatedStyle:N,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),M=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),D=!1,L=new Set,A=function e(){if(!D)return!1;var t=B(),n=L,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var i=c,a=!1,l=0;l<i.configs.length;l++){for(var s=i.configs[l],u=void 0,d=void 0,b=0;b<s.animatedValues.length;b++){var f=s.animatedValues[b];if(!f.done){var p=s.fromValues[b],m=s.toValues[b],O=f.lastPosition,v=m instanceof g,h=Array.isArray(s.initialVelocity)?s.initialVelocity[b]:s.initialVelocity;if(v&&(m=m.getValue()),s.immediate)f.setValue(m),f.done=!0;else if("string"!=typeof p&&"string"!=typeof m){if(void 0!==s.duration)O=p+s.easing((t-f.startTime)/s.duration)*(m-p),u=t>=f.startTime+s.duration;else if(s.decay)O=p+h/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-O)<.1)&&(m=O);else{d=void 0!==f.lastTime?f.lastTime:t,h=void 0!==f.lastVelocity?f.lastVelocity:s.initialVelocity,t>d+64&&(d=t);for(var j=Math.floor(t-d),k=0;k<j;++k){O+=1*(h+=1*((-s.tension*(O-m)+-s.friction*h)/s.mass)/1e3)/1e3}var y=!(!s.clamp||0===s.tension)&&(p<m?O>m:O<m),_=Math.abs(h)<=s.precision,S=0===s.tension||Math.abs(m-O)<=s.precision;u=y||_&&S,f.lastVelocity=h,f.lastTime=t}v&&!s.toValues[b].done&&(u=!1),u?(f.value!==m&&(O=m),f.done=!0):a=!0,f.setValue(O),f.lastPosition=O}else f.setValue(m),f.done=!0}}i.props.onFrame&&(i.values[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(L.delete(i),i.stop(!0))}return L.size?P?P():E(e):D=!1,D};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 s=l?l(e):e;if(s<t){if("identity"===i)return s;"clamp"===i&&(s=t)}if(s>n){if("identity"===a)return s;"clamp"===a&&(s=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t);s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r;return s}(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);var 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(u.arr(i)||u.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),s=l[i.delay]&&l[i.delay].to;l[i.delay]=o({},l[i.delay],i,{to:o({},s,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,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,c=e.to,i=void 0===c?{}:c;u.obj(r)&&(n.merged=o({},r,n.merged)),u.obj(i)&&(n.merged=o({},n.merged,i))}));var r=this.local=++this.guid,i=this.localQueue=this.queue;this.queue=[],i.forEach((function(t,o){var a=t.delay,l=c(t,["delay"]),s=function(t){o===i.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},d=u.arr(l.to)||u.fun(l.to);a?setTimeout((function(){r===n.guid&&(d?n.runAsync(l,s):n.diff(l).start(s))}),a):d?n.runAsync(l,s):n.diff(l).start(s)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,L.has(t)||L.add(t),D||(D=!0,E(P||A));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,L.has(t)&&L.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(u.arr(r.to))for(var l=function(e){var t=e,c=o({},r,m(r.to[t]));u.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)}))}))},s=0;s<r.to.length;s++)l(s);else if(u.fun(r.to)){var d,b=0;a=a.then((function(){return r.to((function(e){var t=o({},r,m(e));if(u.arr(t.config)&&(t.config=t.config[b]),b++,i===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}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,s=void 0===l?{}:l,d=n.reverse,m=n.attach,O=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=u.num(i),d=u.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!v[i],m=u.arr(i),h=!l&&!m&&!d,k=u.und(c[r])?i:c[r],y=l||m||d?i:1,E=p(s,r);j&&(y=j.animations[r].parent);var S,C=a.parent,w=a.interpolation,I=f(j?y.getPayload():y),x=i;h&&(x=_({range:[0,1],output:[i,i]})(1));var P,T=w&&w.getValue(),N=!u.und(C)&&a.animatedValues.some((function(e){return!e.done})),R=!u.equ(x,T),M=!u.equ(x,a.previous),D=!u.equ(E,a.config);if(O||M&&R||D){var L;if(l||d)C=w=a.parent||new H(k);else if(m)C=w=a.parent||new z(k);else if(h){var A=a.interpolation&&a.interpolation.calc(a.parent.value);A=void 0===A||O?k:A,a.parent?(C=a.parent).setValue(0,!1):C=new H(0);var F={output:[A,i]};a.interpolation?(w=a.interpolation,a.interpolation.updateConfig(F)):w=C.interpolate(F)}return I=f(j?y.getPayload():y),S=f(C.getPayload()),O&&!h&&C.setValue(k,!1),t.hasChanged=!0,S.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=N?e.lastVelocity:void 0,e.lastTime=N?e.lastTime:void 0,e.startTime=B(),e.done=!1,e.animatedStyles.clear()})),p(g,r)&&C.setValue(h?y:i,!1),o({},e,((L={})[r]=o({},a,{name:r,parent:C,interpolation:w,animatedValues:S,toValues:I,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 R?e:(h&&(C.setValue(1,!1),w.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=u.fun(t),c=i.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new 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 s=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||s(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,s,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};(u.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=O.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 se(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 ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function be(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function pe(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:Q.hasOwnProperty(t)?Q[t]:(n=ee.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|255)>>>0:(n=te.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|be(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=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|se(de(n[1]),fe(n[2]),fe(n[3])))>>>0:(n=re.exec(t))?(se(de(n[1]),fe(n[2]),fe(n[3]))|be(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var me=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Oe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ve=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)})),I("div"),C((function(e){var t=e.output.map((function(e){return e.replace(Oe,pe)})).map((function(e){return e.replace(ve,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 s in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var u=0===s.indexOf("--"),d=je(s,n[s],u);"float"===s&&(s="cssFloat"),u?e.style.setProperty(s,d):e.style[s]=d}for(var b in 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),s=i.useRef(null),b=i.useRef(null),f=i.useCallback((function(e){var t=s.current;s.current=new M(e,(function(){b.current&&!1===O.fn(b.current,s.current.getAnimatedValue())&&r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){l.current=!1,s.current&&s.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(b,l,r)})),f(t);var p=s.current.getValue(),m=(p.scrollTop,p.scrollLeft,c(p,["scrollTop","scrollLeft"]));return a.createElement(e,o({},m,{ref:function(e){return b.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,n)}}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=_e?t[0].toLowerCase()+t.substring(1):t;return e[n]=ye(n),e}),ye)}),Se=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=A,t.animated=Se,t.a=Se,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=R,t.useSpring=function(e){var t=u.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=u.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]}})})),s=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?[s,f,b]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=$(r),l=a.lazy,s=void 0!==l&&l,u=(a.unique,a.reset),b=void 0!==u&&u,f=(a.enter,a.leave,a.update,a.onDestroyed),m=(a.keys,a.items,a.onFrame),O=a.onRest,v=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){var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),a=$(t),l=a.items,s=a.keys,u=a.initial,d=a.from,b=a.enter,f=a.leave,m=a.update,O=a.trail,v=void 0===O?0:O,g=a.unique,h=a.config,j=a.order,k=void 0===j?["enter","leave","update"]:j,y=$(r),_=y.keys,E=y.items,S=o({},i.current),C=[].concat(i.deleted),w=Object.keys(S),B=new Set(w),I=new Set(s),x=s.filter((function(e){return!B.has(e)})),P=i.transitions.filter((function(e){return!e.destroyed&&!I.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return B.has(e)})),N=-v;for(;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=s.indexOf(e),o=l[r],c=n&&void 0!==u?"initial":"enter";S[e]={slot:c,originalKey:e,key:g?String(e):W++,item:o,trail:N+=v,config:p(h,o,c),from:p(n&&void 0!==u?u||{}:d,o),to:p(b,o)}}));break;case"leave":P.forEach((function(e){var t=_.indexOf(e),n=E[t];C.unshift(o({},S[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=v,config:p(h,n,"leave"),to:p(f,n)})),delete S[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=l[t];S[e]=o({},S[e],{item:n,slot:"update",trail:N+=v,config:p(h,n,"update"),to:p(m,n)})}))}}var R=s.map((function(e){return S[e]}));return C.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=R.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),R=[].concat(R.slice(0,t),[r],R.slice(t))})),o({},i,{changed:x.length||P.length||T.length,first:n&&0===x.length,transitions:R,current:S,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 u=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||s||Y(y,a),f&&f(l)),!Array.from(y.current.instances).some((function(e){return!e[1].idle}))&&(g||s)&&y.current.deleted.length>0&&Y(y),O&&O(l,t,n))},onStart:v&&function(){return v(l,t)},onFrame:m&&function(e){return m(l,t,e)},delay:i,reset:b&&"enter"===t});u.update(d),y.current.paused||u.start()})),i.useEffect((function(){return y.current.mounted=k.current=!0,function(){y.current.mounted=k.current=!1,Array.from(y.current.instances).map((function(e){return e[1].destroy()})),y.current.instances.clear()}}),[]),y.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:y.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){u.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var 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(175)},,function(e,t){!function(){e.exports=this.wp.shortcode}()},,function(e,t,n){"use strict";var r=n(5),o=n(14),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:"M9 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z"}));t.a=c},,,,,,,,,function(e,t,n){"use strict";var r=n(131);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,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){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(36),o=n(35),c=n(29),i=n(37);function a(e){return Object(r.a)(e)||Object(o.a)(e)||Object(c.a)(e)||Object(i.a)()}},function(e,t){!function(){e.exports=this.wp.wordcount}()},,,,,function(e,t){!function(){e.exports=this.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){"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,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(17),l=n(30),s=n(172),u=n(173),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.dispatchEvent=function(e){var n=document.createEvent("Event");n.initEvent(e,!0,!1),t.textarea.dispatchEvent(n)},t.updateLineHeight=function(){t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t.saveDOMNodeRef=function(e){var n=t.props.innerRef;n&&n(e),t.textarea=e},t.getLocals=function(){var e=t,n=e.props,r=(n.onResize,n.maxRows),o=(n.onChange,n.style),a=(n.innerRef,i(n,["onResize","maxRows","onChange","style","innerRef"])),l=e.state.lineHeight,s=e.saveDOMNodeRef,u=r&&l?l*r:null;return c({},a,{saveDOMNodeRef:s,style:u?c({},o,{maxHeight:u}):o,onChange:t.onChange})},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.onResize;"number"==typeof t.maxRows&&this.updateLineHeight(),setTimeout((function(){return s(e.textarea)})),n&&this.textarea.addEventListener("autosize:resized",n)},t.prototype.componentWillUnmount=function(){var e=this.props.onResize;e&&this.textarea.removeEventListener("autosize:resized",e),this.dispatchEvent("autosize:destroy")},t.prototype.render=function(){var e=this.getLocals(),t=e.children,n=e.saveDOMNodeRef,r=i(e,["children","saveDOMNodeRef"]);return a.createElement("textarea",c({},r,{ref:n}),t)},t.prototype.componentDidUpdate=function(){this.props.value!==this.currentValue&&this.dispatchEvent("autosize:update")},t.defaultProps={rows:1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.func},t}(a.Component);t.default=d},function(e,t,n){var r,o,c;o=[e,t],void 0===(c="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){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 s(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",r=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(s("scroll"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(s("hidden"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),i!==r){i=r;var o=c("autosize:resized");try{e.dispatchEvent(o)}catch(e){}}}}function a(e){var t=o.get(e);t&&t.destroy()}function l(e){var t=o.get(e);t&&t.update()}var s=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((s=function(e){return e}).destroy=function(e){return e},s.update=function(e){return e}):((s=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return i(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},s.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=s,e.exports=t.default})?r.apply(t,o):r)||(e.exports=c)},function(e,t,n){var r=n(174);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(176);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,s=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;o=void 0===o||o;var b=r.isWindow(t),f=r.offset(e),p=r.outerHeight(e),m=r.outerWidth(e),O=void 0,v=void 0,g=void 0,h=void 0,j=void 0,k=void 0,y=void 0,_=void 0,E=void 0,S=void 0;b?(y=t,S=r.height(y),E=r.width(y),_={left:r.scrollLeft(y),top:r.scrollTop(y)},j={left:f.left-_.left-s,top:f.top-_.top-l},k={left:f.left+m-(_.left+E)+d,top:f.top+p-(_.top+S)+u},h=_):(O=r.offset(t),v=t.clientHeight,g=t.clientWidth,h={left:t.scrollLeft,top:t.scrollTop},j={left:f.left-(O.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-s,top:f.top-(O.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-l},k={left:f.left+m-(O.left+g+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:f.top+p-(O.top+v+(parseFloat(r.css(t,"borderBottomWidth"))||0))+u}),j.top<0||k.top>0?!0===i?r.scrollTop(t,h.top+j.top):!1===i?r.scrollTop(t,h.top+k.top):j.top<0?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top):c||((i=void 0===i||!!i)?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top)),o&&(j.left<0||k.left>0?!0===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 s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),u=/^(top|right|bottom|left)$/,d="left";var b=void 0;function f(e,t){for(var n=0;n<e.length;n++)t(e[n])}function p(e){return"border-box"===b(e,"boxSizing")}"undefined"!=typeof window&&(b=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,c=n||o.defaultView.getComputedStyle(e,null);return c&&(r=c.getPropertyValue(t)||c[t]),r}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!u.test(t)){var r=e.style,o=r[d],c=e.runtimeStyle[d];e.runtimeStyle[d]=e.currentStyle[d],r[d]="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r[d]=o,e.runtimeStyle[d]=c}return""===n?"auto":n});var m=["margin","border","padding"];function O(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 v(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=void 0;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-v(e,["border","padding"],r):i;if(a){var s=2===n?-v(e,["border"],r):v(e,["margin"],r);return l+(1===n?0:s)}return i+v(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):O(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){if(void 0===r)return t&&y(t,e,-1);if(t){b(t);return p(t)&&(r+=v(t,["padding","border"],n)),_(t,e,r)}}})),e.exports=r({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return 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:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));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:"M16 4h2v9H7v3l-5-4 5-4v3h9V4z"}));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=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:"M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6zM13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z"}));t.a=c},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.dispatch;return function(e){return function(n){return Array.isArray(n)?n.filter(Boolean).map(t):e(n)}}}},function(e,t,n){"use strict";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(273))&&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=u(o),c=u(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":o=s(o),c=s(c);break;case"grid":case"color":case"color-index":case"monochrome":o=parseInt(o,10)||1,c=parseInt(c,10)||0}switch(r){case"min":return c>=o;case"max":return c<=o;default:return c===o}}));return o&&!n||!o&&n}))},t.parse=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 s(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function u(e){var t=parseFloat(e);switch(String(e).match(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 O(){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}O();var v=t.call(m,m.node);return void 0!==v&&m.update&&m.update(v),f.before&&f.before.call(m,m.node),p?("object"!=typeof m.node||null===m.node||m.circular||(o.push(m),O(),s(m.keys,(function(t,o){r.push(t),f.pre&&f.pre.call(m,m.node[t],t);var c=e(m.node[t]);n&&u.call(m.node,t)&&(m.node[t]=c.node),c.isLast=o==m.keys.length-1,c.isFirst=0==o,f.post&&f.post.call(m,c),r.pop()})),o.pop()),f.after&&f.after.call(m,m.node),m):m}(e).node}function c(e){if("object"==typeof e&&null!==e){var t;if(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 s(i(e),(function(n){t[n]=e[n]})),t}return e}r.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r)){t=void 0;break}t=t[r]}return t},r.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r))return!1;t=t[r]}return!0},r.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];u.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},r.prototype.map=function(e){return o(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(r=e.call(this,r,t))})),r},r.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},r.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var a=c(r);return e.push(r),t.push(a),s(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)},s=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};s(i(r.prototype),(function(e){n[e]=function(t){var n=[].slice.call(arguments,1),o=new r(t);return o[e].apply(o,n)}}));var u=Object.hasOwnProperty||function(e,t){return t in e}},,,,,,,,,,,,,,,,,,,,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";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:"M12 8l-6 5.4 1 1.2 5-4.6 5 4.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,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"}));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 s=t[c];if(s.removed){if(s.value=e.join(r.slice(l,l+s.count)),l+=s.count,c&&t[c-1].added){var u=t[c-1];t[c-1]=t[c],t[c]=u}}else{if(!s.added&&o){var d=n.slice(a,a+s.count);d=d.map((function(e,t){var n=r[l+t];return n.length>e.length?n:e})),s.value=e.join(d)}else s.value=e.join(n.slice(a,a+s.count));a+=s.count,s.added||(l+=s.count)}}var b=t[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,s=e.length,u=1,d=l+s,b=[{newPos:-1,components:[]}],f=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=l&&f+1>=s)return a([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*u;n<=u;n+=2){var 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,O=f&&0<=p&&p<s;if(m||O){if(!m||O&&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>=s)return a(o(i,r.components,t,e,i.useLongestToken));b[n]=r}else b[n]=void 0}u++}if(r)!function e(){setTimeout((function(){if(u>d)return r();p()||e()}),0)}();else for(;u<=d;){var m=p();if(m)return m}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,c=n.length,i=e.newPos,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:"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";n.r(t),n.d(t,"__experimentalAlignmentHookSettingsProvider",(function(){return q})),n.d(t,"getColorClassName",(function(){return pe})),n.d(t,"getColorObjectByAttributeValues",(function(){return be})),n.d(t,"getColorObjectByColorValue",(function(){return fe})),n.d(t,"createCustomColorsHOC",(function(){return nn})),n.d(t,"withColors",(function(){return rn})),n.d(t,"__experimentalUseColors",(function(){return kn})),n.d(t,"__experimentalGetGradientClass",(function(){return me})),n.d(t,"getGradientValueBySlug",(function(){return Oe})),n.d(t,"__experimentalGetGradientObjectByGradientValue",(function(){return ve})),n.d(t,"getGradientSlugByValue",(function(){return ge})),n.d(t,"__experimentalUseGradient",(function(){return he})),n.d(t,"getFontSize",(function(){return pt})),n.d(t,"getFontSizeClass",(function(){return Ot})),n.d(t,"getFontSizeObjectByValue",(function(){return mt})),n.d(t,"FontSizePicker",(function(){return vt})),n.d(t,"withFontSizes",(function(){return Cn})),n.d(t,"AlignmentToolbar",(function(){return Nn})),n.d(t,"Autocomplete",(function(){return $n})),n.d(t,"BlockAlignmentToolbar",(function(){return V})),n.d(t,"__experimentalBlockAlignmentMatrixToolbar",(function(){return Yn})),n.d(t,"BlockBreadcrumb",(function(){return Qn})),n.d(t,"BlockContextProvider",(function(){return er})),n.d(t,"BlockControls",(function(){return w})),n.d(t,"BlockColorsStyleSelector",(function(){return or})),n.d(t,"BlockEdit",(function(){return sr})),n.d(t,"useBlockEditContext",(function(){return k})),n.d(t,"BlockFormatControls",(function(){return pr})),n.d(t,"BlockIcon",(function(){return Gn})),n.d(t,"BlockNavigationDropdown",(function(){return Bu})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return hu})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return zu})),n.d(t,"__experimentalBlockNavigationTree",(function(){return Eu})),n.d(t,"__experimentalBlockVariationPicker",(function(){return Gu})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return Qu})),n.d(t,"ButtonBlockerAppender",(function(){return Va})),n.d(t,"ColorPalette",(function(){return Ju})),n.d(t,"ColorPaletteControl",(function(){return ed})),n.d(t,"ContrastChecker",(function(){return He})),n.d(t,"__experimentalGradientPicker",(function(){return nd})),n.d(t,"__experimentalGradientPickerControl",(function(){return rd})),n.d(t,"__experimentalGradientPickerPanel",(function(){return od})),n.d(t,"__experimentalColorGradientControl",(function(){return Ie})),n.d(t,"__experimentalPanelColorGradientSettings",(function(){return Ae})),n.d(t,"__experimentalImageSizeControl",(function(){return id})),n.d(t,"InnerBlocks",(function(){return vd})),n.d(t,"InspectorAdvancedControls",(function(){return ee})),n.d(t,"InspectorControls",(function(){return We})),n.d(t,"__experimentalLinkControl",(function(){return Fd})),n.d(t,"__experimentalLineHeightControl",(function(){return at})),n.d(t,"MediaReplaceFlow",(function(){return Gd})),n.d(t,"MediaPlaceholder",(function(){return eb})),n.d(t,"MediaUpload",(function(){return zd})),n.d(t,"MediaUploadCheck",(function(){return Ud})),n.d(t,"PanelColorSettings",(function(){return ln})),n.d(t,"PlainText",(function(){return rb})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return cb})),n.d(t,"RichText",(function(){return Hu})),n.d(t,"RichTextShortcut",(function(){return ib})),n.d(t,"RichTextToolbarButton",(function(){return ab})),n.d(t,"__unstableRichTextInputEvent",(function(){return sb})),n.d(t,"ToolSelector",(function(){return bb})),n.d(t,"__experimentalUnitControl",(function(){return It})),n.d(t,"URLInput",(function(){return Id})),n.d(t,"URLInputButton",(function(){return Ob})),n.d(t,"URLPopover",(function(){return Yd})),n.d(t,"__experimentalImageURLInputUI",(function(){return jb})),n.d(t,"withColorContext",(function(){return Zu})),n.d(t,"__experimentalBlockSettingsMenuFirstItem",(function(){return Ss})),n.d(t,"__experimentalInserterMenuExtension",(function(){return cl})),n.d(t,"__experimentalPreviewOptions",(function(){return yb})),n.d(t,"__experimentalUseResizeCanvas",(function(){return Ib})),n.d(t,"BlockInspector",(function(){return Mb})),n.d(t,"BlockList",(function(){return Wa})),n.d(t,"__experimentalBlock",(function(){return au})),n.d(t,"BlockMover",(function(){return Zl})),n.d(t,"BlockPreview",(function(){return Ya})),n.d(t,"BlockSelectionClearer",(function(){return Ab})),n.d(t,"BlockSettingsMenu",(function(){return Rs})),n.d(t,"BlockSettingsMenuControls",(function(){return Ps})),n.d(t,"BlockTitle",(function(){return Xn})),n.d(t,"BlockToolbar",(function(){return Ks})),n.d(t,"CopyHandler",(function(){return Os})),n.d(t,"DefaultBlockAppender",(function(){return Fa})),n.d(t,"__unstableEditorStyles",(function(){return uf})),n.d(t,"Inserter",(function(){return Ml})),n.d(t,"__experimentalLibrary",(function(){return df})),n.d(t,"__experimentalSearchForm",(function(){return uo})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return ff})),n.d(t,"MultiSelectScrollIntoView",(function(){return pf})),n.d(t,"NavigableToolbar",(function(){return Yl})),n.d(t,"ObserveTyping",(function(){return Of})),n.d(t,"PreserveScrollInReorder",(function(){return vf})),n.d(t,"SkipToSelectedBlock",(function(){return xb})),n.d(t,"Typewriter",(function(){return yf})),n.d(t,"Warning",(function(){return Vr})),n.d(t,"WritingFlow",(function(){return Ul})),n.d(t,"BlockEditorProvider",(function(){return La})),n.d(t,"useSimulatedMediaQuery",(function(){return Bb})),n.d(t,"__experimentalUseEditorFeature",(function(){return Bt})),n.d(t,"transformStyles",(function(){return sf})),n.d(t,"storeConfig",(function(){return Ra})),n.d(t,"SETTINGS_DEFAULTS",(function(){return po}));var r={};n.r(r),n.d(r,"resetBlocks",(function(){return nc})),n.d(r,"resetSelection",(function(){return rc})),n.d(r,"receiveBlocks",(function(){return oc})),n.d(r,"updateBlockAttributes",(function(){return cc})),n.d(r,"updateBlock",(function(){return ic})),n.d(r,"selectBlock",(function(){return ac})),n.d(r,"selectPreviousBlock",(function(){return lc})),n.d(r,"selectNextBlock",(function(){return sc})),n.d(r,"startMultiSelect",(function(){return uc})),n.d(r,"stopMultiSelect",(function(){return dc})),n.d(r,"multiSelect",(function(){return bc})),n.d(r,"clearSelectedBlock",(function(){return fc})),n.d(r,"toggleSelection",(function(){return pc})),n.d(r,"replaceBlocks",(function(){return Oc})),n.d(r,"replaceBlock",(function(){return vc})),n.d(r,"moveBlocksDown",(function(){return hc})),n.d(r,"moveBlocksUp",(function(){return jc})),n.d(r,"moveBlocksToPosition",(function(){return kc})),n.d(r,"moveBlockToPosition",(function(){return yc})),n.d(r,"insertBlock",(function(){return _c})),n.d(r,"insertBlocks",(function(){return Ec})),n.d(r,"showInsertionPoint",(function(){return Sc})),n.d(r,"hideInsertionPoint",(function(){return Cc})),n.d(r,"setTemplateValidity",(function(){return wc})),n.d(r,"synchronizeTemplate",(function(){return Bc})),n.d(r,"mergeBlocks",(function(){return Ic})),n.d(r,"removeBlocks",(function(){return xc})),n.d(r,"removeBlock",(function(){return Pc})),n.d(r,"replaceInnerBlocks",(function(){return Tc})),n.d(r,"toggleBlockMode",(function(){return Nc})),n.d(r,"startTyping",(function(){return Rc})),n.d(r,"stopTyping",(function(){return Mc})),n.d(r,"startDraggingBlocks",(function(){return Dc})),n.d(r,"stopDraggingBlocks",(function(){return Lc})),n.d(r,"enterFormattedText",(function(){return Ac})),n.d(r,"exitFormattedText",(function(){return Fc})),n.d(r,"selectionChange",(function(){return Vc})),n.d(r,"insertDefaultBlock",(function(){return Hc})),n.d(r,"updateBlockListSettings",(function(){return zc})),n.d(r,"updateSettings",(function(){return Uc})),n.d(r,"__unstableSaveReusableBlock",(function(){return Gc})),n.d(r,"__unstableMarkLastChangeAsPersistent",(function(){return Kc})),n.d(r,"__unstableMarkNextChangeAsNotPersistent",(function(){return Wc})),n.d(r,"__unstableMarkAutomaticChange",(function(){return qc})),n.d(r,"setNavigationMode",(function(){return $c})),n.d(r,"setBlockMovingClientId",(function(){return Yc})),n.d(r,"duplicateBlocks",(function(){return Xc})),n.d(r,"insertBeforeBlock",(function(){return Qc})),n.d(r,"insertAfterBlock",(function(){return Zc})),n.d(r,"toggleBlockHighlight",(function(){return Jc})),n.d(r,"flashBlock",(function(){return ei})),n.d(r,"setHasControlledInnerBlocks",(function(){return ti}));var o={};n.r(o),n.d(o,"getBlockName",(function(){return ai})),n.d(o,"isBlockValid",(function(){return li})),n.d(o,"getBlockAttributes",(function(){return si})),n.d(o,"getBlock",(function(){return ui})),n.d(o,"__unstableGetBlockWithoutInnerBlocks",(function(){return di})),n.d(o,"getBlocks",(function(){return bi})),n.d(o,"getClientIdsOfDescendants",(function(){return fi})),n.d(o,"getClientIdsWithDescendants",(function(){return pi})),n.d(o,"getGlobalBlockCount",(function(){return mi})),n.d(o,"getBlocksByClientId",(function(){return Oi})),n.d(o,"getBlockCount",(function(){return vi})),n.d(o,"getSelectionStart",(function(){return gi})),n.d(o,"getSelectionEnd",(function(){return hi})),n.d(o,"getBlockSelectionStart",(function(){return ji})),n.d(o,"getBlockSelectionEnd",(function(){return ki})),n.d(o,"getSelectedBlockCount",(function(){return yi})),n.d(o,"hasSelectedBlock",(function(){return _i})),n.d(o,"getSelectedBlockClientId",(function(){return Ei})),n.d(o,"getSelectedBlock",(function(){return Si})),n.d(o,"getBlockRootClientId",(function(){return Ci})),n.d(o,"getBlockParents",(function(){return wi})),n.d(o,"getBlockParentsByBlockName",(function(){return Bi})),n.d(o,"getBlockHierarchyRootClientId",(function(){return Ii})),n.d(o,"getLowestCommonAncestorWithSelectedBlock",(function(){return xi})),n.d(o,"getAdjacentBlockClientId",(function(){return Pi})),n.d(o,"getPreviousBlockClientId",(function(){return Ti})),n.d(o,"getNextBlockClientId",(function(){return Ni})),n.d(o,"getSelectedBlocksInitialCaretPosition",(function(){return Ri})),n.d(o,"getSelectedBlockClientIds",(function(){return Mi})),n.d(o,"getMultiSelectedBlockClientIds",(function(){return Di})),n.d(o,"getMultiSelectedBlocks",(function(){return Li})),n.d(o,"getFirstMultiSelectedBlockClientId",(function(){return Ai})),n.d(o,"getLastMultiSelectedBlockClientId",(function(){return Fi})),n.d(o,"isFirstMultiSelectedBlock",(function(){return Vi})),n.d(o,"isBlockMultiSelected",(function(){return Hi})),n.d(o,"isAncestorMultiSelected",(function(){return zi})),n.d(o,"getMultiSelectedBlocksStartClientId",(function(){return Ui})),n.d(o,"getMultiSelectedBlocksEndClientId",(function(){return Gi})),n.d(o,"getBlockOrder",(function(){return Ki})),n.d(o,"getBlockIndex",(function(){return Wi})),n.d(o,"isBlockSelected",(function(){return qi})),n.d(o,"hasSelectedInnerBlock",(function(){return $i})),n.d(o,"isBlockWithinSelection",(function(){return Yi})),n.d(o,"hasMultiSelection",(function(){return Xi})),n.d(o,"isMultiSelecting",(function(){return Qi})),n.d(o,"isSelectionEnabled",(function(){return Zi})),n.d(o,"getBlockMode",(function(){return Ji})),n.d(o,"isTyping",(function(){return ea})),n.d(o,"isDraggingBlocks",(function(){return ta})),n.d(o,"isCaretWithinFormattedText",(function(){return na})),n.d(o,"getBlockInsertionPoint",(function(){return ra})),n.d(o,"isBlockInsertionPointVisible",(function(){return oa})),n.d(o,"isValidTemplate",(function(){return ca})),n.d(o,"getTemplate",(function(){return ia})),n.d(o,"getTemplateLock",(function(){return aa})),n.d(o,"canInsertBlockType",(function(){return sa})),n.d(o,"canInsertBlocks",(function(){return ua})),n.d(o,"getInserterItems",(function(){return fa})),n.d(o,"hasInserterItems",(function(){return pa})),n.d(o,"__experimentalGetAllowedBlocks",(function(){return ma})),n.d(o,"getBlockListSettings",(function(){return Oa})),n.d(o,"getSettings",(function(){return va})),n.d(o,"isLastBlockChangePersistent",(function(){return ga})),n.d(o,"__experimentalGetBlockListSettingsForBlocks",(function(){return ha})),n.d(o,"__experimentalGetParsedReusableBlock",(function(){return ja})),n.d(o,"__unstableIsLastBlockChangeIgnored",(function(){return ka})),n.d(o,"__experimentalGetLastBlockAttributeChanges",(function(){return ya})),n.d(o,"isNavigationMode",(function(){return Ea})),n.d(o,"hasBlockMovingClientId",(function(){return Sa})),n.d(o,"didAutomaticChange",(function(){return Ca})),n.d(o,"isBlockHighlighted",(function(){return wa})),n.d(o,"areInnerBlocksControlled",(function(){return Ba}));var c=n(11),i=n(25),a=n(77),l=n(48),s=(n(69),n(8)),u=n(5),d=n(0),b=n(10),f=n.n(b),p=n(2),m=n(9),O=n(32),v=n(4),g=n(3),h=Object(d.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:p.noop,clientId:null}),j=h.Provider;function k(){return Object(d.useContext)(h)}function y(){var e=k(),t=e.isSelected,n=e.clientId,r=e.name,o=Object(v.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 _=Object(g.createSlotFill)("BlockControls"),E=_.Fill,S=_.Slot;var C=function(e){var t=e.controls,n=e.children;return y()?Object(d.createElement)(E,null,(function(e){var r=Object(p.isEmpty)(e)?null:e;return Object(d.createElement)(g.__experimentalToolbarContext.Provider,{value:r},Object(d.createElement)(g.ToolbarGroup,{controls:t}),n)})):null};C.Slot=function(e){var t=Object(d.useContext)(g.__experimentalToolbarContext);return Object(d.createElement)(S,Object(s.a)({},e,{fillProps:t}))};var w=C,B=n(1),I=n(7),x=Object(d.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(I.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),P=Object(d.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(I.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),T=Object(d.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(I.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),N=Object(d.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(I.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),R=Object(d.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(I.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));function M(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 D={left:{icon:x,title:Object(B.__)("Align left")},center:{icon:P,title:Object(B.__)("Align center")},right:{icon:T,title:Object(B.__)("Align right")},wide:{icon:N,title:Object(B.__)("Wide width")},full:{icon:R,title:Object(B.__)("Full width")}},L=["left","center","right","wide","full"],A=["wide","full"],F={isAlternate:!0};var V=Object(m.compose)(Object(v.withSelect)((function(e){return{wideControlsEnabled:(0,e("core/block-editor").getSettings)().alignWide}})))((function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?L:r,c=e.isCollapsed,i=void 0===c||c,a=e.wideControlsEnabled,l=void 0!==a&&a?o:o.filter((function(e){return-1===A.indexOf(e)})),s=D[t],b=D.center;return Object(d.createElement)(g.ToolbarGroup,{popoverProps:F,isCollapsed:i,icon:s?s.icon:b.icon,label:Object(B.__)("Change alignment"),controls:l.map((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},D[e],{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})}));function H(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 z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var U=["left","center","right","wide","full"],G=["wide","full"];function K(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)?e:!0===e?U:[],!r||!0===e&&!n?p.without.apply(void 0,[t].concat(G)):t}var W=Object(d.createContext)({}),q=W.Provider,$=Object(m.createHigherOrderComponent)((function(e){return function(t){var n=Object(d.useContext)(W).isEmbedButton,r=t.name,o=n?[]:K(Object(c.getBlockSupport)(r,"align"),Object(c.hasBlockSupport)(r,"alignWide",!0));return[o.length>0&&t.isSelected&&Object(d.createElement)(w,{key:"align-controls"},Object(d.createElement)(V,{value:t.attributes.align,onChange:function(e){if(!e){var n=Object(c.getBlockType)(t.name);Object(p.get)(n,["attributes","align","default"])&&(e="")}t.setAttributes({align:e})},controls:o})),Object(d.createElement)(e,Object(s.a)({key:"edit"},t))]}}),"withToolbarControls"),Y=Object(m.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=t.attributes.align,o=Object(v.useSelect)((function(e){return!!e("core/block-editor").getSettings().alignWide}),[]);if(void 0===r)return Object(d.createElement)(e,t);var i=K(Object(c.getBlockSupport)(n,"align"),Object(c.hasBlockSupport)(n,"alignWide",!0),o),a=t.wrapperProps;return i.includes(r)&&(a=z({},a,{"data-align":r})),Object(d.createElement)(e,Object(s.a)({},t,{wrapperProps:a}))}}));Object(O.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(p.has)(e.attributes,["align","type"])||Object(c.hasBlockSupport)(e,"align")&&(e.attributes=z({},e.attributes,{align:{type:"string"}})),e})),Object(O.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Y),Object(O.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",$),Object(O.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){var r=n.align;return K(Object(c.getBlockSupport)(t,"align"),Object(c.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=f()("align".concat(r),e.className)),e}));var X=Object(g.createSlotFill)("InspectorAdvancedControls"),Q=X.Fill,Z=X.Slot;function J(e){var t=e.children;return k().isSelected?Object(d.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}var ne=/[\s#]/g;var re=Object(m.createHigherOrderComponent)((function(e){return function(t){return Object(c.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object(d.createElement)(d.Fragment,null,Object(d.createElement)(e,t),Object(d.createElement)(ee,null,Object(d.createElement)(g.TextControl,{className:"html-anchor-control",label:Object(B.__)("HTML anchor"),help:Object(d.createElement)(d.Fragment,null,Object(B.__)("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(d.createElement)(g.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(B.__)("Learn more about anchors"))),value:t.attributes.anchor||"",onChange:function(e){e=e.replace(ne,"-"),t.setAttributes({anchor:e})},autoComplete:"off"}))):Object(d.createElement)(e,t)}}),"withInspectorControl");function oe(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}Object(O.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return Object(p.has)(e.attributes,["anchor","type"])||Object(c.hasBlockSupport)(e,"anchor")&&(e.attributes=function(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(u.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}({},e.attributes,{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e})),Object(O.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",re),Object(O.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return Object(c.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));var ce=Object(m.createHigherOrderComponent)((function(e){return function(t){return Object(c.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(d.createElement)(d.Fragment,null,Object(d.createElement)(e,t),Object(d.createElement)(ee,null,Object(d.createElement)(g.TextControl,{autoComplete:"off",label:Object(B.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})},help:Object(B.__)("Separate multiple classes with spaces.")}))):Object(d.createElement)(e,t)}}),"withInspectorControl");function ie(e){e="<div data-custom-class-name>".concat(e,"</div>");var t=Object(c.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(O.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Object(c.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.attributes,{className:{type:"string"}})),e})),Object(O.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",ce),Object(O.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Object(c.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=f()(e.className,n.className)),e})),Object(O.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",(function(e,t,n){if(Object(c.hasBlockSupport)(t,"customClassName",!0)){var r=Object(p.omit)(e,["className"]),o=Object(c.getSaveContent)(t,r),i=ie(o),a=ie(n),l=Object(p.difference)(a,i);l.length?e.className=l.join(" "):o&&delete e.className}return e}));var ae=n(16);Object(O.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Object(c.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(p.uniq)([Object(c.getBlockDefaultClassName)(t.name)].concat(Object(ae.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(c.getBlockDefaultClassName)(t.name)),e}));var le=n(12),se=n(139),ue=n(58),de=n.n(ue),be=function(e,t,n){if(t){var r=Object(p.find)(e,{slug:t});if(r)return r}return{color:n}},fe=function(e,t){return Object(p.find)(e,{color:t})};function pe(e,t){if(e&&t)return"has-".concat(Object(p.kebabCase)(t),"-").concat(e)}function me(e){if(e)return"has-".concat(e,"-gradient-background")}function Oe(e,t){var n=Object(p.find)(e,["slug",t]);return n&&n.gradient}function ve(e,t){return Object(p.find)(e,["gradient",t])}function ge(e,t){var n=ve(e,t);return n&&n.slug}function he(){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=k(),i=c.clientId,a=Object(v.useSelect)((function(e){var t=e("core/block-editor"),r=t.getBlockAttributes,c=t.getSettings,a=r(i);return{gradient:a[n],customGradient:a[o],gradients:c().gradients}}),[i,n,o]),l=a.gradients,s=a.gradient,b=a.customGradient,f=Object(v.useDispatch)("core/block-editor"),p=f.updateBlockAttributes,m=Object(d.useCallback)((function(e){var t,r,c=ge(l,e);c?p(i,(r={},Object(u.a)(r,n,c),Object(u.a)(r,o,void 0),r)):p(i,(t={},Object(u.a)(t,n,void 0),Object(u.a)(t,o,e),t))}),[l,i,p]),O=me(s);return{gradientClass:O,gradientValue:s?Oe(l,s):b,setGradient:m}}var je=function e(t){if(!Object(p.isObject)(t))return t;var n=Object(p.pickBy)(Object(p.mapValues)(t,e),p.identity);return Object(p.isEqual)(n,{})?void 0:n},ke=n(14);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}
|
2 |
-
// translators: first %s: the color name or value (e.g. red or #ff0000)
|
3 |
-
var _e=Object(B.__)("(Color: %s)"),Ee=Object(B.__)("(Gradient: %s)"),Se=["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 Ce(e){var t,n,r=e.colors,o=e.gradients,c=e.label,i=e.currentTab,a=e.colorValue,l=e.gradientValue;if("color"===i){if(a){var s=fe(r,t=a),u=s&&s.name;n=Object(B.sprintf)(_e,u||t)}}else if("gradient"===i&&l){var b=ve(o,t=l),f=b&&b.name;n=Object(B.sprintf)(Ee,f||t)}return Object(d.createElement)(d.Fragment,null,c,!!t&&Object(d.createElement)(g.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,i=e.label,a=e.onColorChange,l=e.onGradientChange,u=e.colorValue,b=e.gradientValue,m=a&&(!Object(p.isEmpty)(t)||!r),O=l&&(!Object(p.isEmpty)(n)||!o),v=Object(d.useState)(b?"gradient":!!m&&"color"),h=Object(le.a)(v,2),j=h[0],k=h[1];return m||O?Object(d.createElement)(g.BaseControl,{className:f()("block-editor-color-gradient-control",c)},Object(d.createElement)("fieldset",null,Object(d.createElement)("legend",null,Object(d.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},Object(d.createElement)(g.BaseControl.VisualLabel,null,Object(d.createElement)(Ce,{currentTab:j,label:i,colorValue:u,gradientValue:b})))),m&&O&&Object(d.createElement)(g.ButtonGroup,{className:"block-editor-color-gradient-control__button-tabs"},Object(d.createElement)(g.Button,{isSmall:!0,isPressed:"color"===j,onClick:function(){return k("color")}},Object(B.__)("Solid")),Object(d.createElement)(g.Button,{isSmall:!0,isPressed:"gradient"===j,onClick:function(){return k("gradient")}},Object(B.__)("Gradient"))),("color"===j||!O)&&Object(d.createElement)(g.ColorPalette,Object(s.a)({value:u,onChange:O?function(e){a(e),l()}:a},{colors:t,disableCustomColors:r})),("gradient"===j||!m)&&Object(d.createElement)(g.__experimentalGradientPicker,Object(s.a)({value:b,onChange:m?function(e){l(e),a()}:l},{gradients:n,disableCustomGradients:o})))):null}function Be(e){var t=Object(v.useSelect)((function(e){var t=e("core/block-editor").getSettings();return Object(p.pick)(t,Se)}));return Object(d.createElement)(we,function(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(u.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}({},t,{},e))}var Ie=function(e){return Object(p.every)(Se,(function(t){return e.hasOwnProperty(t)}))?Object(d.createElement)(we,e):Object(d.createElement)(Be,e)};function xe(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 Pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xe(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 Te=Object(B.__)("(%s: color %s)"),Ne=Object(B.__)("(%s: gradient %s)"),Re=["colors","disableCustomColors","gradients","disableCustomGradients"],Me=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,l=e.colors,s=e.gradients;if(!c&&!i)return null;if(c){var u=fe(l||t,c);o=Object(B.sprintf)(Te,a.toLowerCase(),u&&u.name||c)}else{var b=ve(s||n,c);o=Object(B.sprintf)(Ne,a.toLowerCase(),b&&b.name||i)}return Object(d.createElement)(g.ColorIndicator,{key:r,colorValue:c||i,"aria-label":o})}))},De=function(e){var t=e.className,n=e.colors,r=e.gradients,o=e.disableCustomColors,c=e.disableCustomGradients,i=e.children,a=e.settings,l=e.title,u=Object(ke.a)(e,["className","colors","gradients","disableCustomColors","disableCustomGradients","children","settings","title"]);if(Object(p.isEmpty)(n)&&Object(p.isEmpty)(r)&&o&&c&&Object(p.every)(a,(function(e){return Object(p.isEmpty)(e.colors)&&Object(p.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)})))return null;var b=Object(d.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},l,Object(d.createElement)(Me,{colors:n,gradients:r,settings:a}));return Object(d.createElement)(g.PanelBody,Object(s.a)({className:f()("block-editor-panel-color-gradient-settings",t),title:b},u),a.map((function(e,t){return Object(d.createElement)(Ie,Object(s.a)({key:t},Pe({colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:c},e)))})),i)},Le=function(e){var t=Object(v.useSelect)((function(e){var t=e("core/block-editor").getSettings();return Object(p.pick)(t,Re)}));return Object(d.createElement)(De,Pe({},t,{},e))},Ae=function(e){return Object(p.every)(Re,(function(t){return e.hasOwnProperty(t)}))?Object(d.createElement)(De,e):Object(d.createElement)(Le,e)},Fe=n(50);// 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 Ve(e){var t=e.tinyBackgroundColor,n=e.tinyTextColor,r=e.backgroundColor,o=e.textColor,c=t.getBrightness()<n.getBrightness()?Object(B.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):Object(B.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return Object(d.useEffect)((function(){Object(Fe.speak)(Object(B.__)("This color combination may be hard for people to read."))}),[r,o]),Object(d.createElement)("div",{className:"block-editor-contrast-checker"},Object(d.createElement)(g.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},c))}var He=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=de()(t||n),l=de()(i||r);return 1!==a.getAlpha()||1!==l.getAlpha()||de.a.isReadable(a,l,{level:"AA",size:c||!1!==c&&o>=24?"large":"small"})?null:Object(d.createElement)(Ve,{backgroundColor:t,textColor:i,tinyBackgroundColor:a,tinyTextColor:l})},ze=Object(g.createSlotFill)("InspectorControls"),Ue=ze.Fill,Ge=ze.Slot;function Ke(e){var t=e.children;return y()?Object(d.createElement)(Ue,null,t):null}Ke.Slot=Ge;var We=Ke;function qe(e){return document.getElementById("block-"+e)}function $e(e,t){return t.closest(".block-editor-block-list__block")===e}function Ye(e){for(;e&&e.nodeType!==window.Node.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 Xe(e){var t=e.settings,n=e.clientId,r=e.enableContrastChecking,o=void 0===r||r,c=window,i=c.getComputedStyle,a=c.Node,l=Object(d.useState)(),s=Object(le.a)(l,2),u=s[0],b=s[1],f=Object(d.useState)(),p=Object(le.a)(f,2),m=p[0],O=p[1];return Object(d.useEffect)((function(){if(o){var e=qe(n);if(e){O(i(e).color);for(var t=e,r=i(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===a.ELEMENT_NODE;)t=t.parentNode,r=i(t).backgroundColor;b(r)}}})),Object(d.createElement)(We,null,Object(d.createElement)(Ae,{title:Object(B.__)("Color settings"),initialOpen:!1,settings:t},o&&Object(d.createElement)(He,{backgroundColor:u,textColor:m})))}function Qe(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?Qe(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Je=function(e){return"web"===d.Platform.OS&&Object(c.hasBlockSupport)(e,"__experimentalColor")},et=function(e){if("web"!==d.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"__experimentalColor");return Object(p.isObject)(t)&&!!t.linkColor},tt=function(e){if("web"!==d.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"__experimentalColor");return Object(p.isObject)(t)&&!!t.gradients};function nt(e,t,n){var r,o,c,i,a,l;if(!Je(t))return e;var s=tt(t),d=n.backgroundColor,b=n.textColor,p=n.gradient,m=n.style,O=pe("background-color",d),v=me(p),g=pe("color",b),h=f()(e.className,g,v,(l={},Object(u.a)(l,O,!(s&&(null==m||null===(r=m.color)||void 0===r?void 0:r.gradient)||!O)),Object(u.a)(l,"has-text-color",b||(null==m||null===(o=m.color)||void 0===o?void 0:o.text)),Object(u.a)(l,"has-background",d||(null==m||null===(c=m.color)||void 0===c?void 0:c.background)||s&&(p||(null==m||null===(i=m.color)||void 0===i?void 0:i.gradient))),Object(u.a)(l,"has-link-color",null==m||null===(a=m.color)||void 0===a?void 0:a.link),l));return e.className=h||void 0,e}var rt=function(e,t){var n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?be(e,n[1]).color:t};function ot(e){var t,n,r,o,c,i,a=e.name,l=e.attributes,s=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings()}),[]),b=s.colors,f=s.gradients,p=s.__experimentalEnableLinkColor,m=Object(d.useRef)(l);if(Object(d.useEffect)((function(){m.current=l}),[l]),!Je(a))return null;var O,g=tt(a),h=l.style,j=l.textColor,k=l.backgroundColor,y=l.gradient;if(g&&y)O=Oe(f,y);else if(g){var _;O=null==h||null===(_=h.color)||void 0===_?void 0:_.gradient}var E=function(t){return function(n){var r,o,c=fe(b,n),i=t+"Color",a=Ze({},m.current.style,{color:Ze({},null===(r=m.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color,Object(u.a)({},t,(null==c?void 0:c.slug)?void 0:n))}),l=(null==c?void 0:c.slug)?c.slug:void 0,s=Object(u.a)({style:je(a)},i,l);e.setAttributes(s),m.current=Ze({},m.current,{},s)}};return Object(d.createElement)(Xe,{enableContrastChecking:"web"===d.Platform.OS&&!y&&!(null==h||null===(t=h.color)||void 0===t?void 0:t.gradient),clientId:e.clientId,settings:[{label:Object(B.__)("Text Color"),onColorChange:E("text"),colorValue:be(b,j,null==h||null===(n=h.color)||void 0===n?void 0:n.text).color},{label:Object(B.__)("Background Color"),onColorChange:E("background"),colorValue:be(b,k,null==h||null===(r=h.color)||void 0===r?void 0:r.background).color,gradientValue:O,onGradientChange:g?function(t){var n,r=ge(f,t);if(r){var o,c,i,a=Ze({},null===(o=m.current)||void 0===o?void 0:o.style,{color:Ze({},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,s,u,d=Ze({},null===(l=m.current)||void 0===l?void 0:l.style,{color:Ze({},null===(s=m.current)||void 0===s||null===(u=s.style)||void 0===u?void 0:u.color,{gradient:t})});n={style:je(d),gradient:void 0}}e.setAttributes(n),m.current=Ze({},m.current,{},n)}:void 0}].concat(Object(ae.a)(p&&et(a)?[{label:Object(B.__)("Link Color"),onColorChange:function(t){var n,r=fe(b,t);e.setAttributes({style:Ze({},e.attributes.style,{color:Ze({},null===(n=e.attributes.style)||void 0===n?void 0:n.color,{link:(null==r?void 0:r.slug)?"var:preset|color|".concat(r.slug):t})})})},colorValue:rt(b,null==h||null===(o=h.color)||void 0===o?void 0:o.link),clearable:!!(null===(c=e.attributes.style)||void 0===c||null===(i=c.color)||void 0===i?void 0:i.link)}]:[]))})}var ct=Object(m.createHigherOrderComponent)((function(e){return function(t){var n,r,o,c=t.name,i=t.attributes,a=i.backgroundColor,l=i.textColor,u=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings().colors}),[]);if(!Je(c))return Object(d.createElement)(e,t);var b={color:l?null===(n=be(u,l))||void 0===n?void 0:n.color:void 0,backgroundColor:a?null===(r=be(u,a))||void 0===r?void 0:r.color:void 0},f=t.wrapperProps;return f=Ze({},t.wrapperProps,{style:Ze({},b,{},null===(o=t.wrapperProps)||void 0===o?void 0:o.style)}),Object(d.createElement)(e,Object(s.a)({},t,{wrapperProps:f}))}}));Object(O.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return Je(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),tt(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),Object(O.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",nt),Object(O.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!Je(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),nt(r,e,n)},e})),Object(O.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",ct);var it=n(20);function at(e){var t=e.value,n=e.onChange,r=function(e){return void 0!==e&&""!==e}(t),o=r?t:"";return Object(d.createElement)("div",{className:"block-editor-line-height-control"},Object(d.createElement)(g.TextControl,{autoComplete:"off",onKeyDown:function(e){e.keyCode!==it.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(B.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:o,min:0}))}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 st(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(u.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 ut(e){var t,n=e.attributes.style;if(dt(e))return null;return Object(d.createElement)(at,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:function(t){var r=st({},n,{typography:st({},null==n?void 0:n.typography,{lineHeight:t})});e.setAttributes({style:je(r)})}})}function dt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings().__experimentalDisableCustomLineHeight}));return!Object(c.hasBlockSupport)(t,"__experimentalLineHeight")||n}var bt=n(145),ft=n.n(bt),pt=function(e,t,n){if(t){var r=Object(p.find)(e,{slug:t});if(r)return r}return{size:n}};function mt(e,t){var n=Object(p.find)(e,{size:t});return n||{size:t}}function Ot(e){if(e)return"has-".concat(Object(p.kebabCase)(e),"-font-size")}var vt=Object(v.withSelect)((function(e){var t=e("core/block-editor").getSettings();return{disableCustomFontSizes:t.disableCustomFontSizes,fontSizes:t.fontSizes}}))(g.FontSizePicker);function gt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ht(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gt(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jt(e,t,n){if(!Object(c.hasBlockSupport)(t,"__experimentalFontSize"))return e;var r=new ft.a(e.className);r.add(Ot(n.fontSize));var o=r.value;return e.className=o||void 0,e}function kt(){return Object(v.useSelect)((function(e){return e("core/block-editor").getSettings().fontSizes}))}function yt(e){var t,n=e.attributes,r=n.fontSize,o=n.style,c=e.setAttributes,i=_t(e),a=kt();if(i)return null;var l=pt(a,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize);return Object(d.createElement)(vt,{value:l.size,onChange:function(e){var t=mt(a,e).slug;c({style:je(ht({},o,{typography:ht({},null==o?void 0:o.typography,{fontSize:t?void 0:e})})),fontSize:t})}})}function _t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=kt(),r=n.length;return!Object(c.hasBlockSupport)(t,"__experimentalFontSize")||!r}var Et=Object(m.createHigherOrderComponent)((function(e){return function(t){var n,r=kt(),o=t.name,i=t.attributes,a=i.fontSize,l=i.style,s=t.wrapperProps,u=ht({},t);if(Object(c.hasBlockSupport)(o,"__experimentalFontSize")&&a&&!(null==l||null===(n=l.typography)||void 0===n?void 0:n.fontSize)){var b,f=pt(r,a,null==l||null===(b=l.typography)||void 0===b?void 0:b.fontSize).size;u.wrapperProps=ht({},s,{style:ht({fontSize:f},null==s?void 0:s.style)})}return Object(d.createElement)(e,u)}}),"withFontSizeInlineStyles");Object(O.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return Object(c.hasBlockSupport)(e,"__experimentalFontSize")?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),Object(O.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",jt),Object(O.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!Object(c.hasBlockSupport)(e,"__experimentalFontSize"))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),jt(r,e,n)},e})),Object(O.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",Et);var St=["__experimentalLineHeight","__experimentalFontSize"];function Ct(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[_t(e),dt(e)];return t.filter(Boolean).length===t.length}(e),n=wt(e.name);return t||!n?null:Object(d.createElement)(We,null,Object(d.createElement)(g.PanelBody,{title:Object(B.__)("Typography")},Object(d.createElement)(yt,e),Object(d.createElement)(ut,e)))}var wt=function(e){return"web"===d.Platform.OS&&St.some((function(t){return Object(c.hasBlockSupport)(e,t)}))};function Bt(e){var t=k().name,n="__experimentalFeatures.".concat(e);return Object(v.useSelect)((function(e){var r=(0,e("core/blocks").getBlockSupport)(t,n);if(void 0!==r)return r;var o=e("core/block-editor").getSettings;return Object(p.get)(o(),n)}),[t,n])}function It(e){var t=e.units,n=Object(ke.a)(e,["units"]),r=xt(t);return Object(d.createElement)(g.__experimentalUnitControl,Object(s.a)({units:r},n))}function xt(e){var t=Bt("__experimentalDisableCustomUnits"),n=!!t;return Array.isArray(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)}))}(t,e):!n&&e}function Pt(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 Tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pt(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nt(e){var t,n=e.name,r=e.attributes.style,o=e.setAttributes,i=xt();if(!Object(c.hasBlockSupport)(n,"__experimentalPadding"))return null;return d.Platform.select({web:Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:function(e){var t=Tt({},r,{spacing:{padding:e}});o({style:je(t)})},onChangeShowVisualizer:function(e){var t=Tt({},r,{visualizers:{padding:e}});o({style:je(t)})},label:Object(B.__)("Padding"),units:i})),native:null})}var Rt={paddingTop:["spacing","padding","top"],paddingRight:["spacing","padding","right"],paddingBottom:["spacing","padding","bottom"],paddingLeft:["spacing","padding","left"]};function Mt(e){var t=e.children,n=Object(ke.a)(e,["children"]);return Object(v.useSelect)((function(e){var t=e("core/block-editor").getSettings;return Object(p.get)(t(),"__experimentalEnableCustomSpacing")}))?Object(d.createElement)(We,n,Object(d.createElement)(g.PanelBody,{title:Object(B.__)("Spacing")},t)):null}function Dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dt(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var At=[].concat(Object(ae.a)(St),["__experimentalColor","__experimentalPadding"]),Ft=function(e){return At.some((function(t){return Object(c.hasBlockSupport)(e,t)}))};function Vt(e){if(Object(p.startsWith)(e,"var:")){var t=e.slice("var:".length).split("|").join("--");return"var(--wp--".concat(t,")")}return e}function Ht(e,t,n){if(!Ft(t))return e;var r=n.style;return e.style=Lt({},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Lt({},Rt,{lineHeight:["typography","lineHeight"],fontSize:["typography","fontSize"],background:["color","gradient"],backgroundColor:["color","background"],color:["color","text"],"--wp--style--color--link":["color","link"]}),n={};return Object.entries(t).forEach((function(t){var r=Object(se.a)(t),o=r[0],c=r.slice(1),i=Object(le.a)(c,1)[0];Object(p.has)(e,i)&&(n[o]=Vt(Object(p.get)(e,i)))})),n}(r),{},e.style),e}var zt=Object(m.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=Object(c.hasBlockSupport)(n,"__experimentalPadding");return[Object(d.createElement)(Ct,Object(s.a)({key:"typography"},t)),Object(d.createElement)(ot,Object(s.a)({key:"colors"},t)),Object(d.createElement)(e,Object(s.a)({key:"edit"},t)),r&&Object(d.createElement)(Mt,{key:"spacing"},Object(d.createElement)(Nt,t))]}}),"withToolbarControls");Object(O.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Ft(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),Object(O.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",Ht),Object(O.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!Ft(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(O.addFilter)("editor.BlockEdit","core/style/with-block-controls",zt);var Ut=n(19),Gt=n(18),Kt=n(13),Wt=n(23),qt=n(15),$t=n(21);function Yt(){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 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(u.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}var Zt=[],Jt=function(e){return Object(m.createHigherOrderComponent)((function(t){return function(n){return Object(d.createElement)(t,Object(s.a)({},n,{colors:e}))}}),"withCustomColorPalette")},en=function(){return Object(v.withSelect)((function(e){var t=e("core/block-editor").getSettings();return{colors:Object(p.get)(t,["colors"],Zt)}}))};function tn(e,t){var n=Object(p.reduce)(e,(function(e,t){return Qt({},e,{},Object(p.isString)(t)?Object(u.a)({},t,Object(p.kebabCase)(t)):t)}),{});return Object(m.compose)([t,function(e){return function(t){Object($t.a)(c,t);var r,o=(r=c,function(){var e,t=Object(qt.a)(r);if(Yt()){var n=Object(qt.a)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Object(Wt.a)(this,e)});function c(e){var t;return Object(Ut.a)(this,c),(t=o.call(this,e)).setters=t.createSetters(),t.colorUtils={getMostReadableColor:t.getMostReadableColor.bind(Object(Kt.a)(t))},t.state={},t}return Object(Gt.a)(c,[{key:"getMostReadableColor",value:function(e){return function(e,t){return de.a.mostReadable(t,Object(p.map)(e,"color")).toHexString()}(this.props.colors,e)}},{key:"createSetters",value:function(){var e=this;return Object(p.reduce)(n,(function(t,n,r){var o=Object(p.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=fe(n.props.colors,r);n.props.setAttributes((o={},Object(u.a)(o,e,c&&c.slug?c.slug:void 0),Object(u.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(d.createElement)(e,Qt({},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(p.reduce)(n,(function(e,n,c){var i=be(o,r[c],r["custom".concat(Object(p.upperFirst)(c))]),a=t[c];return Object(p.get)(a,["color"])===i.color&&a?e[c]=a:e[c]=Qt({},i,{class:pe(n,i.slug)}),e}),{})}}]),c}(d.Component)}])}function nn(e){return function(){for(var t=Jt(e),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Object(m.createHigherOrderComponent)(tn(r,t),"withCustomColors")}}function rn(){for(var e=en(),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Object(m.createHigherOrderComponent)(tn(n,e),"withColors")}var on=n(52),cn=n.n(on);function an(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 ln=function(e){var t=e.colorSettings,n=Object(ke.a)(e,["colorSettings"]),r=t.map((function(e){var t=e.value,n=e.onChange;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?an(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):an(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Object(ke.a)(e,["value","onChange"]),{colorValue:t,onColorChange:n})}));return Object(d.createElement)(Ae,Object(s.a)({settings:r,gradients:[],disableCustomGradients:!0},n))},sn=function(e,t,n){return"function"==typeof e?e(t):!0===e?n:e};function un(e){var t=e.title,n=e.colorSettings,r=e.colorPanelProps,o=e.contrastCheckers,c=e.detectedBackgroundColor,i=e.detectedColor,a=e.panelChildren,l=e.initialOpen;return Object(d.createElement)(ln,Object(s.a)({title:t,initialOpen:l,colorSettings:Object.values(n)},r),o&&(Array.isArray(o)?o.map((function(e){var t=e.backgroundColor,r=e.textColor,o=Object(ke.a)(e,["backgroundColor","textColor"]);return t=sn(t,n,c),r=sn(r,n,i),Object(d.createElement)(He,Object(s.a)({key:"".concat(t,"-").concat(r),backgroundColor:t,textColor:r},o))})):Object(p.map)(n,(function(e){var t=e.value,r=o.backgroundColor,a=o.textColor;return r=sn(r||t,n,c),a=sn(a||t,n,i),Object(d.createElement)(He,Object(s.a)({},o,{key:"".concat(r,"-").concat(a),backgroundColor:r,textColor:a}))}))),"function"==typeof a?a(n):a)}function dn(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return bn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bn(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,o,c=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return c=e.done,e},e:function(e){i=!0,o=e},f:function(){try{c||null==r.return||r.return()}finally{if(i)throw o}}}}function bn(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 fn(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 pn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fn(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var mn=window,On=mn.getComputedStyle,vn=mn.Node,gn=[],hn={textColor:Object(B.__)("Text Color"),backgroundColor:Object(B.__)("Background Color")},jn=function(e){return Object(d.createElement)(We,null,Object(d.createElement)(un,e))};function kn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{panelTitle:Object(B.__)("Color settings")},n=t.panelTitle,r=void 0===n?Object(B.__)("Color settings"):n,o=t.colorPanelProps,c=t.contrastCheckers,i=t.panelChildren,a=t.colorDetector,l=(a=void 0===a?{}:a).targetRef,s=a.backgroundColorTargetRef,b=void 0===s?l:s,m=a.textColorTargetRef,O=void 0===m?l:m,g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],h=k(),j=h.clientId,y=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockAttributes,r=(0,t.getSettings)().colors;return{attributes:n(j),settingsColors:r&&!0!==r?r:gn}}),[j]),_=y.attributes,E=y.settingsColors,S=Object(v.useDispatch)("core/block-editor"),C=S.updateBlockAttributes,w=Object(d.useCallback)((function(e){return C(j,e)}),[C,j]),I=Object(d.useMemo)((function(){return cn()((function(e,t,n,r,o,c){return function(i){var a,l=i.children,s=i.className,b=void 0===s?"":s,m=i.style,O=void 0===m?{}:m,v={};r?v=Object(u.a)({},t,o):c&&(v=Object(u.a)({},t,c));var g={className:f()(b,(a={},Object(u.a)(a,"has-".concat(Object(p.kebabCase)(r),"-").concat(Object(p.kebabCase)(t)),r),Object(u.a)(a,n||"has-".concat(Object(p.kebabCase)(e)),r||c),a)),style:pn({},v,{},O)};return Object(p.isFunction)(l)?l(g):d.Children.map(l,(function(e){return Object(d.cloneElement)(e,{className:f()(e.props.className,g.className),style:pn({},g.style,{},e.props.style||{})})}))}}),{maxSize:e.length})}),[e.length]),x=Object(d.useMemo)((function(){return cn()((function(e,t){return function(n){var r=t.find((function(e){return e.color===n}));w(Object(u.a)({},r?Object(p.camelCase)("custom ".concat(e)):e,void 0)),w(Object(u.a)({},r?e:Object(p.camelCase)("custom ".concat(e)),r?r.slug:n))}}),{maxSize:e.length})}),[w,e.length]),P=Object(d.useState)(),T=Object(le.a)(P,2),N=T[0],R=T[1],M=Object(d.useState)(),D=Object(le.a)(M,2),L=D[0],A=D[1];return Object(d.useEffect)((function(){if(c){var e,t=!1,n=!1,r=dn(Object(p.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&&A(On(O.current).color),t){for(var l=b.current,s=On(l).backgroundColor;"rgba(0, 0, 0, 0)"===s&&l.parentNode&&l.parentNode.nodeType===vn.ELEMENT_NODE;)l=l.parentNode,s=On(l).backgroundColor;R(s)}}}),[e.reduce((function(e,t){return"".concat(e," | ").concat(_[t.name]," | ").concat(_[Object(p.camelCase)("custom ".concat(t.name))])}),"")].concat(Object(ae.a)(g))),Object(d.useMemo)((function(){var t={},n=e.reduce((function(e,n){"string"==typeof n&&(n={name:n});var r=pn({},n,{color:_[n.name]}),o=r.name,c=r.property,i=void 0===c?o:c,a=r.className,l=r.panelLabel,s=void 0===l?n.label||hn[o]||Object(p.startCase)(o):l,u=r.componentName,d=void 0===u?Object(p.startCase)(o).replace(/\s/g,""):u,b=r.color,f=void 0===b?n.color:b,m=r.colors,O=void 0===m?E:m,v=_[Object(p.camelCase)("custom ".concat(o))],g=v?void 0:O.find((function(e){return e.slug===f}));return e[d]=I(o,i,a,f,g&&g.color,v),e[d].displayName=d,e[d].color=v||g&&g.color,e[d].slug=f,e[d].setColor=x(o,O),t[d]={value:g?g.color:_[Object(p.camelCase)("custom ".concat(o))],onChange:e[d].setColor,label:s,colors:O},O||delete t[d].colors,e}),{}),a={title:r,initialOpen:!1,colorSettings:t,colorPanelProps:o,contrastCheckers:c,detectedBackgroundColor:N,detectedColor:L,panelChildren:i};return pn({},n,{ColorPanel:Object(d.createElement)(un,a),InspectorControlsColorPanel:Object(d.createElement)(jn,a)})}),[_,w,L,N].concat(Object(ae.a)(g)))}function yn(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 _n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function En(e){return function(){var t,n=Object(qt.a)(e);if(Sn()){var r=Object(qt.a)(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return Object(Wt.a)(this,t)}}function Sn(){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}}var Cn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(p.reduce)(t,(function(e,t){return e[t]="custom".concat(Object(p.upperFirst)(t)),e}),{});return Object(m.createHigherOrderComponent)(Object(m.compose)([Object(v.withSelect)((function(e){return{fontSizes:e("core/block-editor").getSettings().fontSizes}})),function(e){return function(t){Object($t.a)(o,t);var n=En(o);function o(e){var t;return Object(Ut.a)(this,o),(t=n.call(this,e)).setters=t.createSetters(),t.state={},t}return Object(Gt.a)(o,[{key:"createSetters",value:function(){var e=this;return Object(p.reduce)(r,(function(t,n,r){var o=Object(p.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(p.find)(n.props.fontSizes,{size:Number(r)});n.props.setAttributes((o={},Object(u.a)(o,e,c&&c.slug?c.slug:void 0),Object(u.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(d.createElement)(e,_n({},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(p.some)(r,c))return null;var i=Object(p.reduce)(Object(p.pickBy)(r,c),(function(e,t,r){var c=n[r],i=pt(o,c,n[t]);return e[r]=_n({},i,{class:Ot(c)}),e}),{});return _n({},t,{},i)}}]),o}(d.Component)}]),"withFontSizes")},wn=n(265),Bn=n(266),In=n(267);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}var Pn=[{icon:wn.a,title:Object(B.__)("Align text left"),align:"left"},{icon:Bn.a,title:Object(B.__)("Align text center"),align:"center"},{icon:In.a,title:Object(B.__)("Align text right"),align:"right"}],Tn={position:"bottom right",isAlternate:!0};var Nn=function(e){var t=e.value,n=e.onChange,r=e.alignmentControls,o=void 0===r?Pn:r,c=e.label,i=void 0===c?Object(B.__)("Change text alignment"):c,a=e.isCollapsed,l=void 0===a||a,s=e.isRTL;function b(e){return function(){return n(t===e?void 0:e)}}var f=Object(p.find)(o,(function(e){return e.align===t}));return Object(d.createElement)(g.ToolbarGroup,{isCollapsed:l,icon:f?f.icon:s?In.a:wn.a,label:i,popoverProps:Tn,controls:o.map((function(e){var n=e.align;return function(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(u.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}({},e,{isActive:t===n,role:l?"menuitemradio":void 0,onClick:b(n)})}))})};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}var Mn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=(e=(e=Object(p.deburr)(e)).replace(/^\//,"")).toLowerCase(),Object(p.words)(e)},Dn=function(e,t){return Object(p.differenceWith)(e,Mn(t),(function(e,t){return t.includes(e)}))},Ln=function(e,t,n,r){var o=Mn(r);return 0===o.length?e:An(e,r,{getCategory:function(e){var n;return null===(n=Object(p.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){return(e.variations||[]).map((function(e){return e.title}))}}).map((function(e){if(Object(p.isEmpty)(e.variations))return e;var t=e.variations.filter((function(e){return Object(p.intersectionWith)(o,Mn(e.title),(function(e,t){return t.includes(e)})).length>0}));return Object(p.isEmpty)(t)?e:function(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(u.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}({},e,{variations:t})}))},An=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Mn(t);if(0===r.length)return e;var o=function(e){return e.title},c=function(e){return e.keywords||[]},i=function(e){return e.category},a=function(){return null},l=function(){return[]},s=n.getTitle,u=void 0===s?o:s,d=n.getKeywords,b=void 0===d?c:d,f=n.getCategory,p=void 0===f?i:f,m=n.getCollection,O=void 0===m?a:m,v=n.getVariations,g=void 0===v?l:v;return e.filter((function(e){var t=u(e),n=b(e),o=p(e),c=O(e),i=g(e),a=[t].concat(Object(ae.a)(n),[o,c],Object(ae.a)(i)).join(" ");return 0===Dn(r,a).length}))},Fn=function(e,t){var n=Object(v.useSelect)((function(t){var n=t("core/block-editor"),r=n.getInserterItems,o=n.getSettings,c=t("core/blocks"),i=c.getCategories,a=c.getCollections,l=o().__experimentalFetchReusableBlocks;return{categories:i(),collections:a(),items:r(e),fetchReusableBlocks:l}}),[e]),r=n.categories,o=n.collections,i=n.items,a=n.fetchReusableBlocks;Object(d.useEffect)((function(){a&&a()}),[]);return[i,r,o,function(e){var n=e.name,r=e.initialAttributes,o=e.innerBlocks,i=Object(c.createBlock)(n,r,function e(t){return Object(p.map)(t,(function(t){var n=Object(le.a)(t,3),r=n[0],o=n[1],i=n[2],a=void 0===i?[]:i;return Object(c.createBlock)(r,o,e(a))}))}(o));t(i)}]};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(u.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}function zn(e){return e.reduce((function(e,t){var n=t.variations,r=void 0===n?[]:n;return r.some((function(e){return e.isDefault}))||e.push(t),r.length&&(e=e.concat(r.map((function(e){return Hn({},t,{id:"".concat(t.id,"-").concat(e.name),icon:e.icon||t.icon,title:e.title||t.title,description:e.description||t.description,example:e.hasOwnProperty("example")?e.example:t.example,initialAttributes:Hn({},t.initialAttributes,{},e.attributes),innerBlocks:e.innerBlocks})})))),e}),[])}var Un=n(147);function Gn(e){var t=e.icon,n=e.showColors,r=void 0!==n&&n,o=e.className;"block-default"===Object(p.get)(t,["src"])&&(t={src:Un.a});var c=Object(d.createElement)(g.Icon,{icon:t&&t.src?t.src:t}),i=r?{backgroundColor:t&&t.background,color:t&&t.foreground}:{};return Object(d.createElement)("span",{style:i,className:f()("block-editor-block-icon",o,{"has-colors":r})},c)}var Kn=function e(t){return Object(p.map)(t,(function(t){var n=Object(le.a)(t,3),r=n[0],o=n[1],i=n[2],a=void 0===i?[]:i;return Object(c.createBlock)(r,o,e(a))}))};var Wn={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems:function(e){var t=Object(v.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=Fn(n,p.noop),c=Object(le.a)(o,3),i=c[0],a=c[1],l=c[2],s=Object(d.useMemo)((function(){return Ln(i,a,l,e).filter((function(e){return e.name!==r}))}),[e,r,i,a,l]);return[Object(d.useMemo)((function(){return zn(s).map((function(e){var t=e.title,n=e.icon,r=e.isDisabled;return{key:"block-".concat(e.id),value:e,label:Object(d.createElement)(d.Fragment,null,Object(d.createElement)(Gn,{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(c.createBlock)(t,n,Kn(r))}}},qn=[];var $n=function(e){var t=k().name,n=e.completers,r=void 0===n?qn:n;return r=Object(d.useMemo)((function(){var e=r;return t===Object(c.getDefaultBlockName)()&&(e=e.concat([Wn])),Object(O.hasFilter)("editor.Autocomplete.completers")&&(e===r&&(e=e.map(p.clone)),e=Object(O.applyFilters)("editor.Autocomplete.completers",e,t)),e}),[r,t]),Object(d.createElement)(g.Autocomplete,Object(s.a)({},e,{completers:r}))};var Yn=function(e){var t=e.label,n=void 0===t?Object(B.__)("Change matrix alignment"):t,r=e.onChange,o=void 0===r?p.noop:r,c=e.value,i=void 0===c?"center":c,a=Object(d.createElement)(g.__experimentalAlignmentMatrixControl.Icon,{value:i}),l="block-editor-block-alignment-matrix-toolbar",s="".concat(l,"__popover");return Object(d.createElement)(g.Dropdown,{position:"bottom right",className:l,popoverProps:{className:s,isAlternate:!0},renderToggle:function(e){var t=e.onToggle,r=e.isOpen;return Object(d.createElement)(g.ToolbarGroup,null,Object(d.createElement)(g.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":r,onKeyDown:function(e){r||e.keyCode!==it.DOWN||(e.preventDefault(),e.stopPropagation(),t())},label:n,icon:a,showTooltip:!0}))},renderContent:function(){return Object(d.createElement)(g.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:o,value:i})}})};function Xn(e){var t=e.clientId,n=Object(v.useSelect)((function(e){return t?(0,e("core/block-editor").getBlockName)(t):null}),[t]);if(!n)return null;var r=Object(c.getBlockType)(n);return r?r.title:null}var Qn=function(){var e=Object(v.useDispatch)("core/block-editor"),t=e.selectBlock,n=e.clearSelectedBlock,r=Object(v.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(d.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":Object(B.__)("Block breadcrumb")},Object(d.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&Object(d.createElement)(g.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:n},Object(B.__)("Document")),!i&&Object(B.__)("Document")),c.map((function(e){return Object(d.createElement)("li",{key:e},Object(d.createElement)(g.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:function(){return t(e)}},Object(d.createElement)(Xn,{clientId:e})))})),!!o&&Object(d.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},Object(d.createElement)(Xn,{clientId:o})))};function Zn(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 Jn=Object(d.createContext)({});function er(e){var t=e.value,n=e.children,r=Object(d.useContext)(Jn),o=Object(d.useMemo)((function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zn(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},r,{},t)}),[r,t]);return Object(d.createElement)(Jn.Provider,{value:o,children:n})}var tr=Jn,nr=function(){return Object(d.createElement)(g.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Object(d.createElement)(g.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"}))},rr=function(e){var t=e.style,n=e.className;return Object(d.createElement)("div",{className:"block-library-colors-selector__icon-container"},Object(d.createElement)("div",{className:"".concat(n," block-library-colors-selector__state-selection"),style:t},Object(d.createElement)(nr,null)))},or=function(e){var t,n,r,o=e.children,c=Object(ke.a)(e,["children"]);return Object(d.createElement)(g.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(d.createElement)(g.ToolbarGroup,null,Object(d.createElement)(g.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:Object(B.__)("Open Colors Selector"),onClick:t,onKeyDown:function(e){o||e.keyCode!==it.DOWN||(e.preventDefault(),e.stopPropagation(),t())},icon:Object(d.createElement)(r,null,Object(d.createElement)(n,null,Object(d.createElement)(rr,null)))}))}),renderContent:function(){return o}})},cr=n(42),ir=n.n(cr),ar={},lr=Object(g.withFilters)("editor.BlockEdit")((function(e){var t=e.attributes,n=void 0===t?{}:t,r=e.name,o=Object(c.getBlockType)(r),i=Object(d.useContext)(tr),a=Object(d.useMemo)((function(){return o&&o.context?(ir()('Block type "context" option',{alternative:'"usesContext"',version:"8.6.0",hint:'Block "'.concat(r,'".'),link:"https://developer.wordpress.org/block-editor/developers/block-api/block-context/"}),Object(p.pick)(i,o.context)):o&&o.usesContext?Object(p.pick)(i,o.usesContext):ar}),[o,i]);if(!o)return null;var l=o.edit||o.save;if(Object(c.hasBlockSupport)(o,"lightBlockWrapper",!1))return Object(d.createElement)(l,Object(s.a)({},e,{context:a}));var u=Object(c.hasBlockSupport)(o,"className",!0)?Object(c.getBlockDefaultClassName)(r):null,b=f()(u,n.className);return Object(d.createElement)(l,Object(s.a)({},e,{context:a,className:b}))}));function sr(e){var t={name:e.name,isSelected:e.isSelected,clientId:e.clientId,onFocus:e.onFocus,onCaretVerticalPositionChange:e.onCaretVerticalPositionChange};return Object(d.createElement)(j,{value:Object(d.useMemo)((function(){return t}),Object.values(t))},Object(d.createElement)(lr,e))}var ur=Object(g.createSlotFill)("BlockFormatControls"),dr=ur.Fill,br=ur.Slot;var fr=function(e){return k().isSelected?Object(d.createElement)(dr,null,(function(t){var n=Object(p.isEmpty)(t)?null:t;return Object(d.createElement)(g.__experimentalToolbarContext.Provider,{value:n},e.children)})):null};fr.Slot=function(e){var t=Object(d.useContext)(g.__experimentalToolbarContext);return Object(d.createElement)(br,Object(s.a)({},e,{fillProps:t}))};var pr=fr,mr=n(22),Or=n.n(mr),vr=n(43),gr=n(194),hr=n(107),jr=n(31),kr=function(e){return e+1},yr=function(e){return{top:e.offsetTop,left:e.offsetLeft}};var _r=function(e,t,n,r,o){var c=Object(m.useReducedMotion)()||!r,i=Object(d.useReducer)(kr,0),a=Object(le.a)(i,2),l=a[0],s=a[1],u=Object(d.useReducer)(kr,0),b=Object(le.a)(u,2),f=b[0],p=b[1],O=Object(d.useState)({x:0,y:0}),v=Object(le.a)(O,2),g=v[0],h=v[1],j=Object(d.useMemo)((function(){return e.current?yr(e.current):null}),[o]),k=Object(d.useMemo)((function(){if(!n||!e.current)return function(){};var t=Object(jr.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(d.useLayoutEffect)((function(){l&&p()}),[l]),Object(d.useLayoutEffect)((function(){if(j)if(c)k();else{e.current.style.transform="";var t=yr(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(hr.useSpring)({from:{x:g.x,y:g.y},to:{x:0,y:0},reset:l!==f,config:{mass:5,tension:2e3,friction:200},immediate:c,onFrame:y})},Er=Object(hr.animated)(g.__experimentalTreeGridRow);function Sr(e){var t=e.isSelected,n=e.position,r=e.level,o=e.rowCount,c=e.children,i=e.className,a=e.path,l=Object(ke.a)(e,["isSelected","position","level","rowCount","children","className","path"]),u=Object(d.useRef)(null),b=a.join("_"),p=_r(u,t,!1,!0,b);return Object(d.createElement)(Er,Object(s.a)({ref:u,style:p,className:f()("block-editor-block-navigation-leaf",i),level:r,positionInSet:n,setSize:o},l),c)}var Cr=n(269),wr=n(270),Br=n(271),Ir=n(272);function xr(e,t,n,r,o,c,i,a){var l=n+1,s=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;if(o<0&&n)return Object(B.__)("Blocks cannot be moved up as they are already at the top");if(o>0&&r)return Object(B.__)("Blocks cannot be moved down as they are already at the bottom");if(o<0&&!n)return Object(B.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
|
8 |
-
Object(B._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);if(o>0&&!r)return Object(B.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
|
9 |
-
Object(B._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)}(e,n,r,o,c);if(r&&o)return Object(B.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
|
10 |
-
Object(B.__)("Block %s is the only block, and cannot be moved"),t);if(c>0&&!o){var u=s("down");if("down"===u)return Object(B.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
11 |
-
Object(B.__)("Move %1$s block from position %2$d down to position %3$d"),t,l,l+1);if("left"===u)return Object(B.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
12 |
-
Object(B.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l+1);if("right"===u)return Object(B.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
13 |
-
Object(B.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l+1)}if(c>0&&o){var d=s("down");if("down"===d)return Object(B.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
14 |
-
Object(B.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===d)return Object(B.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
15 |
-
Object(B.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===d)return Object(B.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
16 |
-
Object(B.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(c<0&&!r){var b=s("up");if("up"===b)return Object(B.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
17 |
-
Object(B.__)("Move %1$s block from position %2$d up to position %3$d"),t,l,l-1);if("left"===b)return Object(B.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
18 |
-
Object(B.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l-1);if("right"===b)return Object(B.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
19 |
-
Object(B.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l-1)}if(c<0&&r){var f=s("up");if("up"===f)return Object(B.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
20 |
-
Object(B.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===f)return Object(B.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
21 |
-
Object(B.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===f)return Object(B.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
22 |
-
Object(B.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}var Pr=function(e,t,n){return"up"===e?"horizontal"===t?n?Cr.a:wr.a:Br.a:"down"===e?"horizontal"===t?n?wr.a:Cr.a:Ir.a:null},Tr=function(e,t,n){return"up"===e?"horizontal"===t?n?Object(B.__)("Move right"):Object(B.__)("Move left"):Object(B.__)("Move up"):"down"===e?"horizontal"===t?n?Object(B.__)("Move left"):Object(B.__)("Move right"):Object(B.__)("Move down"):null},Nr=Object(d.forwardRef)((function(e,t){var n=e.clientIds,r=e.direction,o=e.orientation,i=Object(ke.a)(e,["clientIds","direction","orientation"]),a=Object(m.useInstanceId)(Nr),l=Object(p.castArray)(n).length,u=Object(v.useSelect)((function(e){var t=e("core/block-editor"),i=t.getBlockIndex,a=t.getBlockRootClientId,l=t.getBlockOrder,s=t.getBlock,u=t.getSettings,d=t.getBlockListSettings,b=Object(p.castArray)(n),f=Object(p.first)(b),m=a(f),O=i(f,m),v=i(Object(p.last)(b),m),g=l(m),h=s(f),j=0===O,k=v===g.length-1,y=(d(m)||{}).orientation;return{blockType:h?Object(c.getBlockType)(h.name):null,isDisabled:"up"===r?j:k,rootClientId:m,firstIndex:O,isFirst:j,isLast:k,isRTL:u().isRTL,orientation:o||y}}),[n,r]),b=u.blockType,O=u.isDisabled,h=u.rootClientId,j=u.isFirst,k=u.isLast,y=u.firstIndex,_=u.isRTL,E=u.orientation,S=void 0===E?"vertical":E,C=Object(v.useDispatch)("core/block-editor"),w=C.moveBlocksDown,B=C.moveBlocksUp,I="up"===r?B:w,x="block-editor-block-mover-button__description-".concat(a);return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.Button,Object(s.a)({ref:t,className:f()("block-editor-block-mover-button","is-".concat(r,"-button")),icon:Pr(r,S,_),label:Tr(r,S,_),"aria-describedby":x},i,{onClick:O?null:function(e){I(n,h),i.onClick&&i.onClick(e)},"aria-disabled":O})),Object(d.createElement)("span",{id:x,className:"block-editor-block-mover-button__description"},xr(l,b&&b.title,y,j,k,"up"===r?-1:1,S,_)))})),Rr=Object(d.forwardRef)((function(e,t){return Object(d.createElement)(Nr,Object(s.a)({direction:"up",ref:t},e))})),Mr=Object(d.forwardRef)((function(e,t){return Object(d.createElement)(Nr,Object(s.a)({direction:"down",ref:t},e))}));function Dr(e){var t=e.level,n=e.isLastRow,r=e.terminatedLevels;return Object(p.times)(t-1,(function(e){var o=e+2,c=o===t;return Object(d.createElement)("div",{key:e,"aria-hidden":"true",className:f()("block-editor-block-navigator-descender-line",{"has-item":c,"is-last-row":n,"is-terminated":r.includes(o)})})}))}var Lr=Object(d.createContext)({__experimentalFeatures:!1}),Ar=function(){return Object(d.useContext)(Lr)},Fr=Object(d.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(I.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));var Vr=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(d.createElement)("div",{className:f()(t,"block-editor-warning")},Object(d.createElement)("div",{className:"block-editor-warning__contents"},Object(d.createElement)("p",{className:"block-editor-warning__message"},r),(d.Children.count(n)>0||o)&&Object(d.createElement)("div",{className:"block-editor-warning__actions"},d.Children.count(n)>0&&d.Children.map(n,(function(e,t){return Object(d.createElement)("span",{key:t,className:"block-editor-warning__action"},e)})),o&&Object(d.createElement)(g.Dropdown,{className:"block-editor-warning__secondary",position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(d.createElement)(g.Button,{icon:Fr,label:Object(B.__)("More options"),onClick:n,"aria-expanded":t})},renderContent:function(){return Object(d.createElement)(g.MenuGroup,null,o.map((function(e,t){return Object(d.createElement)(g.MenuItem,{onClick:e.onClick,key:t},e.title)})))}}))))},Hr=n(243),zr=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,c=e.actionText,i=e.className;return Object(d.createElement)("div",{className:i},Object(d.createElement)("div",{className:"block-editor-block-compare__content"},Object(d.createElement)("h2",{className:"block-editor-block-compare__heading"},t),Object(d.createElement)("div",{className:"block-editor-block-compare__html"},n),Object(d.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},r)),Object(d.createElement)("div",{className:"block-editor-block-compare__action"},Object(d.createElement)(g.Button,{isSecondary:!0,tabIndex:"0",onClick:o},c)))};var Ur=function(e){var t,n,r,o,i=e.block,a=e.onKeep,l=e.onConvert,s=e.convertor,u=e.convertButtonText,b={rawContent:i.originalContent,renderedContent:Object(c.getSaveElement)(i.name,i.attributes)},m=(t=s(i),n=Object(p.castArray)(t),r=n.map((function(e){return Object(c.getSaveContent)(e.name,e.attributes,e.innerBlocks)})),o=n.map((function(e){return Object(c.getSaveElement)(e.name,e.attributes,e.innerBlocks)})),{rawContent:r.join(""),renderedContent:o}),O=function(e,t){return Object(Hr.diffChars)(e,t).map((function(e,t){var n=f()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return Object(d.createElement)("span",{key:t,className:n},e.value)}))}(b.rawContent,m.rawContent);return Object(d.createElement)("div",{className:"block-editor-block-compare__wrapper"},Object(d.createElement)(zr,{title:Object(B.__)("Current"),className:"block-editor-block-compare__current",action:a,actionText:Object(B.__)("Convert to HTML"),rawContent:b.rawContent,renderedContent:b.renderedContent}),Object(d.createElement)(zr,{title:Object(B.__)("After Conversion"),className:"block-editor-block-compare__converted",action:l,actionText:u,rawContent:O,renderedContent:m.renderedContent}))};function Gr(){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}}var Kr=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(Gr()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(e){var t;return Object(Ut.a)(this,r),(t=n.call(this,e)).state={compare:!1},t.onCompare=t.onCompare.bind(Object(Kt.a)(t)),t.onCompareClose=t.onCompareClose.bind(Object(Kt.a)(t)),t}return Object(Gt.a)(r,[{key:"onCompare",value:function(){this.setState({compare:!0})}},{key:"onCompareClose",value:function(){this.setState({compare:!1})}},{key:"render",value:function(){var e=this.props,t=e.convertToHTML,n=e.convertToBlocks,r=e.convertToClassic,o=e.attemptBlockRecovery,i=e.block,a=!!Object(c.getBlockType)("core/html"),l=this.state.compare,s=[{title:Object(B.__)("Convert to Classic Block"),onClick:r},{title:Object(B.__)("Attempt Block Recovery"),onClick:o}];return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(Vr,{actions:[Object(d.createElement)(g.Button,{key:"convert",onClick:this.onCompare,isSecondary:a,isPrimary:!a},// translators: Button to fix block content
|
23 |
-
Object(B._x)("Resolve","imperative verb")),a&&Object(d.createElement)(g.Button,{key:"edit",onClick:t,isPrimary:!0},Object(B.__)("Convert to HTML"))],secondaryActions:s},Object(B.__)("This block contains unexpected or invalid content.")),l&&Object(d.createElement)(g.Modal,{title:// translators: Dialog title to fix block content
|
24 |
-
Object(B.__)("Resolve Block"),onRequestClose:this.onCompareClose,className:"block-editor-block-compare"},Object(d.createElement)(Ur,{block:i,onKeep:t,onConvert:n,convertor:Wr,convertButtonText:Object(B.__)("Convert to Blocks")})))}}]),r}(d.Component),Wr=function(e){return Object(c.rawHandler)({HTML:e.originalContent})},qr=Object(m.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId;return{block:e("core/block-editor").getBlock(n)}})),Object(v.withDispatch)((function(e,t){var n=t.block,r=e("core/block-editor").replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return Object(c.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return Object(c.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,Wr(n))},attemptBlockRecovery:function(){var e,t,o,i;r(n.clientId,(t=(e=n).name,o=e.attributes,i=e.innerBlocks,Object(c.createBlock)(t,o,i)))}}}))])(Kr),$r=Object(d.createElement)(Vr,{className:"block-editor-block-list__block-crash-warning"},Object(B.__)("This block has encountered an error and cannot be previewed.")),Yr=function(){return $r};function Xr(){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}}var Qr=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(Xr()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).state={hasError:!1},e}return Object(Gt.a)(r,[{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}}]),r}(d.Component),Zr=n(89),Jr=n.n(Zr);var eo=function(e){var t=e.clientId,n=Object(d.useState)(""),r=Object(le.a)(n,2),o=r[0],i=r[1],a=Object(v.useSelect)((function(e){return e("core/block-editor").getBlock(t)}),[t]),l=Object(v.useDispatch)("core/block-editor").updateBlock;return Object(d.useEffect)((function(){i(Object(c.getBlockContent)(a))}),[a]),Object(d.createElement)(Jr.a,{className:"block-editor-block-list__block-html-textarea",value:o,onBlur:function(){var e=Object(c.getBlockType)(a.name),n=Object(c.getBlockAttributes)(e,o,a.attributes),r=o||Object(c.getSaveContent)(e,n),s=!o||Object(c.isValidBlockContent)(e,n,r);l(t,{attributes:n,originalContent:r,isValid:s}),o||i({content:r})},onChange:function(e){return i(e.target.value)}})};function to(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 no(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 ro(e,t){Array.from(e.querySelectorAll(".rich-text")).forEach((function(e){t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}var oo=n(193),co=[Object(d.createInterpolateElement)(Object(B.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:Object(d.createElement)("kbd",null)}),Object(d.createInterpolateElement)(Object(B.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:Object(d.createElement)("kbd",null)}),Object(d.createInterpolateElement)(Object(B.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:Object(d.createElement)("kbd",null)}),Object(B.__)("Drag files into the editor to automatically insert media blocks."),Object(B.__)("Change a block's type by pressing the block icon on the toolbar.")];var io=function(){var e=Object(d.useState)(Math.floor(Math.random()*co.length)),t=Object(le.a)(e,1)[0];return Object(d.createElement)(g.Tip,null,co[t])},ao=n(132),lo=n(120),so=n(268);var uo=function e(t){var n=t.className,r=t.onChange,o=t.value,c=Object(m.useInstanceId)(e),i=Object(d.useRef)();return Object(d.createElement)("div",{className:f()("block-editor-inserter__search",n)},Object(d.createElement)(g.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-".concat(c)},Object(B.__)("Search for a block")),Object(d.createElement)("input",{ref:i,className:"block-editor-inserter__search-input",id:"block-editor-inserter__search-".concat(c),type:"search",placeholder:Object(B.__)("Search for a block"),autoFocus:!0,onChange:function(e){return r(e.target.value)},autoComplete:"off",value:o||""}),Object(d.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(d.createElement)(g.Button,{icon:ao.a,label:Object(B.__)("Reset search"),onClick:function(){r(""),i.current.focus()}}),!o&&Object(d.createElement)(lo.a,{icon:so.a})))};var bo=function(e){var t=e.blockType;return Object(d.createElement)("div",{className:"block-editor-block-card"},Object(d.createElement)(Gn,{icon:t.icon,showColors:!0}),Object(d.createElement)("div",{className:"block-editor-block-card__content"},Object(d.createElement)("h2",{className:"block-editor-block-card__title"},t.title),Object(d.createElement)("span",{className:"block-editor-block-card__description"},t.description)))},fo={insertUsage:{}},po={alignWide:!1,colors:[{name:Object(B.__)("Black"),slug:"black",color:"#000000"},{name:Object(B.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(B.__)("White"),slug:"white",color:"#ffffff"},{name:Object(B.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(B.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(B.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(B.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(B.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(B.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(B.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(B.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(B.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(B._x)("Small","font size name"),size:13,slug:"small"},{name:Object(B._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(B._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(B._x)("Large","font size name"),size:36,slug:"large"},{name:Object(B._x)("Huge","font size name"),size:48,slug:"huge"}],imageSizes:[{slug:"thumbnail",name:Object(B.__)("Thumbnail")},{slug:"medium",name:Object(B.__)("Medium")},{slug:"large",name:Object(B.__)("Large")},{slug:"full",name:Object(B.__)("Full Size")}],maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,availableLegacyWidgets:{},hasPermissionsToManageWidgets:!1,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalEnableLegacyWidgetBlock:!1,__experimentalBlockDirectory:!1,__experimentalEnableFullSiteEditing:!1,__experimentalEnableFullSiteEditingDemo:!1,__mobileEnablePageTemplates:!1,gradients:[{name:Object(B.__)("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(B.__)("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(B.__)("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(B.__)("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(B.__)("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(B.__)("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(B.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(B.__)("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(B.__)("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(B.__)("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(B.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(B.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function mo(e,t,n){return[].concat(Object(ae.a)(e.slice(0,n)),Object(ae.a)(Object(p.castArray)(t)),Object(ae.a)(e.slice(n)))}function Oo(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(ae.a)(e);return o.splice(t,r),mo(o,e.slice(t,t+r),n)}function vo(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 go(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vo(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ho(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(u.a)({},t,[]);return e.forEach((function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,ho(o,r))})),n}function jo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce((function(e,n){return Object.assign(e,Object(u.a)({},n.clientId,t),jo(n.innerBlocks,n.clientId))}),{})}function ko(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.identity,n={},r=Object(ae.a)(e);r.length;){var o=r.shift(),c=o.innerBlocks,i=Object(ke.a)(o,["innerBlocks"]);r.push.apply(r,Object(ae.a)(c)),n[i.clientId]=t(i)}return n}function yo(e){return ko(e,(function(e){return Object(p.omit)(e,"attributes")}))}function _o(e){return ko(e,(function(e){return e.attributes}))}function Eo(e,t){return e===t?go({},e):t}function So(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&Object(p.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,r=t.attributes,Object(p.isEqual)(Object(p.keys)(n),Object(p.keys)(r)));var n,r}var Co=function(e){return e.reduce((function(e,t){return e[t]={},e}),{})};var wo=Object(p.flow)(v.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=go({},t)).attributes=Object(p.mapValues)(t.attributes,(function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?go({},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(p.mapValues)(ko(n.blocks),(function(){return{}}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":var c=Object(p.keys)(ko(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&c.push(n.rootClientId),r.cache=go({},r.cache,{},Co(o(c)));break;case"UPDATE_BLOCK":r.cache=go({},r.cache,{},Co(o([n.clientId])));break;case"UPDATE_BLOCK_ATTRIBUTES":r.cache=go({},r.cache,{},Co(o(n.clientIds)));break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var i=Co(o(n.replacedClientIds));r.cache=go({},Object(p.omit)(r.cache,n.replacedClientIds),{},Object(p.omit)(i,n.replacedClientIds),{},Co(Object(p.keys)(ko(n.blocks))));break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":r.cache=go({},Object(p.omit)(r.cache,n.removedClientIds),{},Co(Object(p.difference)(o(n.clientIds),n.clientIds)));break;case"MOVE_BLOCKS_TO_POSITION":var a=Object(ae.a)(n.clientIds);n.fromRootClientId&&a.push(n.fromRootClientId),n.toRootClientId&&a.push(n.toRootClientId),r.cache=go({},r.cache,{},Co(o(a)));break;case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":var l=[];n.rootClientId&&l.push(n.rootClientId),r.cache=go({},r.cache,{},Co(o(l)));break;case"SAVE_REUSABLE_BLOCK_SUCCESS":var s=Object(p.keys)(Object(p.omitBy)(r.attributes,(function(e,t){return"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId})));r.cache=go({},r.cache,{},Co(o(s)))}return r}}),(function(e){return function(t,n){var r=function(e){for(var r=e,o=0;o<r.length;o++){var c;!t.order[r[o]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[r[o]]||(r===e&&(r=Object(ae.a)(r)),(c=r).push.apply(c,Object(ae.a)(t.order[r[o]])))}return r};if(t)switch(n.type){case"REMOVE_BLOCKS":n=go({},n,{type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(n.clientIds)});break;case"REPLACE_BLOCKS":n=go({},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(ae.a)(n.blocks);o.length;){var c=o.shift(),i=c.innerBlocks,a=Object(ke.a)(c,["innerBlocks"]);o.push.apply(o,Object(ae.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 s=l;return n.blocks.length&&((s=e(s,go({},n,{type:"INSERT_BLOCKS",index:0}))).order=go({},s.order,{},Object(p.reduce)(r,(function(e,n,r){return t.order[r]&&(e[r]=t.order[r]),e}),{}))),s}}),(function(e){return function(t,n){if(t&&"RESET_BLOCKS"===n.type){var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(p.reduce)(t[n],(function(n,o){return r[o]?n:[].concat(Object(ae.a)(n),[o],Object(ae.a)(e(t,o)))}),[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(p.pickBy)(t.controlledInnerBlocks));return go({},t,{byClientId:go({},Object(p.omit)(t.byClientId,r),{},yo(n.blocks)),attributes:go({},Object(p.omit)(t.attributes,r),{},_o(n.blocks)),order:go({},Object(p.omit)(t.order,r),{},Object(p.omit)(ho(n.blocks),o)),parents:go({},Object(p.omit)(t.parents,r),{},jo(n.blocks)),cache:go({},Object(p.omit)(t.cache,r),{},Object(p.omit)(Object(p.mapValues)(ko(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){n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;var a=Object(p.get)(r,["isPersistentChange"],!0);return r.isPersistentChange===a?r:go({},c,{isPersistentChange:a})}return c=go({},c,{isPersistentChange:i?!n:!So(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 yo(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return go({},e,{},yo(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(p.omit)(t.updates,"attributes");return Object(p.isEmpty)(n)?e:go({},e,Object(u.a)({},t.clientId,go({},e[t.clientId],{},n)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?go({},Object(p.omit)(e,t.replacedClientIds),{},yo(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(p.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 _o(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return go({},e,{},_o(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?go({},e,Object(u.a)({},t.clientId,go({},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 go({},n,Object(u.a)({},r,Object(p.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:go({},e,{},n);case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?go({},Object(p.omit)(e,t.replacedClientIds),{},_o(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(p.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 ho(t.blocks);case"RECEIVE_BLOCKS":return go({},e,{},Object(p.omit)(ho(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=e[r]||[],c=ho(t.blocks,r),i=t.index,a=void 0===i?o.length:i;return go({},e,{},c,Object(u.a)({},r,mo(o,c[r],a)));case"MOVE_BLOCKS_TO_POSITION":var l,s=t.fromRootClientId,d=void 0===s?"":s,b=t.toRootClientId,f=void 0===b?"":b,m=t.clientIds,O=t.index,v=void 0===O?e[f].length:O;if(d===f){var g=e[f],h=g.indexOf(m[0]);return go({},e,Object(u.a)({},f,Oo(e[f],h,v,m.length)))}return go({},e,(l={},Object(u.a)(l,d,p.without.apply(void 0,[e[d]].concat(Object(ae.a)(m)))),Object(u.a)(l,f,mo(e[f],m,v)),l));case"MOVE_BLOCKS_UP":var j=t.clientIds,k=t.rootClientId,y=void 0===k?"":k,_=Object(p.first)(j),E=e[y];if(!E.length||_===Object(p.first)(E))return e;var S=E.indexOf(_);return go({},e,Object(u.a)({},y,Oo(E,S,S-1,j.length)));case"MOVE_BLOCKS_DOWN":var C=t.clientIds,w=t.rootClientId,B=void 0===w?"":w,I=Object(p.first)(C),x=Object(p.last)(C),P=e[B];if(!P.length||x===Object(p.last)(P))return e;var T=P.indexOf(I);return go({},e,Object(u.a)({},B,Oo(P,T,T+1,C.length)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var N=t.clientIds;if(!t.blocks)return e;var R=ho(t.blocks);return Object(p.flow)([function(e){return Object(p.omit)(e,t.replacedClientIds)},function(e){return go({},e,{},Object(p.omit)(R,""))},function(e){return Object(p.mapValues)(e,(function(e){return Object(p.reduce)(e,(function(e,t){return t===N[0]?[].concat(Object(ae.a)(e),Object(ae.a)(R[""])):(-1===N.indexOf(t)&&e.push(t),e)}),[])}))}])(e);case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(p.flow)([function(e){return Object(p.omit)(e,t.removedClientIds)},function(e){return Object(p.mapValues)(e,(function(e){return p.without.apply(void 0,[e].concat(Object(ae.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 jo(t.blocks);case"RECEIVE_BLOCKS":return go({},e,{},jo(t.blocks));case"INSERT_BLOCKS":return go({},e,{},jo(t.blocks,t.rootClientId||""));case"MOVE_BLOCKS_TO_POSITION":return go({},e,{},t.clientIds.reduce((function(e,n){return e[n]=t.toRootClientId||"",e}),{}));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return go({},Object(p.omit)(e,t.replacedClientIds),{},jo(t.blocks,e[t.clientIds[0]]));case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(p.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?go({},e,Object(u.a)({},r,o)):e}});function Bo(){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}var Io=Object(v.combineReducers)({blocks:wo,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},isDraggingBlocks: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!0;case"STOP_DRAGGING_BLOCKS":return!1}return e},isCaretWithinFormattedText:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},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 Bo(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 Bo(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 go({},e,Object(u.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(p.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(p.isEqual)(e[n],t.settings)?e:go({},e,Object(u.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(p.omit)(e,n):e}return e},insertionPoint:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":var n=t.rootClientId,r=t.index;return{rootClientId:n,index:r};case"HIDE_INSERTION_POINT":return null}return e},template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return go({},e,{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:po,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return go({},e,{},t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fo,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(c.isReusableBlock)(n)&&(o.ref=n.attributes.ref,r+="/"+n.attributes.ref),go({},e,{insertUsage:go({},e.insertUsage,Object(u.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(u.a)({},t.clientId,t.updates.attributes);case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((function(e,n){return go({},e,Object(u.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: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"STOP_TYPING":return e}},highlightedBlock:function(e,t){var n=t.clientId,r=t.isHighlighted;if("TOGGLE_BLOCK_HIGHLIGHT"===t.type){if(r)return n;if(e===n)return null}return e}}),xo=n(103),Po=n.n(xo),To=n(242),No=n.n(To),Ro=n(40);function Mo(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return{type:"SELECT",storeName:e,selectorName:t,args:r}}var Do={SELECT:Object(v.createRegistryControl)((function(e){return function(t){var n,r=t.storeName,o=t.selectorName,c=t.args;return(n=e.select(r))[o].apply(n,Object(ae.a)(c))}})),SLEEP:function(e){var t=e.duration;return new Promise((function(e){setTimeout(e,t)}))}};function Lo(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return Ao(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ao(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,o,c=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return c=e.done,e},e:function(e){i=!0,o=e},f:function(){try{c||null==r.return||r.return()}finally{if(i)throw o}}}}function Ao(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 Fo(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 Vo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fo(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ho=Or.a.mark(tc),zo=Or.a.mark(lc),Uo=Or.a.mark(sc),Go=Or.a.mark(Oc),Ko=Or.a.mark(kc),Wo=Or.a.mark(yc),qo=Or.a.mark(Ec),$o=Or.a.mark(xc),Yo=Or.a.mark($c),Xo=Or.a.mark(Yc),Qo=Or.a.mark(Xc),Zo=Or.a.mark(Qc),Jo=Or.a.mark(Zc),ec=Or.a.mark(ei);function tc(){return Or.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Mo("core/block-editor","getBlockCount");case 2:if(0!==e.sent){e.next=7;break}return e.next=6,Hc();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),Ho)}function nc(e){return{type:"RESET_BLOCKS",blocks:e}}function rc(e,t){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t}}function oc(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function cc(e,t){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Object(p.castArray)(e),attributes:t}}function ic(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function ac(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function lc(e){var t;return Or.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Mo("core/block-editor","getPreviousBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,ac(t,-1);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),zo)}function sc(e){var t;return Or.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Mo("core/block-editor","getNextBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,ac(t);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),Uo)}function uc(){return{type:"START_MULTI_SELECT"}}function dc(){return{type:"STOP_MULTI_SELECT"}}function bc(e,t){return{type:"MULTI_SELECT",start:e,end:t}}function fc(){return{type:"CLEAR_SELECTED_BLOCK"}}function pc(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function mc(e,t){var n=Object(p.get)(t,["__experimentalPreferredStyleVariations","value"],{});return e.map((function(e){var t=e.name;if(!Object(c.hasBlockSupport)(t,"defaultStylePicker",!0))return e;if(!n[t])return e;var r=Object(p.get)(e,["attributes","className"]);if(null==r?void 0:r.includes("is-style-"))return e;var o=e.attributes,i=void 0===o?{}:o,a=n[t];return Vo({},e,{attributes:Vo({},i,{className:"".concat(r||""," is-style-").concat(a).trim()})})}))}function Oc(e,t,n,r){var o,c,i;return Or.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return e=Object(p.castArray)(e),a.t0=mc,a.t1=Object(p.castArray)(t),a.next=5,Mo("core/block-editor","getSettings");case 5:return a.t2=a.sent,t=(0,a.t0)(a.t1,a.t2),a.next=9,Mo("core/block-editor","getBlockRootClientId",Object(p.first)(e));case 9:o=a.sent,c=0;case 11:if(!(c<t.length)){a.next=21;break}return i=t[c],a.next=15,Mo("core/block-editor","canInsertBlockType",i.name,o);case 15:if(a.sent){a.next=18;break}return a.abrupt("return");case 18:c++,a.next=11;break;case 21:return a.next=23,{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:r};case 23:return a.delegateYield(tc(),"t3",24);case 24:case"end":return a.stop()}}),Go)}function vc(e,t){return Oc(e,t)}function gc(e){return function(t,n){return{clientIds:Object(p.castArray)(t),type:e,rootClientId:n}}}var hc=gc("MOVE_BLOCKS_DOWN"),jc=gc("MOVE_BLOCKS_UP");function kc(e){var t,n,r,o,c,i=arguments;return Or.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,Mo("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,Mo("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()}}),Ko)}function yc(e){var t,n,r,o=arguments;return Or.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,kc([e],t,n,r);case 5:case"end":return c.stop()}}),Wo)}function _c(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Ec([e],t,n,r)}function Ec(e,t,n){var r,o,c,i,a,l=arguments;return Or.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return r=!(l.length>3&&void 0!==l[3])||l[3],s.t0=mc,s.t1=Object(p.castArray)(e),s.next=5,Mo("core/block-editor","getSettings");case 5:s.t2=s.sent,e=(0,s.t0)(s.t1,s.t2),o=[],c=Lo(e),s.prev=9,c.s();case 11:if((i=c.n()).done){s.next=19;break}return a=i.value,s.next=15,Mo("core/block-editor","canInsertBlockType",a.name,n);case 15:s.sent&&o.push(a);case 17:s.next=11;break;case 19:s.next=24;break;case 21:s.prev=21,s.t3=s.catch(9),c.e(s.t3);case 24:return s.prev=24,c.f(),s.finish(24);case 27:if(!o.length){s.next=29;break}return s.abrupt("return",{type:"INSERT_BLOCKS",blocks:o,index:t,rootClientId:n,time:Date.now(),updateSelection:r});case 29:case"end":return s.stop()}}),qo,null,[[9,21,24,27]])}function Sc(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function Cc(){return{type:"HIDE_INSERTION_POINT"}}function wc(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function Bc(){return{type:"SYNCHRONIZE_TEMPLATE"}}function Ic(e,t){return{type:"MERGE_BLOCKS",blocks:[e,t]}}function xc(e){var t,n,r,o,c=arguments;return Or.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(p.castArray)(e),i.next=6,Mo("core/block-editor","getBlockRootClientId",e[0]);case 6:return n=i.sent,i.next=9,Mo("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,lc(e[0]);case 15:r=i.sent,i.next=21;break;case 18:return i.next=20,Mo("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(tc(),"t0",24);case 24:return o=i.t0,i.abrupt("return",[r||o]);case 26:case"end":return i.stop()}}),$o)}function Pc(e,t){return xc([e],t)}function Tc(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 Nc(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Rc(){return{type:"START_TYPING"}}function Mc(){return{type:"STOP_TYPING"}}function Dc(){return{type:"START_DRAGGING_BLOCKS"}}function Lc(){return{type:"STOP_DRAGGING_BLOCKS"}}function Ac(){return{type:"ENTER_FORMATTED_TEXT"}}function Fc(){return{type:"EXIT_FORMATTED_TEXT"}}function Vc(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function Hc(e,t,n){var r=Object(c.getDefaultBlockName)();if(r)return _c(Object(c.createBlock)(r,e),n,t)}function zc(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Uc(e){return{type:"UPDATE_SETTINGS",settings:e}}function Gc(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Kc(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Wc(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function qc(){return{type:"MARK_AUTOMATIC_CHANGE"}}function $c(){var e,t=arguments;return Or.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(Fe.speak)(Object(B.__)("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(Fe.speak)(Object(B.__)("You are currently in edit mode. To return to the navigation mode, press Escape."));case 4:case"end":return n.stop()}}),Yo)}function Yc(){var e,t=arguments;return Or.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(Fe.speak)(Object(B.__)("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()}}),Xo)}function Xc(e){var t,n,r,o,i,a,l=arguments;return Or.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(t=!(l.length>1&&void 0!==l[1])||l[1],e||e.length){s.next=3;break}return s.abrupt("return");case 3:return s.next=5,Mo("core/block-editor","getBlocksByClientId",e);case 5:return n=s.sent,s.next=8,Mo("core/block-editor","getBlockRootClientId",e[0]);case 8:if(r=s.sent,!Object(p.some)(n,(function(e){return!e}))){s.next=11;break}return s.abrupt("return");case 11:if(o=n.map((function(e){return e.name})),!Object(p.some)(o,(function(e){return!Object(c.hasBlockSupport)(e,"multiple",!0)}))){s.next=14;break}return s.abrupt("return");case 14:return s.next=16,Mo("core/block-editor","getBlockIndex",Object(p.last)(Object(p.castArray)(e)),r);case 16:return i=s.sent,a=n.map((function(e){return Object(c.cloneBlock)(e)})),s.next=20,Ec(a,i+1,r,t);case 20:if(!(a.length>1&&t)){s.next=23;break}return s.next=23,bc(Object(p.first)(a).clientId,Object(p.last)(a).clientId);case 23:return s.abrupt("return",a.map((function(e){return e.clientId})));case 24:case"end":return s.stop()}}),Qo)}function Qc(e){var t,n;return Or.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,Mo("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,Mo("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,Mo("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,Hc({},t,n);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),Zo)}function Zc(e){var t,n;return Or.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,Mo("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,Mo("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,Mo("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,Hc({},t,n+1);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),Jo)}function Jc(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function ei(e){return Or.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Jc(e,!0);case 2:return t.next=4,{type:"SLEEP",duration:150};case 4:return t.next=6,Jc(e,!1);case 6:case"end":return t.stop()}}),ec)}function ti(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}var ni=n(44);function ri(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 oi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ri(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ri(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ci=Object(d.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(g.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(d.createElement)(g.G,null,Object(d.createElement)(g.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"}))),ii=[];function ai(e,t){var n=e.blocks.byClientId[t];return n?n.name:null}function li(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}function si(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}var ui=Object(ni.a)((function(e,t){var n=e.blocks.byClientId[t];return n?oi({},n,{attributes:si(e,t),innerBlocks:Ba(e,t)?ii:bi(e,t)}):null}),(function(e,t){return[e.blocks.cache[t]]})),di=Object(ni.a)((function(e,t){var n=e.blocks.byClientId[t];return n?oi({},n,{attributes:si(e,t)}):null}),(function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t]]})),bi=Object(ni.a)((function(e,t){return Object(p.map)(Ki(e,t),(function(t){return ui(e,t)}))}),(function(e,t){return Object(p.map)(e.blocks.order[t||""],(function(t){return e.blocks.cache[t]}))})),fi=function e(t,n){return Object(p.flatMap)(n,(function(n){var r=Ki(t,n);return[].concat(Object(ae.a)(r),Object(ae.a)(e(t,r)))}))},pi=Object(ni.a)((function(e){var t=Ki(e);return[].concat(Object(ae.a)(t),Object(ae.a)(fi(e,t)))}),(function(e){return[e.blocks.order]})),mi=Object(ni.a)((function(e,t){var n=pi(e);return t?Object(p.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]})),Oi=Object(ni.a)((function(e,t){return Object(p.map)(Object(p.castArray)(t),(function(t){return ui(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function vi(e,t){return Ki(e,t).length}function gi(e){return e.selectionStart}function hi(e){return e.selectionEnd}function ji(e){return e.selectionStart.clientId}function ki(e){return e.selectionEnd.clientId}function yi(e){var t=Di(e).length;return t||(e.selectionStart.clientId?1:0)}function _i(e){var t=e.selectionStart,n=e.selectionEnd;return!!t.clientId&&t.clientId===n.clientId}function Ei(e){var t=e.selectionStart,n=e.selectionEnd,r=t.clientId;return r&&r===n.clientId?r:null}function Si(e){var t=Ei(e);return t?ui(e,t):null}function Ci(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}var wi=Object(ni.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]})),Bi=Object(ni.a)((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=wi(e,t,r);return Object(p.map)(Object(p.filter)(Object(p.map)(o,(function(t){return{id:t,name:ai(e,t)}})),{name:n}),(function(e){return e.id}))}),(function(e){return[e.blocks.parents]}));function Ii(e,t){var n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function xi(e,t){for(var n,r=Ei(e),o=[].concat(Object(ae.a)(wi(e,t)),[t]),c=[].concat(Object(ae.a)(wi(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 Pi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Ei(e)),void 0===t&&(t=n<0?Ai(e):Fi(e)),!t)return null;var r=Ci(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 Ti(e,t){return Pi(e,t,-1)}function Ni(e,t){return Pi(e,t,1)}function Ri(e){return e.initialPosition}var Mi=Object(ni.a)((function(e){var t=e.selectionStart,n=e.selectionEnd;if(void 0===t.clientId||void 0===n.clientId)return ii;if(t.clientId===n.clientId)return[t.clientId];var r=Ci(e,t.clientId);if(null===r)return ii;var o=Ki(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 Di(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?ii:Mi(e)}var Li=Object(ni.a)((function(e){var t=Di(e);return t.length?t.map((function(t){return ui(e,t)})):ii}),(function(e){return[].concat(Object(ae.a)(Mi.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])}));function Ai(e){return Object(p.first)(Di(e))||null}function Fi(e){return Object(p.last)(Di(e))||null}function Vi(e,t){return Ai(e)===t}function Hi(e,t){return-1!==Di(e).indexOf(t)}var zi=Object(ni.a)((function(e,t){for(var n=t,r=!1;n&&!r;)r=Hi(e,n=Ci(e,n));return r}),(function(e){return[e.blocks.order,e.selectionStart.clientId,e.selectionEnd.clientId]}));function Ui(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:t.clientId||null}function Gi(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:n.clientId||null}function Ki(e,t){return e.blocks.order[t||""]||ii}function Wi(e,t,n){return Ki(e,n).indexOf(t)}function qi(e,t){var n=e.selectionStart,r=e.selectionEnd;return n.clientId===r.clientId&&n.clientId===t}function $i(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(p.some)(Ki(e,t),(function(t){return qi(e,t)||Hi(e,t)||n&&$i(e,t,n)}))}function Yi(e,t){if(!t)return!1;var n=Di(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function Xi(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId!==n.clientId}function Qi(e){return e.isMultiSelecting}function Zi(e){return e.isSelectionEnabled}function Ji(e,t){return e.blocksMode[t]||"visual"}function ea(e){return e.isTyping}function ta(e){return e.isDraggingBlocks}function na(e){return e.isCaretWithinFormattedText}function ra(e){var t,n,r=e.insertionPoint,o=e.selectionEnd;if(null!==r)return r;var c=o.clientId;return c?(t=Ci(e,c)||void 0,n=Wi(e,o.clientId,t)+1):n=Ki(e).length,{rootClientId:t,index:n}}function oa(e){return null!==e.insertionPoint}function ca(e){return e.template.isValid}function ia(e){return e.settings.template}function aa(e,t){if(!t)return e.settings.templateLock;var n=Oa(e,t);return n?n.templateLock:null}var la=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(p.isBoolean)(e)?e:Object(p.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},o=Object(c.getBlockType)(t);if(!o)return!1;var i=va(e),a=i.allowedBlockTypes,l=r(a,t,!0);if(!l)return!1;var s=!!aa(e,n);if(s)return!1;var u=Oa(e,n),d=Object(p.get)(u,["allowedBlocks"]),b=r(d,t),f=o.parent,m=ai(e,n),O=r(f,m);return null!==b&&null!==O?b||O:null!==b?b:null===O||O},sa=Object(ni.a)(la,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function ua(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((function(t){return sa(e,ai(e,t),n)}))}function da(e,t){return Object(p.get)(e.preferences.insertUsage,[t],null)}var ba=function(e,t,n){return!!Object(c.hasBlockSupport)(t,"inserter",!0)&&la(e,t.name,n)},fa=Object(ni.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=function(e,t){if(!e)return t;var n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},r=function(t){var r=t.name,o=!1;Object(c.hasBlockSupport)(t.name,"multiple",!0)||(o=Object(p.some)(Oi(e,pi(e)),{name:t.name}));var i=da(e,r)||{},a=i.time,l=i.count,s=void 0===l?0:l,u=t.variations.filter((function(e){var t=e.scope;return!t||t.includes("inserter")}));return{id:r,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:n(a,s)}},o=function(t){var r,o="core/block/".concat(t.id),i=ja(e,t.id);1===i.length&&(r=Object(c.getBlockType)(i[0].name));var a=da(e,o)||{},l=a.time,s=a.count,u=n(l,void 0===s?0:s);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title,icon:r?r.icon:ci,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:u}},i=Object(c.getBlockTypes)().filter((function(n){return ba(e,n,t)})).map(r),a=la(e,"core/block",t)?_a(e).map(o):[];return[].concat(Object(ae.a)(i),Object(ae.a)(a))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,_a(e),Object(c.getBlockTypes)()]})),pa=Object(ni.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object(p.some)(Object(c.getBlockTypes)(),(function(n){return ba(e,n,t)}));if(n)return!0;var r=la(e,"core/block",t)&&_a(e).length>0;return r}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,_a(e),Object(c.getBlockTypes)()]})),ma=Object(ni.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return Object(p.filter)(Object(c.getBlockTypes)(),(function(n){return ba(e,n,t)}))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(c.getBlockTypes)()]}));function Oa(e,t){return e.blockListSettings[t]}function va(e){return e.settings}function ga(e){return e.blocks.isPersistentChange}var ha=Object(ni.a)((function(e,t){return Object(p.filter)(e.blockListSettings,(function(e,n){return t.includes(n)}))}),(function(e){return[e.blockListSettings]})),ja=Object(ni.a)((function(e,t){var n=Object(p.find)(_a(e),(function(e){return e.id===t}));return n?Object(c.parse)(n.content):null}),(function(e){return[_a(e)]}));function ka(e){return e.blocks.isIgnoredChange}function ya(e){return e.lastBlockAttributesChange}function _a(e){return Object(p.get)(e,["settings","__experimentalReusableBlocks"],ii)}function Ea(e){return e.isNavigationMode}function Sa(e){return e.hasBlockMovingClientId}function Ca(e){return!!e.automaticChangeStatus}function wa(e,t){return e.highlightedBlock===t}function Ba(e,t){return!!e.blocks.controlledInnerBlocks[t]}function Ia(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 xa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ia(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ia(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pa={MERGE_BLOCKS:function(e,t){var n=t.dispatch,r=t.getState(),o=Object(le.a)(e.blocks,2),a=o[0],l=o[1],s=ui(r,a),u=Object(c.getBlockType)(s.name);if(u.merge){var d=ui(r,l),b=Object(c.getBlockType)(d.name),f=gi(r),m=f.clientId,O=f.attributeKey,v=f.offset,g=(m===a?u:b).attributes[O],h=(m===a||m===l)&&void 0!==O&&void 0!==v&&!!g;g||("number"==typeof O?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(Ro.a)(O))):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));var j=Object(c.cloneBlock)(s),k=Object(c.cloneBlock)(d);if(h){var y=m===a?j:k,_=y.attributes[O],E=g.multiline,S=g.__unstableMultilineWrapperTags,C=g.__unstablePreserveWhiteSpace,w=Object(i.insert)(Object(i.create)({html:_,multilineTag:E,multilineWrapperTags:S,preserveWhiteSpace:C}),"",v,v);y.attributes[O]=Object(i.toHTMLString)({value:w,multilineTag:E,preserveWhiteSpace:C})}var B=s.name===d.name?[k]:Object(c.switchToBlockType)(k,s.name);if(B&&B.length){var I=u.merge(j.attributes,B[0].attributes);if(h){var x=Object(p.findKey)(I,(function(e){return"string"==typeof e&&-1!==e.indexOf("")})),P=I[x],T=u.attributes[x],N=T.multiline,R=T.__unstableMultilineWrapperTags,M=T.__unstablePreserveWhiteSpace,D=Object(i.create)({html:P,multilineTag:N,multilineWrapperTags:R,preserveWhiteSpace:M}),L=D.text.indexOf(""),A=Object(i.remove)(D,L,L+1),F=Object(i.toHTMLString)({value:A,multilineTag:N,preserveWhiteSpace:M});I[x]=F,n(Vc(s.clientId,x,L,L))}n(Oc([s.clientId,d.clientId],[xa({},s,{attributes:xa({},s.attributes,{},I)})].concat(Object(ae.a)(B.slice(1)))))}}else n(ac(s.clientId))},RESET_BLOCKS:[function(e,t){var n=t.getState(),r=ia(n),o=aa(n),i=!r||"all"!==o||Object(c.doBlocksMatchTemplate)(e.blocks,r);if(i!==ca(n))return wc(i)}],MULTI_SELECT:function(e,t){var n=yi((0,t.getState)());Object(Fe.speak)(Object(B.sprintf)(
|
25 |
-
/* translators: %s: number of selected blocks */
|
26 |
-
Object(B._n)("%s block selected.","%s blocks selected.",n),n),"assertive")},SYNCHRONIZE_TEMPLATE:function(e,t){var n=(0,t.getState)(),r=bi(n),o=ia(n);return nc(Object(c.synchronizeBlocksWithTemplate)(r,o))},MARK_AUTOMATIC_CHANGE:function(e,t){var n=window,r=n.setTimeout,o=n.requestIdleCallback;(void 0===o?function(e){return r(e,100)}:o)((function(){t.dispatch({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))}};var Ta=function(e){var t,n=[Po()(Pa),No.a],r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:e.getState,dispatch:function(){return r.apply(void 0,arguments)}};return t=n.map((function(e){return e(o)})),r=p.flowRight.apply(void 0,Object(ae.a)(t))(e.dispatch),e.dispatch=r,e};function Na(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 Ra={reducer:Io,selectors:o,actions:r,controls:Do},Ma=Object(v.registerStore)("core/block-editor",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Na(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Na(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Ra,{persist:["preferences"]}));Ta(Ma);function Da(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?p.noop:i,l=e.onInput,s=void 0===l?p.noop:l,u=Object(v.useRegistry)(),b=u.dispatch("core/block-editor"),f=b.resetBlocks,m=b.resetSelection,O=b.replaceInnerBlocks,g=b.setHasControlledInnerBlocks,h=b.__unstableMarkNextChangeAsNotPersistent,j=u.select("core/block-editor"),k=j.getBlockName,y=j.getBlocks,_=Object(d.useRef)({incoming:null,outgoing:[]}),E=Object(d.useRef)(s),S=Object(d.useRef)(a);Object(d.useEffect)((function(){E.current=s,S.current=a}),[s,a]),Object(d.useEffect)((function(){var e,t=u.select("core/block-editor"),r=t.getSelectionStart,o=t.getSelectionEnd,c=t.isLastBlockChangePersistent,i=t.__unstableIsLastBlockChangeIgnored,l=c(),d=!1,b=u.subscribe((function(){if(null===n||null!==k(n)){var t=c(),u=y(n),b=u!==e;if(e=u,b&&(_.current.incoming||i()))return _.current.incoming=null,void(l=t);if(b||d&&!b&&t&&!l)l=t,_.current.outgoing.push(e),(l?a:s)(e,{selectionStart:r(),selectionEnd:o()});d=b}}));return function(){return b()}}),[u,n]),Object(d.useEffect)((function(){_.current.outgoing.includes(r)?Object(p.last)(_.current.outgoing)===r&&(_.current.outgoing=[]):y(n)!==r&&(_.current.outgoing=[],_.current.incoming=r,r&&(h(),n?(g(n,!0),h(),O(n,r,!1)):f(r)),o&&c&&m(o,c))}),[r,n])}var La=Object(m.createHigherOrderComponent)((function(e){return Object(v.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object(ke.a)(t,["useSubRegistry","registry"]);if(!r)return Object(d.createElement)(e,Object(s.a)({registry:o},c));var i=Object(d.useState)(null),a=Object(le.a)(i,2),l=a[0],u=a[1];return Object(d.useEffect)((function(){var e=Object(v.createRegistry)({},o),t=e.registerStore("core/block-editor",Ra);Ta(t),u(e)}),[o]),l?Object(d.createElement)(v.RegistryProvider,{value:l},Object(d.createElement)(e,Object(s.a)({registry:l},c))):null}))}),"withRegistryProvider")((function(e){var t=e.children,n=e.settings,r=Object(v.useDispatch)("core/block-editor").updateSettings;return Object(d.useEffect)((function(){r(n)}),[n]),Da(e),t})),Aa=n(60);var Fa=Object(m.compose)(Object(v.withSelect)((function(e,t){var n=e("core/block-editor"),r=n.getBlockCount,o=n.getBlockName,i=n.isBlockValid,a=n.getSettings,l=n.getTemplateLock,s=!r(t.rootClientId),u=o(t.lastBlockClientId)===Object(c.getDefaultBlockName)(),d=i(t.lastBlockClientId),b=a().bodyPlaceholder;return{isVisible:s||!u||!d,showPrompt:s,isLocked:!!l(t.rootClientId),placeholder:b}})),Object(v.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(Aa.decodeEntities)(c)||Object(B.__)("Start writing or type / to choose a block");return Object(d.createElement)("div",{"data-root-client-id":i||"",className:"wp-block block-editor-default-block-appender"},Object(d.createElement)(Jr.a,{role:"button","aria-label":Object(B.__)("Add block"),className:"block-editor-default-block-appender__content",readOnly:!0,onFocus:r,value:o?a:""}),Object(d.createElement)(Ml,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));var Va=Object(d.forwardRef)((function(e,t){var n=e.rootClientId,r=e.className,o=e.__experimentalSelectBlockOnInsert,c=e.onFocus,i=e.tabIndex;return Object(d.createElement)(Ml,{position:"bottom center",rootClientId:n,__experimentalSelectBlockOnInsert:o,__experimentalIsQuick:!0,renderToggle:function(e){var n,o=e.onToggle,a=e.disabled,l=e.isOpen,s=e.blockTitle,u=e.hasSingleBlockType;n=u?Object(B.sprintf)(// translators: %s: the name of the block when there is only one
|
27 |
-
Object(B._x)("Add %s","directly add the only allowed block"),s):Object(B._x)("Add block","Generic label for block inserter button");var b=!u,p=Object(d.createElement)(g.Button,{ref:t,onFocus:c,tabIndex:i,className:f()(r,"block-editor-button-block-appender"),onClick:o,"aria-haspopup":b?"true":void 0,"aria-expanded":b?l:void 0,disabled:a,label:n},!u&&Object(d.createElement)(g.VisuallyHidden,{as:"span"},n),Object(d.createElement)(lo.a,{icon:oo.a}));return(b||u)&&(p=Object(d.createElement)(g.Tooltip,{text:n},p)),p},isAppender:!0})}));function Ha(e){e.stopPropagation()}var za=Object(v.withSelect)((function(e,t){var n=t.rootClientId,r=e("core/block-editor"),o=r.getBlockOrder,i=r.canInsertBlockType;return{isLocked:!!(0,r.getTemplateLock)(n),blockClientIds:o(n),canInsertDefaultBlock:i(Object(c.getDefaultBlockName)(),n)}}))((function(e){var t,n=e.blockClientIds,r=e.rootClientId,o=e.canInsertDefaultBlock,c=e.isLocked,i=e.renderAppender,a=e.className,l=e.tagName,s=void 0===l?"div":l;return c||!1===i?null:(t=i?Object(d.createElement)(i,null):o?Object(d.createElement)(Fa,{rootClientId:r,lastBlockClientId:Object(p.last)(n)}):Object(d.createElement)(Va,{rootClientId:r,className:"block-list-appender__toggle"}),Object(d.createElement)(s,{tabIndex:-1,onFocus:Ha,className:f()("block-list-appender",a)},t))}));function Ua(e){var t=e.element,n=e.rootClientId,r=Object(d.useState)(null),o=Object(le.a)(r,2),i=o[0],a=o[1];var l=Object(v.useSelect)((function(e){var t,r=e("core/block-editor"),o=r.getBlockListSettings,c=r.getClientIdsOfDescendants,i=r.getSettings,a=r.getTemplateLock;return{orientation:null===(t=o(n))||void 0===t?void 0:t.orientation,getClientIdsOfDescendants:c,hasUploadPermissions:!!i().mediaUpload,isLockedAll:"all"===a(n)}}),[n]),s=l.getClientIdsOfDescendants,u=l.hasUploadPermissions,b=l.isLockedAll,f=l.orientation,p=Object(v.useDispatch)("core/block-editor"),m=p.insertBlocks,O=p.updateBlockAttributes,h=p.moveBlocksToPosition,j=Object(d.useCallback)((function(e){if(u){var t=Object(c.findTransform)(Object(c.getBlockTransforms)("from"),(function(t){return"files"===t.type&&t.isMatch(e)}));if(t){var r=t.transform(e,O);m(r,i,n)}}}),[u,O,m,i,n]),k=Object(d.useCallback)((function(e){var t=Object(c.pasteHandler)({HTML:e,mode:"BLOCKS"});t.length&&m(t,i,n)}),[m,i,n]),y=Object(d.useCallback)((function(e){var t=function(e){var t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(e),r=t.srcRootClientId,o=t.srcClientIds,c=t.srcIndex;"block"===t.type&&(r===n&&c===i||o.includes(n)||s(o).some((function(e){return e===n}))||h(o,r,n,(r===n||""===r&&void 0===n)&&c<i?i-1:i))}),[s,i,h,n]),_=Object(g.__unstableUseDropZone)({element:t,onFilesDrop:j,onHTMLDrop:k,onDrop:y,isDisabled:b,withPosition:!0}).position;if(Object(d.useEffect)((function(){if(_){var e=function(e,t,n){var r,o,c=t.x,i=t.y,a="horizontal"===n;return e.forEach((function(t,n){if(t.dataset.block){var l,s=t.getBoundingClientRect(),u=a?i:c,d=a?c:i,b=a?s.top:s.left,f=a?s.bottom:s.right;l=u>=b&&u<=f?u:u<b?b:f;var p=a?s.left:s.top,m=a?s.right:s.bottom,O=Math.sqrt(Math.pow(u-l,2)+Math.pow(d-p,2));(void 0===o||Math.abs(O)<o)&&(o=O,r=n);var v=Math.sqrt(Math.pow(u-l,2)+Math.pow(d-m,2));if(Math.abs(v)<o){o=v;var g=1;e[n+1]&&e[n+1].classList.contains("is-dragging")&&(g=2),r=n+g}}})),r}(Array.from(t.current.children),_,f);if(void 0===e)return;a(e)}}),[_]),_)return i}var Ga,Ka=Object(d.forwardRef)((function(e,t){var n=e.className,r=e.rootClientId,o=e.renderAppender,c=e.__experimentalTagName,i=void 0===c?"div":c,a=e.__experimentalAppenderTagName,l=e.__experimentalPassedProps,u=void 0===l?{}:l,b=Object(v.useSelect)((function(e){var t,n=e("core/block-editor"),o=n.getBlockOrder,c=n.getBlockListSettings,i=n.getSelectedBlockClientId,a=n.getMultiSelectedBlockClientIds,l=n.hasMultiSelection,s=n.getGlobalBlockCount,u=n.isTyping;return{blockClientIds:o(r),selectedBlockClientId:i(),multiSelectedBlockClientIds:a(),orientation:null===(t=c(r))||void 0===t?void 0:t.orientation,hasMultiSelection:l(),enableAnimation:!u()&&s()<=200}}),[r]),p=b.blockClientIds,m=b.selectedBlockClientId,O=b.multiSelectedBlockClientIds,g=b.orientation,h=b.hasMultiSelection,j=b.enableAnimation,k=r?i:nu,y=Ua({element:t,rootClientId:r}),_=y===p.length;return Object(d.createElement)(k,Object(s.a)({},u,{ref:t,className:f()("block-editor-block-list__layout",n,u.className)}),p.map((function(e,t){var n=h?O.includes(e):m===e,o=y===t;return Object(d.createElement)(v.AsyncModeProvider,{key:e,value:!n},Object(d.createElement)(fu,{rootClientId:r,clientId:e,index:t,enableAnimation:j,className:f()({"is-drop-target":o,"is-dropping-horizontally":o&&"horizontal"===g})}))})),Object(d.createElement)(za,{tagName:a,rootClientId:r,renderAppender:o,className:f()({"is-drop-target":_,"is-dropping-horizontally":_&&"horizontal"===g})}))})),Wa=Object(d.forwardRef)((function(e,t){var n=Object(d.useRef)();return Object(d.createElement)(v.AsyncModeProvider,{value:!1},Object(d.createElement)(Ka,Object(s.a)({ref:t||n},e)))}));function qa(e){var t=e.onClick;return Object(d.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},Object(d.createElement)(g.Disabled,null,Object(d.createElement)(Wa,null)))}var $a=function(e){var t=e.viewportWidth,n=e.__experimentalPadding,r=Object(m.useResizeObserver)(),o=Object(le.a)(r,2),c=o[0],i=o[1].width,a=Object(m.useResizeObserver)(),l=Object(le.a)(a,2),s=l[0],u=l[1].height;Ga=Ga||Object(m.pure)(Wa);var b=(i-2*n)/t;return Object(d.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:u*b+2*n}},c,Object(d.createElement)(g.Disabled,{style:{transform:"scale(".concat(b,")"),width:t,left:n,right:n,top:n},className:"block-editor-block-preview__content"},s,Object(d.createElement)(Ga,null)))};var Ya=Object(d.memo)((function(e){var t=e.blocks,n=e.__experimentalPadding,r=void 0===n?0:n,o=e.viewportWidth,c=void 0===o?700:o,i=e.__experimentalLive,a=void 0!==i&&i,l=e.__experimentalOnClick,s=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings()}),[]),u=Object(d.useMemo)((function(){return Object(p.castArray)(t)}),[t]);return t&&0!==t.length?Object(d.createElement)(La,{value:u,settings:s},a?Object(d.createElement)(qa,{onClick:l}):Object(d.createElement)($a,{viewportWidth:c,__experimentalPadding:r})):null}));function Xa(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 Qa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xa(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Za=function(e){var t=e.item,n=Object(c.getBlockType)(t.name);return Object(d.createElement)("div",{className:"block-editor-inserter__menu-preview-panel"},Object(d.createElement)("div",{className:"block-editor-inserter__preview"},Object(c.isReusableBlock)(t)||n.example?Object(d.createElement)("div",{className:"block-editor-inserter__preview-content"},Object(d.createElement)(Ya,{__experimentalPadding:16,viewportWidth:500,blocks:n.example?Object(c.getBlockFromExample)(t.name,{attributes:Qa({},n.example.attributes,{},t.initialAttributes),innerBlocks:n.example.innerBlocks}):Object(c.createBlock)(t.name,t.initialAttributes)})):Object(d.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},Object(B.__)("No Preview Available."))),!Object(c.isReusableBlock)(t)&&Object(d.createElement)(bo,{blockType:t}))};var Ja=function(e){var t=e.icon,n=e.onClick,r=e.isDisabled,o=e.title,c=e.className,i=Object(ke.a)(e,["icon","onClick","isDisabled","title","className"]),a=t?{backgroundColor:t.background,color:t.foreground}:{};return Object(d.createElement)("li",{className:"block-editor-block-types-list__list-item"},Object(d.createElement)(g.Button,Object(s.a)({className:f()("block-editor-block-types-list__item",c),onClick:function(e){e.preventDefault(),n()},disabled:r},i),Object(d.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:a},Object(d.createElement)(Gn,{icon:t,showColors:!0})),Object(d.createElement)("span",{className:"block-editor-block-types-list__item-title"},o)))};var el=function(e){var t=e.items,n=void 0===t?[]:t,r=e.onSelect,o=e.onHover,i=void 0===o?function(){}:o,a=e.children,l=zn(n);return Object(d.createElement)("ul",{role:"list",className:"block-editor-block-types-list"},l.map((function(e){return Object(d.createElement)(Ja,{key:e.id,className:Object(c.getBlockMenuDefaultClassName)(e.id),icon:e.icon,onClick:function(){r(e),i(null)},onFocus:function(){return i(e)},onMouseEnter:function(){return i(e)},onMouseLeave:function(){return i(null)},onBlur:function(){return i(null)},isDisabled:e.isDisabled,title:e.title})})),a)};function tl(e){var t=e.rootClientId,n=e.children,r=Object(v.useSelect)((function(e){var n=(0,e("core/blocks").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(d.createElement)("div",{className:"block-editor-inserter__child-blocks"},(c||o)&&Object(d.createElement)("div",{className:"block-editor-inserter__parent-block-header"},Object(d.createElement)(Gn,{icon:c,showColors:!0}),o&&Object(d.createElement)("h2",null,o)),n)}var nl=Object(g.createSlotFill)("__experimentalInserterMenuExtension"),rl=nl.Fill,ol=nl.Slot;rl.Slot=ol;var cl=rl;var il=function(e){var t=e.title,n=e.icon,r=e.children;return Object(d.createElement)(d.Fragment,null,Object(d.createElement)("div",{className:"block-editor-inserter__panel-header"},Object(d.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),Object(d.createElement)(g.Icon,{icon:n})),Object(d.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};var al=function(){return Object(d.createElement)("div",{className:"block-editor-inserter__no-results"},Object(d.createElement)(lo.a,{className:"block-editor-inserter__no-results-icon",icon:Un.a}),Object(d.createElement)("p",null,Object(B.__)("No results found.")))};function ll(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 sl=Object(g.withSpokenMessages)((function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.filterValue,c=e.debouncedSpeak,i=e.showMostUsedBlocks,a=Fn(t,n),l=Object(le.a)(a,4),s=l[0],b=l[1],f=l[2],m=l[3],O=Object(v.useSelect)((function(e){var n=e("core/block-editor").getBlockName;return!!(0,e("core/blocks").getChildBlockNames)(n(t)).length}),[t]),g=Object(d.useMemo)((function(){return Ln(s,b,f,o)}),[o,s,b,f]),h=Object(d.useMemo)((function(){return Object(p.orderBy)(s,["frecency"],["desc"]).slice(0,6)}),[s]),j=Object(d.useMemo)((function(){return g.filter((function(e){return!e.category}))}),[g]),k=Object(d.useMemo)((function(){var e=function(e){return Object(p.findIndex)(b,(function(t){return t.slug===e.category}))};return Object(p.flow)((function(e){return e.filter((function(e){return e.category&&"reusable"!==e.category}))}),(function(t){return Object(p.sortBy)(t,e)}),(function(e){return Object(p.groupBy)(e,"category")}))(g)}),[g,b]),y=Object(d.useMemo)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ll(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ll(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},f);return Object.keys(f).forEach((function(t){e[t]=g.filter((function(e){return function(e){return e.name.split("/")[0]}(e)===t})),0===e[t].length&&delete e[t]})),e}),[g,f]);Object(d.useEffect)((function(){var e=Object(B.sprintf)(
|
28 |
-
/* translators: %d: number of results. */
|
29 |
-
Object(B._n)("%d result found.","%d results found.",g.length),g.length);c(e)}),[o,c]);var _=!Object(p.isEmpty)(g);return Object(d.createElement)("div",null,O&&Object(d.createElement)(tl,{rootClientId:t},Object(d.createElement)(el,{items:g,onSelect:m,onHover:r})),i&&!O&&!!h.length&&!o&&Object(d.createElement)(il,{title:Object(B._x)("Most used","blocks")},Object(d.createElement)(el,{items:h,onSelect:m,onHover:r})),!O&&Object(p.map)(b,(function(e){var t=k[e.slug];return t&&t.length?Object(d.createElement)(il,{key:e.slug,title:e.title,icon:e.icon},Object(d.createElement)(el,{items:t,onSelect:m,onHover:r})):null})),!O&&!!j.length&&Object(d.createElement)(il,{className:"block-editor-inserter__uncategorized-blocks-panel",title:Object(B.__)("Uncategorized")},Object(d.createElement)(el,{items:j,onSelect:m,onHover:r})),!O&&Object(p.map)(f,(function(e,t){var n=y[t];return n&&n.length?Object(d.createElement)(il,{key:t,title:e.title,icon:e.icon},Object(d.createElement)(el,{items:n,onSelect:m,onHover:r})):null})),Object(d.createElement)(cl.Slot,{fillProps:{onSelect:m,onHover:r,filterValue:o,hasItems:_}},(function(e){return e.length?e:_?null:Object(d.createElement)(al,null)})))})),ul=function(e){var t=Object(v.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(v.useDispatch)("core/notices").createSuccessNotice;return[r,n,Object(d.useCallback)((function(t,n){e(Object(p.map)(n,(function(e){return Object(c.cloneBlock)(e)}))),o(Object(B.sprintf)(
|
30 |
-
/* translators: %s: block pattern title. */
|
31 |
-
Object(B.__)('Pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function dl(e){var t=e.pattern,n=e.onClick,r=t.content,o=t.viewportWidth,i=Object(d.useMemo)((function(){return Object(c.parse)(r)}),[r]),a=Object(m.useInstanceId)(dl),l="block-editor-block-patterns-list__item-description-".concat(a);return Object(d.createElement)("div",{className:"block-editor-block-patterns-list__item",role:"button",onClick:function(){return n(t,i)},onKeyDown:function(e){it.ENTER!==e.keyCode&&it.SPACE!==e.keyCode||n(t,i)},tabIndex:0,"aria-label":t.title,"aria-describedby":t.description?l:void 0},Object(d.createElement)(Ya,{blocks:i,viewportWidth:o}),Object(d.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},t.title),!!t.description&&Object(d.createElement)(g.VisuallyHidden,{id:l},t.description))}function bl(){return Object(d.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var fl=function(e){var t=e.blockPatterns,n=e.shownPatterns,r=e.onClickPattern;return t.map((function(e){return n.includes(e)?Object(d.createElement)(dl,{key:e.name,pattern:e,onClick:r}):Object(d.createElement)(bl,{key:e.name})}))};function pl(e){var t=e.filterValue,n=e.onInsert,r=ul(n),o=Object(le.a)(r,3),c=o[0],i=o[2],a=Object(m.useAsyncList)(c),l=Object(d.useMemo)((function(){return An(c,t)}),[t,c]);if(t)return l.length?Object(d.createElement)(il,{title:Object(B.__)("Search Results")},Object(d.createElement)(fl,{shownPatterns:a,blockPatterns:l,onClickPattern:i})):Object(d.createElement)(al,null)}function ml(e){var t=e.onInsert,n=ul(t),r=Object(le.a)(n,3),o=r[0],c=r[1],i=r[2],a=Object(d.useCallback)((function(e){if(!e.categories||!e.categories.length)return 1/0;var t=Object(p.fromPairs)(c.map((function(e,t){return[e.name,t]})));return Math.min.apply(Math,Object(ae.a)(e.categories.map((function(e){return void 0!==t[e]?t[e]:1/0}))))}),[c]),l=Object(d.useMemo)((function(){return o.sort((function(e,t){return a(e)-a(t)}))}),[o,a]),s=Object(m.useAsyncList)(l),u=Object(d.useMemo)((function(){return o.filter((function(e){return a(e)===1/0}))}),[o,a]);return Object(d.createElement)(d.Fragment,null,c.map((function(e){var t=o.filter((function(t){return t.categories&&t.categories.includes(e.name)}));return!!t.length&&Object(d.createElement)(il,{key:e.name,title:e.label},Object(d.createElement)(fl,{shownPatterns:s,blockPatterns:t,onClickPattern:i}))})),!!u.length&&Object(d.createElement)(il,{title:Object(B._x)("Uncategorized")},Object(d.createElement)(fl,{shownPatterns:s,blockPatterns:u,onClickPattern:i})))}var Ol=function(e){var t=e.onInsert,n=e.filterValue;return n?Object(d.createElement)(pl,{onInsert:t,filterValue:n}):Object(d.createElement)(ml,{onInsert:t})},vl=n(28);function gl(e){var t=e.debouncedSpeak,n=e.filterValue,r=e.onHover,o=e.onInsert,c=e.rootClientId,i=Fn(c,o),a=Object(le.a)(i,4),l=a[0],s=a[1],u=a[2],b=a[3],f=Object(d.useMemo)((function(){var e=l.filter((function(e){return"reusable"===e.category}));return n?Ln(e,s,u,n):e}),[n,l,s,u]);return Object(d.useEffect)((function(){var e=Object(B.sprintf)(
|
32 |
-
/* translators: %d: number of results. */
|
33 |
-
Object(B._n)("%d result found.","%d results found.",f.length),f.length);t(e)}),[n,t]),0===f.length?Object(d.createElement)(al,null):Object(d.createElement)(il,{title:n?Object(B.__)("Search Results"):Object(B.__)("Reusable blocks")},Object(d.createElement)(el,{items:f,onSelect:b,onHover:r}))}var hl=Object(g.withSpokenMessages)((function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.filterValue,c=e.debouncedSpeak;return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(gl,{debouncedSpeak:c,filterValue:o,onHover:r,onInsert:n,rootClientId:t}),Object(d.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},Object(d.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:Object(vl.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(B.__)("Manage all reusable blocks"))))}));function jl(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 kl=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.selectBlockOnInsert,i=Object(v.useSelect)((function(e){var o,c=e("core/block-editor"),i=c.getSettings,a=c.getBlockRootClientId,l=c.getBlockSelectionEnd,s=t;if(!s&&!n&&!r){var d=l();d&&(s=a(d))}return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jl(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({hasPatterns:!!(null===(o=i().__experimentalBlockPatterns)||void 0===o?void 0:o.length),destinationRootClientId:s},Object(p.pick)(e("core/block-editor"),["getSelectedBlock","getBlockIndex","getBlockSelectionEnd","getBlockOrder"]))}),[r,n,t]),a=i.destinationRootClientId,l=i.getSelectedBlock,s=i.getBlockIndex,d=i.getBlockSelectionEnd,b=i.getBlockOrder,f=Object(v.useDispatch)("core/block-editor"),m=f.replaceBlocks,O=f.insertBlocks,g=f.showInsertionPoint,h=f.hideInsertionPoint;function j(){if(n)return s(n,a);var e=d();return!r&&e?s(e,a)+1:b(a).length}return[a,function(e){var t=l();if(!r&&t&&Object(c.isUnmodifiedDefaultBlock)(t)?m(t.clientId,e):O(e,j(),a,o),!o){
|
34 |
-
// translators: %d: the name of the block that has been added
|
35 |
-
var n=Object(B._n)("%d block added.","%d blocks added",e.length);Object(Fe.speak)(n)}},function(e){if(e){var t=j();g(a,t)}else h()}]},yl={name:"blocks",
|
36 |
-
/* translators: Blocks tab title in the block inserter. */
|
37 |
-
title:Object(B.__)("Blocks")},_l={name:"patterns",
|
38 |
-
/* translators: Patterns tab title in the block inserter. */
|
39 |
-
title:Object(B.__)("Patterns")},El={name:"reusable",
|
40 |
-
/* translators: Reusable blocks tab title in the block inserter. */
|
41 |
-
title:Object(B.__)("Reusable")};var Sl=function(e){var t=e.children,n=e.showPatterns,r=void 0!==n&&n,o=e.showReusableBlocks,c=void 0!==o&&o,i=[yl];return r&&i.push(_l),c&&i.push(El),Object(d.createElement)(g.TabPanel,{className:"block-editor-inserter__tabs",tabs:i},t)},Cl=function(e){return e.stopPropagation()};var wl=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.__experimentalSelectBlockOnInsert,c=e.onSelect,i=e.showInserterHelpPanel,a=e.showMostUsedBlocks,l=Object(d.useState)(""),s=Object(le.a)(l,2),u=s[0],b=s[1],f=Object(d.useState)(null),p=Object(le.a)(f,2),m=p[0],O=p[1],h=kl({rootClientId:t,clientId:n,isAppender:r,selectBlockOnInsert:o}),j=Object(le.a)(h,3),k=j[0],y=j[1],_=j[2],E=Object(v.useSelect)((function(e){var t=e("core/block-editor").getSettings(),n=t.__experimentalBlockPatterns,r=t.__experimentalReusableBlocks;return{hasPatterns:!!(null==n?void 0:n.length),hasReusableBlocks:!!(null==r?void 0:r.length)}}),[]),S=E.hasPatterns,C=E.hasReusableBlocks,w=!k&&S,I=function(e){y(e),c()},x=function(e){_(!!e),O(e)},P=Object(d.createElement)(d.Fragment,null,Object(d.createElement)("div",{className:"block-editor-inserter__block-list"},Object(d.createElement)(sl,{rootClientId:k,onInsert:I,onHover:x,filterValue:u,showMostUsedBlocks:a})),i&&Object(d.createElement)("div",{className:"block-editor-inserter__tips"},Object(d.createElement)(g.VisuallyHidden,{as:"h2"},Object(B.__)("A tip for using the block editor")),Object(d.createElement)(io,null))),T=Object(d.createElement)(Ol,{onInsert:I,filterValue:u}),N=Object(d.createElement)(hl,{rootClientId:k,onInsert:I,onHover:x,filterValue:u});return Object(d.createElement)("div",{className:"block-editor-inserter__menu",onKeyPress:Cl,onKeyDown:function(e){[it.LEFT,it.DOWN,it.RIGHT,it.UP,it.BACKSPACE,it.ENTER].includes(e.keyCode)&&e.stopPropagation()}},Object(d.createElement)("div",{className:"block-editor-inserter__main-area"},Object(d.createElement)("div",{className:"block-editor-inserter__content"},Object(d.createElement)(uo,{onChange:b,value:u}),(w||C)&&Object(d.createElement)(Sl,{showPatterns:w,showReusableBlocks:C},(function(e){return"blocks"===e.name?P:"patterns"===e.name?T:N})),!w&&!C&&P)),i&&m&&Object(d.createElement)("div",{className:"block-editor-inserter__preview-container"},Object(d.createElement)(Za,{item:m})))},Bl=function(e){[it.LEFT,it.DOWN,it.RIGHT,it.UP,it.BACKSPACE,it.ENTER].includes(e.keyCode)&&e.stopPropagation()},Il=function(e){return e.stopPropagation()};function xl(e){var t=e.blockTypes,n=e.blockPatterns,r=e.onSelectBlockType,o=e.onSelectBlockPattern,c=e.onHover,i=Object(d.useMemo)((function(){return t.slice(0,6)}),[t]),a=Object(d.useMemo)((function(){return n.slice(0,2)}),[t]);return Object(d.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},!i.length&&!a.length&&Object(d.createElement)(al,null),!!i.length&&Object(d.createElement)(il,{title:Object(d.createElement)(g.VisuallyHidden,null,Object(B.__)("Blocks"))},Object(d.createElement)(el,{items:i,onSelect:r,onHover:c})),!!i.length&&!!a.length&&Object(d.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!a.length&&Object(d.createElement)(il,{title:Object(d.createElement)(g.VisuallyHidden,null,Object(B.__)("Blocks"))},Object(d.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},Object(d.createElement)(fl,{shownPatterns:a,blockPatterns:a,onClickPattern:o}))))}var Pl=Object(g.withSpokenMessages)((function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.selectBlockOnInsert,c=e.debouncedSpeak,i=Object(d.useState)(""),a=Object(le.a)(i,2),l=a[0],s=a[1],u=kl({rootClientId:t,clientId:n,isAppender:r,selectBlockOnInsert:o}),b=Object(le.a)(u,3),f=b[0],p=b[1],m=b[2],O=Fn(f,p),h=Object(le.a)(O,4),j=h[0],k=h[1],y=h[2],_=h[3],E=ul(p),S=Object(le.a)(E,3),C=S[0],w=S[2],I=!f&&C.length&&!!l,x=I&&C.length>6||j.length>6,P=Object(d.useMemo)((function(){return Ln(j,k,y,l)}),[l,j,k,y]),T=Object(d.useMemo)((function(){return An(C,l)}),[l,C]),N=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings().__experimentalSetIsInserterOpened}),[]);return Object(d.useEffect)((function(){N&&N(!1)}),[N]),Object(d.useEffect)((function(){if(l){var e=P.length+T.length,t=Object(B.sprintf)(
|
42 |
-
/* translators: %d: number of results. */
|
43 |
-
Object(B._n)("%d result found.","%d results found.",e),e);c(t)}}),[l,c]),Object(d.createElement)("div",{className:"block-editor-inserter__quick-inserter",onKeyPress:Il,onKeyDown:Bl},x&&Object(d.createElement)(uo,{value:l,onChange:function(e){s(e)}}),Object(d.createElement)(xl,{blockTypes:P,blockPatterns:I?T:[],onSelectBlockPattern:w,onSelectBlockType:_,onHover:m}),N&&Object(d.createElement)(g.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:function(){return N(!0)},"aria-label":Object(B.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},Object(B.__)("Browse all")))}));function Tl(){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}}var Nl=function(e){var t,n=e.onToggle,r=e.disabled,o=e.isOpen,c=e.blockTitle,i=e.hasSingleBlockType,a=e.toggleProps;return t=i?Object(B.sprintf)(// translators: %s: the name of the block when there is only one
|
44 |
-
Object(B._x)("Add %s","directly add the only allowed block"),c):Object(B._x)("Add block","Generic label for block inserter button"),Object(d.createElement)(g.Button,Object(s.a)({icon:oo.a,label:t,tooltipPosition:"bottom",onClick:n,className:"block-editor-inserter__toggle","aria-haspopup":!i&&"true","aria-expanded":!i&&o,disabled:r},a))},Rl=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(Tl()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).onToggle=e.onToggle.bind(Object(Kt.a)(e)),e.renderToggle=e.renderToggle.bind(Object(Kt.a)(e)),e.renderContent=e.renderContent.bind(Object(Kt.a)(e)),e}return Object(Gt.a)(r,[{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,s=r.renderToggle,u=void 0===s?Nl:s;return 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(d.createElement)(Pl,{rootClientId:r,clientId:o,isAppender:c,selectBlockOnInsert:a}):Object(d.createElement)(wl,{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(d.createElement)(g.Dropdown,{className:"block-editor-inserter",contentClassName:f()("block-editor-inserter__popover",{"is-quick":o}),position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:Object(B.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent})}}]),r}(d.Component),Ml=Object(m.compose)([Object(v.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=o.getBlockSelectionEnd,s=e("core/blocks").getBlockVariations,u=a(r=r||c(n||l())||void 0),d=1===Object(p.size)(u)&&0===Object(p.size)(s(u[0].name,"inserter")),b=!1;return d&&(b=u[0]),{hasItems:i(r),hasSingleBlockType:d,blockTitle:b?b.title:"",allowedBlockType:b,rootClientId:r}})),Object(v.withDispatch)((function(e,t,n){var r=n.select;return{insertOnlyAllowedBlock:function(){var n=t.rootClientId,o=t.clientId,i=t.isAppender,a=t.hasSingleBlockType,l=t.allowedBlockType,s=t.__experimentalSelectBlockOnInsert;if(a&&((0,e("core/block-editor").insertBlock)(Object(c.createBlock)(l.name),function(){var e=r("core/block-editor"),t=e.getBlockIndex,c=e.getBlockSelectionEnd,a=e.getBlockOrder;if(o)return t(o,n);var l=c();return!i&&l?t(l,n)+1:a(n).length}(),n,s),!s)){var u=Object(B.sprintf)(// translators: %s: the name of the block that has been added
|
45 |
-
Object(B.__)("%s block added"),l.title);Object(Fe.speak)(u)}}}})),Object(m.ifCondition)((function(e){var t=e.hasItems,n=e.isAppender,r=e.rootClientId,o=e.clientId;return t||!n&&!r&&!o}))])(Rl),Dl=Object(d.forwardRef)((function(e,t){var n=e.selectedClientId,r=e.isReverse,o=e.containerRef,c=e.noCapture,i=e.hasMultiSelection,a=e.multiSelectionContainer,l=Object(v.useSelect)((function(e){return e("core/block-editor").isNavigationMode()})),s=Object(v.useDispatch)("core/block-editor").setNavigationMode;return Object(d.createElement)("div",{ref:t,tabIndex:l?void 0:"0",onFocus:function(){if(c.current)c.current=null;else if(n){var e=qe(n);if(r){var t=jr.focus.tabbable.find(e);(Object(p.last)(t)||e).focus()}else e.focus()}else{if(i)return void a.current.focus();s(!0);var l=jr.focus.tabbable.find(o.current);l.length&&(r?Object(p.last)(l).focus():Object(p.first)(l).focus())}},style:{position:"fixed"}})})),Ll=window,Al=Ll.getSelection,Fl=Ll.getComputedStyle,Vl=Object(p.overEvery)([jr.isTextField,jr.focus.tabbable.isTabbableIndex]);function Hl(e,t,n,r){var o,c=jr.focus.focusable.find(n);return t&&(c=Object(p.reverse)(c)),c=c.slice(c.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),Object(p.find)(c,(function t(n,c,i){if(!jr.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(jr.isTextField)(n))return!0;if(!n.classList.contains("block-editor-block-list__block"))return!1;if(function(e){return e.classList.contains("block-editor-block-list__layout")||!!e.querySelector(".block-editor-block-list__layout")}(n))return!0;if(n.contains(e))return!1;for(var l,s=1;(l=i[c+s])&&n.contains(l);s++)if(t(l,c+s,i))return!1;return!0}))}function zl(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,s=t.hasMultiSelection,u=t.getBlockOrder,d=t.isNavigationMode,b=t.hasBlockMovingClientId,f=t.getBlockIndex,p=t.getBlockRootClientId,m=t.getClientIdsOfDescendants,O=t.canInsertBlockType,v=t.getBlockName,g=t.isSelectionEnabled,h=t.getBlockSelectionStart,j=t.isMultiSelecting,k=t.getSettings,y=n(),_=r(),E=o();return{selectedBlockClientId:y,selectionStartClientId:_,selectionBeforeEndClientId:c(E||y),selectionAfterEndClientId:i(E||y),selectedFirstClientId:a(),selectedLastClientId:l(),hasMultiSelection:s(),blocks:u(),isNavigationMode:d(),hasBlockMovingClientId:b,getBlockIndex:f,getBlockRootClientId:p,getClientIdsOfDescendants:m,canInsertBlockType:O,getBlockName:v,isSelectionEnabled:g(),blockSelectionStart:h(),isMultiSelecting:j(),keepCaretInsideBlock:k().keepCaretInsideBlock}}function Ul(e){var t=e.children,n=Object(d.useRef)(),r=Object(d.useRef)(),o=Object(d.useRef)(),c=Object(d.useRef)(),i=Object(d.useRef)(),a=Object(d.useRef)(),l=Object(d.useRef)(),s=Object(v.useSelect)(zl,[]),u=s.selectedBlockClientId,b=s.selectionStartClientId,m=s.selectionBeforeEndClientId,O=s.selectionAfterEndClientId,g=s.selectedFirstClientId,h=s.selectedLastClientId,j=s.hasMultiSelection,k=s.blocks,y=s.isNavigationMode,_=s.hasBlockMovingClientId,E=s.isSelectionEnabled,S=s.blockSelectionStart,C=s.isMultiSelecting,w=s.getBlockIndex,I=s.getBlockRootClientId,x=s.getClientIdsOfDescendants,P=s.canInsertBlockType,T=s.getBlockName,N=s.keepCaretInsideBlock,R=Object(v.useDispatch)("core/block-editor"),M=R.multiSelect,D=R.selectBlock,L=R.clearSelectedBlock,A=R.setNavigationMode,F=R.setBlockMovingClientId,V=R.moveBlockToPosition,H=Object(d.useState)(!1),z=Object(le.a)(H,2),U=z[0],G=z[1];Object(d.useEffect)((function(){j&&!C&&c.current.focus()}),[j,C]);var K=f()("block-editor-writing-flow",{"is-navigate-mode":y,"is-block-moving-mode":!!_(),"can-insert-moving-block":U});return Object(d.createElement)("div",{className:K},Object(d.createElement)(Dl,{ref:r,selectedClientId:u,containerRef:n,noCapture:a,hasMultiSelection:j,multiSelectionContainer:c}),Object(d.createElement)("div",{ref:n,onKeyDown:function(e){var t=e.keyCode,s=e.target,d=t===it.UP,f=t===it.DOWN,v=t===it.LEFT,E=t===it.RIGHT,S=t===it.TAB,C=t===it.ESCAPE,B=t===it.ENTER,R=t===it.SPACE,H=d||v,z=v||E,U=d||f,K=z||U,W=e.shiftKey,q=W||e.ctrlKey||e.altKey||e.metaKey,$=U?jr.isVerticalEdge:jr.isHorizontalEdge;if(y){var Y,X=S&&W||d,Q=S&&!W||f,Z=v,J=E;if(X)Y=m;else if(Q)Y=O;else if(Z){var ee;Y=null!==(ee=I(u))&&void 0!==ee?ee:u}else if(J){var te;Y=null!==(te=x([u])[0])&&void 0!==te?te:u}var ne=_();if(ne&&Y&&G(P(T(ne),I(Y))),C&&ne&&(F(null),G(!1)),(B||R)&&ne){var re=I(ne),oe=I(u),ce=w(ne,re),ie=w(u,oe);ce<ie&&re===oe&&(ie-=1),V(ne,re,oe,ie),D(ne),F(null)}if(Q||X||Z||J)if(Y)e.preventDefault(),D(Y);else if(S&&u){var ae,le=qe(u);(ae=Q?jr.focus.tabbable.findNext(le):jr.focus.tabbable.findPrevious(le))&&(e.preventDefault(),ae.focus(),L())}}else{if(u)if(S){var se=qe(u);if(W){if(s===se)return a.current=!0,void r.current.focus()}else{var ue=jr.focus.tabbable.find(se);if(s===(Object(p.last)(ue)||se))return a.current=!0,void o.current.focus()}}else C&&A(!0);else if(j&&S&&s===c.current)return a.current=!0,void(W?r.current.focus():o.current.focus());if(U?l.current||(l.current=Object(jr.computeCaretRect)()):l.current=null,!K)return it.isKeyboardEvent.primary(e)&&(i.current=Object(jr.isEntirelySelected)(s)),void(it.isKeyboardEvent.primary(e,"a")&&((s.isContentEditable?i.current:Object(jr.isEntirelySelected)(s))&&(M(Object(p.first)(k),Object(p.last)(k)),e.preventDefault()),i.current=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===it.UP||t===it.DOWN)&&!n)return!0;var r=e.tagName;return"INPUT"!==r&&"TEXTAREA"!==r}(s,t,q)){var de="rtl"===Fl(s).direction?!H:H;if(W)(H&&m||!H&&O)&&(j||function(e,t){var r,o,c=Hl(e,t,n.current);return!(c&&(r=e,o=c,r.closest(".block-editor-block-list__block")===o.closest(".block-editor-block-list__block")))}(s,H)&&$(s,H))&&(!function(e){var t=e?m:O;t&&M(b||u,t)}(H),e.preventDefault());else if(j)!function(e){var t=e?g:h;t&&D(t)}(H),e.preventDefault();else if(U&&Object(jr.isVerticalEdge)(s,H)&&!N){var be=Hl(s,H,n.current,!0);be&&(Object(jr.placeCaretAtVerticalEdge)(be,H,l.current),e.preventDefault())}else if(z&&Al().isCollapsed&&Object(jr.isHorizontalEdge)(s,de)&&!N){var fe=Hl(s,de,n.current);Object(jr.placeCaretAtHorizontalEdge)(fe,de),e.preventDefault()}}}},onMouseDown:function(e){if(l.current=null,y&&u&&$e(qe(u),e.target)?(A(!1),F(null)):y&&_()&&Ye(e.target)&&G(P(T(_()),I(Ye(e.target)))),E&&0===e.button){var t=Ye(e.target);t&&(e.shiftKey?S!==t&&(M(S,t),e.preventDefault()):j&&D(t))}}},Object(d.createElement)("div",{ref:c,tabIndex:j?"0":void 0,"aria-label":j?Object(B.__)("Multiple selected blocks"):void 0,style:{position:"fixed"}}),t),Object(d.createElement)(Dl,{ref:o,selectedClientId:u,containerRef:n,noCapture:a,hasMultiSelection:j,multiSelectionContainer:c,isReverse:!0}),Object(d.createElement)("div",{"aria-hidden":!0,tabIndex:-1,onClick:function(){var e=jr.focus.focusable.find(n.current),t=Object(p.findLast)(e,Vl);t&&Object(jr.placeCaretAtHorizontalEdge)(t,!0)},className:"block-editor-writing-flow__click-redirect"}))}function Gl(e){var t=e.clientId;return Object(v.useSelect)((function(e){var n=e("core/block-editor"),r=n.getBlockIndex,o=n.getBlockInsertionPoint,c=n.isBlockInsertionPointVisible,i=(0,n.getBlockRootClientId)(t),a=r(t,i),l=o();return c()&&l.index===a&&l.rootClientId===i}),[t])?Object(d.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}):null}function Kl(e){var t=e.hasMultiSelection,n=e.selectedBlockClientId,r=e.children,o=e.containerRef,c=Object(d.useState)(!1),i=Object(le.a)(c,2),a=i[0],l=i[1],s=Object(d.useState)(!1),u=Object(le.a)(s,2),b=u[0],p=u[1],m=Object(d.useState)(null),O=Object(le.a)(m,2),h=O[0],j=O[1],k=Object(d.useState)(null),y=Object(le.a)(k,2),_=y[0],E=y[1],S=Object(d.useRef)(),C=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getMultiSelectedBlockClientIds;return{isMultiSelecting:(0,t.isMultiSelecting)(),multiSelectedBlockClientIds:n()}}),[]),w=C.multiSelectedBlockClientIds,B=C.isMultiSelecting;var I=t?w.includes(_):_===n;return Object(d.createElement)(d.Fragment,null,!B&&(a||b)&&Object(d.createElement)(g.Popover,{noArrow:!0,animate:!1,anchorRef:h,position:"top right left",focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:"block-toolbar"},Object(d.createElement)("div",{className:"block-editor-block-list__insertion-point",style:{width:h.offsetWidth}},Object(d.createElement)(Gl,{clientId:_}),Object(d.createElement)("div",{ref:S,onFocus:function(){return p(!0)},onBlur:function(){return p(!1)},onClick:function(e){var t=e.clientX,n=e.clientY,r=e.target;if(r===S.current){var c=r.getBoundingClientRect(),i=n<c.top+c.height/2,a=qe(_),l=Hl(a,!0,i?o.current:a)||a,s=new window.DOMRect(t,n,0,16);Object(jr.placeCaretAtVerticalEdge)(l,i,s,!1)}},tabIndex:-1,className:f()("block-editor-block-list__insertion-point-inserter",{"is-inserter-hidden":I})},Object(d.createElement)(Ml,{position:"bottom center",clientId:_,__experimentalIsQuick:!0})))),Object(d.createElement)("div",{onMouseMove:b||B?void 0:function(e){if(e.target.classList.contains("block-editor-block-list__layout")){var t=e.target.getBoundingClientRect(),n=e.clientY-t.top,r=Array.from(e.target.children).find((function(e){return e.offsetTop>n}));if(r){var o=r.id.slice("block-".length);if(o){var c=r.getBoundingClientRect();e.clientX>c.right||e.clientX<c.left?a&&l(!1):(l(!0),j(r),E(o))}}}else a&&l(!1)}},r))}var Wl=function(e){var t=e.clientId,n=e.rootClientId,r=Object(ke.a)(e,["clientId","rootClientId"]),o=Object(v.useSelect)((function(e){var r,o=e("core/block-editor"),c=o.__unstableGetBlockWithoutInnerBlocks,i=o.getBlockIndex,a=o.hasBlockMovingClientId,l=o.getBlockListSettings,s=i(t,n),u=c(t);return{index:s,name:u.name,attributes:u.attributes,blockMovingMode:a(),orientation:null===(r=l(n))||void 0===r?void 0:r.orientation}}),[t,n]),i=o.index,a=o.name,l=o.attributes,u=o.blockMovingMode,b=o.orientation,p=Object(v.useDispatch)("core/block-editor"),m=p.setNavigationMode,O=p.removeBlock,h=Object(d.useRef)();Object(d.useEffect)((function(){h.current.focus()}));var j=Object(c.getBlockType)(a),k=Object(c.__experimentalGetAccessibleBlockLabel)(j,l,i+1,b),y=f()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!u});return Object(d.createElement)("div",Object(s.a)({className:y},r),Object(d.createElement)(g.Button,{ref:h,onClick:function(){return m(!1)},onKeyDown:function(e){var n=e.keyCode;n!==it.BACKSPACE&&n!==it.DELETE||(O(t),e.preventDefault())},label:k},Object(d.createElement)(Xn,{clientId:t})))};function ql(e){var t,n,r,o=Object(d.useState)(!1),c=Object(le.a)(o,2),i=c[0],a=c[1],l=Object(d.useCallback)((function(){var t=jr.focus.tabbable.find(e.current);a(!t.some((function(e){return!("experimentalToolbarItem"in e.dataset)})))}),[]);return Object(d.useLayoutEffect)(l,[]),t=function(){var t=new window.MutationObserver(l);return t.observe(e.current,{childList:!0,subtree:!0}),function(){return t.disconnect()}},n=[i],r=Object(d.useRef)(!1),Object(d.useLayoutEffect)((function(){if(r.current)return t();r.current=!0}),n),i}function $l(e,t,n){var r=Object(d.useState)(t),o=Object(le.a)(r,1)[0],c=Object(d.useCallback)((function(){var t,n,r;t=e.current,n=jr.focus.tabbable.find(t),(r=Object(le.a)(n,1)[0])&&r.focus()}),[]);Object(l.useShortcut)("core/block-editor/focus-toolbar",c,{bindGlobal:!0,eventName:"keydown"}),Object(d.useEffect)((function(){o&&c()}),[n,o,c])}var Yl=function(e){var t=e.children,n=e.focusOnMount,r=Object(ke.a)(e,["children","focusOnMount"]),o=Object(d.useRef)(),c=ql(o);return $l(o,n,c),c?Object(d.createElement)(g.Toolbar,Object(s.a)({__experimentalAccessibilityLabel:r["aria-label"],ref:o},r),t):Object(d.createElement)(g.NavigableMenu,Object(s.a)({orientation:"horizontal",role:"toolbar",ref:o},r),t)};function Xl(){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}}var Ql=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(Xl()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(Kt.a)(e)),e.onBlur=e.onBlur.bind(Object(Kt.a)(e)),e}return Object(Gt.a)(r,[{key:"onFocus",value:function(){this.setState({isFocused:!0})}},{key:"onBlur",value:function(){this.setState({isFocused:!1})}},{key:"render",value:function(){var e=this.props,t=e.isFirst,n=e.isLast,r=e.clientIds,o=e.isLocked,c=e.isHidden,i=e.rootClientId,a=e.orientation,l=this.state.isFocused;return o||t&&n&&!i?null:Object(d.createElement)("div",{className:f()("block-editor-block-mover",{"is-visible":l||!c,"is-horizontal":"horizontal"===a})},Object(d.createElement)(g.ToolbarGroup,null,Object(d.createElement)(g.__experimentalToolbarItem,{onFocus:this.onFocus,onBlur:this.onBlur},(function(e){return Object(d.createElement)(Rr,Object(s.a)({clientIds:r},e))})),Object(d.createElement)(g.__experimentalToolbarItem,{onFocus:this.onFocus,onBlur:this.onBlur},(function(e){return Object(d.createElement)(Mr,Object(s.a)({clientIds:r},e))}))))}}]),r}(d.Component),Zl=Object(v.withSelect)((function(e,t){var n,r=t.clientIds,o=e("core/block-editor"),i=o.getBlock,a=o.getBlockIndex,l=o.getBlockListSettings,s=o.getTemplateLock,u=o.getBlockOrder,d=o.getBlockRootClientId,b=Object(p.castArray)(r),f=Object(p.first)(b),m=i(f),O=d(Object(p.first)(b)),v=a(f,O),g=0===v,h=a(Object(p.last)(b),O)===u(O).length-1;return{blockType:m?Object(c.getBlockType)(m.name):null,isLocked:"all"===s(O),rootClientId:O,firstIndex:v,isFirst:g,isLast:h,orientation:null===(n=l(O))||void 0===n?void 0:n.orientation}}))(Ql);function Jl(){var e=Object(v.useDispatch)("core/block-editor").selectBlock,t=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=(0,t.getBlockParents)((0,t.getSelectedBlockClientId)()),o=r[r.length-1],i=n(o);return{parentBlockType:Object(c.getBlockType)(i),firstParentClientId:o}}),[]),n=t.parentBlockType,r=t.firstParentClientId;return void 0!==r?Object(d.createElement)("div",{className:"block-editor-block-parent-selector",key:r},Object(d.createElement)(g.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:function(){return e(r)},label:Object(B.sprintf)(
|
46 |
-
/* translators: %s: Name of the block's parent. */
|
47 |
-
Object(B.__)("Select parent (%s)"),n.title),showTooltip:!0,icon:Object(d.createElement)(Gn,{icon:n.icon})})):null}var es=Object(d.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(I.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 ts(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 ns(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ts(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ts(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rs(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return os(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return os(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,o,c=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return c=e.done,e},e:function(e){i=!0,o=e},f:function(){try{c||null==r.return||r.return()}finally{if(i)throw o}}}}function os(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 cs(e){var t=e.genericPreviewBlock,n=e.style,r=e.isActive,o=e.onBlur,c=e.onHover,i=e.onSelect,a=e.styleClassName,l=e.itemRole,s=Object(d.useMemo)((function(){return ns({},t,{attributes:ns({},t.attributes,{className:a})})}),[t,a]);return Object(d.createElement)("div",{key:n.name,className:f()("block-editor-block-styles__item",{"is-active":r}),onClick:function(){return i()},onKeyDown:function(e){it.ENTER!==e.keyCode&&it.SPACE!==e.keyCode||(e.preventDefault(),i())},onMouseEnter:c,onMouseLeave:o,role:l||"button",tabIndex:"0","aria-label":n.label||n.name},Object(d.createElement)("div",{className:"block-editor-block-styles__item-preview"},Object(d.createElement)(Ya,{viewportWidth:500,blocks:s})),Object(d.createElement)("div",{className:"block-editor-block-styles__item-label"},n.label||n.name))}var is=function(e){var t=e.clientId,n=e.onSwitch,r=void 0===n?p.noop:n,o=e.onHoverClassName,i=void 0===o?p.noop:o,a=e.itemRole,l=Object(v.useSelect)((function(e){var n=e("core/block-editor").getBlock,r=e("core/blocks").getBlockStyles,o=n(t);return{block:o,type:Object(c.getBlockType)(o.name),styles:r(o.name),className:o.attributes.className||""}}),[t]),s=l.styles,u=l.block,b=l.type,f=l.className,m=Object(v.useDispatch)("core/block-editor").updateBlockAttributes,O=function(e,t){return Object(d.useMemo)((function(){return t.example?Object(c.getBlockFromExample)(e.name,{attributes:t.example.attributes,innerBlocks:t.example.innerBlocks}):Object(c.cloneBlock)(e)}),[t.example?e.name:e,t])}(u,b);if(!s||0===s.length)return null;b.styles||Object(p.find)(s,"isDefault")||s.unshift({name:"default",label:Object(B._x)("Default","block style"),isDefault:!0});var g=function(e,t){var n,r=rs(new ft.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(p.find)(e,{name:c});if(i)return i}}}catch(e){r.e(e)}finally{r.f()}return Object(p.find)(e,"isDefault")}(s,f);return Object(d.createElement)("div",{className:"block-editor-block-styles"},s.map((function(e){var n=function(e,t,n){var r=new ft.a(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}(f,g,e);return Object(d.createElement)(cs,{genericPreviewBlock:O,className:f,isActive:g===e,key:e.name,onSelect:function(){m(t,{className:n}),i(null),r()},onBlur:function(){return i(null)},onHover:function(){return i(n)},style:e,styleClassName:n,itemRole:a})})))},as=function(e){var t=e.className,n=e.possibleBlockTransformations,r=e.onSelect;return Object(d.createElement)(g.MenuGroup,{label:Object(B.__)("Transform to"),className:t},n.map((function(e){var t=e.name,n=e.icon,o=e.title;return Object(d.createElement)(g.MenuItem,{key:t,className:Object(c.getBlockMenuDefaultClassName)(t),icon:Object(d.createElement)(Gn,{icon:n,showColors:!0}),onClick:function(e){e.preventDefault(),r(t)}},o)})))};function ls(){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 ss(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 us(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ss(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ss(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ds(e){var t=e.hoveredBlock,n=e.hoveredClassName,r=Object(c.getBlockType)(t.name);return Object(d.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},Object(d.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},Object(d.createElement)(g.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},Object(d.createElement)("div",{className:"block-editor-block-switcher__preview"},Object(d.createElement)("div",{className:"block-editor-block-switcher__preview-title"},Object(B.__)("Preview")),Object(d.createElement)(Ya,{viewportWidth:500,blocks:r.example?Object(c.getBlockFromExample)(t.name,{attributes:us({},r.example.attributes,{className:n}),innerBlocks:r.example.innerBlocks}):Object(c.cloneBlock)(t,{className:n})})))))}var bs=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(ls()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).state={hoveredClassName:null},e.onHoverClassName=e.onHoverClassName.bind(Object(Kt.a)(e)),e}return Object(Gt.a)(r,[{key:"onHoverClassName",value:function(e){this.setState({hoveredClassName:e})}},{key:"render",value:function(){var e=this,t=this.props,n=t.blocks,r=t.onTransform,o=t.inserterItems,i=t.hasBlockStyles,a=this.state.hoveredClassName;if(!Array.isArray(n)||!n.length)return null;var l,s=Object(le.a)(n,1)[0],u=Object(p.mapKeys)(o,(function(e){return e.name})),b=Object(p.orderBy)(Object(p.filter)(Object(c.getPossibleBlockTransformations)(n),(function(e){return e&&!!u[e.name]})),(function(e){return u[e.name].frecency}),"desc");if(1===Object(p.uniq)(Object(p.map)(n,"name")).length){var f=s.name,m=Object(c.getBlockType)(f);l=m.icon}else l=es;var O=!!b.length;if(!i&&!O)return Object(d.createElement)(g.ToolbarGroup,null,Object(d.createElement)(g.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:Object(B.__)("Block icon"),icon:Object(d.createElement)(Gn,{icon:l,showColors:!0})}));var v=1===n.length?Object(B.__)("Change block type or style"):Object(B.sprintf)(
|
48 |
-
/* translators: %s: number of blocks. */
|
49 |
-
Object(B._n)("Change type of %d block","Change type of %d blocks",n.length),n.length);return Object(d.createElement)(g.ToolbarGroup,null,Object(d.createElement)(g.__experimentalToolbarItem,null,(function(t){return Object(d.createElement)(g.DropdownMenu,{className:"block-editor-block-switcher",label:v,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:Object(d.createElement)(Gn,{icon:l,className:"block-editor-block-switcher__toggle",showColors:!0}),toggleProps:t,menuProps:{orientation:"both"}},(function(t){var o=t.onClose;return(i||O)&&Object(d.createElement)("div",{className:"block-editor-block-switcher__container"},O&&Object(d.createElement)(as,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:b,onSelect:function(e){r(n,e),o()}}),i&&Object(d.createElement)(g.MenuGroup,{label:Object(B.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},null!==a&&Object(d.createElement)(ds,{hoveredBlock:s,hoveredClassName:a}),Object(d.createElement)(is,{clientId:s.clientId,onSwitch:o,onHoverClassName:e.onHoverClassName,itemRole:"menuitem"})))}))})))}}]),r}(d.Component),fs=Object(m.compose)(Object(v.withSelect)((function(e,t){var n=t.clientIds,r=e("core/block-editor"),o=r.getBlocksByClientId,c=r.getBlockRootClientId,i=r.getInserterItems,a=e("core/blocks").getBlockStyles,l=c(Object(p.castArray)(n)[0]),s=o(n),u=s&&1===s.length?s[0]:null,d=u&&a(u.name);return{blocks:s,inserterItems:i(l),hasBlockStyles:d&&d.length>0}})),Object(v.withDispatch)((function(e,t){return{onTransform:function(n,r){e("core/block-editor").replaceBlocks(t.clientIds,Object(c.switchToBlockType)(n,r))}}})))(bs),ps=n(45);function ms(){var e=Object(v.useSelect)((function(e){return e("core/block-editor")}),[]).getBlockName,t=Object(v.useSelect)((function(e){return e("core/blocks")}),[]).getBlockType,n=Object(v.useDispatch)("core/notices").createSuccessNotice;return Object(d.useCallback)((function(r,o){var c="";if(1===o.length){var i=o[0],a=t(e(i)).title;c="copy"===r?Object(B.sprintf)(// Translators: Name of the block being copied, e.g. "Paragraph"
|
50 |
-
Object(B.__)('Copied "%s" to clipboard.'),a):Object(B.sprintf)(// Translators: Name of the block being cut, e.g. "Paragraph"
|
51 |
-
Object(B.__)('Moved "%s" to clipboard.'),a)}else c="copy"===r?Object(B.sprintf)(// Translators: Number of blocks being copied
|
52 |
-
Object(B.__)("Copied %d blocks to clipboard."),o.length):Object(B.sprintf)(// Translators: Number of blocks being cut
|
53 |
-
Object(B.__)("Moved %d blocks to clipboard."),o.length);n(c,{type:"snackbar"})}),[])}var Os=function(e){var t=e.children,n=Object(d.useRef)(),r=Object(v.useSelect)((function(e){return e("core/block-editor")}),[]),o=r.getBlocksByClientId,i=r.getSelectedBlockClientIds,a=r.hasMultiSelection,l=r.getSettings,s=Object(v.useDispatch)("core/block-editor"),u=s.flashBlock,b=s.removeBlocks,f=s.replaceBlocks,m=ms(),O=l().__experimentalCanUserUseUnfilteredHTML,g=function(e){var t=i();if(0!==t.length){if(!a())if("copy"===e.type||"cut"===e.type?Object(jr.documentHasUncollapsedSelection)():Object(jr.documentHasSelection)())return;if(n.current.contains(e.target)){if(e.preventDefault(),"copy"===e.type||"cut"===e.type){1===t.length&&u(t[0]),m(e.type,t);var r=o(t),l=Object(c.serialize)(r);e.clipboardData.setData("text/plain",l),e.clipboardData.setData("text/html",l)}if("cut"===e.type)b(t);else if("paste"===e.type){var s=function(e){var t=e.clipboardData,n=t.items,r=t.files;n=Object(p.isNil)(n)?[]:n,r=Object(p.isNil)(r)?[]:r;var o="",c="";try{o=t.getData("text/plain"),c=t.getData("text/html")}catch(e){try{c=t.getData("Text")}catch(e){return}}return r=Array.from(r),Array.from(n).forEach((function(e){if(e.getAsFile){var t=e.getAsFile();if(t){var n=t.name,o=t.type,c=t.size;Object(p.find)(r,{name:n,type:o,size:c})||r.push(t)}}})),(r=r.filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)}))).length&&!c&&(c=r.map((function(e){return'<img src="'.concat(Object(ps.createBlobURL)(e),'">')})).join(""),o=""),{html:c,plainText:o}}(e),d=s.plainText,v=s.html,g=Object(c.pasteHandler)({HTML:v,plainText:d,mode:"BLOCKS",canUserUseUnfilteredHTML:O});f(t,g,g.length-1,-1)}}}};return Object(d.createElement)("div",{ref:n,onCopy:g,onCut:g,onPaste:g},t)};function vs(e){var t=e.clientIds,n=e.children,r=e.__experimentalUpdateSelection,o=Object(v.useSelect)((function(e){return e("core/block-editor")}),[]),i=o.canInsertBlockType,a=o.getBlockRootClientId,l=o.getBlocksByClientId,s=o.getTemplateLock,u=Object(v.useSelect)((function(e){return e("core/blocks")}),[]),d=u.getDefaultBlockName,b=u.getGroupingBlockName,f=l(t),m=a(t[0]),O=Object(p.every)(f,(function(e){return!!e&&Object(c.hasBlockSupport)(e.name,"multiple",!0)&&i(e.name,m)})),g=i(d(),m),h=Object(v.useDispatch)("core/block-editor"),j=h.removeBlocks,k=h.replaceBlocks,y=h.duplicateBlocks,_=h.insertAfterBlock,E=h.insertBeforeBlock,S=h.flashBlock,C=h.setBlockMovingClientId,w=h.setNavigationMode,B=ms();return n({canDuplicate:O,canInsertDefaultBlock:g,isLocked:!!s(m),rootClientId:m,blocks:f,onDuplicate:function(){return y(t,r)},onRemove:function(){return j(t,r)},onInsertBefore:function(){E(Object(p.first)(Object(p.castArray)(t)))},onInsertAfter:function(){_(Object(p.last)(Object(p.castArray)(t)))},onMoveTo:function(){w(!0),C(t[0])},onGroup:function(){if(f.length){var e=b(),n=Object(c.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&&S(e[0]),B("copy",e)}})}var gs=Object(m.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor"),o=r.getBlock,i=r.getBlockMode,a=r.getSettings,l=o(n),s=a().codeEditingEnabled;return{mode:i(n),blockType:l?Object(c.getBlockType)(l.name):null,isCodeEditingEnabled:s}})),Object(v.withDispatch)((function(e,t){var n=t.onToggle,r=void 0===n?p.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,i=void 0!==o&&o,a=e.isCodeEditingEnabled,l=void 0===a||a;if(!Object(c.hasBlockSupport)(t,"html",!0)||!l)return null;var s="visual"===n?Object(B.__)("Edit as HTML"):Object(B.__)("Edit visually");return Object(d.createElement)(g.MenuItem,{onClick:r},!i&&s)}));function hs(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(B.__)("Convert to Blocks");return Object(d.createElement)(g.MenuItem,{onClick:n},!r&&o)}var js=Object(m.compose)(Object(v.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(v.withDispatch)((function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Object(c.rawHandler)({HTML:Object(c.getBlockContent)(n)}))}}})))(hs),ks=Object(m.compose)(Object(v.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor").getBlock(n);return{block:r,shouldRender:r&&r.name===Object(c.getFreeformContentHandlerName)()}})),Object(v.withDispatch)((function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Object(c.rawHandler)({HTML:Object(c.serialize)(n)}))}}})))(hs),ys=Object(g.createSlotFill)("__experimentalBlockSettingsMenuFirstItem"),_s=ys.Fill,Es=ys.Slot;_s.Slot=Es;var Ss=_s;function Cs(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 ws(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cs(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Bs=Object(g.createSlotFill)("BlockSettingsMenuControls"),Is=Bs.Fill,xs=Bs.Slot;Is.Slot=function(e){var t=e.fillProps,n=e.clientIds,r=void 0===n?null:n,o=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlocksByClientId,o=t.getSelectedBlockClientIds,c=null!==r?r:o();return Object(p.map)(n(c),(function(e){return e.name}))}),[r]);return Object(d.createElement)(xs,{fillProps:ws({},t,{selectedBlocks:o})},(function(e){return!Object(p.isEmpty)(e)&&Object(d.createElement)(g.MenuGroup,null,e)}))};var Ps=Is,Ts={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};var Ns=function(e){var t=e.clientIds,n=e.__experimentalSelectBlock,r=e.children,o=Object(ke.a)(e,["clientIds","__experimentalSelectBlock","children"]),i=Object(p.castArray)(t),a=i.length,l=i[0],u=Object(v.useSelect)((function(e){var t=e("core/keyboard-shortcuts").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(d.useCallback)(n?function(){var e=Object(vr.a)(Or.a.mark((function e(t){var r;return Or.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)}}():p.noop,[n]);return Object(d.createElement)(vs,{clientIds:t,__experimentalUpdateSelection:!n},(function(e){var n=e.canDuplicate,i=e.canInsertDefaultBlock,f=e.isLocked,m=e.onDuplicate,O=e.onInsertAfter,v=e.onInsertBefore,h=e.onRemove,j=e.onCopy,k=e.onMoveTo,y=e.blocks;return Object(d.createElement)(g.DropdownMenu,Object(s.a)({icon:Fr,label:Object(B.__)("More options"),className:"block-editor-block-settings-menu",popoverProps:Ts,noIcons:!0},o),(function(e){var o=e.onClose;return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.MenuGroup,null,Object(d.createElement)(Ss.Slot,{fillProps:{onClose:o}}),1===a&&Object(d.createElement)(ks,{clientId:l}),1===a&&Object(d.createElement)(js,{clientId:l}),Object(d.createElement)(g.ClipboardButton,{text:function(){return Object(c.serialize)(y)},role:"menuitem",className:"components-menu-item__button",onCopy:j},Object(B.__)("Copy")),n&&Object(d.createElement)(g.MenuItem,{onClick:Object(p.flow)(o,m,b),shortcut:u.duplicate},Object(B.__)("Duplicate")),i&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.MenuItem,{onClick:Object(p.flow)(o,v),shortcut:u.insertBefore},Object(B.__)("Insert Before")),Object(d.createElement)(g.MenuItem,{onClick:Object(p.flow)(o,O),shortcut:u.insertAfter},Object(B.__)("Insert After"))),!f&&Object(d.createElement)(g.MenuItem,{onClick:Object(p.flow)(o,k)},Object(B.__)("Move To")),1===a&&Object(d.createElement)(gs,{clientId:l,onToggle:o})),Object(d.createElement)(Ps.Slot,{fillProps:{onClose:o},clientIds:t}),"function"==typeof r?r({onClose:o}):d.Children.map((function(e){return Object(d.cloneElement)(e,{onClose:o})})),Object(d.createElement)(g.MenuGroup,null,!f&&Object(d.createElement)(g.MenuItem,{onClick:Object(p.flow)(o,h,b),shortcut:u.remove},Object(B._n)("Remove Block","Remove Blocks",a))))}))}))};var Rs=function(e){var t=e.clientIds,n=Object(ke.a)(e,["clientIds"]);return Object(d.createElement)(g.ToolbarGroup,null,Object(d.createElement)(g.__experimentalToolbarItem,null,(function(e){return Object(d.createElement)(Ns,Object(s.a)({clientIds:t,toggleProps:e},n))})))},Ms=Object(d.createElement)(I.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(I.Path,{d:"M7 16.5h10V15H7v1.5zm0-9V9h10V7.5H7z"}));function Ds(e){var t=e.clientIds,n=Object(v.useSelect)((function(e){if(1===t.length){var n=(0,e("core/block-editor").getBlockName)(Object(le.a)(t,1)[0]);return Object(c.getBlockType)(n).icon}}),[t]);return Object(d.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},Object(d.createElement)("div",{className:"block-editor-block-draggable-chip"},Object(d.createElement)(g.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},Object(d.createElement)(g.FlexItem,null,Object(d.createElement)(Gn,{icon:Ms})),Object(d.createElement)(g.FlexItem,null,n?Object(d.createElement)(Gn,{icon:n}):Object(B.sprintf)(
|
54 |
-
/* translators: %d: number of blocks. */
|
55 |
-
Object(B.__)("%d blocks"),t.length)))))}var Ls,As=function(e){var t,n,r,o,c=e.children,i=e.clientIds,a=e.cloneClassname,l=e.onDragStart,s=e.onDragEnd,u=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockIndex,r=t.getBlockRootClientId,o=t.getTemplateLock,c=r(i[0]),a=c?o(c):null;return{index:n(i[0],c),srcRootClientId:c,isDraggable:"all"!==a}}),[i]),b=u.srcRootClientId,f=u.index,p=u.isDraggable,m=Object(d.useRef)(!1),O=(t=Object(d.useRef)(null),n=Object(d.useRef)(null),r=Object(d.useRef)(null),o=Object(d.useRef)(null),Object(d.useEffect)((function(){return function(){o.current&&(clearInterval(o.current),o.current=null)}}),[]),[Object(d.useCallback)((function(e){t.current=e.clientY,r.current=Object(jr.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(d.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 s=Math.max(c-50,0),u=Math.max(c-i-50,0)/s;n.current=-25*u}else n.current=0}}),[]),function(){t.current=null,r.current=null,o.current&&(clearInterval(o.current),o.current=null)}]),h=Object(le.a)(O,3),j=h[0],k=h[1],y=h[2],_=Object(v.useDispatch)("core/block-editor"),E=_.startDraggingBlocks,S=_.stopDraggingBlocks;if(Object(d.useEffect)((function(){return function(){m.current&&S()}}),[]),!p)return c({isDraggable:!1});var C={type:"block",srcIndex:f,srcClientIds:i,srcRootClientId:b};return Object(d.createElement)(g.Draggable,{cloneClassname:a,elementId:"block-".concat(i[0]),transferData:C,onDragStart:function(e){E(),m.current=!0,j(e),l&&l()},onDragOver:k,onDragEnd:function(){S(),m.current=!1,y(),s&&s()},__experimentalDragComponent:Object(d.createElement)(Ds,{clientIds:i})},(function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return c({isDraggable:!0,onDraggableStart:t,onDraggableEnd:n})}))},Fs=window,Vs=Fs.clearTimeout,Hs=Fs.requestAnimationFrame,zs=Fs.cancelAnimationFrame,Us=Fs.setTimeout;function Gs(e){var t=e.ref,n=e.isFocused,r=e.debounceTimeout,o=void 0===r?250:r,c=e.onChange,i=void 0===c?p.noop:c,a=Object(d.useState)(!1),l=Object(le.a)(a,2),s=l[0],u=l[1],b=Object(d.useRef)(),f=function(e){u(e),i(e)},m=function(){var e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e},O=function(){var e=b.current;e&&Vs&&Vs(e)};return Object(d.useEffect)((function(){return function(){return O()}}),[]),{showMovers:s,debouncedShowMovers:function(e){e&&e.stopPropagation(),O(),s||f(!0)},debouncedHideMovers:function(e){e&&e.stopPropagation(),O(),b.current=Us((function(){m()&&f(!1)}),o)}}}function Ks(e){var t=e.hideDragHandle,n=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getBlockMode,o=t.getSelectedBlockClientIds,i=t.isBlockValid,a=t.getBlockRootClientId,l=t.getSettings,s=o(),u=s[0],d=a(u);return{blockClientIds:s,blockClientId:u,blockType:u&&Object(c.getBlockType)(n(u)),hasFixedToolbar:l().hasFixedToolbar,rootClientId:d,isValid:s.every((function(e){return i(e)})),isVisual:s.every((function(e){return"visual"===r(e)}))}}),[]),r=n.blockClientIds,o=n.blockClientId,i=n.blockType,a=n.hasFixedToolbar,l=n.isValid,u=n.isVisual,b=function(e){var t=Object(v.useDispatch)("core/block-editor").toggleBlockHighlight,n=Object(d.useCallback)((function(n){t(e,n)}),[e]);return Object(d.useEffect)((function(){return Ls&&zs(Ls),function(){Ls=Hs((function(){n(!1)}))}}),[]),n}(o),O=Object(d.useRef)(),g=function(e){var t=e.ref,n=e.debounceTimeout,r=void 0===n?250:n,o=e.onChange,c=void 0===o?p.noop:o,i=Object(d.useState)(!1),a=Object(le.a)(i,2),l=a[0],s=a[1],u=Gs({ref:t,debounceTimeout:r,isFocused:l,onChange:c}),b=u.showMovers,f=u.debouncedShowMovers,m=u.debouncedHideMovers,O=Object(d.useRef)(!1),v=function(){return(null==t?void 0:t.current)&&t.current.contains(document.activeElement)};return Object(d.useEffect)((function(){var e=t.current,n=function(){v()&&(s(!0),f())},r=function(){v()||(s(!1),m())};return e&&!O.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),O.current=!0),function(){e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,O,s,f,m]),{showMovers:b,gestures:{onMouseMove:f,onMouseLeave:m}}}({ref:O,onChange:b}),h=g.showMovers,j=g.gestures,k=Object(m.useViewportMatch)("medium","<")||a;if(i&&!Object(c.hasBlockSupport)(i,"__experimentalToolbar",!0))return null;var y=k||h;if(0===r.length)return null;var _=l&&u,E=r.length>1,S=f()("block-editor-block-toolbar",y&&"is-showing-movers");return Object(d.createElement)("div",{className:S},Object(d.createElement)("div",{className:"block-editor-block-toolbar__mover-switcher-container",ref:O},!E&&Object(d.createElement)("div",{className:"block-editor-block-toolbar__block-parent-selector-wrapper"},Object(d.createElement)(Jl,{clientIds:r})),(_||E)&&Object(d.createElement)(As,{clientIds:r,cloneClassname:"block-editor-block-toolbar__drag-clone"},(function(e){var n=e.isDraggable,o=e.onDraggableStart,c=e.onDraggableEnd;return Object(d.createElement)("div",Object(s.a)({},j,{className:"block-editor-block-toolbar__block-switcher-wrapper",draggable:n&&!t,onDragStart:o,onDragEnd:c}),Object(d.createElement)(fs,{clientIds:r}),Object(d.createElement)(Zl,{clientIds:r}))}))),_&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(w.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"}),Object(d.createElement)(pr.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"})),Object(d.createElement)(Rs,{clientIds:r}))}var Ws=function(e){var t=e.focusOnMount,n=Object(ke.a)(e,["focusOnMount"]),r=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getSelectedBlockClientIds,o=e("core/blocks").getBlockType,c=r()[0];return{blockType:c&&o(n(c))}}),[]).blockType;return r&&!Object(c.hasBlockSupport)(r,"__experimentalToolbar",!0)?null:Object(d.createElement)("div",{className:"block-editor-block-contextual-toolbar-wrapper"},Object(d.createElement)(Yl,Object(s.a)({focusOnMount:t,className:"block-editor-block-contextual-toolbar"
|
56 |
-
/* translators: accessibility text for the block toolbar */,"aria-label":Object(B.__)("Block tools")},n),Object(d.createElement)(Ks,null)))};function qs(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 $s(e){var t=e.clientId,n=e.rootClientId,r=e.isValid,o=e.isEmptyDefaultBlock,c=e.capturingClientId,i=Object(v.useSelect)(qs,[]),a=i.isNavigationMode,s=i.isMultiSelecting,u=i.isTyping,b=i.isCaretWithinFormattedText,p=i.hasMultiSelection,O=i.hasFixedToolbar,h=i.lastClientId,j=Object(m.useViewportMatch)("medium"),k=Object(d.useState)(!1),y=Object(le.a)(k,2),_=y[0],E=y[1],S=Object(d.useState)(!1),C=Object(le.a)(S,2),w=C[0],B=C[1],I=Object(d.useContext)(Zs),x=!a&&o&&r,P=a,T=!a&&!O&&j&&!x&&!s&&(!u||b),N=!(a||T||O||o);if(Object(l.useShortcut)("core/block-editor/focus-toolbar",Object(d.useCallback)((function(){return E(!0)}),[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!N}),!(P||T||_||x))return null;var R=I[t];if(c&&(R=document.getElementById("block-"+c)),!R)return null;var M=R;if(p){var D=I[h];if(!D)return null;M={top:R,bottom:D}}var L=x?"top left right":"top right left";return Object(d.createElement)(g.Popover,{noArrow:!0,animate:!1,position:L,focusOnMount:!1,anchorRef:M,className:"block-editor-block-list__block-popover",__unstableSticky:!x,__unstableSlotName:"block-toolbar",__unstableBoundaryParent:!0,__unstableObserveElement:R,onBlur:function(){return E(!1)},shouldAnchorIncludePadding:!0},(T||_)&&Object(d.createElement)("div",{onFocus:function(){B(!0)},onBlur:function(){B(!1)},tabIndex:-1,className:f()("block-editor-block-list__block-popover-inserter",{"is-visible":w})},Object(d.createElement)(Ml,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(T||_)&&Object(d.createElement)(Ws,{focusOnMount:_}),P&&Object(d.createElement)(Wl,{clientId:t,rootClientId:n}),x&&Object(d.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},Object(d.createElement)(Ml,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function Ys(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getFirstMultiSelectedBlockClientId,o=t.getBlockRootClientId,i=t.__unstableGetBlockWithoutInnerBlocks,a=t.getBlockParents,l=t.__experimentalGetBlockListSettingsForBlocks,s=n()||r();if(s){var u,d=i(s)||{},b=d.name,f=d.attributes,m=void 0===f?{}:f,O=d.isValid,v=a(s),g=l(v),h=Object(p.findIndex)(g,["__experimentalCaptureToolbars",!0]);return-1!==h&&(u=v[h]),{clientId:s,rootClientId:o(s),name:b,isValid:O,isEmptyDefaultBlock:b&&Object(c.isUnmodifiedDefaultBlock)({name:b,attributes:m}),capturingClientId:u}}}function Xs(){var e=Object(v.useSelect)(Ys,[]);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(d.createElement)($s,{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:c,capturingClientId:i}):null}var Qs=Object(d.createContext)(),Zs=Object(d.createContext)(),Js=Object(d.createContext)();function eu(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.hasMultiSelection;return{selectedBlockClientId:n(),hasMultiSelection:r()}}function tu(e){Ye(e.target)&&e.preventDefault()}var nu=Object(d.forwardRef)((function(e,t){var n=e.children,r=e.className,o=Object(v.useSelect)(eu,[]),c=o.selectedBlockClientId,i=o.hasMultiSelection,a=Object(v.useDispatch)("core/block-editor").selectBlock,l=function(e){var t=Object(v.useSelect)(no,[]),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.multiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.selectedBlockClientId,l=Object(v.useDispatch)("core/block-editor"),s=l.startMultiSelect,u=l.stopMultiSelect,b=l.multiSelect,f=l.selectBlock,p=Object(d.useRef)(),m=Object(d.useRef)(),O=Object(d.useRef)();Object(d.useEffect)((function(){if(c&&!r){var e=o.length;if(!(e<2)){var t=o[0],n=o[e-1],i=qe(t),l=qe(n),s=window.getSelection(),u=document.createRange();i=to(i,"start"),l=to(l,"end"),u.setStartBefore(i),u.setEndAfter(l),s.removeAllRanges(),s.addRange(u)}}else{if(!a||r)return;var d=window.getSelection();if(d.rangeCount&&!d.isCollapsed){var b=qe(a),f=d.getRangeAt(0),p=f.startContainer,m=f.endContainer;!b||b.contains(p)&&b.contains(m)||d.removeAllRanges()}}}),[c,r,o,f,a]);var g=Object(d.useCallback)((function(t){var n=t.isSelectionEnd,r=window.getSelection();if(r.rangeCount&&!r.isCollapsed){var o=Ye(r.focusNode);if(m.current===o){if(f(o),n&&(ro(e.current,!0),r.rangeCount)){var c=r.getRangeAt(0).commonAncestorContainer;O.current.contains(c)&&O.current.focus()}}else{var a=[].concat(Object(ae.a)(i(m.current)),[m.current]),l=[].concat(Object(ae.a)(i(o)),[o]),s=Math.min(a.length,l.length)-1;b(a[s],l[s])}}else ro(e.current,!0)}),[f,i,b]),h=Object(d.useCallback)((function(){document.removeEventListener("selectionchange",g),window.removeEventListener("mouseup",h),p.current=window.requestAnimationFrame((function(){g({isSelectionEnd:!0}),u()}))}),[g,u]);return Object(d.useEffect)((function(){return function(){document.removeEventListener("selectionchange",g),window.removeEventListener("mouseup",h),window.cancelAnimationFrame(p.current)}}),[g,h]),Object(d.useCallback)((function(t){n&&(m.current=t,O.current=document.activeElement,s(),document.addEventListener("selectionchange",g),window.addEventListener("mouseup",h),ro(e.current,!1))}),[n,s,h])}(t),s=Object(d.useState)({}),u=Object(le.a)(s,2),b=u[0],p=u[1];return Object(d.createElement)(Kl,{hasMultiSelection:i,selectedBlockClientId:c,containerRef:t},Object(d.createElement)(Zs.Provider,{value:b},Object(d.createElement)(Xs,null),Object(d.createElement)("div",{ref:t,className:f()(r,"is-root-container"),onFocus:function(e){if(!i){var t=Ye(e.target);t&&t!==c&&a(t)}},onDragStart:tu},Object(d.createElement)(Js.Provider,{value:p},Object(d.createElement)(Qs.Provider,{value:l},n)))))})),ru=["p","div","h1","h2","h3","h4","h5","h6","ol","ul","li","figure","nav","pre","header","section","aside","footer","main"];function ou(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 cu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ou(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ou(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var iu=Object(d.forwardRef)((function(e,t){var n=e.children,r=e.tagName,o=void 0===r?"div":r,c=e.__unstableIsHtml,i=Object(ke.a)(e,["children","tagName","__unstableIsHtml"]),a=Object(d.useContext)(Qs),l=Object(d.useContext)(Js),b=Object(d.useContext)(uu),m=b.clientId,O=b.rootClientId,g=b.isSelected,h=b.isFirstMultiSelected,j=b.isLastMultiSelected,k=b.isPartOfMultiSelection,y=b.enableAnimation,_=b.index,E=b.className,S=b.isLocked,C=b.name,w=b.mode,I=b.blockTitle,x=b.wrapperProps,P=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlocksInitialCaretPosition,r=t.isMultiSelecting,o=t.isNavigationMode;return{shouldFocusFirstElement:g&&!r()&&!o(),initialPosition:g?n():void 0}}),[g]),T=P.initialPosition,N=P.shouldFocusFirstElement,R=P.isNavigationMode,M=Object(v.useDispatch)("core/block-editor").insertDefaultBlock,D=Object(d.useRef)(),L=x&&!!x["data-align"];t=t||D;var A=Object(d.useState)(!1),F=Object(le.a)(A,2),V=F[0],H=F[1];Object(d.useEffect)((function(){if(g||h||j){var e=t.current;return l((function(t){return cu({},t,Object(u.a)({},m,e))})),function(){l((function(e){return Object(p.omit)(e,m)}))}}}),[g,h,j]);// translators: %s: Type of block (i.e. Text, Image etc)
|
57 |
-
var z=Object(B.sprintf)(Object(B.__)("Block: %s"),I);Object(d.useEffect)((function(){N&&function(){if(!document.activeElement||!$e(t.current,document.activeElement)){var e=jr.focus.tabbable.find(t.current).filter(jr.isTextField).filter((function(e){return $e(t.current,e)&&!e.closest(".block-list-appender")})),n=-1===T,r=(n?p.last:p.first)(e)||t.current;Object(jr.placeCaretAtHorizontalEdge)(r,n)}}()}),[N]),_r(t,g||k,g||h,y,_);var U="html"!==w||c?"":"-visual",G="block-".concat(m).concat(U);return Object(d.createElement)(o,Object(s.a)({"aria-label":z,role:"group"},Object(p.omit)(x,["data-align"]),i,{id:G,ref:t,className:f()(E,i.className,x&&x.className,{"is-hovered":V,"wp-block":!L}),"data-block":m,"data-type":C,"data-title":I,onKeyDown:g&&!S?function(e){var n=e.keyCode,r=e.target;i.onKeyDown&&i.onKeyDown(e),n===it.ENTER&&(r!==t.current||Object(jr.isTextField)(r)||(e.preventDefault(),n===it.ENTER&&M({},O,_+1)))}:void 0,onMouseLeave:g?function(e){var t=e.which;1===(e.buttons||t)&&a(m)}:void 0,onMouseOver:R?function(e){e.defaultPrevented||(e.preventDefault(),V||H(!0))}:void 0,onMouseOut:R?function(e){e.defaultPrevented||(e.preventDefault(),V&&H(!1))}:void 0,tabIndex:"0",style:cu({},x?x.style:{},{},i.style||{})}),n)})),au=ru.reduce((function(e,t){return e[t]=Object(d.forwardRef)((function(e,n){return Object(d.createElement)(iu,Object(s.a)({},e,{ref:n,tagName:t}))})),e}),iu);function lu(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 su(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lu(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var uu=Object(d.createContext)();var du=Object(v.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=t.isLargeViewport,c=e("core/block-editor"),i=c.isBlockSelected,a=c.isAncestorMultiSelected,l=c.isBlockMultiSelected,s=c.isFirstMultiSelectedBlock,u=c.getLastMultiSelectedBlockClientId,d=c.isTyping,b=c.getBlockMode,f=c.isSelectionEnabled,p=c.getSettings,m=c.hasSelectedInnerBlock,O=c.getTemplateLock,v=c.__unstableGetBlockWithoutInnerBlocks,g=c.getMultiSelectedBlockClientIds,h=v(n),j=i(n),k=p(),y=k.focusMode,_=k.isRTL,E=O(r),S=m(n,!0),C=h||{},w=C.name,B=C.attributes,I=C.isValid,x=s(n);return{isMultiSelected:l(n),isPartOfMultiSelection:l(n)||a(n),isFirstMultiSelected:x,isLastMultiSelected:u()===n,multiSelectedClientIds:x?g():void 0,isTypingWithinBlock:(j||S)&&d(),mode:b(n),isSelectionEnabled:f(),isLocked:!!E,isFocusMode:y&&o,isRTL:_,block:h,name:w,attributes:B,isValid:I,isSelected:j,isAncestorOfSelectedBlock:S}})),bu=Object(v.withDispatch)((function(e,t,n){var r=n.select,o=e("core/block-editor"),i=o.updateBlockAttributes,a=o.insertBlocks,l=o.mergeBlocks,s=o.replaceBlocks,u=o.toggleSelection,d=o.__unstableMarkLastChangeAsPersistent;return{setAttributes:function(e){var n=t.clientId,r=t.isFirstMultiSelected,o=t.multiSelectedClientIds;i(r?o:[n],e)},onInsertBlocks:function(e,n){var r=t.rootClientId;a(e,n,r)},onInsertBlocksAfter:function(e){var n=t.clientId,o=t.rootClientId,c=(0,r("core/block-editor").getBlockIndex)(n,o);a(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 a=i(n);a&&l(n,a)}else{var s=c(n);s&&l(s,n)}},onReplace:function(e,n,r){e.length&&!Object(c.isUnmodifiedDefaultBlock)(e[e.length-1])&&d(),s([t.clientId],e,n,r)},toggleSelection:function(e){u(e)}}})),fu=Object(m.compose)(m.pure,Object(a.withViewportMatch)({isLargeViewport:"medium"}),du,bu,Object(m.ifCondition)((function(e){return!!e.block})),Object(g.withFilters)("editor.BlockListBlock"))((function(e){var t,n,r,o=e.mode,i=e.isFocusMode,a=e.isLocked,l=e.clientId,u=e.rootClientId,b=e.isSelected,p=e.isMultiSelected,m=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,S=e.attributes,C=e.wrapperProps,w=e.setAttributes,B=e.onReplace,I=e.onInsertBlocksAfter,x=e.onMerge,P=e.toggleSelection,T=e.index,N=e.enableAnimation,R=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.isDraggingBlocks,r=t.isBlockHighlighted;return{isDragging:n(),isHighlighted:r(l)}}),[l]),M=R.isDragging,D=R.isHighlighted,L=Object(v.useDispatch)("core/block-editor").removeBlock,A=Object(d.useState)(!1),F=Object(le.a)(A,2),V=F[0],H=F[1],z=Object(c.getBlockType)(_),U=Object(c.hasBlockSupport)(z,"lightBlockWrapper",!1),G=_===Object(c.getUnregisteredTypeHandlerName)();z.getEditWrapperProps&&(t=C,n=z.getEditWrapperProps(S),r=su({},t,{},n),t&&n&&t.className&&n.className&&(r.className=f()(t.className,n.className)),t&&n&&t.style&&n.style&&(r.style=su({},t.style,{},n.style)),C=r);var K=U&&Object(c.hasBlockSupport)(z,"className",!0)?Object(c.getBlockDefaultClassName)(_):null,W=U?S.className:null,q=C&&!!C["data-align"],$=f()(K,W,"block-editor-block-list__block",{"wp-block":!q,"has-warning":!E||!!V||G,"is-selected":b,"is-highlighted":D,"is-multi-selected":p,"is-reusable":Object(c.isReusableBlock)(z),"is-dragging":M&&(b||m),"is-typing":h,"is-focused":i&&(b||j),"is-focus-mode":i,"has-child-selected":j},y),Y=Object(d.createElement)(sr,{name:_,isSelected:b,attributes:S,setAttributes:w,insertBlocksAfter:a?void 0:I,onReplace:a?void 0:B,onRemove:a?void 0:function(){return L(l)},mergeBlocks:a?void 0:x,clientId:l,isSelectionEnabled:k,toggleSelection:P});if(q){var X={"data-align":C["data-align"]};Y=Object(d.createElement)("div",Object(s.a)({className:"wp-block"},X),Y)}"visual"!==o&&(Y=Object(d.createElement)("div",{style:{display:"none"}},Y));var Q={clientId:l,rootClientId:u,isSelected:b,isFirstMultiSelected:O,isLastMultiSelected:g,isPartOfMultiSelection:m,enableAnimation:N,index:T,className:$,isLocked:a,name:_,mode:o,blockTitle:z.title,wrapperProps:C},Z=Object(d.useMemo)((function(){return Q}),Object.values(Q));return Object(d.createElement)(uu.Provider,{value:Z},Object(d.createElement)(Qr,{onError:function(){return H(!0)}},E&&U&&Object(d.createElement)(d.Fragment,null,Y,"html"===o&&Object(d.createElement)(au.div,{__unstableIsHtml:!0},Object(d.createElement)(eo,{clientId:l}))),E&&!U&&Object(d.createElement)(au.div,C,Y,"html"===o&&Object(d.createElement)(eo,{clientId:l})),!E&&Object(d.createElement)(au.div,null,Object(d.createElement)(qr,{clientId:l}),Object(d.createElement)("div",null,Object(c.getSaveElement)(z,S)))),!!V&&Object(d.createElement)(au.div,null,Object(d.createElement)(Yr,null)))})),pu=function(e,t,n){return Object(B.sprintf)(
|
58 |
-
/* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
|
59 |
-
Object(B.__)("Block %1$d of %2$d, Level %3$d"),e,t,n)};var mu=Object(d.forwardRef)((function e(t,n){var r=t.className,o=t.block,i=t.isSelected,a=t.onClick,l=t.position,s=t.siblingCount,u=t.level,b=t.tabIndex,p=t.onFocus,O=o.name,v=o.attributes,h=Object(c.getBlockType)(O),j=Object(c.__experimentalGetBlockLabel)(h,v),k=Object(m.useInstanceId)(e),y="block-navigation-block-select-button__".concat(k),_=pu(l,s,u);return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.Button,{className:f()("block-editor-block-navigation-block-select-button",r),onClick:a,"aria-describedby":y,ref:n,tabIndex:b,onFocus:p},Object(d.createElement)(Gn,{icon:h.icon,showColors:!0}),j,i&&Object(d.createElement)(g.VisuallyHidden,null,Object(B.__)("(selected block)"))),Object(d.createElement)("div",{className:"block-editor-block-navigation-block-select-button__description",id:y},_))}));function Ou(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=function(e){return"BlockNavigationBlock-".concat(e)};var gu=Object(d.forwardRef)((function e(t,n){var r=Object(m.useInstanceId)(e),o=t.block.clientId;return Object(d.createElement)(g.Slot,{name:vu(o)},(function(e){if(!e.length)return Object(d.createElement)(mu,Object(s.a)({ref:n},t));var o=t.className,i=t.block,a=t.isSelected,l=t.position,b=t.siblingCount,p=t.level,m=t.tabIndex,O=t.onFocus,v=i.name,h=Object(c.getBlockType)(v),j="block-navigation-block-slot__".concat(r),k=pu(l,b,p),y={tabIndex:m,onFocus:O,ref:n,"aria-describedby":j};return Object(d.createElement)(d.Fragment,null,Object(d.createElement)("div",{className:f()("block-editor-block-navigation-block-slot",o)},Object(d.createElement)(Gn,{icon:h.icon,showColors:!0}),d.Children.map(e,(function(e){return Object(d.cloneElement)(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ou(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ou(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.props,{},y))})),a&&Object(d.createElement)(g.VisuallyHidden,null,Object(B.__)("(selected block)")),Object(d.createElement)("div",{className:"block-editor-block-navigation-block-slot__description",id:j},k)))}))})),hu=function(e){var t=Object(d.useContext)(uu).clientId;return Object(d.createElement)(g.Fill,Object(s.a)({},e,{name:vu(t)}))},ju=Object(d.forwardRef)((function(e,t){var n=e.onClick,r=e.block,o=e.isSelected,c=e.position,i=e.siblingCount,a=e.level,l=Object(ke.a)(e,["onClick","block","isSelected","position","siblingCount","level"]);return Ar().__experimentalFeatures?Object(d.createElement)(gu,Object(s.a)({ref:t,className:"block-editor-block-navigation-block-contents",block:r,onClick:n,isSelected:o,position:c,siblingCount:i,level:a},l)):Object(d.createElement)(mu,Object(s.a)({ref:t,className:"block-editor-block-navigation-block-contents",block:r,onClick:n,isSelected:o,position:c,siblingCount:i,level:a},l))}));function ku(e){var t=e.block,n=e.isSelected,r=e.onClick,o=e.position,c=e.level,i=e.rowCount,a=e.showBlockMovers,l=e.terminatedLevels,s=e.path,u=Object(d.useRef)(null),b=Object(d.useState)(!1),p=Object(le.a)(b,2),m=p[0],O=p[1],h=Object(d.useState)(!1),j=Object(le.a)(h,2),k=j[0],y=j[1],_=Object(v.useDispatch)("core/block-editor").selectBlock,E=t.clientId,S=i-1,C=a&&S>1,w=m||k,I=f()("block-editor-block-navigation-block__mover-cell",{"is-visible":w}),x=Ar().__experimentalFeatures,P=f()("block-editor-block-navigation-block__menu-cell",{"is-visible":w});return Object(d.useEffect)((function(){x&&n&&u.current.focus()}),[x,n]),Object(d.createElement)(Sr,{className:f()({"is-selected":n}),onMouseEnter:function(){return O(!0)},onMouseLeave:function(){return O(!1)},onFocus:function(){return y(!0)},onBlur:function(){return y(!1)},level:c,position:o,rowCount:i,path:s},Object(d.createElement)(g.__experimentalTreeGridCell,{className:"block-editor-block-navigation-block__contents-cell",colSpan:C?void 0:2,ref:u},(function(e){var a=e.ref,s=e.tabIndex,u=e.onFocus;return Object(d.createElement)("div",{className:"block-editor-block-navigation-block__contents-container"},Object(d.createElement)(Dr,{level:c,isLastRow:o===i,terminatedLevels:l}),Object(d.createElement)(ju,{block:t,onClick:function(){return r(t.clientId)},isSelected:n,position:o,siblingCount:S,level:c,ref:a,tabIndex:s,onFocus:u}))})),C&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.__experimentalTreeGridCell,{className:I,withoutGridItem:!0},Object(d.createElement)(g.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(d.createElement)(Rr,{__experimentalOrientation:"vertical",clientIds:[E],ref:t,tabIndex:n,onFocus:r})})),Object(d.createElement)(g.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(d.createElement)(Mr,{__experimentalOrientation:"vertical",clientIds:[E],ref:t,tabIndex:n,onFocus:r})})))),x&&Object(d.createElement)(g.__experimentalTreeGridCell,{className:P},(function(e){var t=e.ref,n=e.tabIndex,o=e.onFocus;return Object(d.createElement)(Ns,{clientIds:[E],icon:gr.a,toggleProps:{ref:t,tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:r},(function(e){var t=e.onClose;return Object(d.createElement)(g.MenuGroup,null,Object(d.createElement)(g.MenuItem,{onClick:Object(vr.a)(Or.a.mark((function e(){return Or.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_(null);case 2:return e.next=4,_(E);case 4:t();case 5:case"end":return e.stop()}}),e)})))},Object(B.__)("Go to block")))}))})))}function yu(e){var t=e.parentBlockClientId,n=e.position,r=e.level,o=e.rowCount,c=e.terminatedLevels,i=e.path,a=Object(m.useInstanceId)(yu),l="block-navigation-appender-row__description_".concat(a),s=Object(B.sprintf)(
|
60 |
-
/* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
|
61 |
-
Object(B.__)("Add block at position %1$d, Level %2$d"),n,r);return Object(d.createElement)(Sr,{level:r,position:n,rowCount:o,path:i},Object(d.createElement)(g.__experimentalTreeGridCell,{className:"block-editor-block-navigation-appender__cell",colSpan:"3"},(function(e){var i=e.ref,a=e.tabIndex,u=e.onFocus;return Object(d.createElement)("div",{className:"block-editor-block-navigation-appender__container"},Object(d.createElement)(Dr,{level:r,isLastRow:n===o,terminatedLevels:c}),Object(d.createElement)(Ml,{rootClientId:t,__experimentalSelectBlockOnInsert:!1,"aria-describedby":l,toggleProps:{ref:i,tabIndex:a,onFocus:u}}),Object(d.createElement)("div",{className:"block-editor-block-navigation-appender__description",id:l},s))})))}function _u(e){var t=e.blocks,n=e.selectBlock,r=e.selectedBlockClientId,o=e.showAppender,c=e.showBlockMovers,i=e.showNestedBlocks,a=e.parentBlockClientId,l=e.level,s=void 0===l?1:l,u=e.terminatedLevels,b=void 0===u?[]:u,f=e.path,m=void 0===f?[]:f,O=!a,v=Object(p.compact)(t),g=function(e){return o&&!O&&r===e},h=g(a),j=h?v.length+1:v.length,k=j;return Object(d.createElement)(d.Fragment,null,Object(p.map)(v,(function(e,t){var a=e.clientId,l=e.innerBlocks,u=t+1,f=j===u?[].concat(Object(ae.a)(b),[s]):b,p=[].concat(Object(ae.a)(m),[u]),O=i&&!!l&&!!l.length,v=g(a);return Object(d.createElement)(d.Fragment,{key:a},Object(d.createElement)(ku,{block:e,onClick:n,isSelected:r===a,level:s,position:u,rowCount:j,showBlockMovers:c,terminatedLevels:b,path:p}),(O||v)&&Object(d.createElement)(_u,{blocks:l,selectedBlockClientId:r,selectBlock:n,showAppender:o,showBlockMovers:c,showNestedBlocks:i,parentBlockClientId:a,level:s+1,terminatedLevels:f,path:p}))})),h&&Object(d.createElement)(yu,{parentBlockClientId:a,position:j,rowCount:k,level:s,terminatedLevels:b,path:[].concat(Object(ae.a)(m),[k])}))}function Eu(e){var t=e.__experimentalFeatures,n=Object(ke.a)(e,["__experimentalFeatures"]),r=Object(d.useMemo)((function(){return{__experimentalFeatures:t}}),[t]);return Object(d.createElement)(g.__experimentalTreeGrid,{className:"block-editor-block-navigation-tree","aria-label":Object(B.__)("Block navigation structure")},Object(d.createElement)(Lr.Provider,{value:r},Object(d.createElement)(_u,n)))}_u.defaultProps={selectBlock:function(){}};var Su=Object(m.compose)(Object(v.withSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getBlockHierarchyRootClientId,o=t.getBlock,c=t.getBlocks,i=n();return{rootBlocks:c(),rootBlock:i?o(r(i)):null,selectedBlockClientId:i}})),Object(v.withDispatch)((function(e,t){var n=t.onSelect,r=void 0===n?p.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(d.createElement)("div",{className:"block-editor-block-navigation__container"},Object(d.createElement)("p",{className:"block-editor-block-navigation__label"},Object(B.__)("Block navigation")),i&&Object(d.createElement)(Eu,{blocks:[t],selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c,showNestedBlocks:!0}),!i&&Object(d.createElement)(Eu,{blocks:n,selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c}))})),Cu=Object(d.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},Object(d.createElement)(g.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));function wu(e){var t=e.isEnabled,n=e.onToggle,r=e.isOpen,o=e.innerRef,c=Object(ke.a)(e,["isEnabled","onToggle","isOpen","innerRef"]);Object(l.useShortcut)("core/edit-post/toggle-block-navigation",Object(d.useCallback)(n,[n]),{bindGlobal:!0,isDisabled:!t});var i=Object(v.useSelect)((function(e){return e("core/keyboard-shortcuts").getShortcutRepresentation("core/edit-post/toggle-block-navigation")}),[]);return Object(d.createElement)(g.Button,Object(s.a)({},c,{ref:o,icon:Cu,"aria-expanded":r,onClick:t?n:void 0,label:Object(B.__)("Block navigation"),className:"block-editor-block-navigation",shortcut:i,"aria-disabled":!t}))}var Bu=Object(d.forwardRef)((function(e,t){var n=e.isDisabled,r=e.__experimentalFeatures,o=Object(ke.a)(e,["isDisabled","__experimentalFeatures"]),c=Object(v.useSelect)((function(e){return!!e("core/block-editor").getBlockCount()}),[])&&!n;return Object(d.createElement)(g.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(d.createElement)(wu,Object(s.a)({},o,{innerRef:t,isOpen:n,onToggle:r,isEnabled:c}))},renderContent:function(e){var t=e.onClose;return Object(d.createElement)(Su,{onSelect:t,__experimentalFeatures:r})}})})),Iu=n(118),xu=[it.rawShortcut.primary("z"),it.rawShortcut.primaryShift("z"),it.rawShortcut.primary("y")],Pu=Object(d.createElement)(g.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(p.fromPairs)(xu.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),Tu=function(){return Pu};function Nu(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(ps.createBlobURL)(e),'">')})).join("")}var Ru={position:"bottom right",isAlternate:!0},Mu=function(){return Object(d.createElement)("div",{className:"block-editor-format-toolbar"},Object(d.createElement)(g.ToolbarGroup,null,["bold","italic","link","text-color"].map((function(e){return Object(d.createElement)(g.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object(d.createElement)(g.Slot,{name:"RichText.ToolbarControls"},(function(e){return 0!==e.length&&Object(d.createElement)(g.__experimentalToolbarItem,null,(function(t){return Object(d.createElement)(g.DropdownMenu,{icon:Ir.a,label:Object(B.__)("More rich text controls"),toggleProps:t,controls:Object(p.orderBy)(e.map((function(e){return Object(le.a)(e,1)[0].props})),"title"),popoverProps:Ru})}))}))))},Du=function(e){var t=e.inline,n=e.anchorRef;return t?Object(d.createElement)(g.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar"},Object(d.createElement)(Mu,null)):Object(d.createElement)(pr,null,Object(d.createElement)(Mu,null))};function Lu(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 Au(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function Fu(e){var t=e.allowedFormats,n=e.formattingControls;return e.disableFormats?Fu.EMPTY_ARRAY:t||n?t||(ir()("wp.blockEditor.RichText formattingControls prop",{alternative:"allowedFormats"}),n.map((function(e){return"core/".concat(e)}))):void 0}Fu.EMPTY_ARRAY=[];var Vu=Object(d.forwardRef)((function e(t,n){var r=t.children,o=t.tagName,a=t.value,l=t.onChange,b=t.isSelected,p=t.multiline,O=t.inlineToolbar,g=t.wrapperClassName,h=t.className,j=t.autocompleters,y=t.onReplace,_=t.placeholder,E=t.keepPlaceholderOnFocus,S=t.allowedFormats,C=t.formattingControls,w=t.withoutInteractiveFormatting,B=t.onRemove,I=t.onMerge,x=t.onSplit,P=t.__unstableOnSplitAtEnd,T=t.__unstableOnSplitMiddle,N=t.identifier,R=t.start,M=t.reversed,D=t.style,L=t.preserveWhiteSpace,A=t.__unstableEmbedURLOnPaste,F=t.__unstableDisableFormats,V=t.disableLineBreaks,H=Object(ke.a)(t,["children","tagName","value","onChange","isSelected","multiline","inlineToolbar","wrapperClassName","className","autocompleters","onReplace","placeholder","keepPlaceholderOnFocus","allowedFormats","formattingControls","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","__unstableOnSplitMiddle","identifier","start","reversed","style","preserveWhiteSpace","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableLineBreaks"]),z=Object(m.useInstanceId)(e);N=N||z;var U=Object(d.useRef)(),G=n||U,K=k(),W=K.clientId,q=K.onCaretVerticalPositionChange,$=K.isSelected,Y=Object(v.useSelect)((function(e){var t,n=e("core/block-editor"),r=n.isCaretWithinFormattedText,o=n.getSelectionStart,i=n.getSelectionEnd,a=n.getSettings,l=n.didAutomaticChange,s=n.__unstableGetBlockWithoutInnerBlocks,f=n.isMultiSelecting,p=n.hasMultiSelection,m=o(),O=i(),v=a().__experimentalUndo;void 0===b?t=m.clientId===W&&m.attributeKey===N:b&&(t=m.clientId===W);var g={};if("native"===d.Platform.OS){var h=W&&s(W);g={shouldBlurOnUnmount:h&&t&&Object(c.isUnmodifiedDefaultBlock)(h)}}return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lu(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({isCaretWithinFormattedText:r(),selectionStart:t?m.offset:void 0,selectionEnd:t?O.offset:void 0,isSelected:t,didAutomaticChange:l(),disabled:f()||p(),undo:v},g)})),X=Y.isCaretWithinFormattedText,Q=Y.selectionStart,Z=Y.selectionEnd,J=Y.isSelected,ee=Y.didAutomaticChange,te=Y.disabled,ne=Y.undo,re=Y.shouldBlurOnUnmount,oe=Object(v.useDispatch)("core/block-editor"),ce=oe.__unstableMarkLastChangeAsPersistent,ie=oe.enterFormattedText,se=oe.exitFormattedText,ue=oe.selectionChange,de=oe.__unstableMarkAutomaticChange,be=Au(p),fe=Fu({allowedFormats:S,formattingControls:C,disableFormats:F}),pe=!fe||fe.length>0,me=a,Oe=l;Array.isArray(a)&&(me=c.children.toHTML(a),Oe=function(e){return l(c.children.fromDOM(Object(i.__unstableCreateElement)(document,e).childNodes))});var ve=Object(d.useCallback)((function(e,t){ue(W,N,e,t)}),[W,N]),ge=Object(d.useCallback)((function(e){var t=e.value,n=e.isReverse;I&&I(!n),B&&Object(i.isEmpty)(t)&&n&&B(!n)}),[I,B]),he=Object(d.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(y&&x){var n=[],r=Object(i.split)(e),o=Object(le.a)(r,2),c=o[0],a=o[1],l=t.length>0,s=-1;l&&Object(i.isEmpty)(c)||(n.push(x(Object(i.toHTMLString)({value:c,multilineTag:be}))),s+=1),l?(n.push.apply(n,Object(ae.a)(t)),s+=t.length):T&&n.push(T()),(l||T)&&Object(i.isEmpty)(a)||n.push(x(Object(i.toHTMLString)({value:a,multilineTag:be})));var u=l?s:1,d=l?-1:null;y(n,u,d)}}),[y,x,be,T]),je=Object(d.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.shiftKey,o=y&&x;if(y){var a=Object(c.getBlockTransforms)("from").filter((function(e){return"enter"===e.type})),l=Object(c.findTransform)(a,(function(e){return e.regExp.test(t.text)}));l&&(y([l.transform({content:t.text})]),de())}if(p)r?V||n(Object(i.insert)(t,"\n")):o&&Object(i.__unstableIsEmptyLine)(t)?he(t):n(Object(i.__unstableInsertLineSeparator)(t));else{var s=t.text,u=t.start,d=t.end,b=P&&u===d&&d===s.length;r||!o&&!b?V||n(Object(i.insert)(t,"\n")):!o&&b?P():o&&he(t)}}),[y,x,de,p,he,P]),ye=Object(d.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.html,a=e.plainText,l=e.files,s=e.activeFormats;if(l&&l.length&&!r){var u=Object(c.pasteHandler)({HTML:Nu(l),mode:"BLOCKS",tagName:o});return window.console.log("Received items:\n\n",l),void(y&&Object(i.isEmpty)(t)?y(u):he(t,u))}var d,b=y&&x?"AUTO":"INLINE";"AUTO"===b&&Object(i.isEmpty)(t)&&(d=a,Object(Iu.regexp)(".*").test(d))&&(b="BLOCKS"),A&&Object(i.isEmpty)(t)&&Object(vl.isURL)(a.trim())&&(b="BLOCKS");var f=Object(c.pasteHandler)({HTML:r,plainText:a,mode:b,tagName:o});if("string"==typeof f){var m=Object(i.create)({html:f});if(s.length)for(var O=m.formats.length;O--;)m.formats[O]=[].concat(Object(ae.a)(s),Object(ae.a)(m.formats[O]||[]));p&&(m=Object(i.replace)(m,/\n+/g,i.__UNSTABLE_LINE_SEPARATOR)),n(Object(i.insert)(t,m))}else f.length>0&&(y&&Object(i.isEmpty)(t)?y(f,f.length-1,-1):he(t,f))}),[o,y,x,he,A,p]),_e=Object(d.useCallback)((function(e,t){if(y){var n=e.start,r=e.text;if(" "===r.slice(n-1,n)){var o=r.slice(0,n).trim(),a=Object(c.getBlockTransforms)("from").filter((function(e){return"prefix"===e.type})),l=Object(c.findTransform)(a,(function(e){var t=e.prefix;return o===t}));if(l){var s=t(Object(i.slice)(e,n,r.length)),u=l.transform(s);y([u]),de()}}}}),[y,de]),Ee=Object(d.createElement)(i.__experimentalRichText,Object(s.a)({},H,{clientId:W,identifier:N,ref:G,value:me,onChange:Oe,selectionStart:Q,selectionEnd:Z,onSelectionChange:ve,tagName:o,className:f()("block-editor-rich-text__editable",h,{"keep-placeholder-on-focus":E}),placeholder:_,allowedFormats:fe,withoutInteractiveFormatting:w,onEnter:je,onDelete:ge,onPaste:ye,__unstableIsSelected:J,__unstableInputRule:_e,__unstableMultilineTag:be,__unstableIsCaretWithinFormattedText:X,__unstableOnEnterFormattedText:ie,__unstableOnExitFormattedText:se,__unstableOnCreateUndoLevel:ce,__unstableMarkAutomaticChange:de,__unstableDidAutomaticChange:ee,__unstableUndo:ne,__unstableDisableFormats:F,style:D,preserveWhiteSpace:L,disabled:te,start:R,reversed:M,onCaretVerticalPositionChange:q,blockIsSelected:void 0!==b?b:$,shouldBlurOnUnmount:re}),(function(e){var t=e.isSelected,n=e.value,o=e.onChange,c=e.onFocus,i=e.editableProps,a=e.editableTagName;return Object(d.createElement)(d.Fragment,null,r&&r({value:n,onChange:o,onFocus:c}),t&&pe&&Object(d.createElement)(Du,{inline:O,anchorRef:G.current}),t&&Object(d.createElement)(Tu,null),Object(d.createElement)($n,{onReplace:y,completers:j,record:n,onChange:o,isSelected:t},(function(e){var t=e.listBoxId,n=e.activeId,r=e.onKeyDown;return Object(d.createElement)(a,Object(s.a)({},i,{"aria-autocomplete":t?"list":void 0,"aria-owns":t,"aria-activedescendant":n,start:R,reversed:M,onKeyDown:function(e){r(e),i.onKeyDown(e)}}))})))}));return g?(ir()("wp.blockEditor.RichText wrapperClassName prop",{alternative:"className prop or create your own wrapper div"}),Object(d.createElement)("div",{className:f()("block-editor-rich-text",g)},Ee)):Ee}));Vu.Content=function(e){var t=e.value,n=e.tagName,r=e.multiline,o=Object(ke.a)(e,["value","tagName","multiline"]);Array.isArray(t)&&(t=c.children.toHTML(t));var i=Au(r);!t&&i&&(t="<".concat(i,"></").concat(i,">"));var a=Object(d.createElement)(d.RawHTML,null,t);return n?Object(d.createElement)(n,Object(p.omit)(o,["format"]),a):a},Vu.isEmpty=function(e){return!e||0===e.length},Vu.Content.defaultProps={format:"string",value:""};var Hu=Vu;function zu(e){var t=e.value,n=e.onChange;return Object(d.createElement)(hu,null,Object(d.createElement)(Hu,{value:t,onChange:n,placeholder:Object(B.__)("Navigation item"),keepPlaceholderOnFocus:!0,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var Uu=n(274);var Gu=function(e){var t=e.icon,n=void 0===t?Uu.a:t,r=e.label,o=void 0===r?Object(B.__)("Choose variation"):r,c=e.instructions,i=void 0===c?Object(B.__)("Select a variation to start with."):c,a=e.variations,l=e.onSelect,s=e.allowSkip,u=f()("block-editor-block-variation-picker",{"has-many-variations":a.length>4});return Object(d.createElement)(g.Placeholder,{icon:n,label:o,instructions:i,className:u},Object(d.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(B.__)("Block variations")},a.map((function(e){return Object(d.createElement)("li",{key:e.name},Object(d.createElement)(g.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:function(){return l(e)},className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(d.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))}))),s&&Object(d.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(d.createElement)(g.Button,{isLink:!0,onClick:function(){return l()}},Object(B.__)("Skip"))))},Ku=Object(d.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(g.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Wu=Object(d.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(g.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"}));function qu(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 $u={top:{icon:Object(d.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(g.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(B._x)("Vertically Align Top","Block vertical alignment setting")},center:{icon:Wu,title:Object(B._x)("Vertically Align Middle","Block vertical alignment setting")},bottom:{icon:Ku,title:Object(B._x)("Vertically Align Bottom","Block vertical alignment setting")}},Yu=["top","center","bottom"],Xu={isAlternate:!0};var Qu=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?Yu:r,c=e.isCollapsed,i=void 0===c||c,a=$u[t],l=$u.top;return Object(d.createElement)(g.ToolbarGroup,{popoverProps:Xu,isCollapsed:i,icon:a?a.icon:l.icon,label:Object(B._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qu(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},$u[e],{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})},Zu=Object(m.createHigherOrderComponent)(Object(v.withSelect)((function(e,t){var n=e("core/block-editor").getSettings(),r=void 0===t.colors?n.colors:t.colors,o=void 0===t.disableCustomColors?n.disableCustomColors:t.disableCustomColors;return{colors:r,disableCustomColors:o,hasColorsToChoose:!Object(p.isEmpty)(r)||!o}})),"withColorContext"),Ju=Zu(g.ColorPalette);function ed(e){var t=e.onChange,n=e.value,r=Object(ke.a)(e,["onChange","value"]);return Object(d.createElement)(Ie,Object(s.a)({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}function td(e){var t=Object(v.useSelect)((function(e){return Object(p.pick)(e("core/block-editor").getSettings(),["gradients","disableCustomGradients"])}),[]),n=t.gradients,r=t.disableCustomGradients;return Object(d.createElement)(g.__experimentalGradientPicker,Object(s.a)({gradients:void 0!==e.gradients?e.gradient:n,disableCustomGradients:void 0!==e.disableCustomGradients?e.disableCustomGradients:r},e))}var nd=function(e){var t=void 0!==e.gradients&&void 0!==e.disableCustomGradients?g.__experimentalGradientPicker:td;return Object(d.createElement)(t,e)};function rd(e){var t=e.className,n=e.value,r=e.onChange,o=e.label,c=void 0===o?Object(B.__)("Gradient Presets"):o,i=Object(ke.a)(e,["className","value","onChange","label"]),a=Object(v.useSelect)((function(e){return Object(p.pick)(e("core/block-editor").getSettings(),["gradients","disableCustomGradients"])}),[]),l=a.gradients,u=void 0===l?[]:l,b=a.disableCustomGradients;return Object(p.isEmpty)(u)&&b?null:Object(d.createElement)(g.BaseControl,{className:f()("block-editor-gradient-picker-control",t)},Object(d.createElement)(g.BaseControl.VisualLabel,null,c),Object(d.createElement)(nd,Object(s.a)({value:n,onChange:r,className:"block-editor-gradient-picker-control__gradient-picker-presets",gradients:u,disableCustomGradients:b},i)))}function od(e){var t=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings().gradients}),[]);return Object(p.isEmpty)(t)?null:Object(d.createElement)(g.PanelBody,{title:Object(B.__)("Gradient")},Object(d.createElement)(rd,e))}var cd=[25,50,75,100];function id(e){var t,n,r=e.imageWidth,o=e.imageHeight,c=e.imageSizeOptions,i=void 0===c?[]:c,a=e.isResizable,l=void 0===a||a,s=e.slug,u=e.width,b=e.height,f=e.onChange,m=e.onChangeImage,O=void 0===m?p.noop:m;function v(e,t){return function(){f({width:e,height:t})}}return Object(d.createElement)(d.Fragment,null,!Object(p.isEmpty)(i)&&Object(d.createElement)(g.SelectControl,{label:Object(B.__)("Image size"),value:s,options:i,onChange:O}),l&&Object(d.createElement)("div",{className:"block-editor-image-size-control"},Object(d.createElement)("p",{className:"block-editor-image-size-control__row"},Object(B.__)("Image dimensions")),Object(d.createElement)("div",{className:"block-editor-image-size-control__row"},Object(d.createElement)(g.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:Object(B.__)("Width"),value:null!==(t=null!=u?u:r)&&void 0!==t?t:"",min:1,onChange:function(e){return f({width:parseInt(e,10)})}}),Object(d.createElement)(g.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:Object(B.__)("Height"),value:null!==(n=null!=b?b:o)&&void 0!==n?n:"",min:1,onChange:function(e){return f({height:parseInt(e,10)})}})),Object(d.createElement)("div",{className:"block-editor-image-size-control__row"},Object(d.createElement)(g.ButtonGroup,{"aria-label":Object(B.__)("Image size presets")},cd.map((function(e){var t=Math.round(r*(e/100)),n=Math.round(o*(e/100)),c=u===t&&b===n;return Object(d.createElement)(g.Button,{key:e,isSmall:!0,isPrimary:c,isPressed:c,onClick:v(t,n)},e,"%")}))),Object(d.createElement)(g.Button,{isSmall:!0,onClick:v()},Object(B.__)("Reset")))))}var ad=Object(m.createHigherOrderComponent)((function(e){return function(t){var n=k().clientId;return Object(d.createElement)(e,Object(s.a)({},t,{clientId:n}))}}),"withClientId"),ld=ad((function(e){var t=e.clientId,n=e.showSeparator,r=e.isFloating,o=e.onAddBlock;return Object(d.createElement)(Va,{rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})})),sd=Object(m.compose)([ad,Object(v.withSelect)((function(e,t){var n=t.clientId,r=(0,e("core/block-editor").getBlockOrder)(n);return{lastBlockClientId:Object(p.last)(r)}}))])((function(e){var t=e.clientId,n=e.lastBlockClientId;return Object(d.createElement)(Fa,{rootClientId:t,lastBlockClientId:n})})),ud=n(53),dd=n.n(ud);var bd=new WeakMap;function fd(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 pd(e){var t=e.clientId,n=e.allowedBlocks,r=e.template,o=e.templateLock,i=e.forwardedRef,a=e.templateInsertUpdatesSelection,l=e.__experimentalCaptureToolbars,u=e.orientation,b=Object(m.useViewportMatch)("medium","<"),O=Object(v.useSelect)((function(e){var n=e("core/block-editor"),r=n.getBlock,o=n.isBlockSelected,c=n.hasSelectedInnerBlock,i=n.isNavigationMode,a=r(t);return{block:a,hasOverlay:"core/template"!==a.name&&!o(t)&&!c(t,!0),enableClickThrough:i()||b}})),g=O.hasOverlay,h=O.block,j=O.enableClickThrough;!function(e,t,n,r,o){var c=Object(v.useDispatch)("core/block-editor").updateBlockListSettings,i=Object(v.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,l=i.parentLock;Object(d.useLayoutEffect)((function(){var i={allowedBlocks:t,templateLock:void 0===n?l:n};void 0!==r&&(i.__experimentalCaptureToolbars=r),void 0!==o&&(i.orientation=o),dd()(a,i)||c(e,i)}),[e,a,t,n,l,r,o,c])}(t,n,o,l,u),function(e,t,n,r){var o=Object(v.useDispatch)("core/block-editor").replaceInnerBlocks,i=Object(v.useSelect)((function(t){return t("core/block-editor").getBlocks(e)}),[e]),a=Object(d.useRef)(null);Object(d.useLayoutEffect)((function(){if((0===i.length||"all"===n)&&!Object(p.isEqual)(t,a.current)){a.current=t;var l=Object(c.synchronizeBlocksWithTemplate)(i,t);Object(p.isEqual)(l,i)||o(e,l,0===i.length&&r&&0!==l.length)}}),[i,n,e])}(t,r,o,a);var k=f()({"has-overlay":j&&g,"is-capturing-toolbar":l}),y=Object(d.createElement)(Wa,Object(s.a)({},e,{ref:i,rootClientId:t,className:k})),_=Object(c.getBlockType)(h.name);if(_&&_.providesContext){var E=function(e,t){bd.has(t)||bd.set(t,new WeakMap);var n=bd.get(t);if(!n.has(e)){var r=Object(p.mapValues)(t.providesContext,(function(t){return e[t]}));n.set(e,r)}return n.get(e)}(h.attributes,_);y=Object(d.createElement)(er,{value:E},y)}return e.__experimentalTagName?y:Object(d.createElement)("div",{className:"block-editor-inner-blocks"},y)}function md(e){return Da(e),Object(d.createElement)(pd,e)}var Od=Object(d.forwardRef)((function(e,t){var n=k().clientId,r=Object(d.useRef)(),o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fd(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({clientId:n,forwardedRef:t||r},e);return e.value&&e.onChange?Object(d.createElement)(md,o):Object(d.createElement)(pd,o)}));Od.DefaultBlockAppender=sd,Od.ButtonBlockAppender=ld,Od.Content=Object(c.withBlockContentContext)((function(e){var t=e.BlockContent;return Object(d.createElement)(t,null)}));var vd=Od;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}var hd=[{id:"opensInNewTab",title:Object(B.__)("Open in new tab")}],jd=function(e){var t=e.value,n=e.onChange,r=void 0===n?p.noop:n,o=e.settings,c=void 0===o?hd:o;if(!c||!c.length)return null;var i=function(e){return function(n){r(function(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(u.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}({},t,Object(u.a)({},e.id,n)))}},a=c.map((function(e){return Object(d.createElement)(g.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:i(e),checked:!!t&&!!t[e.id]})}));return Object(d.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(d.createElement)(g.VisuallyHidden,{as:"legend"},Object(B.__)("Currently selected link settings")),a)},kd=Object(d.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(d.createElement)(I.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"})),yd=function(e){var t=e.itemProps,n=e.suggestion,r=e.isSelected,o=void 0!==r&&r,c=e.onClick,i=e.isURL,a=void 0!==i&&i,l=e.searchTerm,u=void 0===l?"":l;return Object(d.createElement)(g.Button,Object(s.a)({},t,{onClick:c,className:f()("block-editor-link-control__search-item",{"is-selected":o,"is-url":a,"is-entity":!a})}),a&&Object(d.createElement)(lo.a,{className:"block-editor-link-control__search-item-icon",icon:kd}),Object(d.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(d.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(d.createElement)(g.TextHighlight,{text:n.title,highlight:u})),Object(d.createElement)("span",{"aria-hidden":!a,className:"block-editor-link-control__search-item-info"},!a&&(Object(vl.filterURLForDisplay)(Object(vl.safeDecodeURI)(n.url))||""),a&&Object(B.__)("Press ENTER to add this link"))),n.type&&Object(d.createElement)("span",{className:"block-editor-link-control__search-item-type"},n.type))},_d=n(195),Ed=n(116),Sd=n.n(Ed);function Cd(){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}}var wd=function(e){return e.stopPropagation()},Bd=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(Cd()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(e){var t;return Object(Ut.a)(this,r),(t=n.call(this,e)).onChange=t.onChange.bind(Object(Kt.a)(t)),t.onFocus=t.onFocus.bind(Object(Kt.a)(t)),t.onKeyDown=t.onKeyDown.bind(Object(Kt.a)(t)),t.selectLink=t.selectLink.bind(Object(Kt.a)(t)),t.handleOnClick=t.handleOnClick.bind(Object(Kt.a)(t)),t.bindSuggestionNode=t.bindSuggestionNode.bind(Object(Kt.a)(t)),t.autocompleteRef=e.autocompleteRef||Object(d.createRef)(),t.inputRef=Object(d.createRef)(),t.updateSuggestions=Object(p.throttle)(t.updateSuggestions.bind(Object(Kt.a)(t)),200),t.suggestionNodes=[],t.isUpdatingSuggestions=!1,t.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null},t}return Object(Gt.a)(r,[{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.scrollingIntoView&&(this.scrollingIntoView=!0,Sd()(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(vl.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(B.sprintf)(
|
62 |
-
/* translators: %s: number of results. */
|
63 |
-
Object(B._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(B.__)("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 it.UP:e.stopPropagation(),e.preventDefault();var a=r?r-1:o.length-1;this.setState({selectedSuggestion:a});break;case it.DOWN:e.stopPropagation(),e.preventDefault();var l=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:l});break;case it.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak(Object(B.__)("Link selected.")));break;case it.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(i))}}else switch(e.keyCode){case it.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case it.DOWN:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}}},{key:"selectLink",value:function(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}},{key:"handleOnClick",value:function(e){this.selectLink(e),this.inputRef.current.focus()}},{key:"render",value:function(){var e=this,t=this.props,n=t.label,r=t.instanceId,o=t.className,c=t.isFullWidth,i=t.__experimentalRenderSuggestions,a=t.placeholder,l=void 0===a?Object(B.__)("Paste URL or type to search"):a,u=t.value,b=void 0===u?"":u,m=t.autoFocus,O=void 0===m||m,v=t.__experimentalShowInitialSuggestions,h=void 0!==v&&v,j=this.state,k=j.showSuggestions,y=j.suggestions,_=j.selectedSuggestion,E=j.loading,S="url-input-control-".concat(r),C="block-editor-url-input-suggestions-".concat(r),w="block-editor-url-input-suggestion-".concat(r),I={id:C,ref:this.autocompleteRef,role:"listbox"},x=function(t,n){return{role:"option",tabIndex:"-1",id:"".concat(w,"-").concat(n),ref:e.bindSuggestionNode(n),"aria-selected":n===_}};return Object(d.createElement)(g.BaseControl,{label:n,id:S,className:f()("block-editor-url-input",o,{"is-full-width":c})},Object(d.createElement)("input",{className:"block-editor-url-input__input",autoFocus:O,type:"text","aria-label":Object(B.__)("URL"),required:!0,value:b,onChange:this.onChange,onFocus:this.onFocus,onInput:wd,placeholder:l,onKeyDown:this.onKeyDown,role:"combobox","aria-expanded":k,"aria-autocomplete":"list","aria-owns":C,"aria-activedescendant":null!==_?"".concat(w,"-").concat(_):void 0,ref:this.inputRef}),E&&Object(d.createElement)(g.Spinner,null),Object(p.isFunction)(i)&&k&&!!y.length&&i({suggestions:y,selectedSuggestion:_,suggestionsListProps:I,buildSuggestionItemProps:x,isLoading:E,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:h&&!(b&&b.length)}),!Object(p.isFunction)(i)&&k&&!!y.length&&Object(d.createElement)(g.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(d.createElement)("div",Object(s.a)({},I,{className:f()("block-editor-url-input__suggestions","".concat(o,"__suggestions"))}),y.map((function(t,n){return Object(d.createElement)(g.Button,Object(s.a)({},x(0,n),{key:t.id,className:f()("block-editor-url-input__suggestion",{"is-selected":n===_}),onClick:function(){return e.handleOnClick(t)}}),t.title)})))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.value,r=e.disableSuggestions,o=e.__experimentalShowInitialSuggestions,c=void 0!==o&&o,i=t.showSuggestions,a=n&&n.length;return c||a||(i=!1),!0===r&&(i=!1),{showSuggestions:i}}}]),r}(d.Component),Id=Object(m.compose)(m.withSafeTimeout,g.withSpokenMessages,m.withInstanceId,Object(v.withSelect)((function(e,t){if(!Object(p.isFunction)(t.__experimentalFetchLinkSuggestions))return{__experimentalFetchLinkSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}})))(Bd),xd=function(e){var t=e.placeholder,n=e.value,r=e.onChange,o=e.onSelect,c=e.renderSuggestions,i=e.fetchSuggestions,a=e.showInitialSuggestions,l=e.errorMessage,s=Object(d.useState)(),u=Object(le.a)(s,2),b=u[0],f=u[1];return Object(d.createElement)("form",{onSubmit:function(e){e.preventDefault(),o(b||{url:n})}},Object(d.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(d.createElement)(Id,{className:"block-editor-link-control__search-input",value:n,onChange:function(e,t){r(e),f(t)},placeholder:null!=t?t:Object(B.__)("Search or type url"),__experimentalRenderSuggestions:c,__experimentalFetchLinkSuggestions:i,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:a}),Object(d.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(d.createElement)(g.Button,{type:"submit",label:Object(B.__)("Submit"),icon:_d.a,className:"block-editor-link-control__search-submit"}))),l&&Object(d.createElement)(g.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},l))},Pd=function(e){var t=e.searchTerm,n=e.onClick,r=e.itemProps,o=e.isSelected;return t?Object(d.createElement)(g.Button,Object(s.a)({},r,{className:f()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":o}),onClick:n}),Object(d.createElement)(g.Icon,{className:"block-editor-link-control__search-item-icon",icon:"insert"}),Object(d.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(d.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(d.createInterpolateElement)(Object(B.sprintf)(
|
64 |
-
/* translators: %s: search term. */
|
65 |
-
Object(B.__)("New page: <mark>%s</mark>"),t),{mark:Object(d.createElement)("mark",null)})))):null};function Td(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 Nd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Td(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Td(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Rd=Object(g.createSlotFill)("BlockEditorLinkControlViewer"),Md=Rd.Slot,Dd=Rd.Fill,Ld=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 Ad(e){var t=e.searchInputPlaceholder,n=e.value,r=e.settings,o=e.onChange,c=void 0===o?p.noop:o,i=e.noDirectEntry,a=void 0!==i&&i,l=e.showSuggestions,u=void 0===l||l,b=e.showInitialSuggestions,O=e.forceIsEditingLink,h=e.createSuggestion,j=Object(d.useRef)(),k=Object(d.useRef)(),y=Object(d.useRef)(),_=Object(m.useInstanceId)(Ad),E=Object(d.useState)(n&&n.url||""),S=Object(le.a)(E,2),C=S[0],w=S[1],I=Object(d.useState)(void 0!==O?O:!n||!n.url),x=Object(le.a)(I,2),P=x[0],T=x[1],N=Object(d.useState)(!1),R=Object(le.a)(N,2),M=R[0],D=R[1],L=Object(d.useState)(null),A=Object(le.a)(L,2),F=A[0],V=A[1],H=Object(d.useRef)(!1),z=Object(v.useSelect)((function(e){return{fetchSearchSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}}),[]).fetchSearchSuggestions,U=n&&Object(vl.filterURLForDisplay)(Object(vl.safeDecodeURI)(n.url))||"";Object(d.useEffect)((function(){void 0!==O&&O!==P&&T(O)}),[O]),Object(d.useEffect)((function(){H.current&&y.current&&!y.current.contains(document.activeElement)&&(jr.focus.focusable.find(y.current)[0]||y.current).focus();H.current=!1}),[P]),Object(d.useEffect)((function(){return function(){j.current&&j.current.cancel(),k.current&&k.current.cancel()}}),[]);var G=a?function(){return Promise.resolve([])}:function(e){var t="URL",n=Object(vl.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),Object(p.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?Object(vl.prependHTTP)(e):e,type:t}])},K=function(){var e=Object(vr.a)(Or.a.mark((function e(t,n){var r,o;return Or.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([z(t,Nd({},n.isInitialSuggestions?{perPage:3}:{})),G(t)]);case 2:if(r=e.sent,o=!t.includes(" "),r=o&&!n.isInitialSuggestions?r[0].concat(r[1]):r[0],!n.isInitialSuggestions){e.next=7;break}return e.abrupt("return",r);case 7:return e.abrupt("return",q(t)?r:r.concat({title:t,url:t,type:"__CREATE__"}));case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function W(){var e;H.current=!!(null===(e=y.current)||void 0===e?void 0:e.contains(document.activeElement)),T(!1)}function q(e){var t=Object(p.startsWith)(e,"#");return Object(vl.isURL)(e)||e&&e.includes("www.")||t}var $=Object(d.useCallback)((function(e,t){return u?q(e)?G(e,t):K(e,t):Promise.resolve([])}),[G,z]),Y=function(){var e=Object(vr.a)(Or.a.mark((function e(t){var n;return Or.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return D(!0),V(null),e.prev=2,k.current=Ld(Promise.resolve(h(t))),e.next=6,k.current.promise;case 6:n=e.sent,D(!1),n?(c(n),W()):T(!0),e.next=18;break;case 11:if(e.prev=11,e.t0=e.catch(2),!e.t0||!e.t0.isCanceled){e.next=15;break}return e.abrupt("return");case 15:V(e.t0.message||Object(B.__)("An unknown error occurred during creation. Please try again.")),D(!1),T(!0);case 18:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}(),X=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};T(!1);var n=Nd({},t);delete n.type,delete n.id,c(Nd({},n,{},e))};return Object(d.createElement)("div",{tabIndex:-1,ref:y,className:"block-editor-link-control"},M&&Object(d.createElement)("div",{className:"block-editor-link-control__loading"},Object(d.createElement)(g.Spinner,null)," ",Object(B.__)("Creating"),"…"),(P||!n)&&!M&&Object(d.createElement)(xd,{placeholder:t,value:C,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";w(e)},onSelect:function(){var e=Object(vr.a)(Or.a.mark((function e(t){return Or.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("__CREATE__"!==t.type){e.next=5;break}return e.next=3,Y(C);case 3:e.next=6;break;case 5:(!a||Object.keys(t).length>1)&&(X(t,n),W());case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),renderSuggestions:u?function(e){var t=e.suggestionsListProps,r=e.buildSuggestionItemProps,o=e.suggestions,i=e.selectedSuggestion,a=e.isLoading,l=e.isInitialSuggestions,u=f()("block-editor-link-control__search-results",{"is-loading":a}),b=["url","mailto","tel","internal"],p=1===o.length&&b.includes(o[0].type.toLowerCase()),m=h&&!p&&!l,O="block-editor-link-control-search-results-label-".concat(_),v=l?Object(B.__)("Recently updated"):Object(B.sprintf)(
|
66 |
-
/* translators: %s: search term. */
|
67 |
-
Object(B.__)('Search results for "%s"'),C),j=Object(d.createElement)(l?d.Fragment:g.VisuallyHidden,{},Object(d.createElement)("span",{className:"block-editor-link-control__search-results-label",id:O},v));return Object(d.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},j,Object(d.createElement)("div",Object(s.a)({},t,{className:u,"aria-labelledby":O}),o.map((function(e,t){return m&&"__CREATE__"===e.type?Object(d.createElement)(Pd,{searchTerm:C,onClick:Object(vr.a)(Or.a.mark((function t(){return Or.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Y(e.title);case 2:case"end":return t.stop()}}),t)}))),key:e.type,itemProps:r(e,t),isSelected:t===i}):"__CREATE__"===e.type?null:Object(d.createElement)(yd,{key:"".concat(e.id,"-").concat(e.type),itemProps:r(e,t),suggestion:e,index:t,onClick:function(){W(),c(Nd({},n,{},e))},isSelected:t===i,isURL:b.includes(e.type.toLowerCase()),searchTerm:C})}))))}:null,fetchSuggestions:$,showInitialSuggestions:b,errorMessage:F}),n&&!P&&!M&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)("div",{"aria-label":Object(B.__)("Currently selected"),"aria-selected":"true",className:f()("block-editor-link-control__search-item",{"is-current":!0})},Object(d.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(d.createElement)(g.ExternalLink,{className:"block-editor-link-control__search-item-title",href:n.url},n&&n.title||U),n&&n.title&&Object(d.createElement)("span",{className:"block-editor-link-control__search-item-info"},U)),Object(d.createElement)(g.Button,{isSecondary:!0,onClick:function(){return T(!0)},className:"block-editor-link-control__search-item-action"},Object(B.__)("Edit")),Object(d.createElement)(Md,{fillProps:n}))),Object(d.createElement)(jd,{value:n,settings:r,onChange:c}))}Ad.ViewerFill=Dd;var Fd=Ad,Vd=Object(d.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(d.createElement)(I.Path,{d:"M13 11V4c0-.55-.45-1-1-1h-1.67L9 1H5L3.67 3H2c-.55 0-1 .45-1 1v7c0 .55.45 1 1 1h10c.55 0 1-.45 1-1zM7 4.5c1.38 0 2.5 1.12 2.5 2.5S8.38 9.5 7 9.5 4.5 8.38 4.5 7 5.62 4.5 7 4.5zM14 6h5v10.5c0 1.38-1.12 2.5-2.5 2.5S14 17.88 14 16.5s1.12-2.5 2.5-2.5c.17 0 .34.02.5.05V9h-3V6zm-4 8.05V13h2v3.5c0 1.38-1.12 2.5-2.5 2.5S7 17.88 7 16.5 8.12 14 9.5 14c.17 0 .34.02.5.05z"})),Hd=n(196),zd=Object(g.withFilters)("editor.MediaUpload")((function(){return null}));var Ud=Object(v.withSelect)((function(e){return{hasUploadPermissions:!!(0,e("core/block-editor").getSettings)().mediaUpload}}))((function(e){var t=e.hasUploadPermissions,n=e.fallback,r=void 0===n?null:n,o=e.children;return t?o:r})),Gd=Object(m.compose)([Object(v.withDispatch)((function(e){var t=e("core/notices");return{createNotice:t.createNotice,removeNotice:t.removeNotice}})),Object(g.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,l=void 0===a?p.noop:a,s=e.name,u=void 0===s?Object(B.__)("Replace"):s,b=e.createNotice,f=e.removeNotice,m=Object(d.useState)(t),O=Object(le.a)(m,2),h=O[0],j=O[1],k=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings().mediaUpload}),[]),y=Object(d.createRef)(),_=Object(p.uniqueId)("block-editor/media-replace-flow/error-notice/"),E=function(e){var t=document.createElement("div");t.innerHTML=Object(d.renderToString)(e);var n=t.textContent||t.innerText||"";setTimeout((function(){b("error",n,{speak:!0,id:_,isDismissible:!0})}),1e3)},S=function(e){c(e),j(e.url),Object(Fe.speak)(Object(B.__)("The media file has been replaced")),f(_)},C=function(e){e.keyCode===it.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(d.createElement)(g.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(d.createElement)(g.ToolbarGroup,{className:"media-replace-flow"},Object(d.createElement)(g.ToolbarButton,{ref:y,"aria-expanded":t,onClick:n,onKeyDown:C},u))},renderContent:function(e){e.onClose;return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(d.createElement)(zd,{value:n,onSelect:function(e){return S(e)},allowedTypes:r,render:function(e){var t=e.open;return Object(d.createElement)(g.MenuItem,{icon:Vd,onClick:t},Object(B.__)("Open Media Library"))}}),Object(d.createElement)(Ud,null,Object(d.createElement)(g.FormFileUpload,{onChange:function(e){!function(e){var t=e.target.files;l(t);k({allowedTypes:r,filesList:t,onFileChange:function(e){var t=Object(le.a)(e,1)[0];S(t)},onError:E})}(e)},accept:o,render:function(e){var t=e.openFileDialog;return Object(d.createElement)(g.MenuItem,{icon:Hd.a,onClick:function(){t()}},Object(B.__)("Upload"))}}))),i&&Object(d.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:function(e){e.stopPropagation()},onKeyPress:function(e){e.stopPropagation()}},Object(d.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(B.__)("Current media URL:")),Object(d.createElement)(Fd,{value:{url:h},settings:[],showSuggestions:!1,onChange:function(e){var t=e.url;j(t),i(t),y.current.focus()}})))}})})),Kd=n(197);function Wd(e){var t=e.url,n=e.urlLabel,r=e.className,o=f()(r,"block-editor-url-popover__link-viewer-url");return t?Object(d.createElement)(g.ExternalLink,{className:o,href:t},n||Object(vl.filterURLForDisplay)(Object(vl.safeDecodeURI)(t))):Object(d.createElement)("span",{className:o})}function qd(){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}}var $d=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(qd()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).toggleSettingsVisibility=e.toggleSettingsVisibility.bind(Object(Kt.a)(e)),e.state={isSettingsExpanded:!1},e}return Object(Gt.a)(r,[{key:"toggleSettingsVisibility",value:function(){this.setState({isSettingsExpanded:!this.state.isSettingsExpanded})}},{key:"render",value:function(){var e=this.props,t=e.additionalControls,n=e.children,r=e.renderSettings,o=e.position,c=void 0===o?"bottom center":o,i=e.focusOnMount,a=void 0===i?"firstElement":i,l=Object(ke.a)(e,["additionalControls","children","renderSettings","position","focusOnMount"]),u=this.state.isSettingsExpanded,b=!!r&&u;return Object(d.createElement)(g.Popover,Object(s.a)({className:"block-editor-url-popover",focusOnMount:a,position:c},l),Object(d.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(d.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&Object(d.createElement)(g.Button,{className:"block-editor-url-popover__settings-toggle",icon:Ir.a,label:Object(B.__)("Link settings"),onClick:this.toggleSettingsVisibility,"aria-expanded":u})),b&&Object(d.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!b&&Object(d.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}}]),r}(d.Component);$d.LinkEditor=function(e){var t=e.autocompleteRef,n=e.className,r=e.onChangeInputValue,o=e.value,c=Object(ke.a)(e,["autocompleteRef","className","onChangeInputValue","value"]);return Object(d.createElement)("form",Object(s.a)({className:f()("block-editor-url-popover__link-editor",n)},c),Object(d.createElement)(Id,{value:o,onChange:r,autocompleteRef:t}),Object(d.createElement)(g.Button,{icon:_d.a,label:Object(B.__)("Apply"),type:"submit"}))},$d.LinkViewer=function(e){var t=e.className,n=e.linkClassName,r=e.onEditLinkClick,o=e.url,c=e.urlLabel,i=Object(ke.a)(e,["className","linkClassName","onEditLinkClick","url","urlLabel"]);return Object(d.createElement)("div",Object(s.a)({className:f()("block-editor-url-popover__link-viewer",t)},i),Object(d.createElement)(Wd,{url:o,urlLabel:c,className:n}),r&&Object(d.createElement)(g.Button,{icon:Kd.a,label:Object(B.__)("Edit"),onClick:r}))};var Yd=$d;function Xd(){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}}var Qd=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(d.createElement)(Yd,{onClose:o},Object(d.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},Object(d.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(B.__)("URL"),placeholder:Object(B.__)("Paste or type URL"),onChange:n,value:t}),Object(d.createElement)(g.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:_d.a,label:Object(B.__)("Apply"),type:"submit"})))},Zd=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(Xd()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).state={src:"",isURLInputVisible:!1},e.onChangeSrc=e.onChangeSrc.bind(Object(Kt.a)(e)),e.onSubmitSrc=e.onSubmitSrc.bind(Object(Kt.a)(e)),e.onUpload=e.onUpload.bind(Object(Kt.a)(e)),e.onFilesUpload=e.onFilesUpload.bind(Object(Kt.a)(e)),e.openURLInput=e.openURLInput.bind(Object(Kt.a)(e)),e.closeURLInput=e.closeURLInput.bind(Object(Kt.a)(e)),e}return Object(Gt.a)(r,[{key:"onlyAllowsImages",value:function(){var e=this.props.allowedTypes;return!!e&&Object(p.every)(e,(function(e){return"image"===e||Object(p.startsWith)(e,"image/")}))}},{key:"componentDidMount",value:function(){this.setState({src:Object(p.get)(this.props.value,["src"],"")})}},{key:"componentDidUpdate",value:function(e){Object(p.get)(e.value,["src"],"")!==Object(p.get)(this.props.value,["src"],"")&&this.setState({src:Object(p.get)(this.props.value,["src"],"")})}},{key:"onChangeSrc",value:function(e){this.setState({src:e.target.value})}},{key:"onSubmitSrc",value:function(e){e.preventDefault(),this.state.src&&this.props.onSelectURL&&(this.props.onSelectURL(this.state.src),this.closeURLInput())}},{key:"onUpload",value:function(e){this.onFilesUpload(e.target.files)}},{key:"onFilesUpload",value:function(e){var t,n=this,r=this.props,o=r.addToGallery,c=r.allowedTypes,i=r.mediaUpload,a=r.multiple,l=r.onError,s=r.onSelect,u=r.onFilesPreUpload;if((void 0===u?p.noop:u)(e),a)if(o){var d=[];t=function(e){var t=(n.props.value||[]).filter((function(e){return e.id?!d.some((function(t){var n=t.id;return Number(n)===Number(e.id)})):!d.some((function(t){var n=t.urlSlug;return e.url.includes(n)}))}));s(t.concat(e)),d=e.map((function(e){var t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else t=s;else t=function(e){var t=Object(le.a)(e,1)[0];return s(t)};i({allowedTypes:c,filesList:e,onFileChange:t,onError:l})}},{key:"openURLInput",value:function(){this.setState({isURLInputVisible:!0})}},{key:"closeURLInput",value:function(){this.setState({isURLInputVisible:!1})}},{key:"renderPlaceholder",value:function(e,t){var n=this.props,r=n.allowedTypes,o=void 0===r?[]:r,c=n.className,i=n.icon,a=n.isAppender,l=n.labels,s=void 0===l?{}:l,u=n.onDoubleClick,b=n.mediaPreview,p=n.notices,m=n.onSelectURL,O=n.mediaUpload,v=n.children,h=s.instructions,j=s.title;if(O||m||(h=Object(B.__)("To edit this block, you need permission to upload media.")),void 0===h||void 0===j){var k=1===o.length,y=k&&"audio"===o[0],_=k&&"image"===o[0],E=k&&"video"===o[0];void 0===h&&O&&(h=Object(B.__)("Upload a media file or pick one from your media library."),y?h=Object(B.__)("Upload an audio file, pick one from your media library, or add one with a URL."):_?h=Object(B.__)("Upload an image file, pick one from your media library, or add one with a URL."):E&&(h=Object(B.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===j&&(j=Object(B.__)("Media"),y?j=Object(B.__)("Audio"):_?j=Object(B.__)("Image"):E&&(j=Object(B.__)("Video")))}var S=f()("block-editor-media-placeholder",c,{"is-appender":a});return Object(d.createElement)(g.Placeholder,{icon:i,label:j,instructions:h,className:S,notices:p,onClick:t,onDoubleClick:u,preview:b},e,v)}},{key:"renderDropZone",value:function(){var e=this.props,t=e.disableDropZone,n=e.onHTMLDrop,r=void 0===n?p.noop:n;return t?null:Object(d.createElement)(g.DropZone,{onFilesDrop:this.onFilesUpload,onHTMLDrop:r})}},{key:"renderCancelLink",value:function(){var e=this.props.onCancel;return e&&Object(d.createElement)(g.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(B.__)("Cancel"),isLink:!0,onClick:e},Object(B.__)("Cancel"))}},{key:"renderUrlSelectionUI",value:function(){if(!this.props.onSelectURL)return null;var e=this.state,t=e.isURLInputVisible,n=e.src;return Object(d.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(d.createElement)(g.Button,{className:"block-editor-media-placeholder__button",onClick:this.openURLInput,isPressed:t,isTertiary:!0},Object(B.__)("Insert from URL")),t&&Object(d.createElement)(Qd,{src:n,onChange:this.onChangeSrc,onSubmit:this.onSubmitSrc,onClose:this.closeURLInput}))}},{key:"renderMediaUploadChecked",value:function(){var e=this,t=this.props,n=t.accept,r=t.addToGallery,o=t.allowedTypes,c=void 0===o?[]:o,i=t.isAppender,a=t.mediaUpload,l=t.multiple,s=void 0!==l&&l,u=t.onSelect,b=t.value,m=void 0===b?{}:b,O=Object(d.createElement)(zd,{addToGallery:r,gallery:s&&this.onlyAllowsImages(),multiple:s,onSelect:u,allowedTypes:c,value:Object(p.isArray)(m)?m.map((function(e){return e.id})):m.id,render:function(e){var t=e.open;return Object(d.createElement)(g.Button,{isTertiary:!0,onClick:function(e){e.stopPropagation(),t()}},Object(B.__)("Media Library"))}});if(a&&i)return Object(d.createElement)(d.Fragment,null,this.renderDropZone(),Object(d.createElement)(g.FormFileUpload,{onChange:this.onUpload,accept:n,multiple:s,render:function(t){var n=t.openFileDialog,r=Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.Button,{isPrimary:!0,className:f()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(B.__)("Upload")),O,e.renderUrlSelectionUI(),e.renderCancelLink());return e.renderPlaceholder(r,n)}}));if(a){var v=Object(d.createElement)(d.Fragment,null,this.renderDropZone(),Object(d.createElement)(g.FormFileUpload,{isPrimary:!0,className:f()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:this.onUpload,accept:n,multiple:s},Object(B.__)("Upload")),O,this.renderUrlSelectionUI(),this.renderCancelLink());return this.renderPlaceholder(v)}return this.renderPlaceholder(O)}},{key:"render",value:function(){var e=this.props,t=e.disableMediaButtons,n=e.dropZoneUIOnly;return n||t?(n&&ir()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{alternative:"disableMediaButtons"}),Object(d.createElement)(Ud,null,this.renderDropZone())):Object(d.createElement)(Ud,{fallback:this.renderPlaceholder(this.renderUrlSelectionUI())},this.renderMediaUploadChecked())}}]),r}(d.Component),Jd=Object(v.withSelect)((function(e){return{mediaUpload:(0,e("core/block-editor").getSettings)().mediaUpload}})),eb=Object(m.compose)(Jd,Object(g.withFilters)("editor.MediaPlaceholder"))(Zd),tb=Object(d.forwardRef)((function(e,t){return Object(d.createElement)(Hu,Object(s.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))}));tb.Content=function(e){var t=e.value,n=void 0===t?"":t,r=e.tagName,o=void 0===r?"div":r,c=Object(ke.a)(e,["value","tagName"]);return Object(d.createElement)(o,c,n)};var nb=tb,rb=Object(d.forwardRef)((function(e,t){var n=e.__experimentalVersion,r=Object(ke.a)(e,["__experimentalVersion"]);if(2===n)return Object(d.createElement)(nb,Object(s.a)({ref:t},r));var o=r.className,c=r.onChange,i=Object(ke.a)(r,["className","onChange"]);return Object(d.createElement)(Jr.a,Object(s.a)({ref:t,className:f()("block-editor-plain-text",o),onChange:function(e){return c(e.target.value)}},i))}));function ob(e){var t=e.property,n=e.viewport,r=e.desc,o=Object(m.useInstanceId)(ob),c=r||Object(B.sprintf)(
|
68 |
-
/* translators: 1: property name. 2: viewport name. */
|
69 |
-
Object(B._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(d.createElement)(d.Fragment,null,Object(d.createElement)("span",{"aria-describedby":"rbc-desc-".concat(o)},n.label),Object(d.createElement)(g.VisuallyHidden,{as:"span",id:"rbc-desc-".concat(o)},c))}var cb=function(e){var t=e.title,n=e.property,r=e.toggleLabel,o=e.onIsResponsiveChange,c=e.renderDefaultControl,i=e.renderResponsiveControls,a=e.isResponsive,l=void 0!==a&&a,s=e.defaultLabel,u=void 0===s?{id:"all",
|
70 |
-
/* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
|
71 |
-
label:Object(B.__)("All")}:s,b=e.viewports,p=void 0===b?[{id:"small",label:Object(B.__)("Small screens")},{id:"medium",label:Object(B.__)("Medium screens")},{id:"large",label:Object(B.__)("Large screens")}]:b;if(!t||!n||!c)return null;var m=r||Object(B.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(B.__)("Use the same %s on all screensizes."),n),O=Object(B.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),v=c(Object(d.createElement)(ob,{property:n,viewport:u}),u);
|
74 |
-
/* translators: 'Help text for the responsive mode toggle control.' */return Object(d.createElement)("fieldset",{className:"block-editor-responsive-block-control"},Object(d.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),Object(d.createElement)("div",{className:"block-editor-responsive-block-control__inner"},Object(d.createElement)(g.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:m,checked:!l,onChange:o,help:O}),Object(d.createElement)("div",{className:f()("block-editor-responsive-block-control__group",{"is-responsive":l})},!l&&v,l&&(i?i(p):p.map((function(e){return Object(d.createElement)(d.Fragment,{key:e.id},c(Object(d.createElement)(ob,{property:n,viewport:e}),e))}))))))};function ib(e){var t=e.character,n=e.type,r=e.onUse;return Object(m.useKeyboardShortcut)(it.rawShortcut[n](t),(function(){return r(),!1}),{bindGlobal:!0}),null}function ab(e){var t,n=e.name,r=e.shortcutType,o=e.shortcutCharacter,c=Object(ke.a)(e,["name","shortcutType","shortcutCharacter"]),i="RichText.ToolbarControls";return n&&(i+=".".concat(n)),r&&o&&(t=it.displayShortcut[r](o)),Object(d.createElement)(g.Fill,{name:i},Object(d.createElement)(g.ToolbarButton,Object(s.a)({},c,{shortcut:t})))}function lb(){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}}var sb=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(lb()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).onInput=e.onInput.bind(Object(Kt.a)(e)),e}return Object(Gt.a)(r,[{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}}]),r}(d.Component),ub=n(275),db=Object(d.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(d.createElement)(g.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"}));var bb=Object(d.forwardRef)((function(e,t){var n=Object(v.useSelect)((function(e){return e("core/block-editor").isNavigationMode()}),[]),r=Object(v.useDispatch)("core/block-editor").setNavigationMode,o=function(e){r("edit"!==e)};return Object(d.createElement)(g.Dropdown,{renderToggle:function(r){var o=r.isOpen,c=r.onToggle;return Object(d.createElement)(g.Button,Object(s.a)({},e,{ref:t,icon:n?db:ub.a,"aria-expanded":o,onClick:c,label:Object(B.__)("Tools")}))},position:"bottom right",renderContent:function(){return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.NavigableMenu,{role:"menu","aria-label":Object(B.__)("Tools")},Object(d.createElement)(g.MenuItemsChoice,{value:n?"select":"edit",onSelect:o,choices:[{value:"edit",label:Object(d.createElement)(d.Fragment,null,Object(d.createElement)(lo.a,{icon:ub.a}),Object(B.__)("Edit"))},{value:"select",label:Object(d.createElement)(d.Fragment,null,db,Object(B.__)("Select"))}]})),Object(d.createElement)("div",{className:"block-editor-tool-selector__help"},Object(B.__)("Tools offer different interactions for block selection & editing. To select, press Escape, to go back to editing, press Enter.")))}})})),fb=n(177),pb=Object(d.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(I.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"}));function mb(){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}}var Ob=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(mb()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).toggle=e.toggle.bind(Object(Kt.a)(e)),e.submitLink=e.submitLink.bind(Object(Kt.a)(e)),e.state={expanded:!1},e}return Object(Gt.a)(r,[{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(B.__)("Edit link"):Object(B.__)("Insert link");return Object(d.createElement)("div",{className:"block-editor-url-input__button"},Object(d.createElement)(g.Button,{icon:fb.a,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!t}),r&&Object(d.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},Object(d.createElement)("div",{className:"block-editor-url-input__button-modal-line"},Object(d.createElement)(g.Button,{className:"block-editor-url-input__back",icon:pb,label:Object(B.__)("Close"),onClick:this.toggle}),Object(d.createElement)(Id,{value:t||"",onChange:n}),Object(d.createElement)(g.Button,{icon:_d.a,label:Object(B.__)("Submit"),type:"submit"}))))}}]),r}(d.Component),vb=n(133),gb=["noreferrer","noopener"],hb=Object(d.createElement)(g.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(g.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(d.createElement)(g.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(d.createElement)(g.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),jb=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,l=e.linkTarget,s=e.linkClass,u=e.rel,b=Object(d.useState)(!1),f=Object(le.a)(b,2),m=f[0],O=f[1],v=Object(d.useCallback)((function(){O(!0)})),h=Object(d.useState)(!1),j=Object(le.a)(h,2),k=j[0],y=j[1],_=Object(d.useState)(null),E=Object(le.a)(_,2),S=E[0],C=E[1],w=Object(d.useRef)(null),I=function(e){e.stopPropagation()},x=function(e){[it.LEFT,it.DOWN,it.RIGHT,it.UP,it.BACKSPACE,it.ENTER].indexOf(e.keyCode)>-1&&e.stopPropagation()},P=Object(d.useCallback)((function(){"media"!==t&&"attachment"!==t||C(""),y(!0)})),T=Object(d.useCallback)((function(){y(!1)})),N=Object(d.useCallback)((function(){C(null),T(),O(!1)})),R=function(e){var t=e;return void 0===e||Object(p.isEmpty)(t)||Object(p.isEmpty)(t)||(Object(p.each)(gb,(function(e){var n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),Object(p.isEmpty)(t)&&(t=void 0)),t},M=Object(d.useCallback)((function(){return function(e){var t=w.current;t&&t.contains(e.target)||(O(!1),C(null),T())}})),D=Object(d.useCallback)((function(){return function(e){S&&n({href:S}),T(),C(null),e.preventDefault()}})),L=Object(d.useCallback)((function(){n({linkDestination:"none",href:""})})),A=function(){return[{linkDestination:"media",title:Object(B.__)("Media File"),url:"image"===c?i:void 0,icon:hb},{linkDestination:"attachment",title:Object(B.__)("Attachment Page"),url:"image"===c?a:void 0,icon:Object(d.createElement)(g.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(g.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(d.createElement)(g.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"}))}]},F=Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.ToggleControl,{label:Object(B.__)("Open in new tab"),onChange:function(e){var t=function(e){var t=e?"_blank":void 0;return{linkTarget:t,rel:t||u?R(u):void 0}}(e);n(t)},checked:"_blank"===l}),Object(d.createElement)(g.TextControl,{label:Object(B.__)("Link Rel"),value:R(u)||"",onChange:function(e){n({rel:e})},onKeyPress:I,onKeyDown:x}),Object(d.createElement)(g.TextControl,{label:Object(B.__)("Link CSS Class"),value:s||"",onKeyPress:I,onKeyDown:x,onChange:function(e){n({linkClass:e})}})),V=null!==S?S:r,H=(Object(p.find)(A(),["linkDestination",t])||{}).title;return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.ToolbarButton,{icon:fb.a,className:"components-toolbar__control",label:r?Object(B.__)("Edit link"):Object(B.__)("Insert link"),"aria-expanded":m,onClick:v}),m&&Object(d.createElement)(Yd,{onFocusOutside:M(),onClose:N,renderSettings:function(){return F},additionalControls:!V&&Object(d.createElement)(g.NavigableMenu,null,Object(p.map)(A(),(function(e){return Object(d.createElement)(g.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:function(){var t,r,o;C(null),t=e.url,o=A(),r=t?(Object(p.find)(o,(function(e){return e.url===t}))||{linkDestination:"custom"}).linkDestination:"none",n({linkDestination:r,href:t}),T()}},e.title)})))},(!r||k)&&Object(d.createElement)(Yd.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:V,onChangeInputValue:C,onKeyDown:x,onKeyPress:I,onSubmit:D(),autocompleteRef:w}),r&&!k&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(Yd.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",onKeyPress:I,url:r,onEditLinkClick:P,urlLabel:H}),Object(d.createElement)(g.Button,{icon:vb.a,label:Object(B.__)("Remove link"),onClick:L}))))},kb=n(121);function yb(e){var t=e.children,n=e.className,r=e.isEnabled,o=void 0===r||r,c=e.deviceType,i=e.setDeviceType;return Object(d.createElement)(g.Dropdown,{className:"block-editor-post-preview__dropdown",contentClassName:f()(n,"block-editor-post-preview__dropdown-content"),popoverProps:{role:"menu"},position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(d.createElement)(g.Button,{isTertiary:!0,onClick:n,className:"block-editor-post-preview__button-toggle","aria-expanded":t,disabled:!o},Object(B.__)("Preview"))},renderContent:function(){return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.MenuGroup,null,Object(d.createElement)(g.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Desktop")},icon:"Desktop"===c&&kb.a},Object(B.__)("Desktop")),Object(d.createElement)(g.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Tablet")},icon:"Tablet"===c&&kb.a},Object(B.__)("Tablet")),Object(d.createElement)(g.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Mobile")},icon:"Mobile"===c&&kb.a},Object(B.__)("Mobile"))),t)}})}var _b=n(244),Eb=/\((min|max)-width:[^\(]*?\)/g;function Sb(e){return!!e.media&&!!e.media.mediaText.match(Eb)}function Cb(e,t,n){e.deleteRule(n),e.insertRule(t,n)}function wb(e,t){return e.replace(Eb,(function(e){return Object(_b.match)(e,{type:"screen",width:t})?"(min-width:0px)":"(min-width:999999px)"}))}function Bb(e,t){Object(d.useEffect)((function(){if(t){var n="undefined"==typeof window?[]:Object(p.filter)(Object(p.get)(window,["document","styleSheets"],[]),(function(e){return!!e.href&&Object(vl.getProtocol)(e.href)===window.location.protocol&&Object(vl.getAuthority)(e.href)===window.location.host})),r=[];return n.forEach((function(n,o){for(var c=!1,i=0;i<n.cssRules.length;++i){var a=n.cssRules[i];if((a.type===window.CSSRule.STYLE_RULE||a.type===window.CSSRule.MEDIA_RULE)&&(!c&&a.cssText.match(new RegExp("#start-".concat(e)))&&(c=!0),c&&a.cssText.match(new RegExp("#end-".concat(e)))&&(c=!1),c&&Sb(a))){var l=a.cssText;r[o]||(r[o]=[]),r[o][i]=l,Cb(n,wb(l,t),i)}}})),function(){r.forEach((function(e,t){if(e)for(var r=0;r<e.length;++r){var o=e[r];o&&Cb(n[t],o,r)}}))}}}),[t])}function Ib(e){var t=Object(d.useState)(window.innerWidth),n=Object(le.a)(t,2),r=n[0],o=n[1];Object(d.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 Bb("resizable-editor-section",c(e)),function(e){switch(e){case"Tablet":case"Mobile":return{width:c(e),margin:(window.innerHeight<800?36:72)+"px auto",flexGrow:0,maxHeight:"Mobile"===e?"768px":"1024px",overflowY:"auto"};default:return null}}(e)}var xb=Object(v.withSelect)((function(e){return{selectedBlockClientId:e("core/block-editor").getBlockSelectionStart()}}))((function(e){var t=e.selectedBlockClientId;return t&&Object(d.createElement)(g.Button,{isSecondary:!0,className:"block-editor-skip-to-selected-block",onClick:function(){qe(t).focus()}},Object(B.__)("Skip to the selected block"))})),Pb=n(140);var Tb=Object(v.withSelect)((function(e){return{blocks:(0,e("core/block-editor").getMultiSelectedBlocks)()}}))((function(e){var t=e.blocks,n=Object(Pb.count)(Object(c.serialize)(t),"words");return Object(d.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},Object(d.createElement)(Gn,{icon:es,showColors:!0}),Object(d.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},Object(d.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},Object(B.sprintf)(
|
75 |
-
/* translators: %d: number of blocks */
|
76 |
-
Object(B._n)("%d block","%d blocks",t.length),t.length)),Object(d.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},Object(B.sprintf)(
|
77 |
-
/* translators: %d: number of words */
|
78 |
-
Object(B._n)("%d word","%d words",n),n))))}));function Nb(e){var t=e.blockName,n=Object(v.useSelect)((function(e){var n=e("core/block-editor").getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:Object(p.get)(n,["value",t]),onUpdatePreferredStyleVariations:Object(p.get)(n,["onChange"],null),styles:e("core/blocks").getBlockStyles(t)}}),[t]),r=n.preferredStyle,o=n.onUpdatePreferredStyleVariations,c=n.styles,i=Object(d.useMemo)((function(){return[{label:Object(B.__)("Not set"),value:""}].concat(Object(ae.a)(c.map((function(e){return{label:e.label,value:e.name}}))))}),[c]),a=Object(d.useCallback)((function(e){o(t,e)}),[t,o]);return o&&Object(d.createElement)(g.SelectControl,{options:i,value:r||"",label:Object(B.__)("Default Style"),onChange:a})}var Rb=function(e){var t=e.slotName,n=Object(g.__experimentalUseSlot)(t);return Boolean(n.fills&&n.fills.length)?Object(d.createElement)(g.PanelBody,{className:"block-editor-block-inspector__advanced",title:Object(B.__)("Advanced"),initialOpen:!1},Object(d.createElement)(ee.Slot,{bubblesVirtually:!0})):null},Mb=Object(v.withSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getSelectedBlockCount,o=t.getBlockName,i=e("core/blocks").getBlockStyles,a=n(),l=a&&o(a),s=a&&Object(c.getBlockType)(l),u=a&&i(l);return{count:r(),hasBlockStyles:u&&u.length>0,selectedBlockName:l,selectedBlockClientId:a,blockType:s}}))((function(e){var t=e.blockType,n=e.count,r=e.hasBlockStyles,o=e.selectedBlockClientId,i=e.selectedBlockName,a=e.showNoBlockSelectedMessage,l=void 0===a||a;if(n>1)return Object(d.createElement)("div",{className:"block-editor-block-inspector"},Object(d.createElement)(Tb,null),Object(d.createElement)(We.Slot,{bubblesVirtually:!0}));var s=i===Object(c.getUnregisteredTypeHandlerName)();return t&&o&&!s?Object(d.createElement)("div",{className:"block-editor-block-inspector"},Object(d.createElement)(bo,{blockType:t}),r&&Object(d.createElement)("div",null,Object(d.createElement)(g.PanelBody,{title:Object(B.__)("Styles")},Object(d.createElement)(is,{clientId:o}),Object(c.hasBlockSupport)(t.name,"defaultStylePicker",!0)&&Object(d.createElement)(Nb,{blockName:t.name}))),Object(d.createElement)(We.Slot,{bubblesVirtually:!0}),Object(d.createElement)("div",null,Object(d.createElement)(Rb,{slotName:ee.slotName})),Object(d.createElement)(xb,{key:"back"})):l?Object(d.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},Object(B.__)("No block selected.")):null}));function Db(){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}}var Lb=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(Db()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).bindContainer=e.bindContainer.bind(Object(Kt.a)(e)),e.clearSelectionIfFocusTarget=e.clearSelectionIfFocusTarget.bind(Object(Kt.a)(e)),e}return Object(Gt.a)(r,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearSelectionIfFocusTarget",value:function(e){var t=this.props,n=t.hasSelectedBlock,r=t.hasMultiSelection,o=t.clearSelectedBlock,c=n||r;e.target===this.container&&c&&o()}},{key:"render",value:function(){return Object(d.createElement)("div",Object(s.a)({tabIndex:-1,onFocus:this.clearSelectionIfFocusTarget,ref:this.bindContainer},Object(p.omit)(this.props,["clearSelectedBlock","hasSelectedBlock","hasMultiSelection"])))}}]),r}(d.Component),Ab=Object(m.compose)([Object(v.withSelect)((function(e){var t=e("core/block-editor"),n=t.hasSelectedBlock,r=t.hasMultiSelection;return{hasSelectedBlock:n(),hasMultiSelection:r()}})),Object(v.withDispatch)((function(e){return{clearSelectedBlock:e("core/block-editor").clearSelectedBlock}}))])(Lb),Fb=n(245),Vb=n.n(Fb),Hb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,zb=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 s(){return b(/^{\s*/)}function u(){return b(/^}/)}function d(){var t,n=[];for(f(),p(n);e.length&&"}"!==e.charAt(0)&&(t=S()||C());)!1!==t&&(n.push(t),p(n));return n}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 O(){var e=b(/^([^{]+)/);if(e)return Ub(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 v(){var e=c(),t=b(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=Ub(t[0]),!b(/^:\s*/))return l("property missing ':'");var n=b(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(Hb,""),value:n?Ub(n[0]).replace(Hb,""):""});return b(/^[;\s]*/),r}}function g(){var e,t=[];if(!s())return l("missing '{'");for(p(t);e=v();)!1!==e&&(t.push(e),p(t));return u()?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 S(){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(!s())return l("@keyframes missing '{'");for(var i=p();r=h();)i.push(r),i=i.concat(p());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):l("@keyframes missing '}'")}}()||function(){var e=c(),t=b(/^@media *([^{]+)/);if(t){var n=Ub(t[1]);if(!s())return l("@media missing '{'");var r=p().concat(d());return u()?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:Ub(t[1]),media:Ub(t[2])})}()||function(){var e=c(),t=b(/^@supports *([^{]+)/);if(t){var n=Ub(t[1]);if(!s())return l("@supports missing '{'");var r=p().concat(d());return u()?e({type:"supports",supports:n,rules:r}):l("@supports missing '}'")}}()||k()||y()||_()||function(){var e=c(),t=b(/^@([-\w]+)?document *([^{]+)/);if(t){var n=Ub(t[1]),r=Ub(t[2]);if(!s())return l("@document missing '{'");var o=p().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):l("@document missing '}'")}}()||function(){var e=c();if(b(/^@page */)){var t=O()||[];if(!s())return l("@page missing '{'");for(var n,r=p();n=v();)r.push(n),r=r.concat(p());return u()?e({type:"page",selectors:t,declarations:r}):l("@page missing '}'")}}()||function(){var e=c();if(b(/^@host\s*/)){if(!s())return l("@host missing '{'");var t=p().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=c();if(b(/^@font-face\s*/)){if(!s())return l("@font-face missing '{'");for(var t,n=p();t=v();)n.push(t),n=n.concat(p());return u()?e({type:"font-face",declarations:n}):l("@font-face missing '}'")}}()}function C(){var e=c(),t=O();return t?(p(),e({type:"rule",selectors:t,declarations:g()})):l("selector 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(Ro.a)(i)&&e(i,o)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((j=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:j,parsingErrors:a}}))};function Ub(e){return e?e.replace(/^\s+|\s+$/g,""):""}var Gb=n(160),Kb=n.n(Gb),Wb=qb;function qb(e){this.options=e||{}}qb.prototype.emit=function(e){return e},qb.prototype.visit=function(e){return this[e.type](e)},qb.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 $b=Yb;function Yb(e){Wb.call(this,e)}Kb()(Yb,Wb),Yb.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Yb.prototype.comment=function(e){return this.emit("",e.position)},Yb.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Yb.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Yb.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("}")},Yb.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Yb.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Yb.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Yb.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Yb.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Yb.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("}")},Yb.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Yb.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Yb.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Yb.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("}"):""},Yb.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Xb=Qb;function Qb(e){e=e||{},Wb.call(this,e),this.indentation=e.indent}Kb()(Qb,Wb),Qb.prototype.compile=function(e){return this.stylesheet(e)},Qb.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Qb.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Qb.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Qb.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}")},Qb.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}")},Qb.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Qb.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Qb.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}")},Qb.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)+"}")},Qb.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")},Qb.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}")},Qb.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}")},Qb.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}")},Qb.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Qb.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()+"}"):""},Qb.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Qb.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var Zb=function(e,t){try{var n=zb(e),r=Vb.a.map(n,(function(e){if(!e)return e;var n=t(e);return this.update(n)}));return o=r,((c=c||{}).compress?new $b(c):new Xb(c)).compile(o)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var o,c};function Jb(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 ef(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jb(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tf(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 nf(e,t){return new URL(e,t).toString()}var rf=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]};tf(o)&&r.push(o)}return r}(t.value).map((c=e,function(e){return ef({},e,{newUrl:"url("+e.before+e.quote+nf(e.value,c)+e.quote+e.after+")"})}));return ef({},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 of(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 cf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?of(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):of(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var af=/^(body|html|:root).*$/,lf=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?cf({},n,{selectors:n.selectors.map((function(n){return t.includes(n.trim())?n:n.match(af)?n.replace(/^(body|html|:root)/,e):e+" "+n}))}):n}},sf=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(p.map)(e,(function(e){var n=e.css,r=e.baseURL,o=[];return t&&o.push(lf(t)),r&&o.push(rf(r)),o.length?Zb(n,Object(m.compose)(o)):n}))};var uf=function(e){var t=e.styles;return Object(d.useEffect)((function(){var e=sf(t,".editor-styles-wrapper"),n=Object(p.map)(Object(p.compact)(e),(function(e){var t=document.createElement("style");return t.innerHTML=e,document.body.appendChild(t),t}));return function(){return n.forEach((function(e){return document.body.removeChild(e)}))}}),[t]),null};var df=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,l=e.onSelect,s=void 0===l?p.noop:l,u=Object(v.useSelect)((function(e){var r=e("core/block-editor").getBlockRootClientId;return t||r(n)||void 0}),[n,t]);return Object(d.createElement)(wl,{onSelect:s,rootClientId:u,clientId:n,isAppender:r,showInserterHelpPanel:o,showMostUsedBlocks:i,__experimentalSelectBlockOnInsert:a})};function bf(){var e=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientIds,r=t.getBlockOrder,o=t.getBlockRootClientId,c=n(),i=Object(le.a)(c,1)[0];return{clientIds:c,rootBlocksClientIds:r(),rootClientId:o(i)}}),[]),t=e.clientIds,n=e.rootBlocksClientIds,r=e.rootClientId,o=Object(v.useDispatch)("core/block-editor"),c=o.duplicateBlocks,i=o.removeBlocks,a=o.insertAfterBlock,s=o.insertBeforeBlock,u=o.multiSelect,b=o.clearSelectedBlock,f=o.moveBlocksUp,m=o.moveBlocksDown;return Object(l.useShortcut)("core/block-editor/move-up",Object(d.useCallback)((function(e){e.preventDefault(),f(t,r)}),[t,f]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/move-down",Object(d.useCallback)((function(e){e.preventDefault(),m(t,r)}),[t,m]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/duplicate",Object(d.useCallback)((function(e){e.preventDefault(),c(t)}),[t,c]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/remove",Object(d.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/insert-after",Object(d.useCallback)((function(e){e.preventDefault(),a(Object(p.last)(t))}),[t,a]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/insert-before",Object(d.useCallback)((function(e){e.preventDefault(),s(Object(p.first)(t))}),[t,s]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/delete-multi-selection",Object(d.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{isDisabled:t.length<1}),Object(l.useShortcut)("core/block-editor/select-all",Object(d.useCallback)((function(e){e.preventDefault(),u(Object(p.first)(n),Object(p.last)(n))}),[n,u])),Object(l.useShortcut)("core/block-editor/unselect",Object(d.useCallback)((function(e){e.preventDefault(),b(),window.getSelection().removeAllRanges()}),[t,b]),{isDisabled:t.length<2}),null}bf.Register=function(){var e=Object(v.useDispatch)("core/keyboard-shortcuts").registerShortcut;return Object(d.useEffect)((function(){e({name:"core/block-editor/duplicate",category:"block",description:Object(B.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:Object(B.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:Object(B.__)("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(B.__)("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(B.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:Object(B.__)("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(B.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:Object(B.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:Object(B.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:Object(B.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var ff=bf;function pf(){var e=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockSelectionEnd,r=t.hasMultiSelection,o=t.isMultiSelecting;return{selectionEnd:n(),isMultiSelection:r(),isMultiSelecting:o()}}),[]),t=e.isMultiSelection,n=e.selectionEnd,r=e.isMultiSelecting;return Object(d.useEffect)((function(){if(n&&!r&&t){var e=qe(n);if(e){var o=Object(jr.getScrollContainer)(e);o&&Sd()(e,o,{onlyScrollIfNeeded:!0})}}}),[t,n,r]),null}var mf=[it.UP,it.RIGHT,it.DOWN,it.LEFT,it.ENTER,it.BACKSPACE];var Of=Object(m.withSafeTimeout)((function(e){var t=e.children,n=e.setTimeout,r=Object(d.useRef)(),o=Object(d.useRef)(),c=Object(v.useSelect)((function(e){return e("core/block-editor").isTyping()})),i=Object(v.useDispatch)("core/block-editor"),a=i.startTyping,l=i.stopTyping;function s(e){var t=e?"addEventListener":"removeEventListener";document[t]("selectionchange",b),document[t]("mousemove",u)}function u(e){var t=e.clientX,n=e.clientY;if(o.current){var r=o.current,c=r.clientX,i=r.clientY;c===t&&i===n||l()}o.current={clientX:t,clientY:n}}function b(){var e=window.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||l()}function f(e){var t=e.type,n=e.target;!c&&Object(jr.isTextField)(n)&&r.current.contains(n)&&("keydown"!==t||function(e){var t=e.keyCode;return!e.shiftKey&&mf.includes(t)}(e))&&a()}return Object(d.useEffect)((function(){return s(c),function(){return s(!1)}}),[c]),Object(d.createElement)("div",{ref:r,onFocus:function(e){var t=e.target;n((function(){c&&!Object(jr.isTextField)(t)&&l()}))},onKeyPress:f,onKeyDown:Object(p.over)([f,function(e){!c||e.keyCode!==it.ESCAPE&&e.keyCode!==it.TAB||l()}])},t)}));function vf(){return ir()("PreserveScrollInReorder component",{hint:"This behavior is now built-in the block list"}),null}function gf(){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}}var hf=-1!==window.navigator.userAgent.indexOf("Trident"),jf=new Set([it.UP,it.DOWN,it.LEFT,it.RIGHT]),kf=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(gf()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).ref=Object(d.createRef)(),e.onKeyDown=e.onKeyDown.bind(Object(Kt.a)(e)),e.addSelectionChangeListener=e.addSelectionChangeListener.bind(Object(Kt.a)(e)),e.computeCaretRectOnSelectionChange=e.computeCaretRectOnSelectionChange.bind(Object(Kt.a)(e)),e.maintainCaretPosition=e.maintainCaretPosition.bind(Object(Kt.a)(e)),e.computeCaretRect=e.computeCaretRect.bind(Object(Kt.a)(e)),e.onScrollResize=e.onScrollResize.bind(Object(Kt.a)(e)),e.isSelectionEligibleForScroll=e.isSelectionEligibleForScroll.bind(Object(Kt.a)(e)),e}return Object(Gt.a)(r,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.onScrollResize,!0),window.addEventListener("resize",this.onScrollResize,!0)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("scroll",this.onScrollResize,!0),window.removeEventListener("resize",this.onScrollResize,!0),document.removeEventListener("selectionchange",this.computeCaretRectOnSelectionChange),this.onScrollResize.rafId&&window.cancelAnimationFrame(this.onScrollResize.rafId),this.onKeyDown.rafId&&window.cancelAnimationFrame(this.onKeyDown.rafId)}},{key:"computeCaretRect",value:function(){this.isSelectionEligibleForScroll()&&(this.caretRect=Object(jr.computeCaretRect)())}},{key:"computeCaretRectOnSelectionChange",value:function(){document.removeEventListener("selectionchange",this.computeCaretRectOnSelectionChange),this.computeCaretRect()}},{key:"onScrollResize",value:function(){var e=this;this.onScrollResize.rafId||(this.onScrollResize.rafId=window.requestAnimationFrame((function(){e.computeCaretRect(),delete e.onScrollResize.rafId})))}},{key:"isSelectionEligibleForScroll",value:function(){return this.props.selectedBlockClientId&&this.ref.current.contains(document.activeElement)&&document.activeElement.isContentEditable}},{key:"isLastEditableNode",value:function(){var e=this.ref.current.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===document.activeElement}},{key:"maintainCaretPosition",value:function(e){var t=e.keyCode;if(this.isSelectionEligibleForScroll()){var n=Object(jr.computeCaretRect)();if(n)if(this.caretRect)if(jf.has(t))this.caretRect=n;else{var r=n.top-this.caretRect.top;if(0!==r){var o=Object(jr.getScrollContainer)(this.ref.current);if(o){var c=o===document.body,i=c?window.scrollY:o.scrollTop,a=c?0:o.getBoundingClientRect().top,l=c?this.caretRect.top/window.innerHeight:(this.caretRect.top-a)/(window.innerHeight-a);if(0===i&&l<.75&&this.isLastEditableNode())this.caretRect=n;else{var s=c?window.innerHeight:o.clientHeight;this.caretRect.top+this.caretRect.height>a+s||this.caretRect.top<a?this.caretRect=n:c?window.scrollBy(0,r):o.scrollTop+=r}}}}else this.caretRect=n}}},{key:"addSelectionChangeListener",value:function(){document.addEventListener("selectionchange",this.computeCaretRectOnSelectionChange)}},{key:"onKeyDown",value:function(e){var t=this;e.persist(),this.onKeyDown.rafId&&window.cancelAnimationFrame(this.onKeyDown.rafId),this.onKeyDown.rafId=window.requestAnimationFrame((function(){t.maintainCaretPosition(e),delete t.onKeyDown.rafId}))}},{key:"render",value:function(){return Object(d.createElement)("div",{ref:this.ref,onKeyDown:this.onKeyDown,onKeyUp:this.maintainCaretPosition,onMouseDown:this.addSelectionChangeListener,onTouchStart:this.addSelectionChangeListener,className:"block-editor__typewriter"},this.props.children)}}]),r}(d.Component),yf=hf?function(e){return e.children}:Object(v.withSelect)((function(e){return{selectedBlockClientId:(0,e("core/block-editor").getSelectedBlockClientId)()}}))(kf)}]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
build/block-editor/index.min.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', '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-viewport', 'wp-warning', 'wp-wordcount'), 'version' => '7d9962410c68098d3893b858e9b1bf7a');
|
build/block-editor/index.min.js
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
this.wp=this.wp||{},this.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=399)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.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){!function(){e.exports=this.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){!function(){e.exports=this.wp.compose}()},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){!function(){e.exports=this.wp.blocks}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(36);var o=n(29),c=n(37);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,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";n.d(t,"a",(function(){return o}));var r=n(41);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){!function(){e.exports=this.React}()},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(27);var o=n(35),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,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,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)?a(e,t):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){!function(){e.exports=this.wp.keycodes}()},function(e,t){!function(){e.exports=this.regeneratorRuntime}()},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(38),o=n(13);function c(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},,function(e,t){!function(){e.exports=this.wp.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){!function(){e.exports=this.wp.url}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(27);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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){e.exports=n(140)()},function(e,t){!function(){e.exports=this.wp.dom}()},function(e,t){!function(){e.exports=this.wp.hooks}()},,,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){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,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){!function(){e.exports=this.wp.deprecated}()},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";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 s(){n=o?new WeakMap:i()}function u(){var n,r,o,c,i,s=arguments.length;for(c=new Array(s),o=0;o<s;o++)c[o]=arguments[o];for(i=t.apply(null,c),(n=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,s=n,u=!0;for(t=0;t<e.length;t++){if(o=e[t],!(l=o)||"object"!=typeof l){u=!1;break}s.has(o)?s=s.get(o):(c=new WeakMap,s.set(o,c),s=c)}return s.has(r)||((a=i()).isUniqueByDependants=u,s.set(r,a)),s.get(r)}:function(){return n},u.getDependants=t,u.clear=s,s(),u}},function(e,t){!function(){e.exports=this.wp.blob}()},,,function(e,t){!function(){e.exports=this.wp.keyboardShortcuts}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(15),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){return e?e.ownerDocument||e:window.document}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(15),o=n(78);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(56);var a=n(57);function l(e){var t,n,o,l=(o=e.compose,Array.isArray(o)?o:void 0!==o?[o]:[]),s=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},u=function(t,n,o){if(void 0===t&&(t={}),void 0===n&&(n={}),void 0===o&&(o=!1),o||(t=s(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,u=Object(i.c)(l);!(a=u()).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};u.__useOptions=s;var d=l.reduce((function(e,t){return e.push.apply(e,t.__keys||[]),e}),[]);return u.__keys=[].concat(d,(null===(t=e.useState)||void 0===t?void 0:t.__keys)||[],e.keys||[]),u.unstable_propsAreEqual=e.propsAreEqual||(null===(n=l[0])||void 0===n?void 0:n.unstable_propsAreEqual)||a.a,u}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(15),o=n(56),c=n(82);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(57);function l(e){var t,n=e.as,l=e.useHook,s=e.memo,u=e.propsAreEqual,d=void 0===u?null==l?void 0:l.unstable_propsAreEqual:u,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 s,u=i(a,f),d=u[0],b=u[1],p=l(d,Object(o.a)({ref:t},b)),v=p.wrapElement,O=Object(o.b)(p,["wrapElement"]),g=(null===(s=c.render)||void 0===s?void 0:s.__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),s&&(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";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 s})),n.d(t,"g",(function(){return S}));var r=n(18),o=n(15),c=n(60),i=n(65),a=n(64),l=n(68);function s(e){return e.slice().reverse()}function u(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)&&u(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&&u(r,o)?(n=!0,-1):0})),n?t:e}function C(e,t){var n=e.unstable_virtual,o=e.rtl,c=e.orientation,i=e.items,l=e.groups,u=e.currentId,m=e.loop,w=e.wrap,S=e.pastIds,I=e.unstable_moves,x=e.initialVirtual,B=e.initialRTL,P=e.initialOrientation,T=e.initialCurrentId,N=e.initialLoop,R=e.initialWrap,D=e.hasSetCurrentId;switch(t.type){case"registerGroup":var M=t.group;if(0===l.length)return Object(r.b)(Object(r.b)({},e),{},{groups:[M]});var A=d(l,M);return Object(r.b)(Object(r.b)({},e),{},{groups:_(l,M,A)});case"unregisterGroup":var L=t.id,F=l.filter((function(e){return e.id!==L}));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 D||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(u&&u===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!==u&&e!==Q})),J=u?[u].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==u)return C(e,Object(r.b)(Object(r.b)({},t),{},{type:"first"}));var ne=o&&"vertical"!==c,re=ne?s(i):i,oe=re.find((function(e){return e.id===u}));if(!oe)return C(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 se=b(ne?k(re,oe.groupId):s(le));return C(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==se?void 0:se.id}))}var ue=function(e){return e&&y[e]}(ce?c||"horizontal":c),de=m&&m!==ue,be=ce&&w&&w!==ue,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),u,fe),u);return C(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,u),ve=fe?(null==me?void 0:me.id)||null:null==me?void 0:me.id;return C(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:ve}))}var Oe=b(le,u);return C(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=C(Object(r.b)(Object(r.b)({},e),{},{items:s(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=C(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(s(O(g(p(i))))),Ee=null===T,Ce=C(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)({},Ce),{},{orientation:c,items:i});case"first":var we=b(i);return C(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==we?void 0:we.id}));case"last":var Se=C(Object(r.b)(Object(r.b)({},e),{},{items:s(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,u)}));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,w)});case"reset":return Object(r.b)(Object(r.b)({},e),{},{unstable_virtual:x,rtl:B,orientation:P,currentId:h(Object(r.b)(Object(r.b)({},e),{},{currentId:T})),loop:N,wrap:R,unstable_moves:0,pastIds:[]});default:throw new Error}}function w(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,s=t.rtl,u=void 0!==s&&s,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)(C,{unstable_virtual:a,rtl:u,orientation:d,items:[],groups:[],currentId:b,loop:p,wrap:v,unstable_moves:0,pastIds:[],initialVirtual:a,initialRTL:u,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:w((function(e){I.current||k({type:"registerItem",item:e})})),unregisterItem:w((function(e){I.current||k({type:"unregisterItem",id:e})})),registerGroup:w((function(e){I.current||k({type:"registerGroup",group:e})})),unregisterGroup:w((function(e){I.current||k({type:"unregisterGroup",id:e})})),move:w((function(e){return k({type:"move",id:e})})),next:w((function(e){return k({type:"next",allTheWay:e})})),previous:w((function(e){return k({type:"previous",allTheWay:e})})),up:w((function(e){return k({type:"up",allTheWay:e})})),down:w((function(e){return k({type:"down",allTheWay:e})})),first:w((function(){return k({type:"first"})})),last:w((function(){return k({type:"last"})})),unstable_sort:w((function(){return k({type:"sort"})})),unstable_setVirtual:w((function(e){return k({type:"setVirtual",virtual:e})})),setRTL:w((function(e){return k({type:"setRTL",rtl:e})})),setOrientation:w((function(e){return k({type:"setOrientation",orientation:e})})),setCurrentId:w((function(e){return k({type:"setCurrentId",currentId:e})})),setLoop:w((function(e){return k({type:"setLoop",loop:e})})),setWrap:w((function(e){return k({type:"setWrap",wrap:e})})),reset:w((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";function r(e){return e.target===e.currentTarget}n.d(t,"a",(function(){return r}))},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,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)?a(e,t):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";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";n.d(t,"a",(function(){return o}));var r=n(51);function o(e){return Object(r.a)(e).activeElement}},function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(15),o="undefined"==typeof window?r.useEffect:r.useLayoutEffect},,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){!function(){e.exports=this.wp.isShallowEqual}()},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(15);function o(e){return Object(r.useState)(e)[0]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(15);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 i}));var r=n(15),o=n(65),c=n(71);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){var r;!function(o){var c=/^\s+/,i=/\s+$/,a=0,l=o.round,s=o.min,u=o.max,d=o.random;function b(e,t){if(t=t||{},(e=e||"")instanceof b)return e;if(!(this instanceof b))return new b(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,a=null,l=null,d=!1,b=!1;"string"==typeof e&&(e=function(e){e=e.replace(c,"").replace(i,"").toLowerCase();var t,n=!1;if(B[e])e=B[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=U.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=U.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=U.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=U.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=U.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=U.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=U.hex8.exec(e))return{r:D(t[1]),g:D(t[2]),b:D(t[3]),a:F(t[4]),format:n?"name":"hex8"};if(t=U.hex6.exec(e))return{r:D(t[1]),g:D(t[2]),b:D(t[3]),format:n?"name":"hex"};if(t=U.hex4.exec(e))return{r:D(t[1]+""+t[1]),g:D(t[2]+""+t[2]),b:D(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=U.hex3.exec(e))return{r:D(t[1]+""+t[1]),g:D(t[2]+""+t[2]),b:D(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(G(e.r)&&G(e.g)&&G(e.b)?(f=e.r,p=e.g,m=e.b,t={r:255*N(f,255),g:255*N(p,255),b:255*N(m,255)},d=!0,b="%"===String(e.r).substr(-1)?"prgb":"rgb"):G(e.h)&&G(e.s)&&G(e.v)?(r=A(e.s),a=A(e.v),t=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),s=r%6;return{r:255*[n,a,i,i,l,n][s],g:255*[l,n,n,a,i,i][s],b:255*[i,i,l,n,n,a][s]}}(e.h,r,a),d=!0,b="hsv"):G(e.h)&&G(e.s)&&G(e.l)&&(r=A(e.s),l=A(e.l),t=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,r,l),d=!0,b="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,m;return n=T(n),{ok:d,format:e.format||b,r:s(255,u(t.r,0)),g:s(255,u(t.g,0)),b:s(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=a++}function f(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=u(e,t,n),i=s(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=u(e,t,n),i=s(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=[M(l(e).toString(16)),M(l(t).toString(16)),M(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[M(L(r)),M(l(e).toString(16)),M(l(t).toString(16)),M(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=R(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=R(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=R(n.l),b(n)}function k(e,t){t=0===t?0:t||10;var n=b(e).toRgb();return n.r=u(0,s(255,n.r-l(-t/100*255))),n.g=u(0,s(255,n.g-l(-t/100*255))),n.b=u(0,s(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=R(n.l),b(n)}function _(e,t){var n=b(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,b(n)}function E(e){var t=b(e).toHsl();return t.h=(t.h+180)%360,b(t)}function C(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+120)%360,s:t.s,l:t.l}),b({h:(n+240)%360,s:t.s,l:t.l})]}function w(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+90)%360,s:t.s,l:t.l}),b({h:(n+180)%360,s:t.s,l:t.l}),b({h:(n+270)%360,s:t.s,l:t.l})]}function S(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+72)%360,s:t.s,l:t.l}),b({h:(n+216)%360,s:t.s,l:t.l})]}function 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 x(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=[M(l(e).toString(16)),M(l(t).toString(16)),M(l(n).toString(16)),M(L(r))];if(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))return c[0].charAt(0)+c[1].charAt(0)+c[2].charAt(0)+c[3].charAt(0);return 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(x,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},b.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:A(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=b.readability(e,t);switch(o=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=c>=4.5;break;case"AAlarge":o=c>=3;break;case"AAAsmall":o=c>=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 s=0;s<t.length;s++)(r=b.readability(e,t[s]))>l&&(l=r,a=b(t[s]));return b.isReadable(e,a,{level:c,size:i})||!o?a:(n.includeFallbackColors=!1,b.mostReadable(e,["#fff","#000"],n))};var B=b.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=b.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(B);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=s(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function R(e){return s(1,u(0,e))}function D(e){return parseInt(e,16)}function M(e){return 1==e.length?"0"+e:""+e}function A(e){return e<=1&&(e=100*e+"%"),e}function L(e){return o.round(255*parseFloat(e)).toString(16)}function F(e){return D(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.d(t,"a",(function(){return a}));var r=n(18),o=n(53),c=n(52),i=n(57),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 o}));var r=n(15);var o=Object(r.createContext)((function(e){return void 0===e&&(e="id"),(e?e+"-":"")+Math.random().toString(32).substr(2,6)}))},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(58);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 u})),n.d(t,"b",(function(){return l}));var c=n(58),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 s(e){return Object(c.a)(e)===e}function u(e,t){var n=void 0===t?{}:t,r=n.isActive,o=void 0===r?s: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===n||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(18),o=n(53),c=n(52),i=n(70),a=n(15),l=n(66),s=n(74),u=(n(86),n(49)),d=n(60),b=n(73),f=n(76),p=n(58),m=n(75);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(u.a)(c),k=Object(u.a)(i),y=e.disabled&&!e.focusable,_=Object(a.useState)(!0),E=_[0],C=_[1],w=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(s.a)(t)){var r=Object(p.a)(t);if(r){var o="BODY"===r.tagName,c=Object(m.b)(t.parentElement);if(r===c||o&&!c)n(t);else if(c){c.addEventListener("focusin",(function(){return n(t)}),{once:!0})}else{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&&C(!1))}),[]);var x=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]),B=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:w,disabled:!(!y||!E)||void 0,"aria-disabled":!!e.disabled||void 0,onClick:x,onMouseDown:B},v)}});Object(o.a)({as:"div",useHook:h})},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(15),o=Object(r.createContext)({})},,function(e,t){!function(){e.exports=this.wp.notices}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(15),o=n(78),c=n(56);var i=function(e,t,n){void 0===n&&(n=t.children);var i=Object(r.useContext)(o.a);if(i.useCreateElement)return i.useCreateElement(e,t,n);if("string"==typeof e&&function(e){return"function"==typeof e}(n)){t.children;return n(Object(c.b)(t,["children"]))}return Object(r.createElement)(e,t,n)}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(2),o=n(0),c=Object(o.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:r.noop,clientId:null}),i=c.Provider;function a(){return Object(o.useContext)(c)}},function(e,t,n){"use strict";n(107),n(15)},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,s=void 0===l||l;return function(e){if(n){var t,i="function"==typeof n?n(e):n,l="function"==typeof s?s(e):s,u="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(),u&&e.stopPropagation(),r&&r(e),void d(e)}if(c&&"current"in c)null===(t=c.current)||void 0===t||t.call(c,e);else 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(18),o=n(53),c=n(52),i=n(15),a=n(74),l=(n(86),n(49)),s=n(55),u=n(77);var d=Object(c.a)({name:"Clickable",compose:u.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"]),u=Object(i.useState)(!1),d=u[0],b=u[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(s.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){!function(){e.exports=this.wp.viewport}()},function(e,t){!function(){e.exports=this.wp.warning}()},,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(18),o=n(53),c=n(52),i=n(15),a=n(71),l=n(68),s=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:s})},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(123);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";t.__esModule=!0;var r=n(180);t.default=r.default},,function(e,t){var n,r,o=e.exports={};function c(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===c||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:c}catch(e){n=c}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var l,s=[],u=!1,d=-1;function b(){u&&l&&(u=!1,l.length?s=l.concat(s):d=-1,s.length&&f())}function f(){if(!u){var e=a(b);u=!0;for(var t=s.length;t;){for(l=s,s=[];++d<t;)l&&l[d].run();d=-1,t=s.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new p(e,t)),1!==s.length||u||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(51);function o(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}function c(e,t,n){return e.dispatchEvent(o(e,t,n))}},,,function(e,t,n){"use strict"},function(e,t){!function(){e.exports=this.ReactDOM}()},,,,function(e,t,n){e.exports=function(){"use strict";return function(e){var t={};return function e(t,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)e(t,n[r]);else for(r in n)t[r]=(t[r]||[]).concat(n[r])}(t,e),function(e){return function(n){return function(r){var o,c,i=t[r.type],a=n(r);if(i)for(o=0;o<i.length;o++)(c=i[o](r,e))&&e.dispatch(c);return 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(177)),c=r(n(178)),i=n(15),a=r(i),l=r(n(147)),s=r(n(179)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(){var e=i.useState(!1)[1];return i.useCallback((function(){return e((function(e){return!e}))}),[])}function b(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return u.fun(e)?e.apply(void 0,n):e}function m(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return u.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var v,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(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.removeChild(s(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(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.removeChild(s(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},C=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function w(e){_=e}var S,I=function(){return Date.now()};function x(e){S=e}var B,P,T=function(e){return e.current};function N(e){B=e}var R=Object.freeze({get applyAnimatedValues(){return v},injectApplyAnimatedValues:k,get colorNames(){return O},injectColorNames:y,get requestFrame(){return E},get cancelFrame(){return C},injectFrame:function(e,t){E=e,C=t},get interpolation(){return _},injectStringInterpolator:w,get now(){return I},injectNow:function(e){I=e},get defaultElement(){return S},injectDefaultElement:x,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return B},injectCreateAnimatedStyle:N,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),D=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:B(t.style)}):t,r.update=n,r.attach(),r}return l(t,e),t}(j),M=!1,A=new Set,L=function e(){if(!M)return!1;var t=I(),n=A,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 s=i.configs[l],u=void 0,d=void 0,b=0;b<s.animatedValues.length;b++){var f=s.animatedValues[b];if(!f.done){var p=s.fromValues[b],m=s.toValues[b],v=f.lastPosition,O=m instanceof g,h=Array.isArray(s.initialVelocity)?s.initialVelocity[b]:s.initialVelocity;if(O&&(m=m.getValue()),s.immediate)f.setValue(m),f.done=!0;else if("string"!=typeof p&&"string"!=typeof m){if(void 0!==s.duration)v=p+s.easing((t-f.startTime)/s.duration)*(m-p),u=t>=f.startTime+s.duration;else if(s.decay)v=p+h/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-v)<.1)&&(m=v);else{d=void 0!==f.lastTime?f.lastTime:t,h=void 0!==f.lastVelocity?f.lastVelocity:s.initialVelocity,t>d+64&&(d=t);for(var j=Math.floor(t-d),k=0;k<j;++k){v+=1*(h+=1*((-s.tension*(v-m)+-s.friction*h)/s.mass)/1e3)/1e3}var y=!(!s.clamp||0===s.tension)&&(p<m?v>m:v<m),_=Math.abs(h)<=s.precision,C=0===s.tension||Math.abs(m-v)<=s.precision;u=y||_&&C,f.lastVelocity=h,f.lastTime=t}O&&!s.toValues[b].done&&(u=!1),u?(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[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(A.delete(i),i.stop(!0))}return A.size?P?P():E(e):M=!1,M};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 s=l?l(e):e;if(s<t){if("identity"===i)return s;"clamp"===i&&(s=t)}if(s>n){if("identity"===a)return s;"clamp"===a&&(s=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t);s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r;return s}(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);var 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(u.arr(i)||u.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),s=l[i.delay]&&l[i.delay].to;l[i.delay]=o({},l[i.delay],i,{to:o({},s,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,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,c=e.to,i=void 0===c?{}:c;u.obj(r)&&(n.merged=o({},r,n.merged)),u.obj(i)&&(n.merged=o({},n.merged,i))}));var r=this.local=++this.guid,i=this.localQueue=this.queue;this.queue=[],i.forEach((function(t,o){var a=t.delay,l=c(t,["delay"]),s=function(t){o===i.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},d=u.arr(l.to)||u.fun(l.to);a?setTimeout((function(){r===n.guid&&(d?n.runAsync(l,s):n.diff(l).start(s))}),a):d?n.runAsync(l,s):n.diff(l).start(s)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,A.has(t)||A.add(t),M||(M=!0,E(P||L));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,A.has(t)&&A.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(u.arr(r.to))for(var l=function(e){var t=e,c=o({},r,m(r.to[t]));u.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)}))}))},s=0;s<r.to.length;s++)l(s);else if(u.fun(r.to)){var d,b=0;a=a.then((function(){return r.to((function(e){var t=o({},r,m(e));if(u.arr(t.config)&&(t.config=t.config[b]),b++,i===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}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,s=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=u.num(i),d=u.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!O[i],m=u.arr(i),h=!l&&!m&&!d,k=u.und(c[r])?i:c[r],y=l||m||d?i:1,E=p(s,r);j&&(y=j.animations[r].parent);var C,w=a.parent,S=a.interpolation,x=f(j?y.getPayload():y),B=i;h&&(B=_({range:[0,1],output:[i,i]})(1));var P,T=S&&S.getValue(),N=!u.und(w)&&a.animatedValues.some((function(e){return!e.done})),R=!u.equ(B,T),D=!u.equ(B,a.previous),M=!u.equ(E,a.config);if(v||D&&R||M){var A;if(l||d)w=S=a.parent||new H(k);else if(m)w=S=a.parent||new z(k);else if(h){var L=a.interpolation&&a.interpolation.calc(a.parent.value);L=void 0===L||v?k:L,a.parent?(w=a.parent).setValue(0,!1):w=new H(0);var F={output:[L,i]};a.interpolation?(S=a.interpolation,a.interpolation.updateConfig(F)):S=w.interpolate(F)}return x=f(j?y.getPayload():y),C=f(w.getPayload()),v&&!h&&w.setValue(k,!1),t.hasChanged=!0,C.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=N?e.lastVelocity:void 0,e.lastTime=N?e.lastTime:void 0,e.startTime=I(),e.done=!1,e.animatedStyles.clear()})),p(g,r)&&w.setValue(h?y:i,!1),o({},e,((A={})[r]=o({},a,{name:r,parent:w,interpolation:S,animatedValues:C,toValues:x,previous:B,config:E,fromValues:f(w.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}),A))}return R?e:(h&&(w.setValue(1,!1),S.updateConfig({output:[B,B]})),w.done=!0,t.hasChanged=!0,o({},e,((P={})[r]=o({},e[r],{previous:B}),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=u.fun(t),c=i.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new 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 s=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||s(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,s,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};(u.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 se(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 ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function be(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function pe(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:Q.hasOwnProperty(t)?Q[t]:(n=ee.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|255)>>>0:(n=te.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|be(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=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|se(de(n[1]),fe(n[2]),fe(n[3])))>>>0:(n=re.exec(t))?(se(de(n[1]),fe(n[2]),fe(n[3]))|be(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var me=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ve=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,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)})),x("div"),w((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 s in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var u=0===s.indexOf("--"),d=je(s,n[s],u);"float"===s&&(s="cssFloat"),u?e.style.setProperty(s,d):e.style[s]=d}for(var b in 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),s=i.useRef(null),b=i.useRef(null),f=i.useCallback((function(e){var t=s.current;s.current=new D(e,(function(){b.current&&!1===v.fn(b.current,s.current.getAnimatedValue())&&r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){l.current=!1,s.current&&s.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(b,l,r)})),f(t);var p=s.current.getValue(),m=(p.scrollTop,p.scrollLeft,c(p,["scrollTop","scrollLeft"]));return a.createElement(e,o({},m,{ref:function(e){return b.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,n)}}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=_e?t[0].toLowerCase()+t.substring(1):t;return e[n]=ye(n),e}),ye)}),Ce=Ee(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=L,t.animated=Ce,t.a=Ce,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=R,t.useSpring=function(e){var t=u.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=u.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]}})})),s=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?[s,f,b]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=$(r),l=a.lazy,s=void 0!==l&&l,u=(a.unique,a.reset),b=void 0!==u&&u,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){var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),a=$(t),l=a.items,s=a.keys,u=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,C=o({},i.current),w=[].concat(i.deleted),S=Object.keys(C),I=new Set(S),x=new Set(s),B=s.filter((function(e){return!I.has(e)})),P=i.transitions.filter((function(e){return!e.destroyed&&!x.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return I.has(e)})),N=-O;for(;k.length;){switch(k.shift()){case"enter":B.forEach((function(e,t){g&&w.find((function(t){return t.originalKey===e}))&&(w=w.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=l[r],c=n&&void 0!==u?"initial":"enter";C[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!==u?u||{}:d,o),to:p(b,o)}}));break;case"leave":P.forEach((function(e){var t=_.indexOf(e),n=E[t];w.unshift(o({},C[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=O,config:p(h,n,"leave"),to:p(f,n)})),delete C[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=l[t];C[e]=o({},C[e],{item:n,slot:"update",trail:N+=O,config:p(h,n,"update"),to:p(m,n)})}))}}var R=s.map((function(e){return C[e]}));return w.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=R.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),R=[].concat(R.slice(0,t),[r],R.slice(t))})),o({},i,{changed:B.length||P.length||T.length,first:n&&0===B.length,transitions:R,current:C,deleted:w,prevProps:t})}(y.current,r),y.current.changed&&y.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,i=e.trail,a=e.key,l=e.item;y.current.instances.has(a)||y.current.instances.set(a,new G);var u=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||s||Y(y,a),f&&f(l)),!Array.from(y.current.instances).some((function(e){return!e[1].idle}))&&(g||s)&&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});u.update(d),y.current.paused||u.start()})),i.useEffect((function(){return y.current.mounted=k.current=!0,function(){y.current.mounted=k.current=!1,Array.from(y.current.instances).map((function(e){return e[1].destroy()})),y.current.instances.clear()}}),[]),y.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:y.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){u.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var 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";n.d(t,"a",(function(){return E})),n.d(t,"b",(function(){return _}));var r=n(18),o=n(53),c=n(52),i=n(70),a=n(15),l=n(66),s=(n(86),n(49)),u=n(55),d=n(58),b=n(77),f=n(82),p=n(87),m=n(51),v=n(98),O=n(104),g=n(54),h="undefined"!=typeof window&&"msCrypto"in window;var j="undefined"!=typeof window&&"msCrypto"in window;function k(e,t,n){var r=Object(s.a)(n);return Object(a.useCallback)((function(n){var o;if(e&&function(e){return!!Object(u.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),C=Object(s.a)(o),w=Object(s.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),x=k(e.unstable_virtual,_,b),B=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(u.a)(t)&&!i)return null===(r=C.current)||void 0===r||r.call(C,t),void(null==_||null===(o=_.ref.current)||void 0===o||o.focus());if(i)return void t.stopPropagation()}else if(Object(u.a)(t)){var a;null===(a=e.setCurrentId)||void 0===a||a.call(e,null)}null===(n=C.current)||void 0===n||n.call(C,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(u.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=w.current)||void 0===n||n.call(w,t)}),[e.unstable_virtual,e.items,_]),T=Object(a.useMemo)((function(){return Object(p.a)({onKeyDown:I,stopPropagation:!0,shouldKeyDown:function(t){return Object(u.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)))));if(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:B,onBlur:P,onKeyDown:T,onKeyUp:x,"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(18),o=n(53),c=n(52),i=n(15),a=n(66),l=(n(86),n(49)),s=n(55),u=n(73),d=n(76),b=n(75),f=n(89),p=n(87),m=n(51),v=n(54),O=n(97),g=n(99),h=n(100);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),C=e.id,w=e.disabled&&!e.focusable,S=e.currentId===C,I=Object(l.a)(S),x=Object(i.useRef)(!1),B=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),R=Object(l.a)(y),D=!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(C)return null===(t=e.registerItem)||void 0===t||t.call(e,{id:C,ref:E,disabled:!!w}),function(){var t;null===(t=e.unregisterItem)||void 0===t||t.call(e,C)}}),[C,w,e.registerItem,e.unregisterItem]),Object(i.useEffect)((function(){var t=E.current;t&&e.unstable_moves&&I.current&&t.focus()}),[e.unstable_moves]);var M=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)&&C&&!function(e,t){if(Object(s.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,C),e.unstable_virtual&&e.baseId&&Object(s.a)(t))){var c=t.target,i=Object(m.a)(c).getElementById(e.baseId);i&&(x.current=!0,Object(b.a)(i))}}),[C,e.items,e.setCurrentId,e.unstable_virtual,e.baseId]),A=Object(i.useCallback)((function(t){var n;if(e.unstable_virtual&&x.current)return x.current=!1,t.preventDefault(),void t.stopPropagation();null===(n=T.current)||void 0===n||n.call(T,t)}),[e.unstable_virtual]),L=Object(i.useCallback)((function(e){var t;if(null===(t=N.current)||void 0===t||t.call(N,e),Object(s.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:L,stopPropagation:!0,shouldKeyDown:s.a,keyMap:function(){var t="horizontal"!==e.orientation,n="vertical"!==e.orientation,r=!!(null==B?void 0:B.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)}}}})}),[L,e.orientation,B,e.up,e.next,e.down,e.previous,e.first,e.last]),V=Object(i.useCallback)((function(e){var t;if(null===(t=R.current)||void 0===t||t.call(R,e),!e.defaultPrevented){var n=j(e.currentTarget);n&&!Object(u.a)(n)&&n.focus()}}),[]);return Object(r.b)({ref:Object(a.a)(E,o),id:C,tabIndex:D?f:-1,"aria-selected":!(!e.unstable_virtual||!S)||void 0,onFocus:M,onBlur:A,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 o}));var r=n(51);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";e.exports=n(184)},,function(e,t){!function(){e.exports=this.wp.shortcode}()},,,function(e,t,n){"use strict";var r=n(5),o=n(14),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:"M9 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z"}));t.a=c},,function(e,t,n){"use strict";var r=n(8),o=n(14),c=n(0),i=n(2),a=n(3),l=n(167),s=Object(a.createSlotFill)("BlockControls"),u=s.Fill,d=s.Slot;var b=function(e){return"BlockControls".concat(e?"-expanded":"")},f=function(e){var t=e.controls,n=e.__experimentalIsExpanded,r=e.children;return Object(l.a)()?Object(c.createElement)(u,{name:b(n)},(function(e){var n=Object(i.isEmpty)(e)?null:e;return Object(c.createElement)(a.__experimentalToolbarContext.Provider,{value:n},Object(c.createElement)(a.ToolbarGroup,{controls:t}),r)})):null};f.Slot=function(e){var t=e.__experimentalIsExpanded,n=void 0!==t&&t,i=Object(o.a)(e,["__experimentalIsExpanded"]),l=Object(c.useContext)(a.__experimentalToolbarContext);return Object(c.createElement)(d,Object(r.a)({name:b(n)},i,{fillProps:l}))},t.a=f},,,,,,,,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,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){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(36),o=n(35),c=n(29),i=n(37);function a(e){return Object(r.a)(e)||Object(o.a)(e)||Object(c.a)(e)||Object(i.a)()}},function(e,t){!function(){e.exports=this.wp.wordcount}()},,,,,function(e,t){!function(){e.exports=this.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";n.d(t,"a",(function(){return c}));var r=n(4),o=n(85);function c(){var e=Object(o.b)(),t=e.isSelected,n=e.clientId,c=e.name,i=Object(r.useSelect)((function(e){if(!t){var r=e("core/block-editor"),o=r.getBlockName,i=r.isFirstMultiSelectedBlock,a=r.getMultiSelectedBlockClientIds;return!!i(n)&&a().every((function(e){return o(e)===c}))}}),[n,t,c]);return t||i}},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,n){"use strict";var r=a(n(283)),o=a(n(288)),c=a(n(206)),i=a(n(203));function a(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:i.default,TransitionGroup:c.default,ReplaceTransition:o.default,CSSTransition:r.default}},,,,,,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,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(15),l=n(30),s=n(181),u=n(182),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.dispatchEvent=function(e){var n=document.createEvent("Event");n.initEvent(e,!0,!1),t.textarea.dispatchEvent(n)},t.updateLineHeight=function(){t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t.saveDOMNodeRef=function(e){var n=t.props.innerRef;n&&n(e),t.textarea=e},t.getLocals=function(){var e=t,n=e.props,r=(n.onResize,n.maxRows),o=(n.onChange,n.style),a=(n.innerRef,i(n,["onResize","maxRows","onChange","style","innerRef"])),l=e.state.lineHeight,s=e.saveDOMNodeRef,u=r&&l?l*r:null;return c({},a,{saveDOMNodeRef:s,style:u?c({},o,{maxHeight:u}):o,onChange:t.onChange})},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.onResize;"number"==typeof t.maxRows&&this.updateLineHeight(),setTimeout((function(){return s(e.textarea)})),n&&this.textarea.addEventListener("autosize:resized",n)},t.prototype.componentWillUnmount=function(){var e=this.props.onResize;e&&this.textarea.removeEventListener("autosize:resized",e),this.dispatchEvent("autosize:destroy")},t.prototype.render=function(){var e=this.getLocals(),t=e.children,n=e.saveDOMNodeRef,r=i(e,["children","saveDOMNodeRef"]);return a.createElement("textarea",c({},r,{ref:n}),t)},t.prototype.componentDidUpdate=function(){this.props.value!==this.currentValue&&this.dispatchEvent("autosize:update")},t.defaultProps={rows:1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.func},t}(a.Component);t.default=d},function(e,t,n){var r,o,c;o=[e,t],void 0===(c="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){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 s(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",r=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(s("scroll"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(s("hidden"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),i!==r){i=r;var o=c("autosize:resized");try{e.dispatchEvent(o)}catch(e){}}}}function a(e){var t=o.get(e);t&&t.destroy()}function l(e){var t=o.get(e);t&&t.update()}var s=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((s=function(e){return e}).destroy=function(e){return e},s.update=function(e){return e}):((s=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return i(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},s.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=s,e.exports=t.default})?r.apply(t,o):r)||(e.exports=c)},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,s=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;o=void 0===o||o;var b=r.isWindow(t),f=r.offset(e),p=r.outerHeight(e),m=r.outerWidth(e),v=void 0,O=void 0,g=void 0,h=void 0,j=void 0,k=void 0,y=void 0,_=void 0,E=void 0,C=void 0;b?(y=t,C=r.height(y),E=r.width(y),_={left:r.scrollLeft(y),top:r.scrollTop(y)},j={left:f.left-_.left-s,top:f.top-_.top-l},k={left:f.left+m-(_.left+E)+d,top:f.top+p-(_.top+C)+u},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))-s,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))+u}),j.top<0||k.top>0?!0===i?r.scrollTop(t,h.top+j.top):!1===i?r.scrollTop(t,h.top+k.top):j.top<0?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top):c||((i=void 0===i||!!i)?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top)),o&&(j.left<0||k.left>0?!0===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 s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),u=/^(top|right|bottom|left)$/,d="left";var b=void 0;function f(e,t){for(var n=0;n<e.length;n++)t(e[n])}function p(e){return"border-box"===b(e,"boxSizing")}"undefined"!=typeof window&&(b=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,c=n||o.defaultView.getComputedStyle(e,null);return c&&(r=c.getPropertyValue(t)||c[t]),r}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!u.test(t)){var r=e.style,o=r[d],c=e.runtimeStyle[d];e.runtimeStyle[d]=e.currentStyle[d],r[d]="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r[d]=o,e.runtimeStyle[d]=c}return""===n?"auto":n});var m=["margin","border","padding"];function v(e,t,n){var r={},o=e.style,c=void 0;for(c in t)t.hasOwnProperty(c)&&(r[c]=o[c],o[c]=t[c]);for(c in n.call(e),t)t.hasOwnProperty(c)&&(o[c]=r[c])}function 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=void 0;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 s=2===n?-O(e,["border"],r):O(e,["margin"],r);return l+(1===n?0:s)}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){if(void 0===r)return t&&y(t,e,-1);if(t){b(t);return p(t)&&(r+=O(t,["padding","border"],n)),_(t,e,r)}}})),e.exports=r({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return 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:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=c},function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(30)),o=a(n(15)),c=a(n(108)),i=n(204);n(205);function a(e){return e&&e.__esModule?e:{default:e}}t.UNMOUNTED="unmounted";t.EXITED="exited";t.ENTERING="entering";t.ENTERED="entered";t.EXITING="exiting";var l=function(e){var t,n;function r(t,n){var r;r=e.call(this,t,n)||this;var o,c=n.transitionGroup,i=c&&!c.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o="exited",r.appearStatus="entering"):o="entered":o=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:o},r.nextCallback=null,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getChildContext=function(){return{transitionGroup:null}},r.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null},i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},i.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=c.default.findDOMNode(this);"entering"===t?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},i.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,c=this.getTimeouts(),i=o?c.appear:c.enter;t||r?(this.props.onEnter(e,o),this.safeSetState({status:"entering"},(function(){n.props.onEntering(e,o),n.onTransitionEnd(e,i,(function(){n.safeSetState({status:"entered"},(function(){n.props.onEntered(e,o)}))}))}))):this.safeSetState({status:"entered"},(function(){n.props.onEntered(e)}))},i.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:"exiting"},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))},i.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},i.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},i.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=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}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var c=o.default.Children.only(n);return o.default.cloneElement(c,r)},r}(o.default.Component);function s(){}l.contextTypes={transitionGroup:r.object},l.childContextTypes={transitionGroup:function(){}},l.propTypes={},l.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:s,onEntering:s,onEntered:s,onExit:s,onExiting:s,onExited:s},l.UNMOUNTED=0,l.EXITED=1,l.ENTERING=2,l.ENTERED=3,l.EXITING=4;var u=(0,i.polyfill)(l);t.default=u},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function c(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==a){var l=e.displayName||e.name,s="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+s+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=c;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return i})),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,c.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;var r;(r=n(30))&&r.__esModule;t.timeoutsShape=null;t.classNamesShape=null},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=a(n(30)),o=a(n(15)),c=n(204),i=n(289);function a(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=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)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var u=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},d=function(e){var t,n;function r(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(s(s(r)));return r.state={handleExited:o,firstRender:!0},r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var c=r.prototype;return c.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},c.componentDidMount=function(){this.appeared=!0,this.mounted=!0},c.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,i.getInitialChildMapping)(e,r):(0,i.getNextChildMapping)(e,n,r),firstRender:!1}},c.handleExited=function(e,t){var n=(0,i.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=l({},t.children);return delete n[e.key],{children:n}})))},c.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=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}(e,["component","childFactory"]),c=u(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?c:o.default.createElement(t,r,c)},r}(o.default.Component);d.childContextTypes={transitionGroup:r.default.object.isRequired},d.propTypes={},d.defaultProps={component:"div",childFactory:function(e){return e}};var b=(0,c.polyfill)(d);t.default=b,e.exports=t.default},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:"M16 4h2v9H7v3l-5-4 5-4v3h9V4z"}));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=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:"M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6zM13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z"}));t.a=c},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.dispatch;return function(e){return function(n){return Array.isArray(n)?n.filter(Boolean).map(t):e(n)}}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l}));var r=n(12),o=n(0),c=n(171),i=n(2),a=(n(92),n(132));function l(e){var t=e.children,n=e.className;return Object(o.createElement)(a.a.Slot,{__experimentalIsExpanded:!0},(function(e){return Object(o.createElement)(s,{className:n,fills:e},t)}))}function s(t){var n=t.fills,a=t.className,l=void 0===a?"":a,s=t.children,u=Object(o.useRef)(),d=Object(o.useRef)(),b=Object(o.useRef)(),f=Object(o.useState)({}),p=Object(r.a)(f,2),m=p[0],v=p[1],O=Object(o.useRef)();O.current=n;var g=Object(o.useCallback)(Object(i.throttle)((function(){var e=O.current.length?d.current:b.current;if(e){e.style.position="absolute",e.style.width="auto";var t=window.getComputedStyle(e,null);v({width:t.getPropertyValue("width"),height:t.getPropertyValue("height")}),e.style.position="",e.style.width=""}}),100),[]);Object(o.useEffect)((function(){var e=new window.MutationObserver((function(e){e.find((function(e){return"childList"===e.type}))&&g()}));return e.observe(u.current,{childList:!0,subtree:!0}),function(){return e.disconnect()}}),[]),Object(o.useEffect)((function(){n.length>1&&void 0!==e&&e.env}),[n.length]);var h=n[0];return Object(o.createElement)("div",{className:"block-editor-block-toolbar-animated-width-container",ref:u,style:m},Object(o.createElement)(c.TransitionGroup,null,h?Object(o.createElement)(c.CSSTransition,{key:"fills",timeout:300,classNames:"block-editor-block-toolbar-content"},Object(o.createElement)("div",{className:l,ref:d},h)):Object(o.createElement)(c.CSSTransition,{key:"default",timeout:300,classNames:"block-editor-block-toolbar-content"},Object(o.createElement)("div",{className:l,ref:b},s))))}}).call(this,n(103))},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(294))&&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=u(o),c=u(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":o=s(o),c=s(c);break;case"grid":case"color":case"color-index":case"monochrome":o=parseInt(o,10)||1,c=parseInt(c,10)||0}switch(r){case"min":return c>=o;case"max":return c<=o;default:return c===o}}));return o&&!n||!o&&n}))},t.parse=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 s(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function u(e){var t=parseFloat(e);switch(String(e).match(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(),s(m.keys,(function(t,o){r.push(t),f.pre&&f.pre.call(m,m.node[t],t);var c=e(m.node[t]);n&&u.call(m.node,t)&&(m.node[t]=c.node),c.isLast=o==m.keys.length-1,c.isFirst=0==o,f.post&&f.post.call(m,c),r.pop()})),o.pop()),f.after&&f.after.call(m,m.node),m):m}(e).node}function c(e){if("object"==typeof e&&null!==e){var t;if(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 s(i(e),(function(n){t[n]=e[n]})),t}return e}r.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r)){t=void 0;break}t=t[r]}return t},r.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r))return!1;t=t[r]}return!0},r.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];u.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},r.prototype.map=function(e){return o(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(r=e.call(this,r,t))})),r},r.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},r.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var a=c(r);return e.push(r),t.push(a),s(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)},s=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};s(i(r.prototype),(function(e){n[e]=function(t){var n=[].slice.call(arguments,1),o=new r(t);return o[e].apply(o,n)}}));var u=Object.hasOwnProperty||function(e,t){return t in e}},,,,,,,,,,,,,,,,,,,,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";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";t.__esModule=!0,t.default=void 0;!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(30));var r=a(n(284)),o=a(n(287)),c=a(n(15)),i=a(n(203));n(205);function a(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=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)}var s=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,r.default)(e,t)}))},u=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,o.default)(e,t)}))},d=function(e){var t,n;function r(){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).onEnter=function(e,n){var r=t.getClassNames(n?"appear":"enter").className;t.removeClasses(e,"exit"),s(e,r),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.getClassNames(n?"appear":"enter").activeClassName;t.reflowAndAddClass(e,r),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.getClassNames("appear").doneClassName,o=t.getClassNames("enter").doneClassName,c=n?r+" "+o:o;t.removeClasses(e,n?"appear":"enter"),s(e,c),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.getClassNames("exit").className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),s(e,n),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.getClassNames("exit").activeClassName;t.reflowAndAddClass(e,n),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.getClassNames("exit").doneClassName;t.removeClasses(e,"exit"),s(e,n),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?(r&&n?n+"-":"")+e:n[e];return{className:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.removeClasses=function(e,t){var n=this.getClassNames(t),r=n.className,o=n.activeClassName,c=n.doneClassName;r&&u(e,r),o&&u(e,o),c&&u(e,c)},o.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,s(e,t))},o.render=function(){var e=l({},this.props);return delete e.classNames,c.default.createElement(i.default,l({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(c.default.Component);d.defaultProps={classNames:""},d.propTypes={};var b=d;t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(285);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,o.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var o=r(n(286));e.exports=t.default},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=r(e.className,t):e.setAttribute("class",r(e.className&&e.className.baseVal||"",t))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;i(n(30));var r=i(n(15)),o=n(108),c=i(n(206));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(e){var t,n;function i(){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).handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=i.prototype;return a.handleLifecycle=function(e,t,n){var c,i=this.props.children,a=r.default.Children.toArray(i)[t];a.props[e]&&(c=a.props)[e].apply(c,n),this.props[e]&&this.props[e]((0,o.findDOMNode)(this))},a.render=function(){var e=this.props,t=e.children,n=e.in,o=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}(e,["children","in"]),i=r.default.Children.toArray(t),a=i[0],l=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(c.default,o,n?r.default.cloneElement(a,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(l,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);a.propTypes={};var l=a;t.default=l,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=c,t.getInitialChildMapping=function(e,t){return o(e.children,(function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})}))},t.getNextChildMapping=function(e,t,n){var a=o(e.children),l=c(t,a);return Object.keys(l).forEach((function(o){var c=l[o];if((0,r.isValidElement)(c)){var s=o in t,u=o in a,d=t[o],b=(0,r.isValidElement)(d)&&!d.props.in;!u||s&&!b?u||!s||b?u&&s&&(0,r.isValidElement)(d)&&(l[o]=(0,r.cloneElement)(c,{onExited:n.bind(null,c),in:d.props.in,exit:i(c,"exit",e),enter:i(c,"enter",e)})):l[o]=(0,r.cloneElement)(c,{in:!1}):l[o]=(0,r.cloneElement)(c,{onExited:n.bind(null,c),in:!0,exit:i(c,"exit",e),enter:i(c,"enter",e)})}})),l};var r=n(15);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)})),n}function c(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),c=[];for(var i in e)i in t?c.length&&(o[i]=c,c=[]):c.push(i);var a={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var s=o[l][r];a[o[l][r]]=n(s)}a[l]=n(l)}for(r=0;r<c.length;r++)a[c[r]]=n(c[r]);return a}function i(e,t,n){return null!=n[t]?n[t]:e.props[t]}},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:"M12 8l-6 5.4 1 1.2 5-4.6 5 4.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,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"}));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 s=t[c];if(s.removed){if(s.value=e.join(r.slice(l,l+s.count)),l+=s.count,c&&t[c-1].added){var u=t[c-1];t[c-1]=t[c],t[c]=u}}else{if(!s.added&&o){var d=n.slice(a,a+s.count);d=d.map((function(e,t){var n=r[l+t];return n.length>e.length?n:e})),s.value=e.join(d)}else s.value=e.join(n.slice(a,a+s.count));a+=s.count,s.added||(l+=s.count)}}var b=t[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,s=e.length,u=1,d=l+s,b=[{newPos:-1,components:[]}],f=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=l&&f+1>=s)return a([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*u;n<=u;n+=2){var 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<s;if(m||v){if(!m||v&&d.newPos<f.newPos?(r=c(f),i.pushComponent(r.components,void 0,!0)):((r=d).newPos++,i.pushComponent(r.components,!0,void 0)),p=i.extractCommon(r,t,e,n),r.newPos+1>=l&&p+1>=s)return a(o(i,r.components,t,e,i.useLongestToken));b[n]=r}else b[n]=void 0}u++}if(r)!function e(){setTimeout((function(){if(u>d)return r();p()||e()}),0)}();else for(;u<=d;){var m=p();if(m)return m}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,c=n.length,i=e.newPos,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:"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";n.r(t),n.d(t,"__experimentalAlignmentHookSettingsProvider",(function(){return F})),n.d(t,"getColorClassName",(function(){return ae})),n.d(t,"getColorObjectByAttributeValues",(function(){return ce})),n.d(t,"getColorObjectByColorValue",(function(){return ie})),n.d(t,"createCustomColorsHOC",(function(){return Yt})),n.d(t,"withColors",(function(){return Xt})),n.d(t,"__experimentalUseColors",(function(){return pn})),n.d(t,"__experimentalGetGradientClass",(function(){return le})),n.d(t,"getGradientValueBySlug",(function(){return se})),n.d(t,"__experimentalGetGradientObjectByGradientValue",(function(){return ue})),n.d(t,"getGradientSlugByValue",(function(){return de})),n.d(t,"__experimentalUseGradient",(function(){return be})),n.d(t,"getFontSize",(function(){return lt})),n.d(t,"getFontSizeClass",(function(){return ut})),n.d(t,"getFontSizeObjectByValue",(function(){return st})),n.d(t,"FontSizePicker",(function(){return dt})),n.d(t,"withFontSizes",(function(){return hn})),n.d(t,"AlignmentToolbar",(function(){return wn})),n.d(t,"Autocomplete",(function(){return Hn})),n.d(t,"BlockAlignmentToolbar",(function(){return T})),n.d(t,"__experimentalBlockAlignmentMatrixToolbar",(function(){return zn})),n.d(t,"BlockBreadcrumb",(function(){return Gn})),n.d(t,"BlockContextProvider",(function(){return qn})),n.d(t,"BlockControls",(function(){return g.a})),n.d(t,"BlockColorsStyleSelector",(function(){return Qn})),n.d(t,"BlockEdit",(function(){return nr})),n.d(t,"useBlockEditContext",(function(){return z.b})),n.d(t,"BlockFormatControls",(function(){return ar})),n.d(t,"BlockIcon",(function(){return An})),n.d(t,"BlockNavigationDropdown",(function(){return ku})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return bu})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return Du})),n.d(t,"__experimentalBlockNavigationTree",(function(){return Ou})),n.d(t,"__experimentalBlockVariationPicker",(function(){return Au})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return Gu})),n.d(t,"ButtonBlockerAppender",(function(){return Na})),n.d(t,"ColorPalette",(function(){return Wu})),n.d(t,"ColorPaletteControl",(function(){return qu})),n.d(t,"ContrastChecker",(function(){return Re})),n.d(t,"__experimentalGradientPicker",(function(){return Yu})),n.d(t,"__experimentalGradientPickerControl",(function(){return Xu})),n.d(t,"__experimentalGradientPickerPanel",(function(){return Qu})),n.d(t,"__experimentalColorGradientControl",(function(){return ye})),n.d(t,"__experimentalPanelColorGradientSettings",(function(){return Pe})),n.d(t,"__experimentalImageSizeControl",(function(){return Ju})),n.d(t,"InnerBlocks",(function(){return ud})),n.d(t,"InspectorAdvancedControls",(function(){return q})),n.d(t,"InspectorControls",(function(){return Ve})),n.d(t,"__experimentalLinkControl",(function(){return Hd})),n.d(t,"__experimentalLineHeightControl",(function(){return tt})),n.d(t,"MediaReplaceFlow",(function(){return Wd})),n.d(t,"MediaPlaceholder",(function(){return Zd})),n.d(t,"MediaUpload",(function(){return Gd})),n.d(t,"MediaUploadCheck",(function(){return Kd})),n.d(t,"PanelColorSettings",(function(){return en})),n.d(t,"PlainText",(function(){return tb})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return rb})),n.d(t,"RichText",(function(){return Ru})),n.d(t,"RichTextShortcut",(function(){return ob})),n.d(t,"RichTextToolbarButton",(function(){return cb})),n.d(t,"__unstableRichTextInputEvent",(function(){return ab})),n.d(t,"ToolSelector",(function(){return ub})),n.d(t,"__experimentalUnitControl",(function(){return yt})),n.d(t,"URLInput",(function(){return jd})),n.d(t,"URLInputButton",(function(){return pb})),n.d(t,"URLPopover",(function(){return Xd})),n.d(t,"__experimentalImageURLInputUI",(function(){return gb})),n.d(t,"withColorContext",(function(){return Ku})),n.d(t,"__experimentalBlockSettingsMenuFirstItem",(function(){return js})),n.d(t,"__experimentalInserterMenuExtension",(function(){return tl})),n.d(t,"__experimentalPreviewOptions",(function(){return jb})),n.d(t,"__experimentalUseResizeCanvas",(function(){return Sb})),n.d(t,"BlockInspector",(function(){return Nb})),n.d(t,"BlockList",(function(){return Fa})),n.d(t,"__experimentalBlock",(function(){return eu})),n.d(t,"BlockMover",(function(){return Yl})),n.d(t,"BlockPreview",(function(){return za})),n.d(t,"BlockSelectionClearer",(function(){return Mb})),n.d(t,"BlockSettingsMenu",(function(){return xs})),n.d(t,"BlockSettingsMenuControls",(function(){return ws})),n.d(t,"BlockTitle",(function(){return Un})),n.d(t,"BlockToolbar",(function(){return Ls})),n.d(t,"CopyHandler",(function(){return fs})),n.d(t,"DefaultBlockAppender",(function(){return Ta})),n.d(t,"__unstableEditorStyles",(function(){return lf})),n.d(t,"Inserter",(function(){return Pl})),n.d(t,"__experimentalLibrary",(function(){return sf})),n.d(t,"__experimentalSearchForm",(function(){return ro})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return df})),n.d(t,"MultiSelectScrollIntoView",(function(){return bf})),n.d(t,"NavigableToolbar",(function(){return Wl})),n.d(t,"ObserveTyping",(function(){return pf})),n.d(t,"PreserveScrollInReorder",(function(){return mf})),n.d(t,"SkipToSelectedBlock",(function(){return Ib})),n.d(t,"Typewriter",(function(){return jf})),n.d(t,"Warning",(function(){return Nr})),n.d(t,"WritingFlow",(function(){return Fl})),n.d(t,"BlockEditorProvider",(function(){return Ba})),n.d(t,"useSimulatedMediaQuery",(function(){return wb})),n.d(t,"__experimentalUseEditorFeature",(function(){return kf})),n.d(t,"transformStyles",(function(){return af})),n.d(t,"storeConfig",(function(){return Sa})),n.d(t,"SETTINGS_DEFAULTS",(function(){return io}));var r={};n.r(r),n.d(r,"resetBlocks",(function(){return Yo})),n.d(r,"resetSelection",(function(){return Xo})),n.d(r,"receiveBlocks",(function(){return Qo})),n.d(r,"updateBlockAttributes",(function(){return Zo})),n.d(r,"updateBlock",(function(){return Jo})),n.d(r,"selectBlock",(function(){return ec})),n.d(r,"selectPreviousBlock",(function(){return tc})),n.d(r,"selectNextBlock",(function(){return nc})),n.d(r,"startMultiSelect",(function(){return rc})),n.d(r,"stopMultiSelect",(function(){return oc})),n.d(r,"multiSelect",(function(){return cc})),n.d(r,"clearSelectedBlock",(function(){return ic})),n.d(r,"toggleSelection",(function(){return ac})),n.d(r,"replaceBlocks",(function(){return sc})),n.d(r,"replaceBlock",(function(){return uc})),n.d(r,"moveBlocksDown",(function(){return bc})),n.d(r,"moveBlocksUp",(function(){return fc})),n.d(r,"moveBlocksToPosition",(function(){return pc})),n.d(r,"moveBlockToPosition",(function(){return mc})),n.d(r,"insertBlock",(function(){return vc})),n.d(r,"insertBlocks",(function(){return Oc})),n.d(r,"showInsertionPoint",(function(){return gc})),n.d(r,"hideInsertionPoint",(function(){return hc})),n.d(r,"setTemplateValidity",(function(){return jc})),n.d(r,"synchronizeTemplate",(function(){return kc})),n.d(r,"mergeBlocks",(function(){return yc})),n.d(r,"removeBlocks",(function(){return _c})),n.d(r,"removeBlock",(function(){return Ec})),n.d(r,"replaceInnerBlocks",(function(){return Cc})),n.d(r,"toggleBlockMode",(function(){return wc})),n.d(r,"startTyping",(function(){return Sc})),n.d(r,"stopTyping",(function(){return Ic})),n.d(r,"startDraggingBlocks",(function(){return xc})),n.d(r,"stopDraggingBlocks",(function(){return Bc})),n.d(r,"enterFormattedText",(function(){return Pc})),n.d(r,"exitFormattedText",(function(){return Tc})),n.d(r,"selectionChange",(function(){return Nc})),n.d(r,"insertDefaultBlock",(function(){return Rc})),n.d(r,"updateBlockListSettings",(function(){return Dc})),n.d(r,"updateSettings",(function(){return Mc})),n.d(r,"__unstableSaveReusableBlock",(function(){return Ac})),n.d(r,"__unstableMarkLastChangeAsPersistent",(function(){return Lc})),n.d(r,"__unstableMarkNextChangeAsNotPersistent",(function(){return Fc})),n.d(r,"__unstableMarkAutomaticChange",(function(){return Vc})),n.d(r,"setNavigationMode",(function(){return Hc})),n.d(r,"setBlockMovingClientId",(function(){return zc})),n.d(r,"duplicateBlocks",(function(){return Uc})),n.d(r,"insertBeforeBlock",(function(){return Gc})),n.d(r,"insertAfterBlock",(function(){return Kc})),n.d(r,"toggleBlockHighlight",(function(){return Wc})),n.d(r,"flashBlock",(function(){return qc})),n.d(r,"setHasControlledInnerBlocks",(function(){return $c}));var o={};n.r(o),n.d(o,"getBlockName",(function(){return ei})),n.d(o,"isBlockValid",(function(){return ti})),n.d(o,"getBlockAttributes",(function(){return ni})),n.d(o,"getBlock",(function(){return ri})),n.d(o,"__unstableGetBlockWithoutInnerBlocks",(function(){return oi})),n.d(o,"getBlocks",(function(){return ci})),n.d(o,"getClientIdsOfDescendants",(function(){return ii})),n.d(o,"getClientIdsWithDescendants",(function(){return ai})),n.d(o,"getGlobalBlockCount",(function(){return li})),n.d(o,"getBlocksByClientId",(function(){return si})),n.d(o,"getBlockCount",(function(){return ui})),n.d(o,"getSelectionStart",(function(){return di})),n.d(o,"getSelectionEnd",(function(){return bi})),n.d(o,"getBlockSelectionStart",(function(){return fi})),n.d(o,"getBlockSelectionEnd",(function(){return pi})),n.d(o,"getSelectedBlockCount",(function(){return mi})),n.d(o,"hasSelectedBlock",(function(){return vi})),n.d(o,"getSelectedBlockClientId",(function(){return Oi})),n.d(o,"getSelectedBlock",(function(){return gi})),n.d(o,"getBlockRootClientId",(function(){return hi})),n.d(o,"getBlockParents",(function(){return ji})),n.d(o,"getBlockParentsByBlockName",(function(){return ki})),n.d(o,"getBlockHierarchyRootClientId",(function(){return yi})),n.d(o,"getLowestCommonAncestorWithSelectedBlock",(function(){return _i})),n.d(o,"getAdjacentBlockClientId",(function(){return Ei})),n.d(o,"getPreviousBlockClientId",(function(){return Ci})),n.d(o,"getNextBlockClientId",(function(){return wi})),n.d(o,"getSelectedBlocksInitialCaretPosition",(function(){return Si})),n.d(o,"getSelectedBlockClientIds",(function(){return Ii})),n.d(o,"getMultiSelectedBlockClientIds",(function(){return xi})),n.d(o,"getMultiSelectedBlocks",(function(){return Bi})),n.d(o,"getFirstMultiSelectedBlockClientId",(function(){return Pi})),n.d(o,"getLastMultiSelectedBlockClientId",(function(){return Ti})),n.d(o,"isFirstMultiSelectedBlock",(function(){return Ni})),n.d(o,"isBlockMultiSelected",(function(){return Ri})),n.d(o,"isAncestorMultiSelected",(function(){return Di})),n.d(o,"getMultiSelectedBlocksStartClientId",(function(){return Mi})),n.d(o,"getMultiSelectedBlocksEndClientId",(function(){return Ai})),n.d(o,"getBlockOrder",(function(){return Li})),n.d(o,"getBlockIndex",(function(){return Fi})),n.d(o,"isBlockSelected",(function(){return Vi})),n.d(o,"hasSelectedInnerBlock",(function(){return Hi})),n.d(o,"isBlockWithinSelection",(function(){return zi})),n.d(o,"hasMultiSelection",(function(){return Ui})),n.d(o,"isMultiSelecting",(function(){return Gi})),n.d(o,"isSelectionEnabled",(function(){return Ki})),n.d(o,"getBlockMode",(function(){return Wi})),n.d(o,"isTyping",(function(){return qi})),n.d(o,"isDraggingBlocks",(function(){return $i})),n.d(o,"isCaretWithinFormattedText",(function(){return Yi})),n.d(o,"getBlockInsertionPoint",(function(){return Xi})),n.d(o,"isBlockInsertionPointVisible",(function(){return Qi})),n.d(o,"isValidTemplate",(function(){return Zi})),n.d(o,"getTemplate",(function(){return Ji})),n.d(o,"getTemplateLock",(function(){return ea})),n.d(o,"canInsertBlockType",(function(){return na})),n.d(o,"canInsertBlocks",(function(){return ra})),n.d(o,"getInserterItems",(function(){return ia})),n.d(o,"hasInserterItems",(function(){return aa})),n.d(o,"__experimentalGetAllowedBlocks",(function(){return la})),n.d(o,"getBlockListSettings",(function(){return sa})),n.d(o,"getSettings",(function(){return ua})),n.d(o,"isLastBlockChangePersistent",(function(){return da})),n.d(o,"__experimentalGetBlockListSettingsForBlocks",(function(){return ba})),n.d(o,"__experimentalGetParsedReusableBlock",(function(){return fa})),n.d(o,"__unstableIsLastBlockChangeIgnored",(function(){return pa})),n.d(o,"__experimentalGetLastBlockAttributeChanges",(function(){return ma})),n.d(o,"isNavigationMode",(function(){return Oa})),n.d(o,"hasBlockMovingClientId",(function(){return ga})),n.d(o,"didAutomaticChange",(function(){return ha})),n.d(o,"isBlockHighlighted",(function(){return ja})),n.d(o,"areInnerBlocksControlled",(function(){return ka}));var c=n(11),i=n(26),a=n(91),l=n(48),s=(n(80),n(8)),u=n(5),d=n(0),b=n(10),f=n.n(b),p=n(2),m=n(9),v=n(32),O=n(4),g=n(132),h=n(1),j=n(3),k=n(7),y=Object(d.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(k.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),_=Object(d.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(k.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),E=Object(d.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(k.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),C=Object(d.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(k.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),w=Object(d.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(k.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));function S(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 I={left:{icon:y,title:Object(h.__)("Align left")},center:{icon:_,title:Object(h.__)("Align center")},right:{icon:E,title:Object(h.__)("Align right")},wide:{icon:C,title:Object(h.__)("Wide width")},full:{icon:w,title:Object(h.__)("Full width")}},x=["left","center","right","wide","full"],B=["wide","full"],P={isAlternate:!0};var T=Object(m.compose)(Object(O.withSelect)((function(e){return{wideControlsEnabled:(0,e("core/block-editor").getSettings)().alignWide}})))((function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?x:r,c=e.isCollapsed,i=void 0===c||c,a=e.wideControlsEnabled,l=void 0!==a&&a?o:o.filter((function(e){return-1===B.indexOf(e)})),s=I[t],b=I.center;return Object(d.createElement)(j.ToolbarGroup,{popoverProps:P,isCollapsed:i,icon:s?s.icon:b.icon,label:Object(h.__)("Change alignment"),controls:l.map((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},I[e],{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})}));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 R(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(u.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}var D=["left","center","right","wide","full"],M=["wide","full"];function A(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)?e:!0===e?D:[],!r||!0===e&&!n?p.without.apply(void 0,[t].concat(M)):t}var L=Object(d.createContext)({}),F=L.Provider,V=Object(m.createHigherOrderComponent)((function(e){return function(t){var n=Object(d.useContext)(L).isEmbedButton,r=t.name,o=n?[]:A(Object(c.getBlockSupport)(r,"align"),Object(c.hasBlockSupport)(r,"alignWide",!0));return[o.length>0&&t.isSelected&&Object(d.createElement)(g.a,{key:"align-controls"},Object(d.createElement)(T,{value:t.attributes.align,onChange:function(e){if(!e){var n=Object(c.getBlockType)(t.name);Object(p.get)(n,["attributes","align","default"])&&(e="")}t.setAttributes({align:e})},controls:o})),Object(d.createElement)(e,Object(s.a)({key:"edit"},t))]}}),"withToolbarControls"),H=Object(m.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=t.attributes.align,o=Object(O.useSelect)((function(e){return!!e("core/block-editor").getSettings().alignWide}),[]);if(void 0===r)return Object(d.createElement)(e,t);var i=A(Object(c.getBlockSupport)(n,"align"),Object(c.hasBlockSupport)(n,"alignWide",!0),o),a=t.wrapperProps;return i.includes(r)&&(a=R({},a,{"data-align":r})),Object(d.createElement)(e,Object(s.a)({},t,{wrapperProps:a}))}}));Object(v.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(p.has)(e.attributes,["align","type"])||Object(c.hasBlockSupport)(e,"align")&&(e.attributes=R({},e.attributes,{align:{type:"string"}})),e})),Object(v.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",H),Object(v.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",V),Object(v.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){var r=n.align;return A(Object(c.getBlockSupport)(t,"align"),Object(c.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=f()("align".concat(r),e.className)),e}));var z=n(85),U=Object(j.createSlotFill)("InspectorAdvancedControls"),G=U.Fill,K=U.Slot;function W(e){var t=e.children;return Object(z.b)().isSelected?Object(d.createElement)(G,null,t):null}W.slotName="InspectorAdvancedControls",W.Slot=K;var q=W;function $(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 Y=/[\s#]/g;var X=Object(m.createHigherOrderComponent)((function(e){return function(t){return Object(c.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object(d.createElement)(d.Fragment,null,Object(d.createElement)(e,t),Object(d.createElement)(q,null,Object(d.createElement)(j.TextControl,{className:"html-anchor-control",label:Object(h.__)("HTML anchor"),help:Object(d.createElement)(d.Fragment,null,Object(h.__)("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(d.createElement)(j.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(h.__)("Learn more about anchors"))),value:t.attributes.anchor||"",onChange:function(e){e=e.replace(Y,"-"),t.setAttributes({anchor:e})},autoComplete:"off"}))):Object(d.createElement)(e,t)}}),"withInspectorControl");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}Object(v.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return Object(p.has)(e.attributes,["anchor","type"])||Object(c.hasBlockSupport)(e,"anchor")&&(e.attributes=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.attributes,{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e})),Object(v.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",X),Object(v.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return Object(c.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));var Z=Object(m.createHigherOrderComponent)((function(e){return function(t){return Object(c.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(d.createElement)(d.Fragment,null,Object(d.createElement)(e,t),Object(d.createElement)(q,null,Object(d.createElement)(j.TextControl,{autoComplete:"off",label:Object(h.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})},help:Object(h.__)("Separate multiple classes with spaces.")}))):Object(d.createElement)(e,t)}}),"withInspectorControl");function J(e){e="<div data-custom-class-name>".concat(e,"</div>");var t=Object(c.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(v.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Object(c.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=function(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}({},e.attributes,{className:{type:"string"}})),e})),Object(v.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Z),Object(v.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Object(c.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=f()(e.className,n.className)),e})),Object(v.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",(function(e,t,n){if(Object(c.hasBlockSupport)(t,"customClassName",!0)){var r=Object(p.omit)(e,["className"]),o=Object(c.getSaveContent)(t,r),i=J(o),a=J(n),l=Object(p.difference)(a,i);l.length?e.className=l.join(" "):o&&delete e.className}return e}));var ee=n(17);Object(v.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Object(c.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(p.uniq)([Object(c.getBlockDefaultClassName)(t.name)].concat(Object(ee.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(c.getBlockDefaultClassName)(t.name)),e}));var te=n(12),ne=n(148),re=n(69),oe=n.n(re),ce=function(e,t,n){if(t){var r=Object(p.find)(e,{slug:t});if(r)return r}return{color:n}},ie=function(e,t){return Object(p.find)(e,{color:t})};function ae(e,t){if(e&&t)return"has-".concat(Object(p.kebabCase)(t),"-").concat(e)}function le(e){if(e)return"has-".concat(e,"-gradient-background")}function se(e,t){var n=Object(p.find)(e,["slug",t]);return n&&n.gradient}function ue(e,t){return Object(p.find)(e,["gradient",t])}function de(e,t){var n=ue(e,t);return n&&n.slug}function be(){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=Object(z.b)(),i=c.clientId,a=Object(O.useSelect)((function(e){var t=e("core/block-editor"),r=t.getBlockAttributes,c=t.getSettings,a=r(i);return{gradient:a[n],customGradient:a[o],gradients:c().gradients}}),[i,n,o]),l=a.gradients,s=a.gradient,b=a.customGradient,f=Object(O.useDispatch)("core/block-editor"),p=f.updateBlockAttributes,m=Object(d.useCallback)((function(e){var t,r,c=de(l,e);c?p(i,(r={},Object(u.a)(r,n,c),Object(u.a)(r,o,void 0),r)):p(i,(t={},Object(u.a)(t,n,void 0),Object(u.a)(t,o,e),t))}),[l,i,p]),v=le(s);return{gradientClass:v,gradientValue:s?se(l,s):b,setGradient:m}}var fe=function e(t){if(!Object(p.isObject)(t))return t;var n=Object(p.pickBy)(Object(p.mapValues)(t,e),p.identity);return Object(p.isEqual)(n,{})?void 0:n},pe=n(14);function me(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}
|
2 |
+
// translators: first %s: the color name or value (e.g. red or #ff0000)
|
3 |
+
var ve=Object(h.__)("(Color: %s)"),Oe=Object(h.__)("(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 he(e){var t,n,r=e.colors,o=e.gradients,c=e.label,i=e.currentTab,a=e.colorValue,l=e.gradientValue;if("color"===i){if(a){var s=ie(r,t=a),u=s&&s.name;n=Object(h.sprintf)(ve,u||t)}}else if("gradient"===i&&l){var b=ue(o,t=l),f=b&&b.name;n=Object(h.sprintf)(Oe,f||t)}return Object(d.createElement)(d.Fragment,null,c,!!t&&Object(d.createElement)(j.ColorIndicator,{colorValue:t,"aria-label":n}))}function je(e){var t=e.colors,n=e.gradients,r=e.disableCustomColors,o=e.disableCustomGradients,c=e.className,i=e.label,a=e.onColorChange,l=e.onGradientChange,u=e.colorValue,b=e.gradientValue,m=a&&(!Object(p.isEmpty)(t)||!r),v=l&&(!Object(p.isEmpty)(n)||!o),O=Object(d.useState)(b?"gradient":!!m&&"color"),g=Object(te.a)(O,2),k=g[0],y=g[1];return m||v?Object(d.createElement)(j.BaseControl,{className:f()("block-editor-color-gradient-control",c)},Object(d.createElement)("fieldset",null,Object(d.createElement)("legend",null,Object(d.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},Object(d.createElement)(j.BaseControl.VisualLabel,null,Object(d.createElement)(he,{currentTab:k,label:i,colorValue:u,gradientValue:b})))),m&&v&&Object(d.createElement)(j.ButtonGroup,{className:"block-editor-color-gradient-control__button-tabs"},Object(d.createElement)(j.Button,{isSmall:!0,isPressed:"color"===k,onClick:function(){return y("color")}},Object(h.__)("Solid")),Object(d.createElement)(j.Button,{isSmall:!0,isPressed:"gradient"===k,onClick:function(){return y("gradient")}},Object(h.__)("Gradient"))),("color"===k||!v)&&Object(d.createElement)(j.ColorPalette,Object(s.a)({value:u,onChange:v?function(e){a(e),l()}:a},{colors:t,disableCustomColors:r})),("gradient"===k||!m)&&Object(d.createElement)(j.__experimentalGradientPicker,Object(s.a)({value:b,onChange:m?function(e){l(e),a()}:l},{gradients:n,disableCustomGradients:o})))):null}function ke(e){var t=Object(O.useSelect)((function(e){var t=e("core/block-editor").getSettings();return Object(p.pick)(t,ge)}));return Object(d.createElement)(je,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?me(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{},e))}var ye=function(e){return Object(p.every)(ge,(function(t){return e.hasOwnProperty(t)}))?Object(d.createElement)(je,e):Object(d.createElement)(ke,e)};function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(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 Ce=Object(h.__)("(%s: color %s)"),we=Object(h.__)("(%s: gradient %s)"),Se=["colors","disableCustomColors","gradients","disableCustomGradients"],Ie=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,l=e.colors,s=e.gradients;if(!c&&!i)return null;if(c){var u=ie(l||t,c);o=Object(h.sprintf)(Ce,a.toLowerCase(),u&&u.name||c)}else{var b=ue(s||n,c);o=Object(h.sprintf)(we,a.toLowerCase(),b&&b.name||i)}return Object(d.createElement)(j.ColorIndicator,{key:r,colorValue:c||i,"aria-label":o})}))},xe=function(e){var t=e.className,n=e.colors,r=e.gradients,o=e.disableCustomColors,c=e.disableCustomGradients,i=e.children,a=e.settings,l=e.title,u=Object(pe.a)(e,["className","colors","gradients","disableCustomColors","disableCustomGradients","children","settings","title"]);if(Object(p.isEmpty)(n)&&Object(p.isEmpty)(r)&&o&&c&&Object(p.every)(a,(function(e){return Object(p.isEmpty)(e.colors)&&Object(p.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)})))return null;var b=Object(d.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},l,Object(d.createElement)(Ie,{colors:n,gradients:r,settings:a}));return Object(d.createElement)(j.PanelBody,Object(s.a)({className:f()("block-editor-panel-color-gradient-settings",t),title:b},u),a.map((function(e,t){return Object(d.createElement)(ye,Object(s.a)({key:t},Ee({colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:c},e)))})),i)},Be=function(e){var t=Object(O.useSelect)((function(e){var t=e("core/block-editor").getSettings();return Object(p.pick)(t,Se)}));return Object(d.createElement)(xe,Ee({},t,{},e))},Pe=function(e){return Object(p.every)(Se,(function(t){return e.hasOwnProperty(t)}))?Object(d.createElement)(xe,e):Object(d.createElement)(Be,e)},Te=n(59);// 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 Ne(e){var t=e.tinyBackgroundColor,n=e.tinyTextColor,r=e.backgroundColor,o=e.textColor,c=t.getBrightness()<n.getBrightness()?Object(h.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):Object(h.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return Object(d.useEffect)((function(){Object(Te.speak)(Object(h.__)("This color combination may be hard for people to read."))}),[r,o]),Object(d.createElement)("div",{className:"block-editor-contrast-checker"},Object(d.createElement)(j.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},c))}var Re=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=oe()(t||n),l=oe()(i||r);return 1!==a.getAlpha()||1!==l.getAlpha()||oe.a.isReadable(a,l,{level:"AA",size:c||!1!==c&&o>=24?"large":"small"})?null:Object(d.createElement)(Ne,{backgroundColor:t,textColor:i,tinyBackgroundColor:a,tinyTextColor:l})},De=n(167),Me=Object(j.createSlotFill)("InspectorControls"),Ae=Me.Fill,Le=Me.Slot;function Fe(e){var t=e.children;return Object(De.a)()?Object(d.createElement)(Ae,null,t):null}Fe.Slot=Le;var Ve=Fe;function He(e){return document.getElementById("block-"+e)}function ze(e,t){return t.closest(".block-editor-block-list__block")===e}function Ue(e){for(;e&&e.nodeType!==window.Node.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 Ge(e){var t=e.settings,n=e.clientId,r=e.enableContrastChecking,o=void 0===r||r,c=window,i=c.getComputedStyle,a=c.Node,l=Object(d.useState)(),s=Object(te.a)(l,2),u=s[0],b=s[1],f=Object(d.useState)(),p=Object(te.a)(f,2),m=p[0],v=p[1];return Object(d.useEffect)((function(){if(o){var e=He(n);if(e){v(i(e).color);for(var t=e,r=i(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===a.ELEMENT_NODE;)t=t.parentNode,r=i(t).backgroundColor;b(r)}}})),Object(d.createElement)(Ve,null,Object(d.createElement)(Pe,{title:Object(h.__)("Color settings"),initialOpen:!1,settings:t},o&&Object(d.createElement)(Re,{backgroundColor:u,textColor:m})))}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 We(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(u.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}var qe=function(e){return"web"===d.Platform.OS&&Object(c.hasBlockSupport)(e,"__experimentalColor")},$e=function(e){if("web"!==d.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"__experimentalColor");return Object(p.isObject)(t)&&!!t.linkColor},Ye=function(e){if("web"!==d.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"__experimentalColor");return Object(p.isObject)(t)&&!!t.gradients};function Xe(e,t,n){var r,o,c,i,a,l;if(!qe(t))return e;var s=Ye(t),d=n.backgroundColor,b=n.textColor,p=n.gradient,m=n.style,v=ae("background-color",d),O=le(p),g=ae("color",b),h=f()(e.className,g,O,(l={},Object(u.a)(l,v,!(s&&(null==m||null===(r=m.color)||void 0===r?void 0:r.gradient)||!v)),Object(u.a)(l,"has-text-color",b||(null==m||null===(o=m.color)||void 0===o?void 0:o.text)),Object(u.a)(l,"has-background",d||(null==m||null===(c=m.color)||void 0===c?void 0:c.background)||s&&(p||(null==m||null===(i=m.color)||void 0===i?void 0:i.gradient))),Object(u.a)(l,"has-link-color",null==m||null===(a=m.color)||void 0===a?void 0:a.link),l));return e.className=h||void 0,e}var Qe=function(e,t){var n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?ce(e,n[1]).color:t};function Ze(e){var t,n,r,o,c,i,a=e.name,l=e.attributes,s=Object(O.useSelect)((function(e){return e("core/block-editor").getSettings()}),[]),b=s.colors,f=s.gradients,p=s.__experimentalEnableLinkColor,m=Object(d.useRef)(l);if(Object(d.useEffect)((function(){m.current=l}),[l]),!qe(a))return null;var v,g=Ye(a),j=l.style,k=l.textColor,y=l.backgroundColor,_=l.gradient;if(g&&_)v=se(f,_);else if(g){var E;v=null==j||null===(E=j.color)||void 0===E?void 0:E.gradient}var C=function(t){return function(n){var r,o,c=ie(b,n),i=t+"Color",a=We({},m.current.style,{color:We({},null===(r=m.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color,Object(u.a)({},t,(null==c?void 0:c.slug)?void 0:n))}),l=(null==c?void 0:c.slug)?c.slug:void 0,s=Object(u.a)({style:fe(a)},i,l);e.setAttributes(s),m.current=We({},m.current,{},s)}};return Object(d.createElement)(Ge,{enableContrastChecking:"web"===d.Platform.OS&&!_&&!(null==j||null===(t=j.color)||void 0===t?void 0:t.gradient),clientId:e.clientId,settings:[{label:Object(h.__)("Text Color"),onColorChange:C("text"),colorValue:ce(b,k,null==j||null===(n=j.color)||void 0===n?void 0:n.text).color},{label:Object(h.__)("Background Color"),onColorChange:C("background"),colorValue:ce(b,y,null==j||null===(r=j.color)||void 0===r?void 0:r.background).color,gradientValue:v,onGradientChange:g?function(t){var n,r=de(f,t);if(r){var o,c,i,a=We({},null===(o=m.current)||void 0===o?void 0:o.style,{color:We({},null===(c=m.current)||void 0===c||null===(i=c.style)||void 0===i?void 0:i.color,{gradient:void 0})});n={style:fe(a),gradient:r}}else{var l,s,u,d=We({},null===(l=m.current)||void 0===l?void 0:l.style,{color:We({},null===(s=m.current)||void 0===s||null===(u=s.style)||void 0===u?void 0:u.color,{gradient:t})});n={style:fe(d),gradient:void 0}}e.setAttributes(n),m.current=We({},m.current,{},n)}:void 0}].concat(Object(ee.a)(p&&$e(a)?[{label:Object(h.__)("Link Color"),onColorChange:function(t){var n,r=ie(b,t);e.setAttributes({style:We({},e.attributes.style,{color:We({},null===(n=e.attributes.style)||void 0===n?void 0:n.color,{link:(null==r?void 0:r.slug)?"var:preset|color|".concat(r.slug):t})})})},colorValue:Qe(b,null==j||null===(o=j.color)||void 0===o?void 0:o.link),clearable:!!(null===(c=e.attributes.style)||void 0===c||null===(i=c.color)||void 0===i?void 0:i.link)}]:[]))})}var Je=Object(m.createHigherOrderComponent)((function(e){return function(t){var n,r,o,c=t.name,i=t.attributes,a=i.backgroundColor,l=i.textColor,u=Object(O.useSelect)((function(e){return e("core/block-editor").getSettings().colors}),[]);if(!qe(c))return Object(d.createElement)(e,t);var b={color:l?null===(n=ce(u,l))||void 0===n?void 0:n.color:void 0,backgroundColor:a?null===(r=ce(u,a))||void 0===r?void 0:r.color:void 0},f=t.wrapperProps;return f=We({},t.wrapperProps,{style:We({},b,{},null===(o=t.wrapperProps)||void 0===o?void 0:o.style)}),Object(d.createElement)(e,Object(s.a)({},t,{wrapperProps:f}))}}));Object(v.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return qe(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Ye(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),Object(v.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",Xe),Object(v.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!qe(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),Xe(r,e,n)},e})),Object(v.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",Je);var et=n(19);function tt(e){var t=e.value,n=e.onChange,r=function(e){return void 0!==e&&""!==e}(t),o=r?t:"";return Object(d.createElement)("div",{className:"block-editor-line-height-control"},Object(d.createElement)(j.TextControl,{autoComplete:"off",onKeyDown:function(e){e.keyCode!==et.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(h.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:o,min:0}))}function nt(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?nt(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ot(e){var t,n=e.attributes.style;if(ct(e))return null;return Object(d.createElement)(tt,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:function(t){var r=rt({},n,{typography:rt({},null==n?void 0:n.typography,{lineHeight:t})});e.setAttributes({style:fe(r)})}})}function ct(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(O.useSelect)((function(e){return!e("core/block-editor").getSettings().enableCustomLineHeight}));return!Object(c.hasBlockSupport)(t,"__experimentalLineHeight")||n}var it=n(154),at=n.n(it),lt=function(e,t,n){if(t){var r=Object(p.find)(e,{slug:t});if(r)return r}return{size:n}};function st(e,t){var n=Object(p.find)(e,{size:t});return n||{size:t}}function ut(e){if(e)return"has-".concat(Object(p.kebabCase)(e),"-font-size")}var dt=Object(O.withSelect)((function(e){var t=e("core/block-editor").getSettings();return{disableCustomFontSizes:t.disableCustomFontSizes,fontSizes:t.fontSizes}}))(j.FontSizePicker);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(u.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}function pt(e,t,n){if(!Object(c.hasBlockSupport)(t,"__experimentalFontSize"))return e;var r=new at.a(e.className);r.add(ut(n.fontSize));var o=r.value;return e.className=o||void 0,e}function mt(){return Object(O.useSelect)((function(e){return e("core/block-editor").getSettings().fontSizes}))}function vt(e){var t,n=e.attributes,r=n.fontSize,o=n.style,c=e.setAttributes,i=Ot(e),a=mt();if(i)return null;var l=lt(a,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize);return Object(d.createElement)(dt,{value:l.size,onChange:function(e){var t=st(a,e).slug;c({style:fe(ft({},o,{typography:ft({},null==o?void 0:o.typography,{fontSize:t?void 0:e})})),fontSize:t})}})}function Ot(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=mt(),r=n.length;return!Object(c.hasBlockSupport)(t,"__experimentalFontSize")||!r}var gt=Object(m.createHigherOrderComponent)((function(e){return function(t){var n,r=mt(),o=t.name,i=t.attributes,a=i.fontSize,l=i.style,s=t.wrapperProps,u=ft({},t);if(Object(c.hasBlockSupport)(o,"__experimentalFontSize")&&a&&!(null==l||null===(n=l.typography)||void 0===n?void 0:n.fontSize)){var b,f=lt(r,a,null==l||null===(b=l.typography)||void 0===b?void 0:b.fontSize).size;u.wrapperProps=ft({},s,{style:ft({fontSize:f},null==s?void 0:s.style)})}return Object(d.createElement)(e,u)}}),"withFontSizeInlineStyles");Object(v.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return Object(c.hasBlockSupport)(e,"__experimentalFontSize")?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),Object(v.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",pt),Object(v.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!Object(c.hasBlockSupport)(e,"__experimentalFontSize"))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),pt(r,e,n)},e})),Object(v.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",gt);var ht=["__experimentalLineHeight","__experimentalFontSize"];function jt(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[Ot(e),ct(e)];return t.filter(Boolean).length===t.length}(e),n=kt(e.name);return t||!n?null:Object(d.createElement)(Ve,null,Object(d.createElement)(j.PanelBody,{title:Object(h.__)("Typography")},Object(d.createElement)(vt,e),Object(d.createElement)(ot,e)))}var kt=function(e){return"web"===d.Platform.OS&&ht.some((function(t){return Object(c.hasBlockSupport)(e,t)}))};function yt(e){var t=e.units,n=Object(pe.a)(e,["units"]),r=_t(t);return Object(d.createElement)(j.__experimentalUnitControl,Object(s.a)({units:r},n))}function _t(e){var t=Object(O.useSelect)((function(e){return e("core/block-editor").getSettings().enableCustomUnits}),[]),n=!t;return Array.isArray(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)}))}(t,e):!n&&e}function Et(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 Ct(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Et(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wt(e){var t,n=e.name,r=e.attributes.style,o=e.setAttributes,i=_t();if(!Object(c.hasBlockSupport)(n,"__experimentalPadding"))return null;return d.Platform.select({web:Object(d.createElement)(d.Fragment,null,Object(d.createElement)(j.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:function(e){var t=Ct({},r,{spacing:{padding:e}});o({style:fe(t)})},onChangeShowVisualizer:function(e){var t=Ct({},r,{visualizers:{padding:e}});o({style:fe(t)})},label:Object(h.__)("Padding"),units:i})),native:null})}var St={paddingTop:["spacing","padding","top"],paddingRight:["spacing","padding","right"],paddingBottom:["spacing","padding","bottom"],paddingLeft:["spacing","padding","left"]};function It(e){var t=e.children,n=Object(pe.a)(e,["children"]);return Object(O.useSelect)((function(e){var t=e("core/block-editor").getSettings;return Object(p.get)(t(),"__experimentalEnableCustomSpacing")}),[])?Object(d.createElement)(Ve,n,Object(d.createElement)(j.PanelBody,{title:Object(h.__)("Spacing")},t)):null}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 Bt(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(u.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}var Pt=[].concat(Object(ee.a)(ht),["__experimentalColor","__experimentalPadding"]),Tt=function(e){return Pt.some((function(t){return Object(c.hasBlockSupport)(e,t)}))};function Nt(e){if(Object(p.startsWith)(e,"var:")){var t=e.slice("var:".length).split("|").join("--");return"var(--wp--".concat(t,")")}return e}function Rt(e,t,n){if(!Tt(t))return e;var r=n.style;return e.style=Bt({},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Bt({},St,{lineHeight:["typography","lineHeight"],fontSize:["typography","fontSize"],background:["color","gradient"],backgroundColor:["color","background"],color:["color","text"],"--wp--style--color--link":["color","link"]}),n={};return Object.entries(t).forEach((function(t){var r=Object(ne.a)(t),o=r[0],c=r.slice(1),i=Object(te.a)(c,1)[0];Object(p.has)(e,i)&&(n[o]=Nt(Object(p.get)(e,i)))})),n}(r),{},e.style),e}var Dt=Object(m.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=Object(c.hasBlockSupport)(n,"__experimentalPadding");return[Object(d.createElement)(jt,Object(s.a)({key:"typography"},t)),Object(d.createElement)(Ze,Object(s.a)({key:"colors"},t)),Object(d.createElement)(e,Object(s.a)({key:"edit"},t)),r&&Object(d.createElement)(It,{key:"spacing"},Object(d.createElement)(wt,t))]}}),"withToolbarControls");Object(v.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Tt(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),Object(v.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",Rt),Object(v.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!Tt(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),Rt(r,e,n)},e})),Object(v.addFilter)("editor.BlockEdit","core/style/with-block-controls",Dt);var Mt=n(22),At=n(21),Lt=n(13),Ft=n(24),Vt=n(16),Ht=n(23);function zt(){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 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(u.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}var Kt=[],Wt=function(e){return Object(m.createHigherOrderComponent)((function(t){return function(n){return Object(d.createElement)(t,Object(s.a)({},n,{colors:e}))}}),"withCustomColorPalette")},qt=function(){return Object(O.withSelect)((function(e){var t=e("core/block-editor").getSettings();return{colors:Object(p.get)(t,["colors"],Kt)}}))};function $t(e,t){var n=Object(p.reduce)(e,(function(e,t){return Gt({},e,{},Object(p.isString)(t)?Object(u.a)({},t,Object(p.kebabCase)(t)):t)}),{});return Object(m.compose)([t,function(e){return function(t){Object(Ht.a)(c,t);var r,o=(r=c,function(){var e,t=Object(Vt.a)(r);if(zt()){var n=Object(Vt.a)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Object(Ft.a)(this,e)});function c(e){var t;return Object(Mt.a)(this,c),(t=o.call(this,e)).setters=t.createSetters(),t.colorUtils={getMostReadableColor:t.getMostReadableColor.bind(Object(Lt.a)(t))},t.state={},t}return Object(At.a)(c,[{key:"getMostReadableColor",value:function(e){return function(e,t){return oe.a.mostReadable(t,Object(p.map)(e,"color")).toHexString()}(this.props.colors,e)}},{key:"createSetters",value:function(){var e=this;return Object(p.reduce)(n,(function(t,n,r){var o=Object(p.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=ie(n.props.colors,r);n.props.setAttributes((o={},Object(u.a)(o,e,c&&c.slug?c.slug:void 0),Object(u.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(d.createElement)(e,Gt({},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(p.reduce)(n,(function(e,n,c){var i=ce(o,r[c],r["custom".concat(Object(p.upperFirst)(c))]),a=t[c];return Object(p.get)(a,["color"])===i.color&&a?e[c]=a:e[c]=Gt({},i,{class:ae(n,i.slug)}),e}),{})}}]),c}(d.Component)}])}function Yt(e){return function(){for(var t=Wt(e),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Object(m.createHigherOrderComponent)($t(r,t),"withCustomColors")}}function Xt(){for(var e=qt(),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Object(m.createHigherOrderComponent)($t(n,e),"withColors")}var Qt=n(62),Zt=n.n(Qt);function Jt(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 en=function(e){var t=e.colorSettings,n=Object(pe.a)(e,["colorSettings"]),r=t.map((function(e){var t=e.value,n=e.onChange;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jt(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Object(pe.a)(e,["value","onChange"]),{colorValue:t,onColorChange:n})}));return Object(d.createElement)(Pe,Object(s.a)({settings:r,gradients:[],disableCustomGradients:!0},n))},tn=function(e,t,n){return"function"==typeof e?e(t):!0===e?n:e};function nn(e){var t=e.title,n=e.colorSettings,r=e.colorPanelProps,o=e.contrastCheckers,c=e.detectedBackgroundColor,i=e.detectedColor,a=e.panelChildren,l=e.initialOpen;return Object(d.createElement)(en,Object(s.a)({title:t,initialOpen:l,colorSettings:Object.values(n)},r),o&&(Array.isArray(o)?o.map((function(e){var t=e.backgroundColor,r=e.textColor,o=Object(pe.a)(e,["backgroundColor","textColor"]);return t=tn(t,n,c),r=tn(r,n,i),Object(d.createElement)(Re,Object(s.a)({key:"".concat(t,"-").concat(r),backgroundColor:t,textColor:r},o))})):Object(p.map)(n,(function(e){var t=e.value,r=o.backgroundColor,a=o.textColor;return r=tn(r||t,n,c),a=tn(a||t,n,i),Object(d.createElement)(Re,Object(s.a)({},o,{key:"".concat(r,"-").concat(a),backgroundColor:r,textColor:a}))}))),"function"==typeof a?a(n):a)}function rn(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return on(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return on(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,o,c=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return c=e.done,e},e:function(e){i=!0,o=e},f:function(){try{c||null==r.return||r.return()}finally{if(i)throw o}}}}function on(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 cn(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 an(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ln=window,sn=ln.getComputedStyle,un=ln.Node,dn=[],bn={textColor:Object(h.__)("Text Color"),backgroundColor:Object(h.__)("Background Color")},fn=function(e){return Object(d.createElement)(Ve,null,Object(d.createElement)(nn,e))};function pn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{panelTitle:Object(h.__)("Color settings")},n=t.panelTitle,r=void 0===n?Object(h.__)("Color settings"):n,o=t.colorPanelProps,c=t.contrastCheckers,i=t.panelChildren,a=t.colorDetector,l=(a=void 0===a?{}:a).targetRef,s=a.backgroundColorTargetRef,b=void 0===s?l:s,m=a.textColorTargetRef,v=void 0===m?l:m,g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],j=Object(z.b)(),k=j.clientId,y=Object(O.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockAttributes,r=(0,t.getSettings)().colors;return{attributes:n(k),settingsColors:r&&!0!==r?r:dn}}),[k]),_=y.attributes,E=y.settingsColors,C=Object(O.useDispatch)("core/block-editor"),w=C.updateBlockAttributes,S=Object(d.useCallback)((function(e){return w(k,e)}),[w,k]),I=Object(d.useMemo)((function(){return Zt()((function(e,t,n,r,o,c){return function(i){var a,l=i.children,s=i.className,b=void 0===s?"":s,m=i.style,v=void 0===m?{}:m,O={};r?O=Object(u.a)({},t,o):c&&(O=Object(u.a)({},t,c));var g={className:f()(b,(a={},Object(u.a)(a,"has-".concat(Object(p.kebabCase)(r),"-").concat(Object(p.kebabCase)(t)),r),Object(u.a)(a,n||"has-".concat(Object(p.kebabCase)(e)),r||c),a)),style:an({},O,{},v)};return Object(p.isFunction)(l)?l(g):d.Children.map(l,(function(e){return Object(d.cloneElement)(e,{className:f()(e.props.className,g.className),style:an({},g.style,{},e.props.style||{})})}))}}),{maxSize:e.length})}),[e.length]),x=Object(d.useMemo)((function(){return Zt()((function(e,t){return function(n){var r=t.find((function(e){return e.color===n}));S(Object(u.a)({},r?Object(p.camelCase)("custom ".concat(e)):e,void 0)),S(Object(u.a)({},r?e:Object(p.camelCase)("custom ".concat(e)),r?r.slug:n))}}),{maxSize:e.length})}),[S,e.length]),B=Object(d.useState)(),P=Object(te.a)(B,2),T=P[0],N=P[1],R=Object(d.useState)(),D=Object(te.a)(R,2),M=D[0],A=D[1];return Object(d.useEffect)((function(){if(c){var e,t=!1,n=!1,r=rn(Object(p.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&&A(sn(v.current).color),t){for(var l=b.current,s=sn(l).backgroundColor;"rgba(0, 0, 0, 0)"===s&&l.parentNode&&l.parentNode.nodeType===un.ELEMENT_NODE;)l=l.parentNode,s=sn(l).backgroundColor;N(s)}}}),[e.reduce((function(e,t){return"".concat(e," | ").concat(_[t.name]," | ").concat(_[Object(p.camelCase)("custom ".concat(t.name))])}),"")].concat(Object(ee.a)(g))),Object(d.useMemo)((function(){var t={},n=e.reduce((function(e,n){"string"==typeof n&&(n={name:n});var r=an({},n,{color:_[n.name]}),o=r.name,c=r.property,i=void 0===c?o:c,a=r.className,l=r.panelLabel,s=void 0===l?n.label||bn[o]||Object(p.startCase)(o):l,u=r.componentName,d=void 0===u?Object(p.startCase)(o).replace(/\s/g,""):u,b=r.color,f=void 0===b?n.color:b,m=r.colors,v=void 0===m?E:m,O=_[Object(p.camelCase)("custom ".concat(o))],g=O?void 0:v.find((function(e){return e.slug===f}));return e[d]=I(o,i,a,f,g&&g.color,O),e[d].displayName=d,e[d].color=O||g&&g.color,e[d].slug=f,e[d].setColor=x(o,v),t[d]={value:g?g.color:_[Object(p.camelCase)("custom ".concat(o))],onChange:e[d].setColor,label:s,colors:v},v||delete t[d].colors,e}),{}),a={title:r,initialOpen:!1,colorSettings:t,colorPanelProps:o,contrastCheckers:c,detectedBackgroundColor:T,detectedColor:M,panelChildren:i};return an({},n,{ColorPanel:Object(d.createElement)(nn,a),InspectorControlsColorPanel:Object(d.createElement)(fn,a)})}),[_,S,M,T].concat(Object(ee.a)(g)))}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(u.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){return function(){var t,n=Object(Vt.a)(e);if(gn()){var r=Object(Vt.a)(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return Object(Ft.a)(this,t)}}function gn(){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}}var hn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(p.reduce)(t,(function(e,t){return e[t]="custom".concat(Object(p.upperFirst)(t)),e}),{});return Object(m.createHigherOrderComponent)(Object(m.compose)([Object(O.withSelect)((function(e){return{fontSizes:e("core/block-editor").getSettings().fontSizes}})),function(e){return function(t){Object(Ht.a)(o,t);var n=On(o);function o(e){var t;return Object(Mt.a)(this,o),(t=n.call(this,e)).setters=t.createSetters(),t.state={},t}return Object(At.a)(o,[{key:"createSetters",value:function(){var e=this;return Object(p.reduce)(r,(function(t,n,r){var o=Object(p.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(p.find)(n.props.fontSizes,{size:Number(r)});n.props.setAttributes((o={},Object(u.a)(o,e,c&&c.slug?c.slug:void 0),Object(u.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(d.createElement)(e,vn({},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(p.some)(r,c))return null;var i=Object(p.reduce)(Object(p.pickBy)(r,c),(function(e,t,r){var c=n[r],i=lt(o,c,n[t]);return e[r]=vn({},i,{class:ut(c)}),e}),{});return vn({},t,{},i)}}]),o}(d.Component)}]),"withFontSizes")},jn=n(279),kn=n(280),yn=n(281);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}var En=[{icon:jn.a,title:Object(h.__)("Align text left"),align:"left"},{icon:kn.a,title:Object(h.__)("Align text center"),align:"center"},{icon:yn.a,title:Object(h.__)("Align text right"),align:"right"}],Cn={position:"bottom right",isAlternate:!0};var wn=function(e){var t=e.value,n=e.onChange,r=e.alignmentControls,o=void 0===r?En:r,c=e.label,i=void 0===c?Object(h.__)("Change text alignment"):c,a=e.isCollapsed,l=void 0===a||a,s=e.isRTL;function b(e){return function(){return n(t===e?void 0:e)}}var f=Object(p.find)(o,(function(e){return e.align===t}));return Object(d.createElement)(j.ToolbarGroup,{isCollapsed:l,icon:f?f.icon:s?yn.a:jn.a,label:i,popoverProps:Cn,controls:o.map((function(e){var n=e.align;return function(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(u.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}({},e,{isActive:t===n,role:l?"menuitemradio":void 0,onClick:b(n)})}))})};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}var In=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=(e=(e=Object(p.deburr)(e)).replace(/^\//,"")).toLowerCase(),Object(p.words)(e)},xn=function(e,t){return Object(p.differenceWith)(e,In(t),(function(e,t){return t.includes(e)}))},Bn=function(e,t,n,r){var o=In(r);return 0===o.length?e:Pn(e,r,{getCategory:function(e){var n;return null===(n=Object(p.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))}}).map((function(e){if(Object(p.isEmpty)(e.variations))return e;var t=e.variations.filter((function(e){var t=e.title,n=e.keywords,r=void 0===n?[]:n;return Object(p.intersectionWith)(o,In(t).concat(r),(function(e,t){return t.includes(e)})).length>0}));return Object(p.isEmpty)(t)?e:function(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(u.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}({},e,{variations:t})}))},Pn=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=In(t);if(0===r.length)return e;var o=function(e){return e.title},c=function(e){return e.keywords||[]},i=function(e){return e.category},a=function(){return null},l=function(){return[]},s=n.getTitle,u=void 0===s?o:s,d=n.getKeywords,b=void 0===d?c:d,f=n.getCategory,p=void 0===f?i:f,m=n.getCollection,v=void 0===m?a:m,O=n.getVariations,g=void 0===O?l:O;return e.filter((function(e){var t=u(e),n=b(e),o=p(e),c=v(e),i=g(e),a=[t].concat(Object(ee.a)(n),[o,c],Object(ee.a)(i)).join(" ");return 0===xn(r,a).length}))},Tn=function(e,t){var n=Object(O.useSelect)((function(t){var n=t("core/block-editor"),r=n.getInserterItems,o=n.getSettings,c=t("core/blocks"),i=c.getCategories,a=c.getCollections,l=o().__experimentalFetchReusableBlocks;return{categories:i(),collections:a(),items:r(e),fetchReusableBlocks:l}}),[e]),r=n.categories,o=n.collections,i=n.items,a=n.fetchReusableBlocks;Object(d.useEffect)((function(){a&&a()}),[]);return[i,r,o,function(e){var n=e.name,r=e.initialAttributes,o=e.innerBlocks,i=Object(c.createBlock)(n,r,function e(t){return Object(p.map)(t,(function(t){var n=Object(te.a)(t,3),r=n[0],o=n[1],i=n[2],a=void 0===i?[]:i;return Object(c.createBlock)(r,o,e(a))}))}(o));t(i)}]};function Nn(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 Rn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nn(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Dn(e){return e.reduce((function(e,t){var n=t.variations,r=void 0===n?[]:n;return r.some((function(e){return e.isDefault}))||e.push(t),r.length&&(e=e.concat(r.map((function(e){return Rn({},t,{id:"".concat(t.id,"-").concat(e.name),icon:e.icon||t.icon,title:e.title||t.title,description:e.description||t.description,example:e.hasOwnProperty("example")?e.example:t.example,initialAttributes:Rn({},t.initialAttributes,{},e.attributes),innerBlocks:e.innerBlocks})})))),e}),[])}var Mn=n(155);function An(e){var t=e.icon,n=e.showColors,r=void 0!==n&&n,o=e.className;"block-default"===Object(p.get)(t,["src"])&&(t={src:Mn.a});var c=Object(d.createElement)(j.Icon,{icon:t&&t.src?t.src:t}),i=r?{backgroundColor:t&&t.background,color:t&&t.foreground}:{};return Object(d.createElement)("span",{style:i,className:f()("block-editor-block-icon",o,{"has-colors":r})},c)}var Ln=function e(t){return Object(p.map)(t,(function(t){var n=Object(te.a)(t,3),r=n[0],o=n[1],i=n[2],a=void 0===i?[]:i;return Object(c.createBlock)(r,o,e(a))}))};var Fn={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems:function(e){var t=Object(O.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=Tn(n,p.noop),c=Object(te.a)(o,3),i=c[0],a=c[1],l=c[2],s=Object(d.useMemo)((function(){return Bn(i,a,l,e).filter((function(e){return e.name!==r}))}),[e,r,i,a,l]);return[Object(d.useMemo)((function(){return Dn(s).map((function(e){var t=e.title,n=e.icon,r=e.isDisabled;return{key:"block-".concat(e.id),value:e,label:Object(d.createElement)(d.Fragment,null,Object(d.createElement)(An,{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(c.createBlock)(t,n,Ln(r))}}},Vn=[];var Hn=function(e){var t=Object(z.b)().name,n=e.completers,r=void 0===n?Vn:n;return r=Object(d.useMemo)((function(){var e=r;return t===Object(c.getDefaultBlockName)()&&(e=e.concat([Fn])),Object(v.hasFilter)("editor.Autocomplete.completers")&&(e===r&&(e=e.map(p.clone)),e=Object(v.applyFilters)("editor.Autocomplete.completers",e,t)),e}),[r,t]),Object(d.createElement)(j.Autocomplete,Object(s.a)({},e,{completers:r}))};var zn=function(e){var t=e.label,n=void 0===t?Object(h.__)("Change matrix alignment"):t,r=e.onChange,o=void 0===r?p.noop:r,c=e.value,i=void 0===c?"center":c,a=Object(d.createElement)(j.__experimentalAlignmentMatrixControl.Icon,{value:i}),l="block-editor-block-alignment-matrix-toolbar",s="".concat(l,"__popover");return Object(d.createElement)(j.Dropdown,{position:"bottom right",className:l,popoverProps:{className:s,isAlternate:!0},renderToggle:function(e){var t=e.onToggle,r=e.isOpen;return Object(d.createElement)(j.ToolbarGroup,null,Object(d.createElement)(j.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":r,onKeyDown:function(e){r||e.keyCode!==et.DOWN||(e.preventDefault(),e.stopPropagation(),t())},label:n,icon:a,showTooltip:!0}))},renderContent:function(){return Object(d.createElement)(j.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:o,value:i})}})};function Un(e){var t=e.clientId,n=Object(O.useSelect)((function(e){return t?(0,e("core/block-editor").getBlockName)(t):null}),[t]);if(!n)return null;var r=Object(c.getBlockType)(n);return r?r.title:null}var Gn=function(){var e=Object(O.useDispatch)("core/block-editor"),t=e.selectBlock,n=e.clearSelectedBlock,r=Object(O.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(d.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":Object(h.__)("Block breadcrumb")},Object(d.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&Object(d.createElement)(j.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:n},Object(h.__)("Document")),!i&&Object(h.__)("Document")),c.map((function(e){return Object(d.createElement)("li",{key:e},Object(d.createElement)(j.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:function(){return t(e)}},Object(d.createElement)(Un,{clientId:e})))})),!!o&&Object(d.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},Object(d.createElement)(Un,{clientId:o})))};function Kn(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 Wn=Object(d.createContext)({});function qn(e){var t=e.value,n=e.children,r=Object(d.useContext)(Wn),o=Object(d.useMemo)((function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kn(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},r,{},t)}),[r,t]);return Object(d.createElement)(Wn.Provider,{value:o,children:n})}var $n=Wn,Yn=function(){return Object(d.createElement)(j.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Object(d.createElement)(j.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"}))},Xn=function(e){var t=e.style,n=e.className;return Object(d.createElement)("div",{className:"block-library-colors-selector__icon-container"},Object(d.createElement)("div",{className:"".concat(n," block-library-colors-selector__state-selection"),style:t},Object(d.createElement)(Yn,null)))},Qn=function(e){var t,n,r,o=e.children,c=Object(pe.a)(e,["children"]);return Object(d.createElement)(j.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(d.createElement)(j.ToolbarGroup,null,Object(d.createElement)(j.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:Object(h.__)("Open Colors Selector"),onClick:t,onKeyDown:function(e){o||e.keyCode!==et.DOWN||(e.preventDefault(),e.stopPropagation(),t())},icon:Object(d.createElement)(r,null,Object(d.createElement)(n,null,Object(d.createElement)(Xn,null)))}))}),renderContent:function(){return o}})},Zn=n(42),Jn=n.n(Zn),er={},tr=Object(j.withFilters)("editor.BlockEdit")((function(e){var t=e.attributes,n=void 0===t?{}:t,r=e.name,o=Object(c.getBlockType)(r),i=Object(d.useContext)($n),a=Object(d.useMemo)((function(){return o&&o.context?(Jn()('Block type "context" option',{alternative:'"usesContext"',version:"8.6.0",hint:'Block "'.concat(r,'".'),link:"https://developer.wordpress.org/block-editor/developers/block-api/block-context/"}),Object(p.pick)(i,o.context)):o&&o.usesContext?Object(p.pick)(i,o.usesContext):er}),[o,i]);if(!o)return null;var l=o.edit||o.save;if(Object(c.hasBlockSupport)(o,"lightBlockWrapper",!1))return Object(d.createElement)(l,Object(s.a)({},e,{context:a}));var u=Object(c.hasBlockSupport)(o,"className",!0)?Object(c.getBlockDefaultClassName)(r):null,b=f()(u,n.className);return Object(d.createElement)(l,Object(s.a)({},e,{context:a,className:b}))}));function nr(e){var t={name:e.name,isSelected:e.isSelected,clientId:e.clientId,onFocus:e.onFocus,onCaretVerticalPositionChange:e.onCaretVerticalPositionChange};return Object(d.createElement)(z.a,{value:Object(d.useMemo)((function(){return t}),Object.values(t))},Object(d.createElement)(tr,e))}var rr=Object(j.createSlotFill)("BlockFormatControls"),or=rr.Fill,cr=rr.Slot;var ir=function(e){return Object(z.b)().isSelected?Object(d.createElement)(or,null,(function(t){var n=Object(p.isEmpty)(t)?null:t;return Object(d.createElement)(j.__experimentalToolbarContext.Provider,{value:n},e.children)})):null};ir.Slot=function(e){var t=Object(d.useContext)(j.__experimentalToolbarContext);return Object(d.createElement)(cr,Object(s.a)({},e,{fillProps:t}))};var ar=ir,lr=n(20),sr=n.n(lr),ur=n(43),dr=n(207),br=n(115),fr=n(31),pr=function(e){return e+1},mr=function(e){return{top:e.offsetTop,left:e.offsetLeft}};var vr=function(e,t,n,r,o){var c=Object(m.useReducedMotion)()||!r,i=Object(d.useReducer)(pr,0),a=Object(te.a)(i,2),l=a[0],s=a[1],u=Object(d.useReducer)(pr,0),b=Object(te.a)(u,2),f=b[0],p=b[1],v=Object(d.useState)({x:0,y:0}),O=Object(te.a)(v,2),g=O[0],h=O[1],j=Object(d.useMemo)((function(){return e.current?mr(e.current):null}),[o]),k=Object(d.useMemo)((function(){if(!n||!e.current)return function(){};var t=Object(fr.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(d.useLayoutEffect)((function(){l&&p()}),[l]),Object(d.useLayoutEffect)((function(){if(j)if(c)k();else{e.current.style.transform="";var t=mr(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(br.useSpring)({from:{x:g.x,y:g.y},to:{x:0,y:0},reset:l!==f,config:{mass:5,tension:2e3,friction:200},immediate:c,onFrame:y})},Or=Object(br.animated)(j.__experimentalTreeGridRow);function gr(e){var t=e.isSelected,n=e.position,r=e.level,o=e.rowCount,c=e.children,i=e.className,a=e.path,l=Object(pe.a)(e,["isSelected","position","level","rowCount","children","className","path"]),u=Object(d.useRef)(null),b=a.join("_"),p=vr(u,t,!1,!0,b);return Object(d.createElement)(Or,Object(s.a)({ref:u,style:p,className:f()("block-editor-block-navigation-leaf",i),level:r,positionInSet:n,setSize:o},l),c)}var hr=n(290),jr=n(291),kr=n(292),yr=n(293);function _r(e,t,n,r,o,c,i,a){var l=n+1,s=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;if(o<0&&n)return Object(h.__)("Blocks cannot be moved up as they are already at the top");if(o>0&&r)return Object(h.__)("Blocks cannot be moved down as they are already at the bottom");if(o<0&&!n)return Object(h.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
|
8 |
+
Object(h._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);if(o>0&&!r)return Object(h.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
|
9 |
+
Object(h._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)}(e,n,r,o,c);if(r&&o)return Object(h.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
|
10 |
+
Object(h.__)("Block %s is the only block, and cannot be moved"),t);if(c>0&&!o){var u=s("down");if("down"===u)return Object(h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
11 |
+
Object(h.__)("Move %1$s block from position %2$d down to position %3$d"),t,l,l+1);if("left"===u)return Object(h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
12 |
+
Object(h.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l+1);if("right"===u)return Object(h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
13 |
+
Object(h.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l+1)}if(c>0&&o){var d=s("down");if("down"===d)return Object(h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
14 |
+
Object(h.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===d)return Object(h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
15 |
+
Object(h.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===d)return Object(h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
16 |
+
Object(h.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(c<0&&!r){var b=s("up");if("up"===b)return Object(h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
17 |
+
Object(h.__)("Move %1$s block from position %2$d up to position %3$d"),t,l,l-1);if("left"===b)return Object(h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
18 |
+
Object(h.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l-1);if("right"===b)return Object(h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
19 |
+
Object(h.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l-1)}if(c<0&&r){var f=s("up");if("up"===f)return Object(h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
20 |
+
Object(h.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===f)return Object(h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
21 |
+
Object(h.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===f)return Object(h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
22 |
+
Object(h.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}var Er=function(e,t,n){return"up"===e?"horizontal"===t?n?hr.a:jr.a:kr.a:"down"===e?"horizontal"===t?n?jr.a:hr.a:yr.a:null},Cr=function(e,t,n){return"up"===e?"horizontal"===t?n?Object(h.__)("Move right"):Object(h.__)("Move left"):Object(h.__)("Move up"):"down"===e?"horizontal"===t?n?Object(h.__)("Move left"):Object(h.__)("Move right"):Object(h.__)("Move down"):null},wr=Object(d.forwardRef)((function(e,t){var n=e.clientIds,r=e.direction,o=e.orientation,i=Object(pe.a)(e,["clientIds","direction","orientation"]),a=Object(m.useInstanceId)(wr),l=Object(p.castArray)(n).length,u=Object(O.useSelect)((function(e){var t=e("core/block-editor"),i=t.getBlockIndex,a=t.getBlockRootClientId,l=t.getBlockOrder,s=t.getBlock,u=t.getSettings,d=t.getBlockListSettings,b=Object(p.castArray)(n),f=Object(p.first)(b),m=a(f),v=i(f,m),O=i(Object(p.last)(b),m),g=l(m),h=s(f),j=0===v,k=O===g.length-1,y=(d(m)||{}).orientation;return{blockType:h?Object(c.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]),b=u.blockType,v=u.isDisabled,g=u.rootClientId,h=u.isFirst,k=u.isLast,y=u.firstIndex,_=u.isRTL,E=u.orientation,C=void 0===E?"vertical":E,w=Object(O.useDispatch)("core/block-editor"),S=w.moveBlocksDown,I=w.moveBlocksUp,x="up"===r?I:S,B="block-editor-block-mover-button__description-".concat(a);return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(j.Button,Object(s.a)({ref:t,className:f()("block-editor-block-mover-button","is-".concat(r,"-button")),icon:Er(r,C,_),label:Cr(r,C,_),"aria-describedby":B},i,{onClick:v?null:function(e){x(n,g),i.onClick&&i.onClick(e)},"aria-disabled":v})),Object(d.createElement)("span",{id:B,className:"block-editor-block-mover-button__description"},_r(l,b&&b.title,y,h,k,"up"===r?-1:1,C,_)))})),Sr=Object(d.forwardRef)((function(e,t){return Object(d.createElement)(wr,Object(s.a)({direction:"up",ref:t},e))})),Ir=Object(d.forwardRef)((function(e,t){return Object(d.createElement)(wr,Object(s.a)({direction:"down",ref:t},e))}));function xr(e){var t=e.level,n=e.isLastRow,r=e.terminatedLevels;return Object(p.times)(t-1,(function(e){var o=e+2,c=o===t;return Object(d.createElement)("div",{key:e,"aria-hidden":"true",className:f()("block-editor-block-navigator-descender-line",{"has-item":c,"is-last-row":n,"is-terminated":r.includes(o)})})}))}var Br=Object(d.createContext)({__experimentalFeatures:!1}),Pr=function(){return Object(d.useContext)(Br)},Tr=Object(d.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(k.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));var Nr=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(d.createElement)("div",{className:f()(t,"block-editor-warning")},Object(d.createElement)("div",{className:"block-editor-warning__contents"},Object(d.createElement)("p",{className:"block-editor-warning__message"},r),(d.Children.count(n)>0||o)&&Object(d.createElement)("div",{className:"block-editor-warning__actions"},d.Children.count(n)>0&&d.Children.map(n,(function(e,t){return Object(d.createElement)("span",{key:t,className:"block-editor-warning__action"},e)})),o&&Object(d.createElement)(j.Dropdown,{className:"block-editor-warning__secondary",position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(d.createElement)(j.Button,{icon:Tr,label:Object(h.__)("More options"),onClick:n,"aria-expanded":t})},renderContent:function(){return Object(d.createElement)(j.MenuGroup,null,o.map((function(e,t){return Object(d.createElement)(j.MenuItem,{onClick:e.onClick,key:t},e.title)})))}}))))},Rr=n(257),Dr=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,c=e.actionText,i=e.className;return Object(d.createElement)("div",{className:i},Object(d.createElement)("div",{className:"block-editor-block-compare__content"},Object(d.createElement)("h2",{className:"block-editor-block-compare__heading"},t),Object(d.createElement)("div",{className:"block-editor-block-compare__html"},n),Object(d.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},r)),Object(d.createElement)("div",{className:"block-editor-block-compare__action"},Object(d.createElement)(j.Button,{isSecondary:!0,tabIndex:"0",onClick:o},c)))};var Mr=function(e){var t,n,r,o,i=e.block,a=e.onKeep,l=e.onConvert,s=e.convertor,u=e.convertButtonText,b={rawContent:i.originalContent,renderedContent:Object(c.getSaveElement)(i.name,i.attributes)},m=(t=s(i),n=Object(p.castArray)(t),r=n.map((function(e){return Object(c.getSaveContent)(e.name,e.attributes,e.innerBlocks)})),o=n.map((function(e){return Object(c.getSaveElement)(e.name,e.attributes,e.innerBlocks)})),{rawContent:r.join(""),renderedContent:o}),v=function(e,t){return Object(Rr.diffChars)(e,t).map((function(e,t){var n=f()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return Object(d.createElement)("span",{key:t,className:n},e.value)}))}(b.rawContent,m.rawContent);return Object(d.createElement)("div",{className:"block-editor-block-compare__wrapper"},Object(d.createElement)(Dr,{title:Object(h.__)("Current"),className:"block-editor-block-compare__current",action:a,actionText:Object(h.__)("Convert to HTML"),rawContent:b.rawContent,renderedContent:b.renderedContent}),Object(d.createElement)(Dr,{title:Object(h.__)("After Conversion"),className:"block-editor-block-compare__converted",action:l,actionText:u,rawContent:v,renderedContent:m.renderedContent}))};function Ar(){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}}var Lr=function(e){Object(Ht.a)(r,e);var t,n=(t=r,function(){var e,n=Object(Vt.a)(t);if(Ar()){var r=Object(Vt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Ft.a)(this,e)});function r(e){var t;return Object(Mt.a)(this,r),(t=n.call(this,e)).state={compare:!1},t.onCompare=t.onCompare.bind(Object(Lt.a)(t)),t.onCompareClose=t.onCompareClose.bind(Object(Lt.a)(t)),t}return Object(At.a)(r,[{key:"onCompare",value:function(){this.setState({compare:!0})}},{key:"onCompareClose",value:function(){this.setState({compare:!1})}},{key:"render",value:function(){var e=this.props,t=e.convertToHTML,n=e.convertToBlocks,r=e.convertToClassic,o=e.attemptBlockRecovery,i=e.block,a=!!Object(c.getBlockType)("core/html"),l=this.state.compare,s=[{title:Object(h.__)("Convert to Classic Block"),onClick:r},{title:Object(h.__)("Attempt Block Recovery"),onClick:o}];return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(Nr,{actions:[Object(d.createElement)(j.Button,{key:"convert",onClick:this.onCompare,isSecondary:a,isPrimary:!a},// translators: Button to fix block content
|
23 |
+
Object(h._x)("Resolve","imperative verb")),a&&Object(d.createElement)(j.Button,{key:"edit",onClick:t,isPrimary:!0},Object(h.__)("Convert to HTML"))],secondaryActions:s},Object(h.__)("This block contains unexpected or invalid content.")),l&&Object(d.createElement)(j.Modal,{title:// translators: Dialog title to fix block content
|
24 |
+
Object(h.__)("Resolve Block"),onRequestClose:this.onCompareClose,className:"block-editor-block-compare"},Object(d.createElement)(Mr,{block:i,onKeep:t,onConvert:n,convertor:Fr,convertButtonText:Object(h.__)("Convert to Blocks")})))}}]),r}(d.Component),Fr=function(e){return Object(c.rawHandler)({HTML:e.originalContent})},Vr=Object(m.compose)([Object(O.withSelect)((function(e,t){var n=t.clientId;return{block:e("core/block-editor").getBlock(n)}})),Object(O.withDispatch)((function(e,t){var n=t.block,r=e("core/block-editor").replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return Object(c.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return Object(c.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,Fr(n))},attemptBlockRecovery:function(){var e,t,o,i;r(n.clientId,(t=(e=n).name,o=e.attributes,i=e.innerBlocks,Object(c.createBlock)(t,o,i)))}}}))])(Lr),Hr=Object(d.createElement)(Nr,{className:"block-editor-block-list__block-crash-warning"},Object(h.__)("This block has encountered an error and cannot be previewed.")),zr=function(){return Hr};function Ur(){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}}var Gr=function(e){Object(Ht.a)(r,e);var t,n=(t=r,function(){var e,n=Object(Vt.a)(t);if(Ur()){var r=Object(Vt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Ft.a)(this,e)});function r(){var e;return Object(Mt.a)(this,r),(e=n.apply(this,arguments)).state={hasError:!1},e}return Object(At.a)(r,[{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}}]),r}(d.Component),Kr=n(101),Wr=n.n(Kr);var qr=function(e){var t=e.clientId,n=Object(d.useState)(""),r=Object(te.a)(n,2),o=r[0],i=r[1],a=Object(O.useSelect)((function(e){return e("core/block-editor").getBlock(t)}),[t]),l=Object(O.useDispatch)("core/block-editor").updateBlock;return Object(d.useEffect)((function(){i(Object(c.getBlockContent)(a))}),[a]),Object(d.createElement)(Wr.a,{className:"block-editor-block-list__block-html-textarea",value:o,onBlur:function(){var e=Object(c.getBlockType)(a.name),n=Object(c.getBlockAttributes)(e,o,a.attributes),r=o||Object(c.getSaveContent)(e,n),s=!o||Object(c.isValidBlockContent)(e,n,r);l(t,{attributes:n,originalContent:r,isValid:s}),o||i({content:r})},onChange:function(e){return i(e.target.value)}})};function $r(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 Yr(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 Xr(e,t){Array.from(e.querySelectorAll(".rich-text")).forEach((function(e){t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}var Qr=n(202),Zr=[Object(d.createInterpolateElement)(Object(h.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:Object(d.createElement)("kbd",null)}),Object(d.createInterpolateElement)(Object(h.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:Object(d.createElement)("kbd",null)}),Object(d.createInterpolateElement)(Object(h.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:Object(d.createElement)("kbd",null)}),Object(h.__)("Drag files into the editor to automatically insert media blocks."),Object(h.__)("Change a block's type by pressing the block icon on the toolbar.")];var Jr=function(){var e=Object(d.useState)(Math.floor(Math.random()*Zr.length)),t=Object(te.a)(e,1)[0];return Object(d.createElement)(j.Tip,null,Zr[t])},eo=n(142),to=n(129),no=n(282);var ro=function e(t){var n=t.className,r=t.onChange,o=t.value,c=Object(m.useInstanceId)(e),i=Object(d.useRef)();return Object(d.createElement)("div",{className:f()("block-editor-inserter__search",n)},Object(d.createElement)(j.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-".concat(c)},Object(h.__)("Search for a block")),Object(d.createElement)("input",{ref:i,className:"block-editor-inserter__search-input",id:"block-editor-inserter__search-".concat(c),type:"search",placeholder:Object(h.__)("Search for a block"),autoFocus:!0,onChange:function(e){return r(e.target.value)},autoComplete:"off",value:o||""}),Object(d.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(d.createElement)(j.Button,{icon:eo.a,label:Object(h.__)("Reset search"),onClick:function(){r(""),i.current.focus()}}),!o&&Object(d.createElement)(to.a,{icon:no.a})))};var oo=function(e){var t=e.blockType;return Object(d.createElement)("div",{className:"block-editor-block-card"},Object(d.createElement)(An,{icon:t.icon,showColors:!0}),Object(d.createElement)("div",{className:"block-editor-block-card__content"},Object(d.createElement)("h2",{className:"block-editor-block-card__title"},t.title),Object(d.createElement)("span",{className:"block-editor-block-card__description"},t.description)))},co={insertUsage:{}},io={alignWide:!1,colors:[{name:Object(h.__)("Black"),slug:"black",color:"#000000"},{name:Object(h.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(h.__)("White"),slug:"white",color:"#ffffff"},{name:Object(h.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(h.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(h.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(h.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(h.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(h.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(h.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(h.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(h.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(h._x)("Small","font size name"),size:13,slug:"small"},{name:Object(h._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(h._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(h._x)("Large","font size name"),size:36,slug:"large"},{name:Object(h._x)("Huge","font size name"),size:48,slug:"huge"}],imageSizes:[{slug:"thumbnail",name:Object(h.__)("Thumbnail")},{slug:"medium",name:Object(h.__)("Medium")},{slug:"large",name:Object(h.__)("Large")},{slug:"full",name:Object(h.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,availableLegacyWidgets:{},hasPermissionsToManageWidgets:!1,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalEnableLegacyWidgetBlock:!1,__experimentalBlockDirectory:!1,__experimentalEnableFullSiteEditing:!1,__experimentalEnableFullSiteEditingDemo:!1,__mobileEnablePageTemplates:!1,gradients:[{name:Object(h.__)("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(h.__)("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(h.__)("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(h.__)("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(h.__)("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(h.__)("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(h.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(h.__)("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(h.__)("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(h.__)("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(h.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(h.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function ao(e,t,n){return[].concat(Object(ee.a)(e.slice(0,n)),Object(ee.a)(Object(p.castArray)(t)),Object(ee.a)(e.slice(n)))}function lo(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(ee.a)(e);return o.splice(t,r),ao(o,e.slice(t,t+r),n)}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 uo(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(u.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}function bo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(u.a)({},t,[]);return e.forEach((function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,bo(o,r))})),n}function fo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce((function(e,n){return Object.assign(e,Object(u.a)({},n.clientId,t),fo(n.innerBlocks,n.clientId))}),{})}function po(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.identity,n={},r=Object(ee.a)(e);r.length;){var o=r.shift(),c=o.innerBlocks,i=Object(pe.a)(o,["innerBlocks"]);r.push.apply(r,Object(ee.a)(c)),n[i.clientId]=t(i)}return n}function mo(e){return po(e,(function(e){return Object(p.omit)(e,"attributes")}))}function vo(e){return po(e,(function(e){return e.attributes}))}function Oo(e,t){return e===t?uo({},e):t}function go(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&Object(p.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,r=t.attributes,Object(p.isEqual)(Object(p.keys)(n),Object(p.keys)(r)));var n,r}var ho=function(e){return e.reduce((function(e,t){return e[t]={},e}),{})};var jo=Object(p.flow)(O.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=uo({},t)).attributes=Object(p.mapValues)(t.attributes,(function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?uo({},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(p.mapValues)(po(n.blocks),(function(){return{}}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":var c=Object(p.keys)(po(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&c.push(n.rootClientId),r.cache=uo({},r.cache,{},ho(o(c)));break;case"UPDATE_BLOCK":r.cache=uo({},r.cache,{},ho(o([n.clientId])));break;case"UPDATE_BLOCK_ATTRIBUTES":r.cache=uo({},r.cache,{},ho(o(n.clientIds)));break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var i=ho(o(n.replacedClientIds));r.cache=uo({},Object(p.omit)(r.cache,n.replacedClientIds),{},Object(p.omit)(i,n.replacedClientIds),{},ho(Object(p.keys)(po(n.blocks))));break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":r.cache=uo({},Object(p.omit)(r.cache,n.removedClientIds),{},ho(Object(p.difference)(o(n.clientIds),n.clientIds)));break;case"MOVE_BLOCKS_TO_POSITION":var a=Object(ee.a)(n.clientIds);n.fromRootClientId&&a.push(n.fromRootClientId),n.toRootClientId&&a.push(n.toRootClientId),r.cache=uo({},r.cache,{},ho(o(a)));break;case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":var l=[];n.rootClientId&&l.push(n.rootClientId),r.cache=uo({},r.cache,{},ho(o(l)));break;case"SAVE_REUSABLE_BLOCK_SUCCESS":var s=Object(p.keys)(Object(p.omitBy)(r.attributes,(function(e,t){return"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId})));r.cache=uo({},r.cache,{},ho(o(s)))}return r}}),(function(e){return function(t,n){var r=function(e){for(var r=e,o=0;o<r.length;o++){var c;!t.order[r[o]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[r[o]]||(r===e&&(r=Object(ee.a)(r)),(c=r).push.apply(c,Object(ee.a)(t.order[r[o]])))}return r};if(t)switch(n.type){case"REMOVE_BLOCKS":n=uo({},n,{type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(n.clientIds)});break;case"REPLACE_BLOCKS":n=uo({},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(ee.a)(n.blocks);o.length;){var c=o.shift(),i=c.innerBlocks,a=Object(pe.a)(c,["innerBlocks"]);o.push.apply(o,Object(ee.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 s=l;return n.blocks.length&&((s=e(s,uo({},n,{type:"INSERT_BLOCKS",index:0}))).order=uo({},s.order,{},Object(p.reduce)(r,(function(e,n,r){return t.order[r]&&(e[r]=t.order[r]),e}),{}))),s}}),(function(e){return function(t,n){if(t&&"RESET_BLOCKS"===n.type){var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(p.reduce)(t[n],(function(n,o){return r[o]?n:[].concat(Object(ee.a)(n),[o],Object(ee.a)(e(t,o)))}),[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(p.pickBy)(t.controlledInnerBlocks));return uo({},t,{byClientId:uo({},Object(p.omit)(t.byClientId,r),{},mo(n.blocks)),attributes:uo({},Object(p.omit)(t.attributes,r),{},vo(n.blocks)),order:uo({},Object(p.omit)(t.order,r),{},Object(p.omit)(bo(n.blocks),o)),parents:uo({},Object(p.omit)(t.parents,r),{},fo(n.blocks)),cache:uo({},Object(p.omit)(t.cache,r),{},Object(p.omit)(Object(p.mapValues)(po(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){n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;var a=Object(p.get)(r,["isPersistentChange"],!0);return r.isPersistentChange===a?r:uo({},c,{isPersistentChange:a})}return c=uo({},c,{isPersistentChange:i?!n:!go(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 mo(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return uo({},e,{},mo(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(p.omit)(t.updates,"attributes");return Object(p.isEmpty)(n)?e:uo({},e,Object(u.a)({},t.clientId,uo({},e[t.clientId],{},n)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?uo({},Object(p.omit)(e,t.replacedClientIds),{},mo(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(p.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 vo(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return uo({},e,{},vo(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?uo({},e,Object(u.a)({},t.clientId,uo({},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 uo({},n,Object(u.a)({},r,Object(p.reduce)(t.attributes,(function(t,n,o){return n!==t[o]&&((t=Oo(e[r],t))[o]=n),t}),e[r])))}),{});return t.clientIds.every((function(t){return n[t]===e[t]}))?e:uo({},e,{},n);case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?uo({},Object(p.omit)(e,t.replacedClientIds),{},vo(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(p.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 bo(t.blocks);case"RECEIVE_BLOCKS":return uo({},e,{},Object(p.omit)(bo(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=e[r]||[],c=bo(t.blocks,r),i=t.index,a=void 0===i?o.length:i;return uo({},e,{},c,Object(u.a)({},r,ao(o,c[r],a)));case"MOVE_BLOCKS_TO_POSITION":var l,s=t.fromRootClientId,d=void 0===s?"":s,b=t.toRootClientId,f=void 0===b?"":b,m=t.clientIds,v=t.index,O=void 0===v?e[f].length:v;if(d===f){var g=e[f],h=g.indexOf(m[0]);return uo({},e,Object(u.a)({},f,lo(e[f],h,O,m.length)))}return uo({},e,(l={},Object(u.a)(l,d,p.without.apply(void 0,[e[d]].concat(Object(ee.a)(m)))),Object(u.a)(l,f,ao(e[f],m,O)),l));case"MOVE_BLOCKS_UP":var j=t.clientIds,k=t.rootClientId,y=void 0===k?"":k,_=Object(p.first)(j),E=e[y];if(!E.length||_===Object(p.first)(E))return e;var C=E.indexOf(_);return uo({},e,Object(u.a)({},y,lo(E,C,C-1,j.length)));case"MOVE_BLOCKS_DOWN":var w=t.clientIds,S=t.rootClientId,I=void 0===S?"":S,x=Object(p.first)(w),B=Object(p.last)(w),P=e[I];if(!P.length||B===Object(p.last)(P))return e;var T=P.indexOf(x);return uo({},e,Object(u.a)({},I,lo(P,T,T+1,w.length)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var N=t.clientIds;if(!t.blocks)return e;var R=bo(t.blocks);return Object(p.flow)([function(e){return Object(p.omit)(e,t.replacedClientIds)},function(e){return uo({},e,{},Object(p.omit)(R,""))},function(e){return Object(p.mapValues)(e,(function(e){return Object(p.reduce)(e,(function(e,t){return t===N[0]?[].concat(Object(ee.a)(e),Object(ee.a)(R[""])):(-1===N.indexOf(t)&&e.push(t),e)}),[])}))}])(e);case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(p.flow)([function(e){return Object(p.omit)(e,t.removedClientIds)},function(e){return Object(p.mapValues)(e,(function(e){return p.without.apply(void 0,[e].concat(Object(ee.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 fo(t.blocks);case"RECEIVE_BLOCKS":return uo({},e,{},fo(t.blocks));case"INSERT_BLOCKS":return uo({},e,{},fo(t.blocks,t.rootClientId||""));case"MOVE_BLOCKS_TO_POSITION":return uo({},e,{},t.clientIds.reduce((function(e,n){return e[n]=t.toRootClientId||"",e}),{}));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return uo({},Object(p.omit)(e,t.replacedClientIds),{},fo(t.blocks,e[t.clientIds[0]]));case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(p.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?uo({},e,Object(u.a)({},r,o)):e}});function ko(){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}var yo=Object(O.combineReducers)({blocks:jo,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},isDraggingBlocks: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!0;case"STOP_DRAGGING_BLOCKS":return!1}return e},isCaretWithinFormattedText:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},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 ko(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 ko(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 uo({},e,Object(u.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(p.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(p.isEqual)(e[n],t.settings)?e:uo({},e,Object(u.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(p.omit)(e,n):e}return e},insertionPoint:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":var n=t.rootClientId,r=t.index;return{rootClientId:n,index:r};case"HIDE_INSERTION_POINT":return null}return e},template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return uo({},e,{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:io,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return uo({},e,{},t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:co,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(c.isReusableBlock)(n)&&(o.ref=n.attributes.ref,r+="/"+n.attributes.ref),uo({},e,{insertUsage:uo({},e.insertUsage,Object(u.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(u.a)({},t.clientId,t.updates.attributes);case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((function(e,n){return uo({},e,Object(u.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: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"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}}),_o=n(112),Eo=n.n(_o),Co=n(255),wo=n.n(Co),So=n(38);function Io(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return{type:"SELECT",storeName:e,selectorName:t,args:r}}var xo={SELECT:Object(O.createRegistryControl)((function(e){return function(t){var n,r=t.storeName,o=t.selectorName,c=t.args;return(n=e.select(r))[o].apply(n,Object(ee.a)(c))}})),SLEEP:function(e){var t=e.duration;return new Promise((function(e){setTimeout(e,t)}))}};function Bo(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return Po(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Po(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,o,c=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return c=e.done,e},e:function(e){i=!0,o=e},f:function(){try{c||null==r.return||r.return()}finally{if(i)throw o}}}}function Po(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 To(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 No(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?To(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):To(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ro=sr.a.mark($o),Do=sr.a.mark(tc),Mo=sr.a.mark(nc),Ao=sr.a.mark(sc),Lo=sr.a.mark(pc),Fo=sr.a.mark(mc),Vo=sr.a.mark(Oc),Ho=sr.a.mark(_c),zo=sr.a.mark(Hc),Uo=sr.a.mark(zc),Go=sr.a.mark(Uc),Ko=sr.a.mark(Gc),Wo=sr.a.mark(Kc),qo=sr.a.mark(qc);function $o(){return sr.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Io("core/block-editor","getBlockCount");case 2:if(0!==e.sent){e.next=7;break}return e.next=6,Rc();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),Ro)}function Yo(e){return{type:"RESET_BLOCKS",blocks:e}}function Xo(e,t){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t}}function Qo(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function Zo(e,t){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Object(p.castArray)(e),attributes:t}}function Jo(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function ec(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function tc(e){var t;return sr.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Io("core/block-editor","getPreviousBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,ec(t,-1);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),Do)}function nc(e){var t;return sr.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Io("core/block-editor","getNextBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,ec(t);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),Mo)}function rc(){return{type:"START_MULTI_SELECT"}}function oc(){return{type:"STOP_MULTI_SELECT"}}function cc(e,t){return{type:"MULTI_SELECT",start:e,end:t}}function ic(){return{type:"CLEAR_SELECTED_BLOCK"}}function ac(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function lc(e,t){var n=Object(p.get)(t,["__experimentalPreferredStyleVariations","value"],{});return e.map((function(e){var t=e.name;if(!Object(c.hasBlockSupport)(t,"defaultStylePicker",!0))return e;if(!n[t])return e;var r=Object(p.get)(e,["attributes","className"]);if(null==r?void 0:r.includes("is-style-"))return e;var o=e.attributes,i=void 0===o?{}:o,a=n[t];return No({},e,{attributes:No({},i,{className:"".concat(r||""," is-style-").concat(a).trim()})})}))}function sc(e,t,n,r){var o,c,i;return sr.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return e=Object(p.castArray)(e),a.t0=lc,a.t1=Object(p.castArray)(t),a.next=5,Io("core/block-editor","getSettings");case 5:return a.t2=a.sent,t=(0,a.t0)(a.t1,a.t2),a.next=9,Io("core/block-editor","getBlockRootClientId",Object(p.first)(e));case 9:o=a.sent,c=0;case 11:if(!(c<t.length)){a.next=21;break}return i=t[c],a.next=15,Io("core/block-editor","canInsertBlockType",i.name,o);case 15:if(a.sent){a.next=18;break}return a.abrupt("return");case 18:c++,a.next=11;break;case 21:return a.next=23,{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:r};case 23:return a.delegateYield($o(),"t3",24);case 24:case"end":return a.stop()}}),Ao)}function uc(e,t){return sc(e,t)}function dc(e){return function(t,n){return{clientIds:Object(p.castArray)(t),type:e,rootClientId:n}}}var bc=dc("MOVE_BLOCKS_DOWN"),fc=dc("MOVE_BLOCKS_UP");function pc(e){var t,n,r,o,c,i=arguments;return sr.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,Io("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,Io("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()}}),Lo)}function mc(e){var t,n,r,o=arguments;return sr.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,pc([e],t,n,r);case 5:case"end":return c.stop()}}),Fo)}function vc(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Oc([e],t,n,r)}function Oc(e,t,n){var r,o,c,i,a,l=arguments;return sr.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return r=!(l.length>3&&void 0!==l[3])||l[3],s.t0=lc,s.t1=Object(p.castArray)(e),s.next=5,Io("core/block-editor","getSettings");case 5:s.t2=s.sent,e=(0,s.t0)(s.t1,s.t2),o=[],c=Bo(e),s.prev=9,c.s();case 11:if((i=c.n()).done){s.next=19;break}return a=i.value,s.next=15,Io("core/block-editor","canInsertBlockType",a.name,n);case 15:s.sent&&o.push(a);case 17:s.next=11;break;case 19:s.next=24;break;case 21:s.prev=21,s.t3=s.catch(9),c.e(s.t3);case 24:return s.prev=24,c.f(),s.finish(24);case 27:if(!o.length){s.next=29;break}return s.abrupt("return",{type:"INSERT_BLOCKS",blocks:o,index:t,rootClientId:n,time:Date.now(),updateSelection:r});case 29:case"end":return s.stop()}}),Vo,null,[[9,21,24,27]])}function gc(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function hc(){return{type:"HIDE_INSERTION_POINT"}}function jc(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function kc(){return{type:"SYNCHRONIZE_TEMPLATE"}}function yc(e,t){return{type:"MERGE_BLOCKS",blocks:[e,t]}}function _c(e){var t,n,r,o,c=arguments;return sr.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(p.castArray)(e),i.next=6,Io("core/block-editor","getBlockRootClientId",e[0]);case 6:return n=i.sent,i.next=9,Io("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,tc(e[0]);case 15:r=i.sent,i.next=21;break;case 18:return i.next=20,Io("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($o(),"t0",24);case 24:return o=i.t0,i.abrupt("return",[r||o]);case 26:case"end":return i.stop()}}),Ho)}function Ec(e,t){return _c([e],t)}function Cc(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 wc(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Sc(){return{type:"START_TYPING"}}function Ic(){return{type:"STOP_TYPING"}}function xc(){return{type:"START_DRAGGING_BLOCKS"}}function Bc(){return{type:"STOP_DRAGGING_BLOCKS"}}function Pc(){return{type:"ENTER_FORMATTED_TEXT"}}function Tc(){return{type:"EXIT_FORMATTED_TEXT"}}function Nc(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function Rc(e,t,n){var r=Object(c.getDefaultBlockName)();if(r)return vc(Object(c.createBlock)(r,e),n,t)}function Dc(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Mc(e){return{type:"UPDATE_SETTINGS",settings:e}}function Ac(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Lc(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Fc(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function Vc(){return{type:"MARK_AUTOMATIC_CHANGE"}}function Hc(){var e,t=arguments;return sr.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(Te.speak)(Object(h.__)("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(Te.speak)(Object(h.__)("You are currently in edit mode. To return to the navigation mode, press Escape."));case 4:case"end":return n.stop()}}),zo)}function zc(){var e,t=arguments;return sr.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(Te.speak)(Object(h.__)("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()}}),Uo)}function Uc(e){var t,n,r,o,i,a,l=arguments;return sr.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(t=!(l.length>1&&void 0!==l[1])||l[1],e||e.length){s.next=3;break}return s.abrupt("return");case 3:return s.next=5,Io("core/block-editor","getBlocksByClientId",e);case 5:return n=s.sent,s.next=8,Io("core/block-editor","getBlockRootClientId",e[0]);case 8:if(r=s.sent,!Object(p.some)(n,(function(e){return!e}))){s.next=11;break}return s.abrupt("return");case 11:if(o=n.map((function(e){return e.name})),!Object(p.some)(o,(function(e){return!Object(c.hasBlockSupport)(e,"multiple",!0)}))){s.next=14;break}return s.abrupt("return");case 14:return s.next=16,Io("core/block-editor","getBlockIndex",Object(p.last)(Object(p.castArray)(e)),r);case 16:return i=s.sent,a=n.map((function(e){return Object(c.cloneBlock)(e)})),s.next=20,Oc(a,i+1,r,t);case 20:if(!(a.length>1&&t)){s.next=23;break}return s.next=23,cc(Object(p.first)(a).clientId,Object(p.last)(a).clientId);case 23:return s.abrupt("return",a.map((function(e){return e.clientId})));case 24:case"end":return s.stop()}}),Go)}function Gc(e){var t,n;return sr.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,Io("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,Io("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,Io("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,Rc({},t,n);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),Ko)}function Kc(e){var t,n;return sr.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,Io("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,Io("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,Io("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,Rc({},t,n+1);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),Wo)}function Wc(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function qc(e){return sr.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Wc(e,!0);case 2:return t.next=4,{type:"SLEEP",duration:150};case 4:return t.next=6,Wc(e,!1);case 6:case"end":return t.stop()}}),qo)}function $c(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}var Yc=n(44);function Xc(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 Qc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xc(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Zc=Object(d.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(j.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(d.createElement)(j.G,null,Object(d.createElement)(j.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"}))),Jc=[];function ei(e,t){var n=e.blocks.byClientId[t];return n?n.name:null}function ti(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}function ni(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}var ri=Object(Yc.a)((function(e,t){var n=e.blocks.byClientId[t];return n?Qc({},n,{attributes:ni(e,t),innerBlocks:ka(e,t)?Jc:ci(e,t)}):null}),(function(e,t){return[e.blocks.cache[t]]})),oi=Object(Yc.a)((function(e,t){var n=e.blocks.byClientId[t];return n?Qc({},n,{attributes:ni(e,t)}):null}),(function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t]]})),ci=Object(Yc.a)((function(e,t){return Object(p.map)(Li(e,t),(function(t){return ri(e,t)}))}),(function(e,t){return Object(p.map)(e.blocks.order[t||""],(function(t){return e.blocks.cache[t]}))})),ii=function e(t,n){return Object(p.flatMap)(n,(function(n){var r=Li(t,n);return[].concat(Object(ee.a)(r),Object(ee.a)(e(t,r)))}))},ai=Object(Yc.a)((function(e){var t=Li(e);return[].concat(Object(ee.a)(t),Object(ee.a)(ii(e,t)))}),(function(e){return[e.blocks.order]})),li=Object(Yc.a)((function(e,t){var n=ai(e);return t?Object(p.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]})),si=Object(Yc.a)((function(e,t){return Object(p.map)(Object(p.castArray)(t),(function(t){return ri(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function ui(e,t){return Li(e,t).length}function di(e){return e.selectionStart}function bi(e){return e.selectionEnd}function fi(e){return e.selectionStart.clientId}function pi(e){return e.selectionEnd.clientId}function mi(e){var t=xi(e).length;return t||(e.selectionStart.clientId?1:0)}function vi(e){var t=e.selectionStart,n=e.selectionEnd;return!!t.clientId&&t.clientId===n.clientId}function Oi(e){var t=e.selectionStart,n=e.selectionEnd,r=t.clientId;return r&&r===n.clientId?r:null}function gi(e){var t=Oi(e);return t?ri(e,t):null}function hi(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}var ji=Object(Yc.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]})),ki=Object(Yc.a)((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=ji(e,t,r);return Object(p.map)(Object(p.filter)(Object(p.map)(o,(function(t){return{id:t,name:ei(e,t)}})),{name:n}),(function(e){return e.id}))}),(function(e){return[e.blocks.parents]}));function yi(e,t){var n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function _i(e,t){for(var n,r=Oi(e),o=[].concat(Object(ee.a)(ji(e,t)),[t]),c=[].concat(Object(ee.a)(ji(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 Ei(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Oi(e)),void 0===t&&(t=n<0?Pi(e):Ti(e)),!t)return null;var r=hi(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 Ci(e,t){return Ei(e,t,-1)}function wi(e,t){return Ei(e,t,1)}function Si(e){return e.initialPosition}var Ii=Object(Yc.a)((function(e){var t=e.selectionStart,n=e.selectionEnd;if(void 0===t.clientId||void 0===n.clientId)return Jc;if(t.clientId===n.clientId)return[t.clientId];var r=hi(e,t.clientId);if(null===r)return Jc;var o=Li(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 xi(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?Jc:Ii(e)}var Bi=Object(Yc.a)((function(e){var t=xi(e);return t.length?t.map((function(t){return ri(e,t)})):Jc}),(function(e){return[].concat(Object(ee.a)(Ii.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])}));function Pi(e){return Object(p.first)(xi(e))||null}function Ti(e){return Object(p.last)(xi(e))||null}function Ni(e,t){return Pi(e)===t}function Ri(e,t){return-1!==xi(e).indexOf(t)}var Di=Object(Yc.a)((function(e,t){for(var n=t,r=!1;n&&!r;)r=Ri(e,n=hi(e,n));return r}),(function(e){return[e.blocks.order,e.selectionStart.clientId,e.selectionEnd.clientId]}));function Mi(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:t.clientId||null}function Ai(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:n.clientId||null}function Li(e,t){return e.blocks.order[t||""]||Jc}function Fi(e,t,n){return Li(e,n).indexOf(t)}function Vi(e,t){var n=e.selectionStart,r=e.selectionEnd;return n.clientId===r.clientId&&n.clientId===t}function Hi(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(p.some)(Li(e,t),(function(t){return Vi(e,t)||Ri(e,t)||n&&Hi(e,t,n)}))}function zi(e,t){if(!t)return!1;var n=xi(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function Ui(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId!==n.clientId}function Gi(e){return e.isMultiSelecting}function Ki(e){return e.isSelectionEnabled}function Wi(e,t){return e.blocksMode[t]||"visual"}function qi(e){return e.isTyping}function $i(e){return e.isDraggingBlocks}function Yi(e){return e.isCaretWithinFormattedText}function Xi(e){var t,n,r=e.insertionPoint,o=e.selectionEnd;if(null!==r)return r;var c=o.clientId;return c?(t=hi(e,c)||void 0,n=Fi(e,o.clientId,t)+1):n=Li(e).length,{rootClientId:t,index:n}}function Qi(e){return null!==e.insertionPoint}function Zi(e){return e.template.isValid}function Ji(e){return e.settings.template}function ea(e,t){if(!t)return e.settings.templateLock;var n=sa(e,t);return n?n.templateLock:null}var ta=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(p.isBoolean)(e)?e:Object(p.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},o=Object(c.getBlockType)(t);if(!o)return!1;var i=ua(e),a=i.allowedBlockTypes,l=r(a,t,!0);if(!l)return!1;var s=!!ea(e,n);if(s)return!1;var u=sa(e,n),d=Object(p.get)(u,["allowedBlocks"]),b=r(d,t),f=o.parent,m=ei(e,n),v=r(f,m);return null!==b&&null!==v?b||v:null!==b?b:null===v||v},na=Object(Yc.a)(ta,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function ra(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((function(t){return na(e,ei(e,t),n)}))}function oa(e,t){return Object(p.get)(e.preferences.insertUsage,[t],null)}var ca=function(e,t,n){return!!Object(c.hasBlockSupport)(t,"inserter",!0)&&ta(e,t.name,n)},ia=Object(Yc.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=function(e,t){if(!e)return t;var n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},r=function(t){var r=t.name,o=!1;Object(c.hasBlockSupport)(t.name,"multiple",!0)||(o=Object(p.some)(si(e,ai(e)),{name:t.name}));var i=oa(e,r)||{},a=i.time,l=i.count,s=void 0===l?0:l,u=t.variations.filter((function(e){var t=e.scope;return!t||t.includes("inserter")}));return{id:r,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:n(a,s)}},o=function(t){var r,o="core/block/".concat(t.id),i=fa(e,t.id);1===i.length&&(r=Object(c.getBlockType)(i[0].name));var a=oa(e,o)||{},l=a.time,s=a.count,u=n(l,void 0===s?0:s);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title,icon:r?r.icon:Zc,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:u}},i=Object(c.getBlockTypes)().filter((function(n){return ca(e,n,t)})).map(r),a=ta(e,"core/block",t)?va(e).map(o):[];return[].concat(Object(ee.a)(i),Object(ee.a)(a))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,va(e),Object(c.getBlockTypes)()]})),aa=Object(Yc.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object(p.some)(Object(c.getBlockTypes)(),(function(n){return ca(e,n,t)}));if(n)return!0;var r=ta(e,"core/block",t)&&va(e).length>0;return r}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,va(e),Object(c.getBlockTypes)()]})),la=Object(Yc.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return Object(p.filter)(Object(c.getBlockTypes)(),(function(n){return ca(e,n,t)}))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(c.getBlockTypes)()]}));function sa(e,t){return e.blockListSettings[t]}function ua(e){return e.settings}function da(e){return e.blocks.isPersistentChange}var ba=Object(Yc.a)((function(e,t){return Object(p.filter)(e.blockListSettings,(function(e,n){return t.includes(n)}))}),(function(e){return[e.blockListSettings]})),fa=Object(Yc.a)((function(e,t){var n=Object(p.find)(va(e),(function(e){return e.id===t}));return n?Object(c.parse)(n.content):null}),(function(e){return[va(e)]}));function pa(e){return e.blocks.isIgnoredChange}function ma(e){return e.lastBlockAttributesChange}function va(e){return Object(p.get)(e,["settings","__experimentalReusableBlocks"],Jc)}function Oa(e){return e.isNavigationMode}function ga(e){return e.hasBlockMovingClientId}function ha(e){return!!e.automaticChangeStatus}function ja(e,t){return e.highlightedBlock===t}function ka(e,t){return!!e.blocks.controlledInnerBlocks[t]}function ya(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 _a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ya(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ya(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ea={MERGE_BLOCKS:function(e,t){var n=t.dispatch,r=t.getState(),o=Object(te.a)(e.blocks,2),a=o[0],l=o[1],s=ri(r,a),u=Object(c.getBlockType)(s.name);if(u.merge){var d=ri(r,l),b=Object(c.getBlockType)(d.name),f=di(r),m=f.clientId,v=f.attributeKey,O=f.offset,g=(m===a?u:b).attributes[v],h=(m===a||m===l)&&void 0!==v&&void 0!==O&&!!g;g||("number"==typeof v?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ".concat(Object(So.a)(v))):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));var j=Object(c.cloneBlock)(s),k=Object(c.cloneBlock)(d);if(h){var y=m===a?j:k,_=y.attributes[v],E=g.multiline,C=g.__unstableMultilineWrapperTags,w=g.__unstablePreserveWhiteSpace,S=Object(i.insert)(Object(i.create)({html:_,multilineTag:E,multilineWrapperTags:C,preserveWhiteSpace:w}),"",O,O);y.attributes[v]=Object(i.toHTMLString)({value:S,multilineTag:E,preserveWhiteSpace:w})}var I=s.name===d.name?[k]:Object(c.switchToBlockType)(k,s.name);if(I&&I.length){var x=u.merge(j.attributes,I[0].attributes);if(h){var B=Object(p.findKey)(x,(function(e){return"string"==typeof e&&-1!==e.indexOf("")})),P=x[B],T=u.attributes[B],N=T.multiline,R=T.__unstableMultilineWrapperTags,D=T.__unstablePreserveWhiteSpace,M=Object(i.create)({html:P,multilineTag:N,multilineWrapperTags:R,preserveWhiteSpace:D}),A=M.text.indexOf(""),L=Object(i.remove)(M,A,A+1),F=Object(i.toHTMLString)({value:L,multilineTag:N,preserveWhiteSpace:D});x[B]=F,n(Nc(s.clientId,B,A,A))}n(sc([s.clientId,d.clientId],[_a({},s,{attributes:_a({},s.attributes,{},x)})].concat(Object(ee.a)(I.slice(1)))))}}else n(ec(s.clientId))},RESET_BLOCKS:[function(e,t){var n=t.getState(),r=Ji(n),o=ea(n),i=!r||"all"!==o||Object(c.doBlocksMatchTemplate)(e.blocks,r);if(i!==Zi(n))return jc(i)}],MULTI_SELECT:function(e,t){var n=mi((0,t.getState)());Object(Te.speak)(Object(h.sprintf)(
|
25 |
+
/* translators: %s: number of selected blocks */
|
26 |
+
Object(h._n)("%s block selected.","%s blocks selected.",n),n),"assertive")},SYNCHRONIZE_TEMPLATE:function(e,t){var n=(0,t.getState)(),r=ci(n),o=Ji(n);return Yo(Object(c.synchronizeBlocksWithTemplate)(r,o))},MARK_AUTOMATIC_CHANGE:function(e,t){var n=window,r=n.setTimeout,o=n.requestIdleCallback;(void 0===o?function(e){return r(e,100)}:o)((function(){t.dispatch({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))}};var Ca=function(e){var t,n=[Eo()(Ea),wo.a],r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:e.getState,dispatch:function(){return r.apply(void 0,arguments)}};return t=n.map((function(e){return e(o)})),r=p.flowRight.apply(void 0,Object(ee.a)(t))(e.dispatch),e.dispatch=r,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}var Sa={reducer:yo,selectors:o,actions:r,controls:xo},Ia=Object(O.registerStore)("core/block-editor",function(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(u.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}({},Sa,{persist:["preferences"]}));Ca(Ia);function xa(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?p.noop:i,l=e.onInput,s=void 0===l?p.noop:l,u=Object(O.useRegistry)(),b=u.dispatch("core/block-editor"),f=b.resetBlocks,m=b.resetSelection,v=b.replaceInnerBlocks,g=b.setHasControlledInnerBlocks,h=b.__unstableMarkNextChangeAsNotPersistent,j=u.select("core/block-editor"),k=j.getBlockName,y=j.getBlocks,_=Object(d.useRef)({incoming:null,outgoing:[]}),E=Object(d.useRef)(s),C=Object(d.useRef)(a);Object(d.useEffect)((function(){E.current=s,C.current=a}),[s,a]),Object(d.useEffect)((function(){var e,t=u.select("core/block-editor"),r=t.getSelectionStart,o=t.getSelectionEnd,c=t.isLastBlockChangePersistent,i=t.__unstableIsLastBlockChangeIgnored,l=c(),d=!1,b=u.subscribe((function(){if(null===n||null!==k(n)){var t=c(),u=y(n),b=u!==e;if(e=u,b&&(_.current.incoming||i()))return _.current.incoming=null,void(l=t);if(b||d&&!b&&t&&!l)l=t,_.current.outgoing.push(e),(l?a:s)(e,{selectionStart:r(),selectionEnd:o()});d=b}}));return function(){return b()}}),[u,n]),Object(d.useEffect)((function(){_.current.outgoing.includes(r)?Object(p.last)(_.current.outgoing)===r&&(_.current.outgoing=[]):y(n)!==r&&(_.current.outgoing=[],_.current.incoming=r,r&&(h(),n?(g(n,!0),h(),v(n,r,!1)):f(r)),o&&c&&m(o,c))}),[r,n])}var Ba=Object(m.createHigherOrderComponent)((function(e){return Object(O.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object(pe.a)(t,["useSubRegistry","registry"]);if(!r)return Object(d.createElement)(e,Object(s.a)({registry:o},c));var i=Object(d.useState)(null),a=Object(te.a)(i,2),l=a[0],u=a[1];return Object(d.useEffect)((function(){var e=Object(O.createRegistry)({},o),t=e.registerStore("core/block-editor",Sa);Ca(t),u(e)}),[o]),l?Object(d.createElement)(O.RegistryProvider,{value:l},Object(d.createElement)(e,Object(s.a)({registry:l},c))):null}))}),"withRegistryProvider")((function(e){var t=e.children,n=e.settings,r=Object(O.useDispatch)("core/block-editor").updateSettings;return Object(d.useEffect)((function(){r(n)}),[n]),xa(e),t})),Pa=n(72);var Ta=Object(m.compose)(Object(O.withSelect)((function(e,t){var n=e("core/block-editor"),r=n.getBlockCount,o=n.getBlockName,i=n.isBlockValid,a=n.getSettings,l=n.getTemplateLock,s=!r(t.rootClientId),u=o(t.lastBlockClientId)===Object(c.getDefaultBlockName)(),d=i(t.lastBlockClientId),b=a().bodyPlaceholder;return{isVisible:s||!u||!d,showPrompt:s,isLocked:!!l(t.rootClientId),placeholder:b}})),Object(O.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(Pa.decodeEntities)(c)||Object(h.__)("Start writing or type / to choose a block");return Object(d.createElement)("div",{"data-root-client-id":i||"",className:"wp-block block-editor-default-block-appender"},Object(d.createElement)(Wr.a,{role:"button","aria-label":Object(h.__)("Add block"),className:"block-editor-default-block-appender__content",readOnly:!0,onFocus:r,value:o?a:""}),Object(d.createElement)(Pl,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));var Na=Object(d.forwardRef)((function(e,t){var n=e.rootClientId,r=e.className,o=e.__experimentalSelectBlockOnInsert,c=e.onFocus,i=e.tabIndex;return Object(d.createElement)(Pl,{position:"bottom center",rootClientId:n,__experimentalSelectBlockOnInsert:o,__experimentalIsQuick:!0,renderToggle:function(e){var n,o=e.onToggle,a=e.disabled,l=e.isOpen,s=e.blockTitle,u=e.hasSingleBlockType;n=u?Object(h.sprintf)(// translators: %s: the name of the block when there is only one
|
27 |
+
Object(h._x)("Add %s","directly add the only allowed block"),s):Object(h._x)("Add block","Generic label for block inserter button");var b=!u,p=Object(d.createElement)(j.Button,{ref:t,onFocus:c,tabIndex:i,className:f()(r,"block-editor-button-block-appender"),onClick:o,"aria-haspopup":b?"true":void 0,"aria-expanded":b?l:void 0,disabled:a,label:n},!u&&Object(d.createElement)(j.VisuallyHidden,{as:"span"},n),Object(d.createElement)(to.a,{icon:Qr.a}));return(b||u)&&(p=Object(d.createElement)(j.Tooltip,{text:n},p)),p},isAppender:!0})}));function Ra(e){e.stopPropagation()}var Da=Object(O.withSelect)((function(e,t){var n=t.rootClientId,r=e("core/block-editor"),o=r.getBlockOrder,i=r.canInsertBlockType;return{isLocked:!!(0,r.getTemplateLock)(n),blockClientIds:o(n),canInsertDefaultBlock:i(Object(c.getDefaultBlockName)(),n)}}))((function(e){var t,n=e.blockClientIds,r=e.rootClientId,o=e.canInsertDefaultBlock,c=e.isLocked,i=e.renderAppender,a=e.className,l=e.tagName,s=void 0===l?"div":l;return c||!1===i?null:(t=i?Object(d.createElement)(i,null):o?Object(d.createElement)(Ta,{rootClientId:r,lastBlockClientId:Object(p.last)(n)}):Object(d.createElement)(Na,{rootClientId:r,className:"block-list-appender__toggle"}),Object(d.createElement)(s,{tabIndex:-1,onFocus:Ra,className:f()("block-list-appender",a)},t))}));function Ma(e){var t=e.element,n=e.rootClientId,r=Object(d.useState)(null),o=Object(te.a)(r,2),i=o[0],a=o[1],l=Object(O.useSelect)((function(e){var t,r=e("core/block-editor"),o=r.getBlockListSettings,c=r.getClientIdsOfDescendants,i=r.getBlockIndex,a=r.getSettings,l=r.getTemplateLock;return{orientation:null===(t=o(n))||void 0===t?void 0:t.orientation,getClientIdsOfDescendants:c,getBlockIndex:i,hasUploadPermissions:!!a().mediaUpload,isLockedAll:"all"===l(n)}}),[n]),s=l.getClientIdsOfDescendants,u=l.getBlockIndex,b=l.hasUploadPermissions,f=l.isLockedAll,p=l.orientation,m=Object(O.useDispatch)("core/block-editor"),v=m.insertBlocks,g=m.updateBlockAttributes,h=m.moveBlocksToPosition,k=Object(d.useCallback)((function(e){if(b){var t=Object(c.findTransform)(Object(c.getBlockTransforms)("from"),(function(t){return"files"===t.type&&t.isMatch(e)}));if(t){var r=t.transform(e,g);v(r,i,n)}}}),[b,g,v,i,n]),y=Object(d.useCallback)((function(e){var t=Object(c.pasteHandler)({HTML:e,mode:"BLOCKS"});t.length&&v(t,i,n)}),[v,i,n]),_=Object(d.useCallback)((function(e){var t=function(e){var t={srcRootClientId:null,srcClientIds:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(e),r=t.srcRootClientId,o=t.srcClientIds;if("block"===t.type){var c=u(o[0],r);if(r!==n||c!==i)if(!o.includes(n)&&!s(o).some((function(e){return e===n})))h(o,r,n,(r===n||""===r&&void 0===n)&&c<i?i-1:i)}}),[s,u,i,h,n]),E=Object(j.__unstableUseDropZone)({element:t,onFilesDrop:k,onHTMLDrop:y,onDrop:_,isDisabled:f,withPosition:!0}).position;if(Object(d.useEffect)((function(){if(E){var e=function(e,t,n){var r,o,c=t.x,i=t.y,a="horizontal"===n;return e.forEach((function(t,n){if(t.classList.contains("wp-block")){var l,s=t.getBoundingClientRect(),u=a?i:c,d=a?c:i,b=a?s.top:s.left,f=a?s.bottom:s.right;l=u>=b&&u<=f?u:u<b?b:f;var p=a?s.left:s.top,m=a?s.right:s.bottom,v=Math.sqrt(Math.pow(u-l,2)+Math.pow(d-p,2));(void 0===o||Math.abs(v)<o)&&(o=v,r=n);var O=Math.sqrt(Math.pow(u-l,2)+Math.pow(d-m,2));if(Math.abs(O)<o){o=O;var g=1;e[n+1]&&e[n+1].classList.contains("is-dragging")&&(g=2),r=n+g}}})),r}(Array.from(t.current.children),E,p);a(void 0===e?0:e)}}),[E]),E)return i}var Aa,La=Object(d.forwardRef)((function(e,t){var n=e.className,r=e.rootClientId,o=e.renderAppender,c=e.__experimentalTagName,i=void 0===c?"div":c,a=e.__experimentalAppenderTagName,l=e.__experimentalPassedProps,u=void 0===l?{}:l,b=Object(O.useSelect)((function(e){var t,n=e("core/block-editor"),o=n.getBlockOrder,c=n.getBlockListSettings,i=n.getSelectedBlockClientId,a=n.getMultiSelectedBlockClientIds,l=n.hasMultiSelection,s=n.getGlobalBlockCount,u=n.isTyping;return{blockClientIds:o(r),selectedBlockClientId:i(),multiSelectedBlockClientIds:a(),orientation:null===(t=c(r))||void 0===t?void 0:t.orientation,hasMultiSelection:l(),enableAnimation:!u()&&s()<=200}}),[r]),p=b.blockClientIds,m=b.selectedBlockClientId,v=b.multiSelectedBlockClientIds,g=b.orientation,h=b.hasMultiSelection,j=b.enableAnimation,k=r?i:Ys,y=Ma({element:t,rootClientId:r}),_=y===p.length;return Object(d.createElement)(k,Object(s.a)({},u,{ref:t,className:f()("block-editor-block-list__layout",n,u.className)}),p.map((function(e,t){var n=h?v.includes(e):m===e,o=y===t;return Object(d.createElement)(O.AsyncModeProvider,{key:e,value:!n},Object(d.createElement)(iu,{rootClientId:r,clientId:e,index:t,enableAnimation:j,className:f()({"is-drop-target":o,"is-dropping-horizontally":o&&"horizontal"===g})}))})),Object(d.createElement)(Da,{tagName:a,rootClientId:r,renderAppender:o,className:f()({"is-drop-target":_,"is-dropping-horizontally":_&&"horizontal"===g})}))})),Fa=Object(d.forwardRef)((function(e,t){var n=Object(d.useRef)();return Object(d.createElement)(O.AsyncModeProvider,{value:!1},Object(d.createElement)(La,Object(s.a)({ref:t||n},e)))}));function Va(e){var t=e.onClick;return Object(d.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},Object(d.createElement)(j.Disabled,null,Object(d.createElement)(Fa,null)))}var Ha=function(e){var t=e.viewportWidth,n=e.__experimentalPadding,r=Object(m.useResizeObserver)(),o=Object(te.a)(r,2),c=o[0],i=o[1].width,a=Object(m.useResizeObserver)(),l=Object(te.a)(a,2),s=l[0],u=l[1].height;Aa=Aa||Object(m.pure)(Fa);var b=(i-2*n)/t;return Object(d.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:u*b+2*n}},c,Object(d.createElement)(j.Disabled,{style:{transform:"scale(".concat(b,")"),width:t,left:n,right:n,top:n},className:"block-editor-block-preview__content"},s,Object(d.createElement)(Aa,null)))};var za=Object(d.memo)((function(e){var t=e.blocks,n=e.__experimentalPadding,r=void 0===n?0:n,o=e.viewportWidth,c=void 0===o?700:o,i=e.__experimentalLive,a=void 0!==i&&i,l=e.__experimentalOnClick,s=Object(O.useSelect)((function(e){return e("core/block-editor").getSettings()}),[]),u=Object(d.useMemo)((function(){return Object(p.castArray)(t)}),[t]);return t&&0!==t.length?Object(d.createElement)(Ba,{value:u,settings:s},a?Object(d.createElement)(Va,{onClick:l}):Object(d.createElement)(Ha,{viewportWidth:c,__experimentalPadding:r})):null}));function Ua(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 Ga(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ua(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ua(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ka=function(e){var t=e.item,n=Object(c.getBlockType)(t.name);return Object(d.createElement)("div",{className:"block-editor-inserter__preview-container"},Object(d.createElement)("div",{className:"block-editor-inserter__preview"},Object(c.isReusableBlock)(t)||n.example?Object(d.createElement)("div",{className:"block-editor-inserter__preview-content"},Object(d.createElement)(za,{__experimentalPadding:16,viewportWidth:500,blocks:n.example?Object(c.getBlockFromExample)(t.name,{attributes:Ga({},n.example.attributes,{},t.initialAttributes),innerBlocks:n.example.innerBlocks}):Object(c.createBlock)(t.name,t.initialAttributes)})):Object(d.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},Object(h.__)("No Preview Available."))),!Object(c.isReusableBlock)(t)&&Object(d.createElement)(oo,{blockType:t}))},Wa=n(54),qa=n(120),$a=n(121);var Ya=function(e){var t=e.icon,n=e.onClick,r=e.isDisabled,o=e.title,c=e.className,i=e.composite,a=Object(pe.a)(e,["icon","onClick","isDisabled","title","className","composite"]),l=t?{backgroundColor:t.background,color:t.foreground}:{};return Object(d.createElement)("div",{className:"block-editor-block-types-list__list-item"},Object(d.createElement)($a.a,Object(s.a)({role:"option",as:j.Button},i,{className:f()("block-editor-block-types-list__item",c),onClick:function(e){e.preventDefault(),n()},disabled:r},a),Object(d.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:l},Object(d.createElement)(An,{icon:t,showColors:!0})),Object(d.createElement)("span",{className:"block-editor-block-types-list__item-title"},o)))};var Xa=function(e){var t=e.items,n=void 0===t?[]:t,r=e.onSelect,o=e.onHover,i=void 0===o?function(){}:o,a=e.children,l=e.label,u=Object(Wa.g)(),b=Dn(n),f=b.reduce((function(e,t){return e+"--"+t.id}),"");return Object(d.useEffect)((function(){u.unstable_sort()}),[u.unstable_sort,f]),Object(d.createElement)(qa.a,Object(s.a)({},u,{role:"listbox",className:"block-editor-block-types-list","aria-label":l}),b.map((function(e){return Object(d.createElement)(Ya,{key:e.id,className:Object(c.getBlockMenuDefaultClassName)(e.id),icon:e.icon,onClick:function(){r(e),i(null)},onFocus:function(){return i(e)},onMouseEnter:function(){return i(e)},onMouseLeave:function(){return i(null)},onBlur:function(){return i(null)},isDisabled:e.isDisabled,title:e.title,composite:u})})),a)};function Qa(e){var t=e.rootClientId,n=e.children,r=Object(O.useSelect)((function(e){var n=(0,e("core/blocks").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(d.createElement)("div",{className:"block-editor-inserter__child-blocks"},(c||o)&&Object(d.createElement)("div",{className:"block-editor-inserter__parent-block-header"},Object(d.createElement)(An,{icon:c,showColors:!0}),o&&Object(d.createElement)("h2",null,o)),n)}var Za=Object(j.createSlotFill)("__experimentalInserterMenuExtension"),Ja=Za.Fill,el=Za.Slot;Ja.Slot=el;var tl=Ja;var nl=function(e){var t=e.title,n=e.icon,r=e.children;return Object(d.createElement)(d.Fragment,null,Object(d.createElement)("div",{className:"block-editor-inserter__panel-header"},Object(d.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),Object(d.createElement)(j.Icon,{icon:n})),Object(d.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};var rl=function(){return Object(d.createElement)("div",{className:"block-editor-inserter__no-results"},Object(d.createElement)(to.a,{className:"block-editor-inserter__no-results-icon",icon:Mn.a}),Object(d.createElement)("p",null,Object(h.__)("No results found.")))};function ol(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 cl=Object(j.withSpokenMessages)((function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.filterValue,c=e.debouncedSpeak,i=e.showMostUsedBlocks,a=Tn(t,n),l=Object(te.a)(a,4),s=l[0],b=l[1],f=l[2],m=l[3],v=Object(O.useSelect)((function(e){var n=e("core/block-editor").getBlockName;return!!(0,e("core/blocks").getChildBlockNames)(n(t)).length}),[t]),g=Object(d.useMemo)((function(){return Bn(s,b,f,o)}),[o,s,b,f]),j=Object(d.useMemo)((function(){return Object(p.orderBy)(s,["frecency"],["desc"]).slice(0,6)}),[s]),k=Object(d.useMemo)((function(){return g.filter((function(e){return!e.category}))}),[g]),y=Object(d.useMemo)((function(){var e=function(e){return Object(p.findIndex)(b,(function(t){return t.slug===e.category}))};return Object(p.flow)((function(e){return e.filter((function(e){return e.category&&"reusable"!==e.category}))}),(function(t){return Object(p.sortBy)(t,e)}),(function(e){return Object(p.groupBy)(e,"category")}))(g)}),[g,b]),_=Object(d.useMemo)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ol(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ol(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},f);return Object.keys(f).forEach((function(t){e[t]=g.filter((function(e){return function(e){return e.name.split("/")[0]}(e)===t})),0===e[t].length&&delete e[t]})),e}),[g,f]);Object(d.useEffect)((function(){return function(){return r(null)}}),[]),Object(d.useEffect)((function(){var e=Object(h.sprintf)(
|
28 |
+
/* translators: %d: number of results. */
|
29 |
+
Object(h._n)("%d result found.","%d results found.",g.length),g.length);c(e)}),[o,c]);var E=!Object(p.isEmpty)(g);return Object(d.createElement)("div",null,v&&Object(d.createElement)(Qa,{rootClientId:t},Object(d.createElement)(Xa,{items:g,onSelect:m,onHover:r,label:Object(h.__)("Child Blocks")})),i&&!v&&!!j.length&&!o&&Object(d.createElement)(nl,{title:Object(h._x)("Most used","blocks")},Object(d.createElement)(Xa,{items:j,onSelect:m,onHover:r,label:Object(h._x)("Most used","blocks")})),!v&&Object(p.map)(b,(function(e){var t=y[e.slug];return t&&t.length?Object(d.createElement)(nl,{key:e.slug,title:e.title,icon:e.icon},Object(d.createElement)(Xa,{items:t,onSelect:m,onHover:r,label:e.title})):null})),!v&&!!k.length&&Object(d.createElement)(nl,{className:"block-editor-inserter__uncategorized-blocks-panel",title:Object(h.__)("Uncategorized")},Object(d.createElement)(Xa,{items:k,onSelect:m,onHover:r,label:Object(h.__)("Uncategorized")})),!v&&Object(p.map)(f,(function(e,t){var n=_[t];return n&&n.length?Object(d.createElement)(nl,{key:t,title:e.title,icon:e.icon},Object(d.createElement)(Xa,{items:n,onSelect:m,onHover:r,label:e.title})):null})),Object(d.createElement)(tl.Slot,{fillProps:{onSelect:m,onHover:r,filterValue:o,hasItems:E}},(function(e){return e.length?e:E?null:Object(d.createElement)(rl,null)})))})),il=function(e){var t=Object(O.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(O.useDispatch)("core/notices").createSuccessNotice;return[r,n,Object(d.useCallback)((function(t,n){e(Object(p.map)(n,(function(e){return Object(c.cloneBlock)(e)}))),o(Object(h.sprintf)(
|
30 |
+
/* translators: %s: block pattern title. */
|
31 |
+
Object(h.__)('Pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function al(e){var t=e.pattern,n=e.onClick,r=t.content,o=t.viewportWidth,i=Object(d.useMemo)((function(){return Object(c.parse)(r)}),[r]),a=Object(m.useInstanceId)(al),l="block-editor-block-patterns-list__item-description-".concat(a);return Object(d.createElement)("div",{className:"block-editor-block-patterns-list__item",role:"button",onClick:function(){return n(t,i)},onKeyDown:function(e){et.ENTER!==e.keyCode&&et.SPACE!==e.keyCode||n(t,i)},tabIndex:0,"aria-label":t.title,"aria-describedby":t.description?l:void 0},Object(d.createElement)(za,{blocks:i,viewportWidth:o}),Object(d.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},t.title),!!t.description&&Object(d.createElement)(j.VisuallyHidden,{id:l},t.description))}function ll(){return Object(d.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var sl=function(e){var t=e.blockPatterns,n=e.shownPatterns,r=e.onClickPattern;return t.map((function(e){return n.includes(e)?Object(d.createElement)(al,{key:e.name,pattern:e,onClick:r}):Object(d.createElement)(ll,{key:e.name})}))};function ul(e){var t=e.filterValue,n=e.onInsert,r=il(n),o=Object(te.a)(r,3),c=o[0],i=o[2],a=Object(m.useAsyncList)(c),l=Object(d.useMemo)((function(){return Pn(c,t)}),[t,c]);if(t)return l.length?Object(d.createElement)(nl,{title:Object(h.__)("Search Results")},Object(d.createElement)(sl,{shownPatterns:a,blockPatterns:l,onClickPattern:i})):Object(d.createElement)(rl,null)}function dl(e){var t=e.onInsert,n=il(t),r=Object(te.a)(n,3),o=r[0],c=r[1],i=r[2],a=Object(d.useCallback)((function(e){if(!e.categories||!e.categories.length)return 1/0;var t=Object(p.fromPairs)(c.map((function(e,t){return[e.name,t]})));return Math.min.apply(Math,Object(ee.a)(e.categories.map((function(e){return void 0!==t[e]?t[e]:1/0}))))}),[c]),l=Object(d.useMemo)((function(){return o.sort((function(e,t){return a(e)-a(t)}))}),[o,a]),s=Object(m.useAsyncList)(l),u=Object(d.useMemo)((function(){return o.filter((function(e){return a(e)===1/0}))}),[o,a]);return Object(d.createElement)(d.Fragment,null,c.map((function(e){var t=o.filter((function(t){return t.categories&&t.categories.includes(e.name)}));return!!t.length&&Object(d.createElement)(nl,{key:e.name,title:e.label},Object(d.createElement)(sl,{shownPatterns:s,blockPatterns:t,onClickPattern:i}))})),!!u.length&&Object(d.createElement)(nl,{title:Object(h._x)("Uncategorized")},Object(d.createElement)(sl,{shownPatterns:s,blockPatterns:u,onClickPattern:i})))}var bl=function(e){var t=e.onInsert,n=e.filterValue;return n?Object(d.createElement)(ul,{onInsert:t,filterValue:n}):Object(d.createElement)(dl,{onInsert:t})},fl=n(28);function pl(e){var t=e.debouncedSpeak,n=e.filterValue,r=e.onHover,o=e.onInsert,c=e.rootClientId,i=Tn(c,o),a=Object(te.a)(i,4),l=a[0],s=a[1],u=a[2],b=a[3],f=Object(d.useMemo)((function(){var e=l.filter((function(e){return"reusable"===e.category}));return n?Bn(e,s,u,n):e}),[n,l,s,u]);return Object(d.useEffect)((function(){var e=Object(h.sprintf)(
|
32 |
+
/* translators: %d: number of results. */
|
33 |
+
Object(h._n)("%d result found.","%d results found.",f.length),f.length);t(e)}),[n,t]),0===f.length?Object(d.createElement)(rl,null):Object(d.createElement)(nl,{title:n?Object(h.__)("Search Results"):Object(h.__)("Reusable blocks")},Object(d.createElement)(Xa,{items:f,onSelect:b,onHover:r,label:n?Object(h.__)("Search Results"):Object(h.__)("Reusable blocks")}))}var ml=Object(j.withSpokenMessages)((function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.filterValue,c=e.debouncedSpeak;return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(pl,{debouncedSpeak:c,filterValue:o,onHover:r,onInsert:n,rootClientId:t}),Object(d.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},Object(d.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:Object(fl.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(h.__)("Manage all reusable blocks"))))}));function vl(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 Ol=function(e){var t=e.onSelect,n=e.rootClientId,r=e.clientId,o=e.isAppender,i=e.selectBlockOnInsert,a=Object(O.useSelect)((function(e){var t,c=e("core/block-editor"),i=c.getSettings,a=c.getBlockRootClientId,l=c.getBlockSelectionEnd,s=n;if(!s&&!r&&!o){var d=l();d&&(s=a(d))}return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vl(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({hasPatterns:!!(null===(t=i().__experimentalBlockPatterns)||void 0===t?void 0:t.length),destinationRootClientId:s},Object(p.pick)(e("core/block-editor"),["getSelectedBlock","getBlockIndex","getBlockSelectionEnd","getBlockOrder"]))}),[o,r,n]),l=a.destinationRootClientId,s=a.getSelectedBlock,d=a.getBlockIndex,b=a.getBlockSelectionEnd,f=a.getBlockOrder,m=Object(O.useDispatch)("core/block-editor"),v=m.replaceBlocks,g=m.insertBlocks,j=m.showInsertionPoint,k=m.hideInsertionPoint;function y(){if(r)return d(r,l);var e=b();return!o&&e?d(e,l)+1:f(l).length}return[l,function(e){var n=s();if(!o&&n&&Object(c.isUnmodifiedDefaultBlock)(n)?v(n.clientId,e):g(e,y(),l,i),!i){
|
34 |
+
// translators: %d: the name of the block that has been added
|
35 |
+
var r=Object(h._n)("%d block added.","%d blocks added",e.length);Object(Te.speak)(r)}t&&t()},function(e){if(e){var t=y();j(l,t)}else k()}]},gl={name:"blocks",
|
36 |
+
/* translators: Blocks tab title in the block inserter. */
|
37 |
+
title:Object(h.__)("Blocks")},hl={name:"patterns",
|
38 |
+
/* translators: Patterns tab title in the block inserter. */
|
39 |
+
title:Object(h.__)("Patterns")},jl={name:"reusable",
|
40 |
+
/* translators: Reusable blocks tab title in the block inserter. */
|
41 |
+
title:Object(h.__)("Reusable")};var kl=function(e){var t=e.children,n=e.showPatterns,r=void 0!==n&&n,o=e.showReusableBlocks,c=void 0!==o&&o,i=[gl];return r&&i.push(hl),c&&i.push(jl),Object(d.createElement)(j.TabPanel,{className:"block-editor-inserter__tabs",tabs:i},t)},yl=function(e){return e.stopPropagation()};var _l=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.__experimentalSelectBlockOnInsert,c=e.onSelect,i=e.showInserterHelpPanel,a=e.showMostUsedBlocks,l=Object(d.useState)(""),s=Object(te.a)(l,2),u=s[0],b=s[1],f=Object(d.useState)(null),p=Object(te.a)(f,2),m=p[0],v=p[1],g=Ol({rootClientId:t,clientId:n,isAppender:r,selectBlockOnInsert:o}),k=Object(te.a)(g,3),y=k[0],_=k[1],E=k[2],C=Object(O.useSelect)((function(e){var t=e("core/block-editor").getSettings(),n=t.__experimentalBlockPatterns,r=t.__experimentalReusableBlocks;return{hasPatterns:!!(null==n?void 0:n.length),hasReusableBlocks:!!(null==r?void 0:r.length)}}),[]),w=C.hasPatterns,S=C.hasReusableBlocks,I=!y&&w,x=function(e){_(e),c()},B=function(e){E(!!e),v(e)},P=Object(d.createElement)(d.Fragment,null,Object(d.createElement)("div",{className:"block-editor-inserter__block-list"},Object(d.createElement)(cl,{rootClientId:y,onInsert:x,onHover:B,filterValue:u,showMostUsedBlocks:a})),i&&Object(d.createElement)("div",{className:"block-editor-inserter__tips"},Object(d.createElement)(j.VisuallyHidden,{as:"h2"},Object(h.__)("A tip for using the block editor")),Object(d.createElement)(Jr,null))),T=Object(d.createElement)(bl,{onInsert:x,filterValue:u}),N=Object(d.createElement)(ml,{rootClientId:y,onInsert:x,onHover:B,filterValue:u});return Object(d.createElement)("div",{className:"block-editor-inserter__menu",onKeyPress:yl,onKeyDown:function(e){[et.LEFT,et.DOWN,et.RIGHT,et.UP,et.BACKSPACE,et.ENTER].includes(e.keyCode)&&e.stopPropagation()}},Object(d.createElement)("div",{className:"block-editor-inserter__main-area"},Object(d.createElement)("div",{className:"block-editor-inserter__content"},Object(d.createElement)(ro,{onChange:function(e){m&&v(null),b(e)},value:u}),(I||S)&&Object(d.createElement)(kl,{showPatterns:I,showReusableBlocks:S},(function(e){return"blocks"===e.name?P:"patterns"===e.name?T:N})),!I&&!S&&P)),i&&m&&Object(d.createElement)(Ka,{item:m}))},El=function(e){[et.LEFT,et.DOWN,et.RIGHT,et.UP,et.BACKSPACE,et.ENTER].includes(e.keyCode)&&e.stopPropagation()},Cl=function(e){return e.stopPropagation()};function wl(e){var t=e.blockTypes,n=e.blockPatterns,r=e.onSelectBlockType,o=e.onSelectBlockPattern,c=e.onHover,i=Object(d.useMemo)((function(){return Object(p.orderBy)(t,["frecency"],["desc"]).slice(0,6)}),[t]),a=Object(d.useMemo)((function(){return n.slice(0,2)}),[t]);return Object(d.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},!i.length&&!a.length&&Object(d.createElement)(rl,null),!!i.length&&Object(d.createElement)(nl,{title:Object(d.createElement)(j.VisuallyHidden,null,Object(h.__)("Blocks"))},Object(d.createElement)(Xa,{items:i,onSelect:r,onHover:c,label:Object(h.__)("Blocks")})),!!i.length&&!!a.length&&Object(d.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!a.length&&Object(d.createElement)(nl,{title:Object(d.createElement)(j.VisuallyHidden,null,Object(h.__)("Blocks"))},Object(d.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},Object(d.createElement)(sl,{shownPatterns:a,blockPatterns:a,onClickPattern:o}))))}var Sl=Object(j.withSpokenMessages)((function(e){var t=e.onSelect,n=e.rootClientId,r=e.clientId,o=e.isAppender,c=e.selectBlockOnInsert,i=e.debouncedSpeak,a=Object(d.useState)(""),l=Object(te.a)(a,2),s=l[0],u=l[1],b=Ol({onSelect:t,rootClientId:n,clientId:r,isAppender:o,selectBlockOnInsert:c}),p=Object(te.a)(b,3),m=p[0],v=p[1],g=p[2],k=Tn(m,v),y=Object(te.a)(k,4),_=y[0],E=y[1],C=y[2],w=y[3],S=il(v),I=Object(te.a)(S,3),x=I[0],B=I[2],P=!m&&x.length&&!!s,T=P&&x.length>6||_.length>6,N=Object(d.useMemo)((function(){return Bn(_,E,C,s)}),[s,_,E,C]),R=Object(d.useMemo)((function(){return Pn(x,s)}),[s,x]),D=Object(O.useSelect)((function(e){return e("core/block-editor").getSettings().__experimentalSetIsInserterOpened}),[]);return Object(d.useEffect)((function(){D&&D(!1)}),[D]),Object(d.useEffect)((function(){if(s){var e=N.length+R.length,t=Object(h.sprintf)(
|
42 |
+
/* translators: %d: number of results. */
|
43 |
+
Object(h._n)("%d result found.","%d results found.",e),e);i(t)}}),[s,i]),Object(d.createElement)("div",{className:f()("block-editor-inserter__quick-inserter",{"has-search":T,"has-expand":D}),onKeyPress:Cl,onKeyDown:El},T&&Object(d.createElement)(ro,{value:s,onChange:function(e){u(e)}}),Object(d.createElement)(wl,{blockTypes:N,blockPatterns:P?R:[],onSelectBlockPattern:B,onSelectBlockType:w,onHover:g}),D&&Object(d.createElement)(j.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:function(){return D(!0)},"aria-label":Object(h.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},Object(h.__)("Browse all")))}));function Il(){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}}var xl=function(e){var t,n=e.onToggle,r=e.disabled,o=e.isOpen,c=e.blockTitle,i=e.hasSingleBlockType,a=e.toggleProps;return t=i?Object(h.sprintf)(// translators: %s: the name of the block when there is only one
|
44 |
+
Object(h._x)("Add %s","directly add the only allowed block"),c):Object(h._x)("Add block","Generic label for block inserter button"),Object(d.createElement)(j.Button,Object(s.a)({icon:Qr.a,label:t,tooltipPosition:"bottom",onClick:n,className:"block-editor-inserter__toggle","aria-haspopup":!i&&"true","aria-expanded":!i&&o,disabled:r},a))},Bl=function(e){Object(Ht.a)(r,e);var t,n=(t=r,function(){var e,n=Object(Vt.a)(t);if(Il()){var r=Object(Vt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Ft.a)(this,e)});function r(){var e;return Object(Mt.a)(this,r),(e=n.apply(this,arguments)).onToggle=e.onToggle.bind(Object(Lt.a)(e)),e.renderToggle=e.renderToggle.bind(Object(Lt.a)(e)),e.renderContent=e.renderContent.bind(Object(Lt.a)(e)),e}return Object(At.a)(r,[{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,s=r.renderToggle,u=void 0===s?xl:s;return 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(d.createElement)(Sl,{onSelect:t,rootClientId:r,clientId:o,isAppender:c,selectBlockOnInsert:a}):Object(d.createElement)(_l,{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(d.createElement)(j.Dropdown,{className:"block-editor-inserter",contentClassName:f()("block-editor-inserter__popover",{"is-quick":o}),position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:Object(h.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent})}}]),r}(d.Component),Pl=Object(m.compose)([Object(O.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("core/blocks").getBlockVariations,s=a(r=r||c(n)||void 0),u=1===Object(p.size)(s)&&0===Object(p.size)(l(s[0].name,"inserter")),d=!1;return u&&(d=s[0]),{hasItems:i(r),hasSingleBlockType:u,blockTitle:d?d.title:"",allowedBlockType:d,rootClientId:r}})),Object(O.withDispatch)((function(e,t,n){var r=n.select;return{insertOnlyAllowedBlock:function(){var n=t.rootClientId,o=t.clientId,i=t.isAppender,a=t.hasSingleBlockType,l=t.allowedBlockType,s=t.__experimentalSelectBlockOnInsert;if(a&&((0,e("core/block-editor").insertBlock)(Object(c.createBlock)(l.name),function(){var e=r("core/block-editor"),t=e.getBlockIndex,c=e.getBlockSelectionEnd,a=e.getBlockOrder;if(o)return t(o,n);var l=c();return!i&&l?t(l,n)+1:a(n).length}(),n,s),!s)){var u=Object(h.sprintf)(// translators: %s: the name of the block that has been added
|
45 |
+
Object(h.__)("%s block added"),l.title);Object(Te.speak)(u)}}}})),Object(m.ifCondition)((function(e){var t=e.hasItems,n=e.isAppender,r=e.rootClientId,o=e.clientId;return t||!n&&!r&&!o}))])(Bl),Tl=Object(d.forwardRef)((function(e,t){var n=e.selectedClientId,r=e.isReverse,o=e.containerRef,c=e.noCapture,i=e.hasMultiSelection,a=e.multiSelectionContainer,l=Object(O.useSelect)((function(e){return e("core/block-editor").isNavigationMode()})),s=Object(O.useDispatch)("core/block-editor").setNavigationMode;return Object(d.createElement)("div",{ref:t,tabIndex:l?void 0:"0",onFocus:function(){if(c.current)c.current=null;else if(n){var e=He(n);if(r){var t=fr.focus.tabbable.find(e);(Object(p.last)(t)||e).focus()}else e.focus()}else{if(i)return void a.current.focus();s(!0);var l=fr.focus.tabbable.find(o.current);l.length&&(r?Object(p.last)(l).focus():Object(p.first)(l).focus())}},style:{position:"fixed"}})})),Nl=window,Rl=Nl.getSelection,Dl=Nl.getComputedStyle,Ml=Object(p.overEvery)([fr.isTextField,fr.focus.tabbable.isTabbableIndex]);function Al(e,t,n,r){var o,c=fr.focus.focusable.find(n);return t&&(c=Object(p.reverse)(c)),c=c.slice(c.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),Object(p.find)(c,(function t(n,c,i){if(!fr.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(fr.isTextField)(n))return!0;if(!n.classList.contains("block-editor-block-list__block"))return!1;if(function(e){return e.classList.contains("block-editor-block-list__layout")||!!e.querySelector(".block-editor-block-list__layout")}(n))return!0;if(n.contains(e))return!1;for(var l,s=1;(l=i[c+s])&&n.contains(l);s++)if(t(l,c+s,i))return!1;return!0}))}function Ll(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,s=t.hasMultiSelection,u=t.getBlockOrder,d=t.isNavigationMode,b=t.hasBlockMovingClientId,f=t.getBlockIndex,p=t.getBlockRootClientId,m=t.getClientIdsOfDescendants,v=t.canInsertBlockType,O=t.getBlockName,g=t.isSelectionEnabled,h=t.getBlockSelectionStart,j=t.isMultiSelecting,k=t.getSettings,y=n(),_=r(),E=o();return{selectedBlockClientId:y,selectionStartClientId:_,selectionBeforeEndClientId:c(E||y),selectionAfterEndClientId:i(E||y),selectedFirstClientId:a(),selectedLastClientId:l(),hasMultiSelection:s(),blocks:u(),isNavigationMode:d(),hasBlockMovingClientId:b,getBlockIndex:f,getBlockRootClientId:p,getClientIdsOfDescendants:m,canInsertBlockType:v,getBlockName:O,isSelectionEnabled:g(),blockSelectionStart:h(),isMultiSelecting:j(),keepCaretInsideBlock:k().keepCaretInsideBlock}}function Fl(e){var t=e.children,n=Object(d.useRef)(),r=Object(d.useRef)(),o=Object(d.useRef)(),c=Object(d.useRef)(),i=Object(d.useRef)(),a=Object(d.useRef)(),l=Object(d.useRef)(),s=Object(O.useSelect)(Ll,[]),u=s.selectedBlockClientId,b=s.selectionStartClientId,m=s.selectionBeforeEndClientId,v=s.selectionAfterEndClientId,g=s.selectedFirstClientId,j=s.selectedLastClientId,k=s.hasMultiSelection,y=s.blocks,_=s.isNavigationMode,E=s.hasBlockMovingClientId,C=s.isSelectionEnabled,w=s.blockSelectionStart,S=s.isMultiSelecting,I=s.getBlockIndex,x=s.getBlockRootClientId,B=s.getClientIdsOfDescendants,P=s.canInsertBlockType,T=s.getBlockName,N=s.keepCaretInsideBlock,R=Object(O.useDispatch)("core/block-editor"),D=R.multiSelect,M=R.selectBlock,A=R.clearSelectedBlock,L=R.setNavigationMode,F=R.setBlockMovingClientId,V=R.moveBlockToPosition,H=Object(d.useState)(!1),z=Object(te.a)(H,2),U=z[0],G=z[1];Object(d.useEffect)((function(){k&&!S&&c.current.focus()}),[k,S]);var K=f()("block-editor-writing-flow",{"is-navigate-mode":_,"is-block-moving-mode":!!E(),"can-insert-moving-block":U});return Object(d.createElement)("div",{className:K},Object(d.createElement)(Tl,{ref:r,selectedClientId:u,containerRef:n,noCapture:a,hasMultiSelection:k,multiSelectionContainer:c}),Object(d.createElement)("div",{ref:n,onKeyDown:function(e){var t=e.keyCode,s=e.target,d=t===et.UP,f=t===et.DOWN,O=t===et.LEFT,h=t===et.RIGHT,C=t===et.TAB,w=t===et.ESCAPE,S=t===et.ENTER,R=t===et.SPACE,H=d||O,z=O||h,U=d||f,K=z||U,W=e.shiftKey,q=W||e.ctrlKey||e.altKey||e.metaKey,$=U?fr.isVerticalEdge:fr.isHorizontalEdge;if(_){var Y,X=C&&W||d,Q=C&&!W||f,Z=O,J=h;if(X)Y=m;else if(Q)Y=v;else if(Z){var ee;Y=null!==(ee=x(u))&&void 0!==ee?ee:u}else if(J){var te;Y=null!==(te=B([u])[0])&&void 0!==te?te:u}var ne=E();if(ne&&Y&&G(P(T(ne),x(Y))),w&&ne&&(F(null),G(!1)),(S||R)&&ne){var re=x(ne),oe=x(u),ce=I(ne,re),ie=I(u,oe);ce<ie&&re===oe&&(ie-=1),V(ne,re,oe,ie),M(ne),F(null)}if(Q||X||Z||J)if(Y)e.preventDefault(),M(Y);else if(C&&u){var ae,le=He(u);(ae=Q?fr.focus.tabbable.findNext(le):fr.focus.tabbable.findPrevious(le))&&(e.preventDefault(),ae.focus(),A())}}else{if(u)if(C){var se=He(u);if(W){if(s===se)return a.current=!0,void r.current.focus()}else{var ue=fr.focus.tabbable.find(se);if(s===(Object(p.last)(ue)||se))return a.current=!0,void o.current.focus()}}else w&&L(!0);else if(k&&C&&s===c.current)return a.current=!0,void(W?r.current.focus():o.current.focus());if(U?l.current||(l.current=Object(fr.computeCaretRect)()):l.current=null,!K)return et.isKeyboardEvent.primary(e)&&(i.current=Object(fr.isEntirelySelected)(s)),void(et.isKeyboardEvent.primary(e,"a")&&((s.isContentEditable?i.current:Object(fr.isEntirelySelected)(s))&&(D(Object(p.first)(y),Object(p.last)(y)),e.preventDefault()),i.current=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===et.UP||t===et.DOWN)&&!n)return!0;var r=e.tagName;return"INPUT"!==r&&"TEXTAREA"!==r}(s,t,q)){var de="rtl"===Dl(s).direction?!H:H;if(W)(H&&m||!H&&v)&&(k||function(e,t){var r,o,c=Al(e,t,n.current);return!(c&&(r=e,o=c,r.closest(".block-editor-block-list__block")===o.closest(".block-editor-block-list__block")))}(s,H)&&$(s,H))&&(!function(e){var t=e?m:v;t&&D(b||u,t)}(H),e.preventDefault());else if(k)!function(e){var t=e?g:j;t&&M(t)}(H),e.preventDefault();else if(U&&Object(fr.isVerticalEdge)(s,H)&&!N){var be=Al(s,H,n.current,!0);be&&(Object(fr.placeCaretAtVerticalEdge)(be,H,l.current),e.preventDefault())}else if(z&&Rl().isCollapsed&&Object(fr.isHorizontalEdge)(s,de)&&!N){var fe=Al(s,de,n.current);Object(fr.placeCaretAtHorizontalEdge)(fe,de),e.preventDefault()}}}},onMouseDown:function(e){if(l.current=null,_&&u&&ze(He(u),e.target)?(L(!1),F(null)):_&&E()&&Ue(e.target)&&G(P(T(E()),x(Ue(e.target)))),C&&0===e.button){var t=Ue(e.target);t&&(e.shiftKey?w!==t&&(D(w,t),e.preventDefault()):k&&M(t))}}},Object(d.createElement)("div",{ref:c,tabIndex:k?"0":void 0,"aria-label":k?Object(h.__)("Multiple selected blocks"):void 0,style:{position:"fixed"}}),t),Object(d.createElement)(Tl,{ref:o,selectedClientId:u,containerRef:n,noCapture:a,hasMultiSelection:k,multiSelectionContainer:c,isReverse:!0}),Object(d.createElement)("div",{"aria-hidden":!0,tabIndex:-1,onClick:function(){var e=fr.focus.focusable.find(n.current),t=Object(p.findLast)(e,Ml);t&&Object(fr.placeCaretAtHorizontalEdge)(t,!0)},className:"block-editor-writing-flow__click-redirect"}))}function Vl(e){var t=e.clientId,n=e.setIsInserterForced,r=e.containerRef,o=Object(d.useRef)(),c=Object(O.useSelect)((function(e){var n=e("core/block-editor"),r=n.getMultiSelectedBlockClientIds,o=n.getSelectedBlockClientId,c=n.hasMultiSelection,i=r(),a=o();return c()?i.includes(t):t===a}),[t]);return Object(d.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=i.getBoundingClientRect(),l=c<a.top+a.height/2,s=He(t),u=Al(s,!0,l?r.current:s)||s,d=new window.DOMRect(n,c,0,16);Object(fr.placeCaretAtVerticalEdge)(u,l,d,!1)}},tabIndex:-1,className:f()("block-editor-block-list__insertion-point-inserter",{"is-inserter-hidden":c})},Object(d.createElement)(Pl,{position:"bottom center",clientId:t,__experimentalIsQuick:!0}))}function Hl(e){var t=e.clientId,n=e.isInserterShown,r=e.isInserterForced,o=e.setIsInserterForced,c=e.containerRef,i=e.showInsertionPoint,a=He(t);return Object(d.createElement)(j.Popover,{noArrow:!0,animate:!1,anchorRef:a,position:"top right left",focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:"block-toolbar"},Object(d.createElement)("div",{className:"block-editor-block-list__insertion-point",style:{width:null==a?void 0:a.offsetWidth}},i&&Object(d.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}),(n||r)&&Object(d.createElement)(Vl,{clientId:t,setIsInserterForced:o,containerRef:c})))}function zl(e){var t=e.children,n=e.containerRef,r=Object(d.useState)(!1),o=Object(te.a)(r,2),c=o[0],i=o[1],a=Object(d.useState)(!1),l=Object(te.a)(a,2),s=l[0],u=l[1],b=Object(d.useState)(null),f=Object(te.a)(b,2),p=f[0],m=f[1],v=Object(O.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]}}),[]),g=v.isMultiSelecting,h=v.isInserterVisible,j=v.selectedClientId;var k=c||s||h;return Object(d.createElement)(d.Fragment,null,!g&&k&&Object(d.createElement)(Hl,{clientId:h?j:p,isInserterShown:c,isInserterForced:s,setIsInserterForced:u,containerRef:n,showInsertionPoint:h}),Object(d.createElement)("div",{onMouseMove:s||g?void 0:function(e){if(e.target.classList.contains("block-editor-block-list__layout")){var t=e.target.getBoundingClientRect(),n=e.clientY-t.top,r=Array.from(e.target.children).find((function(e){return e.offsetTop>n}));if(r){var o=r.id.slice("block-".length);if(o){var a=r.getBoundingClientRect();e.clientX>a.right||e.clientX<a.left?c&&i(!1):(i(!0),m(o))}}}else c&&i(!1)}},t))}var Ul=function(e){var t=e.clientId,n=e.rootClientId,r=Object(pe.a)(e,["clientId","rootClientId"]),o=Object(O.useSelect)((function(e){var r,o=e("core/block-editor"),c=o.__unstableGetBlockWithoutInnerBlocks,i=o.getBlockIndex,a=o.hasBlockMovingClientId,l=o.getBlockListSettings,s=i(t,n),u=c(t);return{index:s,name:u.name,attributes:u.attributes,blockMovingMode:a(),orientation:null===(r=l(n))||void 0===r?void 0:r.orientation}}),[t,n]),i=o.index,a=o.name,l=o.attributes,u=o.blockMovingMode,b=o.orientation,p=Object(O.useDispatch)("core/block-editor"),m=p.setNavigationMode,v=p.removeBlock,g=Object(d.useRef)();Object(d.useEffect)((function(){g.current.focus()}));var h=Object(c.getBlockType)(a),k=Object(c.__experimentalGetAccessibleBlockLabel)(h,l,i+1,b),y=f()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!u});return Object(d.createElement)("div",Object(s.a)({className:y},r),Object(d.createElement)(j.Button,{ref:g,onClick:function(){return m(!1)},onKeyDown:function(e){var n=e.keyCode;n!==et.BACKSPACE&&n!==et.DELETE||(v(t),e.preventDefault())},label:k},Object(d.createElement)(Un,{clientId:t})))};function Gl(e){var t,n,r,o=Object(d.useState)(!0),c=Object(te.a)(o,2),i=c[0],a=c[1],l=Object(d.useCallback)((function(){var t=fr.focus.tabbable.find(e.current);a(!t.some((function(e){return!("experimentalToolbarItem"in e.dataset)})))}),[]);return Object(d.useLayoutEffect)(l,[]),t=function(){var t=new window.MutationObserver(l);return t.observe(e.current,{childList:!0,subtree:!0}),function(){return t.disconnect()}},n=[i],r=Object(d.useRef)(!1),Object(d.useLayoutEffect)((function(){if(r.current)return t();r.current=!0}),n),i}function Kl(e,t,n){var r=Object(d.useState)(t),o=Object(te.a)(r,1)[0],c=Object(d.useCallback)((function(){var t,n,r;t=e.current,n=fr.focus.tabbable.find(t),(r=Object(te.a)(n,1)[0])&&r.focus()}),[]);Object(l.useShortcut)("core/block-editor/focus-toolbar",c,{bindGlobal:!0,eventName:"keydown"}),Object(d.useEffect)((function(){o&&c()}),[n,o,c])}var Wl=function(e){var t=e.children,n=e.focusOnMount,r=Object(pe.a)(e,["children","focusOnMount"]),o=Object(d.useRef)(),c=Gl(o);return Kl(o,n,c),c?Object(d.createElement)(j.Toolbar,Object(s.a)({__experimentalAccessibilityLabel:r["aria-label"],ref:o},r),t):Object(d.createElement)(j.NavigableMenu,Object(s.a)({orientation:"horizontal",role:"toolbar",ref:o},r),t)};function ql(){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}}var $l=function(e){Object(Ht.a)(r,e);var t,n=(t=r,function(){var e,n=Object(Vt.a)(t);if(ql()){var r=Object(Vt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Ft.a)(this,e)});function r(){var e;return Object(Mt.a)(this,r),(e=n.apply(this,arguments)).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(Lt.a)(e)),e.onBlur=e.onBlur.bind(Object(Lt.a)(e)),e}return Object(At.a)(r,[{key:"onFocus",value:function(){this.setState({isFocused:!0})}},{key:"onBlur",value:function(){this.setState({isFocused:!1})}},{key:"render",value:function(){var e=this.props,t=e.isFirst,n=e.isLast,r=e.clientIds,o=e.isLocked,c=e.isHidden,i=e.rootClientId,a=e.orientation,l=this.state.isFocused;return o||t&&n&&!i?null:Object(d.createElement)("div",{className:f()("block-editor-block-mover",{"is-visible":l||!c,"is-horizontal":"horizontal"===a})},Object(d.createElement)(j.ToolbarGroup,null,Object(d.createElement)(j.__experimentalToolbarItem,{onFocus:this.onFocus,onBlur:this.onBlur},(function(e){return Object(d.createElement)(Sr,Object(s.a)({clientIds:r},e))})),Object(d.createElement)(j.__experimentalToolbarItem,{onFocus:this.onFocus,onBlur:this.onBlur},(function(e){return Object(d.createElement)(Ir,Object(s.a)({clientIds:r},e))}))))}}]),r}(d.Component),Yl=Object(O.withSelect)((function(e,t){var n,r=t.clientIds,o=e("core/block-editor"),i=o.getBlock,a=o.getBlockIndex,l=o.getBlockListSettings,s=o.getTemplateLock,u=o.getBlockOrder,d=o.getBlockRootClientId,b=Object(p.castArray)(r),f=Object(p.first)(b),m=i(f),v=d(Object(p.first)(b)),O=a(f,v),g=0===O,h=a(Object(p.last)(b),v)===u(v).length-1;return{blockType:m?Object(c.getBlockType)(m.name):null,isLocked:"all"===s(v),rootClientId:v,firstIndex:O,isFirst:g,isLast:h,orientation:null===(n=l(v))||void 0===n?void 0:n.orientation}}))($l);function Xl(){var e=Object(O.useDispatch)("core/block-editor").selectBlock,t=Object(O.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=(0,t.getBlockParents)((0,t.getSelectedBlockClientId)()),o=r[r.length-1],i=n(o);return{parentBlockType:Object(c.getBlockType)(i),firstParentClientId:o}}),[]),n=t.parentBlockType,r=t.firstParentClientId;return void 0!==r?Object(d.createElement)("div",{className:"block-editor-block-parent-selector",key:r},Object(d.createElement)(j.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:function(){return e(r)},label:Object(h.sprintf)(
|
46 |
+
/* translators: %s: Name of the block's parent. */
|
47 |
+
Object(h.__)("Select parent (%s)"),n.title),showTooltip:!0,icon:Object(d.createElement)(An,{icon:n.icon})})):null}var Ql=Object(d.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(k.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 Zl(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 Jl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zl(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function es(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return ts(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ts(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,o,c=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return c=e.done,e},e:function(e){i=!0,o=e},f:function(){try{c||null==r.return||r.return()}finally{if(i)throw o}}}}function ts(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 ns(e){var t=e.genericPreviewBlock,n=e.style,r=e.isActive,o=e.onBlur,c=e.onHover,i=e.onSelect,a=e.styleClassName,l=e.itemRole,s=Object(d.useMemo)((function(){return Jl({},t,{attributes:Jl({},t.attributes,{className:a})})}),[t,a]);return Object(d.createElement)("div",{key:n.name,className:f()("block-editor-block-styles__item",{"is-active":r}),onClick:function(){return i()},onKeyDown:function(e){et.ENTER!==e.keyCode&&et.SPACE!==e.keyCode||(e.preventDefault(),i())},onMouseEnter:c,onMouseLeave:o,role:l||"button",tabIndex:"0","aria-label":n.label||n.name},Object(d.createElement)("div",{className:"block-editor-block-styles__item-preview"},Object(d.createElement)(za,{viewportWidth:500,blocks:s})),Object(d.createElement)("div",{className:"block-editor-block-styles__item-label"},n.label||n.name))}var rs=function(e){var t=e.clientId,n=e.onSwitch,r=void 0===n?p.noop:n,o=e.onHoverClassName,i=void 0===o?p.noop:o,a=e.itemRole,l=Object(O.useSelect)((function(e){var n=e("core/block-editor").getBlock,r=e("core/blocks").getBlockStyles,o=n(t);return{block:o,type:Object(c.getBlockType)(o.name),styles:r(o.name),className:o.attributes.className||""}}),[t]),s=l.styles,u=l.block,b=l.type,f=l.className,m=Object(O.useDispatch)("core/block-editor").updateBlockAttributes,v=function(e,t){return Object(d.useMemo)((function(){return t.example?Object(c.getBlockFromExample)(e.name,{attributes:t.example.attributes,innerBlocks:t.example.innerBlocks}):Object(c.cloneBlock)(e)}),[t.example?e.name:e,t])}(u,b);if(!s||0===s.length)return null;b.styles||Object(p.find)(s,"isDefault")||s.unshift({name:"default",label:Object(h._x)("Default","block style"),isDefault:!0});var g=function(e,t){var n,r=es(new at.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(p.find)(e,{name:c});if(i)return i}}}catch(e){r.e(e)}finally{r.f()}return Object(p.find)(e,"isDefault")}(s,f);return Object(d.createElement)("div",{className:"block-editor-block-styles"},s.map((function(e){var n=function(e,t,n){var r=new at.a(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}(f,g,e);return Object(d.createElement)(ns,{genericPreviewBlock:v,className:f,isActive:g===e,key:e.name,onSelect:function(){m(t,{className:n}),i(null),r()},onBlur:function(){return i(null)},onHover:function(){return i(n)},style:e,styleClassName:n,itemRole:a})})))},os=function(e){var t=e.className,n=e.possibleBlockTransformations,r=e.onSelect;return Object(d.createElement)(j.MenuGroup,{label:Object(h.__)("Transform to"),className:t},n.map((function(e){var t=e.name,n=e.icon,o=e.title;return Object(d.createElement)(j.MenuItem,{key:t,className:Object(c.getBlockMenuDefaultClassName)(t),icon:Object(d.createElement)(An,{icon:n,showColors:!0}),onClick:function(e){e.preventDefault(),r(t)}},o)})))};function cs(){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 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 as(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(u.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}function ls(e){var t=e.hoveredBlock,n=e.hoveredClassName,r=Object(c.getBlockType)(t.name);return Object(d.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},Object(d.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},Object(d.createElement)(j.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},Object(d.createElement)("div",{className:"block-editor-block-switcher__preview"},Object(d.createElement)("div",{className:"block-editor-block-switcher__preview-title"},Object(h.__)("Preview")),Object(d.createElement)(za,{viewportWidth:500,blocks:r.example?Object(c.getBlockFromExample)(t.name,{attributes:as({},r.example.attributes,{className:n}),innerBlocks:r.example.innerBlocks}):Object(c.cloneBlock)(t,{className:n})})))))}var ss=function(e){Object(Ht.a)(r,e);var t,n=(t=r,function(){var e,n=Object(Vt.a)(t);if(cs()){var r=Object(Vt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Ft.a)(this,e)});function r(){var e;return Object(Mt.a)(this,r),(e=n.apply(this,arguments)).state={hoveredClassName:null},e.onHoverClassName=e.onHoverClassName.bind(Object(Lt.a)(e)),e}return Object(At.a)(r,[{key:"onHoverClassName",value:function(e){this.setState({hoveredClassName:e})}},{key:"render",value:function(){var e=this,t=this.props,n=t.blocks,r=t.onTransform,o=t.inserterItems,i=t.hasBlockStyles,a=this.state.hoveredClassName;if(!Array.isArray(n)||!n.length)return null;var l,s=Object(te.a)(n,1)[0],u=Object(p.mapKeys)(o,(function(e){return e.name})),b=Object(p.orderBy)(Object(p.filter)(Object(c.getPossibleBlockTransformations)(n),(function(e){return e&&!!u[e.name]})),(function(e){return u[e.name].frecency}),"desc");if(1===Object(p.uniq)(Object(p.map)(n,"name")).length){var f=s.name,m=Object(c.getBlockType)(f);l=m.icon}else l=Ql;var v=!!b.length;if(!i&&!v)return Object(d.createElement)(j.ToolbarGroup,null,Object(d.createElement)(j.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:Object(h.__)("Block icon"),icon:Object(d.createElement)(An,{icon:l,showColors:!0})}));var O=1===n.length?Object(h.__)("Change block type or style"):Object(h.sprintf)(
|
48 |
+
/* translators: %s: number of blocks. */
|
49 |
+
Object(h._n)("Change type of %d block","Change type of %d blocks",n.length),n.length);return Object(d.createElement)(j.ToolbarGroup,null,Object(d.createElement)(j.__experimentalToolbarItem,null,(function(t){return Object(d.createElement)(j.DropdownMenu,{className:"block-editor-block-switcher",label:O,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:Object(d.createElement)(An,{icon:l,className:"block-editor-block-switcher__toggle",showColors:!0}),toggleProps:t,menuProps:{orientation:"both"}},(function(t){var o=t.onClose;return(i||v)&&Object(d.createElement)("div",{className:"block-editor-block-switcher__container"},v&&Object(d.createElement)(os,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:b,onSelect:function(e){r(n,e),o()}}),i&&Object(d.createElement)(j.MenuGroup,{label:Object(h.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},null!==a&&Object(d.createElement)(ls,{hoveredBlock:s,hoveredClassName:a}),Object(d.createElement)(rs,{clientId:s.clientId,onSwitch:o,onHoverClassName:e.onHoverClassName,itemRole:"menuitem"})))}))})))}}]),r}(d.Component),us=Object(m.compose)(Object(O.withSelect)((function(e,t){var n=t.clientIds,r=e("core/block-editor"),o=r.getBlocksByClientId,c=r.getBlockRootClientId,i=r.getInserterItems,a=e("core/blocks").getBlockStyles,l=c(Object(p.castArray)(n)[0]),s=o(n),u=s&&1===s.length?s[0]:null,d=u&&a(u.name);return{blocks:s,inserterItems:i(l),hasBlockStyles:d&&d.length>0}})),Object(O.withDispatch)((function(e,t){return{onTransform:function(n,r){e("core/block-editor").replaceBlocks(t.clientIds,Object(c.switchToBlockType)(n,r))}}})))(ss),ds=n(45);function bs(){var e=Object(O.useSelect)((function(e){return e("core/block-editor")}),[]).getBlockName,t=Object(O.useSelect)((function(e){return e("core/blocks")}),[]).getBlockType,n=Object(O.useDispatch)("core/notices").createSuccessNotice;return Object(d.useCallback)((function(r,o){var c="";if(1===o.length){var i=o[0],a=t(e(i)).title;c="copy"===r?Object(h.sprintf)(// Translators: Name of the block being copied, e.g. "Paragraph"
|
50 |
+
Object(h.__)('Copied "%s" to clipboard.'),a):Object(h.sprintf)(// Translators: Name of the block being cut, e.g. "Paragraph"
|
51 |
+
Object(h.__)('Moved "%s" to clipboard.'),a)}else c="copy"===r?Object(h.sprintf)(// Translators: Number of blocks being copied
|
52 |
+
Object(h.__)("Copied %d blocks to clipboard."),o.length):Object(h.sprintf)(// Translators: Number of blocks being cut
|
53 |
+
Object(h.__)("Moved %d blocks to clipboard."),o.length);n(c,{type:"snackbar"})}),[])}var fs=function(e){var t=e.children,n=Object(d.useRef)(),r=Object(O.useSelect)((function(e){return e("core/block-editor")}),[]),o=r.getBlocksByClientId,i=r.getSelectedBlockClientIds,a=r.hasMultiSelection,l=r.getSettings,s=Object(O.useDispatch)("core/block-editor"),u=s.flashBlock,b=s.removeBlocks,f=s.replaceBlocks,m=bs(),v=l().__experimentalCanUserUseUnfilteredHTML,g=function(e){var t=i();if(0!==t.length){if(!a())if("copy"===e.type||"cut"===e.type?Object(fr.documentHasUncollapsedSelection)():Object(fr.documentHasSelection)())return;if(n.current.contains(e.target)){if(e.preventDefault(),"copy"===e.type||"cut"===e.type){1===t.length&&u(t[0]),m(e.type,t);var r=o(t),l=Object(c.serialize)(r);e.clipboardData.setData("text/plain",l),e.clipboardData.setData("text/html",l)}if("cut"===e.type)b(t);else if("paste"===e.type){var s=function(e){var t=e.clipboardData,n=t.items,r=t.files;n=Object(p.isNil)(n)?[]:n,r=Object(p.isNil)(r)?[]:r;var o="",c="";try{o=t.getData("text/plain"),c=t.getData("text/html")}catch(e){try{c=t.getData("Text")}catch(e){return}}return r=Array.from(r),Array.from(n).forEach((function(e){if(e.getAsFile){var t=e.getAsFile();if(t){var n=t.name,o=t.type,c=t.size;Object(p.find)(r,{name:n,type:o,size:c})||r.push(t)}}})),(r=r.filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)}))).length&&!c&&(c=r.map((function(e){return'<img src="'.concat(Object(ds.createBlobURL)(e),'">')})).join(""),o=""),{html:c,plainText:o}}(e),d=s.plainText,O=s.html,g=Object(c.pasteHandler)({HTML:O,plainText:d,mode:"BLOCKS",canUserUseUnfilteredHTML:v});f(t,g,g.length-1,-1)}}}};return Object(d.createElement)("div",{ref:n,onCopy:g,onCut:g,onPaste:g},t)};function ps(e){var t=e.clientIds,n=e.children,r=e.__experimentalUpdateSelection,o=Object(O.useSelect)((function(e){return e("core/block-editor")}),[]),i=o.canInsertBlockType,a=o.getBlockRootClientId,l=o.getBlocksByClientId,s=o.getTemplateLock,u=Object(O.useSelect)((function(e){return e("core/blocks")}),[]),d=u.getDefaultBlockName,b=u.getGroupingBlockName,f=l(t),m=a(t[0]),v=Object(p.every)(f,(function(e){return!!e&&Object(c.hasBlockSupport)(e.name,"multiple",!0)&&i(e.name,m)})),g=i(d(),m),h=Object(O.useDispatch)("core/block-editor"),j=h.removeBlocks,k=h.replaceBlocks,y=h.duplicateBlocks,_=h.insertAfterBlock,E=h.insertBeforeBlock,C=h.flashBlock,w=h.setBlockMovingClientId,S=h.setNavigationMode,I=bs();return n({canDuplicate:v,canInsertDefaultBlock:g,isLocked:!!s(m),rootClientId:m,blocks:f,onDuplicate:function(){return y(t,r)},onRemove:function(){return j(t,r)},onInsertBefore:function(){E(Object(p.first)(Object(p.castArray)(t)))},onInsertAfter:function(){_(Object(p.last)(Object(p.castArray)(t)))},onMoveTo:function(){S(!0),w(t[0])},onGroup:function(){if(f.length){var e=b(),n=Object(c.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&&C(e[0]),I("copy",e)}})}var ms=Object(m.compose)([Object(O.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor"),o=r.getBlock,i=r.getBlockMode,a=r.getSettings,l=o(n),s=a().codeEditingEnabled;return{mode:i(n),blockType:l?Object(c.getBlockType)(l.name):null,isCodeEditingEnabled:s}})),Object(O.withDispatch)((function(e,t){var n=t.onToggle,r=void 0===n?p.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,i=void 0!==o&&o,a=e.isCodeEditingEnabled,l=void 0===a||a;if(!Object(c.hasBlockSupport)(t,"html",!0)||!l)return null;var s="visual"===n?Object(h.__)("Edit as HTML"):Object(h.__)("Edit visually");return Object(d.createElement)(j.MenuItem,{onClick:r},!i&&s)}));var vs=Object(m.compose)(Object(O.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(O.withDispatch)((function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Object(c.rawHandler)({HTML:Object(c.getBlockContent)(n)}))}}})))((function(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(h.__)("Convert to Blocks");return Object(d.createElement)(j.MenuItem,{onClick:n},!r&&o)})),Os=Object(j.createSlotFill)("__experimentalBlockSettingsMenuFirstItem"),gs=Os.Fill,hs=Os.Slot;gs.Slot=hs;var js=gs;function ks(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 ys(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ks(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ks(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _s=Object(j.createSlotFill)("BlockSettingsMenuControls"),Es=_s.Fill,Cs=_s.Slot;Es.Slot=function(e){var t=e.fillProps,n=e.clientIds,r=void 0===n?null:n,o=Object(O.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlocksByClientId,o=t.getSelectedBlockClientIds,c=null!==r?r:o();return Object(p.map)(n(c),(function(e){return e.name}))}),[r]);return Object(d.createElement)(Cs,{fillProps:ys({},t,{selectedBlocks:o})},(function(e){return!Object(p.isEmpty)(e)&&Object(d.createElement)(j.MenuGroup,null,e)}))};var ws=Es,Ss={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};var Is=function(e){var t=e.clientIds,n=e.__experimentalSelectBlock,r=e.children,o=Object(pe.a)(e,["clientIds","__experimentalSelectBlock","children"]),i=Object(p.castArray)(t),a=i.length,l=i[0],u=Object(O.useSelect)((function(e){var t=e("core/keyboard-shortcuts").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(d.useCallback)(n?function(){var e=Object(ur.a)(sr.a.mark((function e(t){var r;return sr.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)}}():p.noop,[n]);return Object(d.createElement)(ps,{clientIds:t,__experimentalUpdateSelection:!n},(function(e){var n=e.canDuplicate,i=e.canInsertDefaultBlock,f=e.isLocked,m=e.onDuplicate,v=e.onInsertAfter,O=e.onInsertBefore,g=e.onRemove,k=e.onCopy,y=e.onMoveTo,_=e.blocks;return Object(d.createElement)(j.DropdownMenu,Object(s.a)({icon:Tr,label:Object(h.__)("More options"),className:"block-editor-block-settings-menu",popoverProps:Ss,noIcons:!0},o),(function(e){var o=e.onClose;return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(j.MenuGroup,null,Object(d.createElement)(js.Slot,{fillProps:{onClose:o}}),1===a&&Object(d.createElement)(vs,{clientId:l}),Object(d.createElement)(j.ClipboardButton,{text:function(){return Object(c.serialize)(_)},role:"menuitem",className:"components-menu-item__button",onCopy:k},Object(h.__)("Copy")),n&&Object(d.createElement)(j.MenuItem,{onClick:Object(p.flow)(o,m,b),shortcut:u.duplicate},Object(h.__)("Duplicate")),i&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(j.MenuItem,{onClick:Object(p.flow)(o,O),shortcut:u.insertBefore},Object(h.__)("Insert Before")),Object(d.createElement)(j.MenuItem,{onClick:Object(p.flow)(o,v),shortcut:u.insertAfter},Object(h.__)("Insert After"))),!f&&Object(d.createElement)(j.MenuItem,{onClick:Object(p.flow)(o,y)},Object(h.__)("Move To")),1===a&&Object(d.createElement)(ms,{clientId:l,onToggle:o})),Object(d.createElement)(ws.Slot,{fillProps:{onClose:o},clientIds:t}),"function"==typeof r?r({onClose:o}):d.Children.map((function(e){return Object(d.cloneElement)(e,{onClose:o})})),Object(d.createElement)(j.MenuGroup,null,!f&&Object(d.createElement)(j.MenuItem,{onClick:Object(p.flow)(o,g,b),shortcut:u.remove},Object(h._n)("Remove Block","Remove Blocks",a))))}))}))};var xs=function(e){var t=e.clientIds,n=Object(pe.a)(e,["clientIds"]);return Object(d.createElement)(j.ToolbarGroup,null,Object(d.createElement)(j.__experimentalToolbarItem,null,(function(e){return Object(d.createElement)(Is,Object(s.a)({clientIds:t,toggleProps:e},n))})))},Bs=Object(d.createElement)(k.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(k.Path,{d:"M7 16.5h10V15H7v1.5zm0-9V9h10V7.5H7z"}));function Ps(e){var t=e.clientIds,n=Object(O.useSelect)((function(e){if(1===t.length){var n=(0,e("core/block-editor").getBlockName)(Object(te.a)(t,1)[0]);return Object(c.getBlockType)(n).icon}}),[t]);return Object(d.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},Object(d.createElement)("div",{className:"block-editor-block-draggable-chip"},Object(d.createElement)(j.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},Object(d.createElement)(j.FlexItem,null,Object(d.createElement)(An,{icon:Bs})),Object(d.createElement)(j.FlexItem,null,n?Object(d.createElement)(An,{icon:n}):Object(h.sprintf)(
|
54 |
+
/* translators: %d: number of blocks. */
|
55 |
+
Object(h.__)("%d blocks"),t.length)))))}var Ts=function(e){var t,n,r,o,c=e.children,i=e.clientIds,a=e.cloneClassname,l=e.onDragStart,s=e.onDragEnd,u=Object(O.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockRootClientId,r=t.getTemplateLock,o=n(i[0]);return{srcRootClientId:o,isDraggable:"all"!==(o?r(o):null)}}),[i]),b=u.srcRootClientId,f=u.isDraggable,p=Object(d.useRef)(!1),m=(t=Object(d.useRef)(null),n=Object(d.useRef)(null),r=Object(d.useRef)(null),o=Object(d.useRef)(null),Object(d.useEffect)((function(){return function(){o.current&&(clearInterval(o.current),o.current=null)}}),[]),[Object(d.useCallback)((function(e){t.current=e.clientY,r.current=Object(fr.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(d.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 s=Math.max(c-50,0),u=Math.max(c-i-50,0)/s;n.current=-25*u}else n.current=0}}),[]),function(){t.current=null,r.current=null,o.current&&(clearInterval(o.current),o.current=null)}]),v=Object(te.a)(m,3),g=v[0],h=v[1],k=v[2],y=Object(O.useDispatch)("core/block-editor"),_=y.startDraggingBlocks,E=y.stopDraggingBlocks;if(Object(d.useEffect)((function(){return function(){p.current&&E()}}),[]),!f)return c({isDraggable:!1});var C={type:"block",srcClientIds:i,srcRootClientId:b};return Object(d.createElement)(j.Draggable,{cloneClassname:a,elementId:"block-".concat(i[0]),transferData:C,onDragStart:function(e){_(),p.current=!0,g(e),l&&l()},onDragOver:h,onDragEnd:function(){E(),p.current=!1,k(),s&&s()},__experimentalDragComponent:Object(d.createElement)(Ps,{clientIds:i})},(function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return c({isDraggable:!0,onDraggableStart:t,onDraggableEnd:n})}))},Ns=window,Rs=Ns.clearTimeout,Ds=Ns.setTimeout;function Ms(e){var t=e.ref,n=e.isFocused,r=e.debounceTimeout,o=void 0===r?200:r,c=e.onChange,i=void 0===c?p.noop:c,a=Object(d.useState)(!1),l=Object(te.a)(a,2),s=l[0],u=l[1],b=Object(d.useRef)(),f=function(e){u(e),i(e)},m=function(){var e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e},v=function(){var e=b.current;e&&Rs&&Rs(e)};return Object(d.useEffect)((function(){return function(){return v()}}),[]),{showMovers:s,debouncedShowMovers:function(e){e&&e.stopPropagation(),v(),s||f(!0)},debouncedHideMovers:function(e){e&&e.stopPropagation(),v(),b.current=Ds((function(){m()&&f(!1)}),o)}}}var As=n(256);function Ls(e){var t=e.hideDragHandle,n=e.__experimentalExpandedControl,r=void 0!==n&&n,o=Object(O.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getBlockMode,o=t.getSelectedBlockClientIds,i=t.isBlockValid,a=t.getBlockRootClientId,l=t.getSettings,s=o(),u=s[0],d=a(u);return{blockClientIds:s,blockClientId:u,blockType:u&&Object(c.getBlockType)(n(u)),hasFixedToolbar:l().hasFixedToolbar,rootClientId:d,isValid:s.every((function(e){return i(e)})),isVisual:s.every((function(e){return"visual"===r(e)}))}}),[]),i=o.blockClientIds,a=o.blockClientId,l=o.blockType,u=o.hasFixedToolbar,b=o.isValid,v=o.isVisual,h=Object(O.useDispatch)("core/block-editor").toggleBlockHighlight,j=Object(d.useRef)(),k=function(e){var t=e.ref,n=e.debounceTimeout,r=void 0===n?200:n,o=e.onChange,c=void 0===o?p.noop:o,i=Object(d.useState)(!1),a=Object(te.a)(i,2),l=a[0],s=a[1],u=Ms({ref:t,debounceTimeout:r,isFocused:l,onChange:c}),b=u.showMovers,f=u.debouncedShowMovers,m=u.debouncedHideMovers,v=Object(d.useRef)(!1),O=function(){return(null==t?void 0:t.current)&&t.current.contains(document.activeElement)};return Object(d.useEffect)((function(){var e=t.current,n=function(){O()&&(s(!0),f())},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,f,m]),{showMovers:b,gestures:{onMouseMove:f,onMouseLeave:m}}}({ref:j,onChange:function(e){h(a,e)}}),y=k.showMovers,_=k.gestures,E=Object(m.useViewportMatch)("medium","<")||u;if(l&&!Object(c.hasBlockSupport)(l,"__experimentalToolbar",!0))return null;var C=E||y;if(0===i.length)return null;var w=b&&v,S=i.length>1,I=f()("block-editor-block-toolbar",C&&"is-showing-movers"),x=r?As.a:"div";return Object(d.createElement)(x,{className:I},Object(d.createElement)("div",Object(s.a)({className:"block-editor-block-toolbar__mover-switcher-container",ref:j},_),!S&&Object(d.createElement)("div",{className:"block-editor-block-toolbar__block-parent-selector-wrapper"},Object(d.createElement)(Xl,{clientIds:i})),(w||S)&&Object(d.createElement)(Ts,{clientIds:i,cloneClassname:"block-editor-block-toolbar__drag-clone"},(function(e){var n=e.isDraggable,r=e.onDraggableStart,o=e.onDraggableEnd;return Object(d.createElement)("div",{className:"block-editor-block-toolbar__block-switcher-wrapper",draggable:n&&!t,onDragStart:r,onDragEnd:o},Object(d.createElement)(us,{clientIds:i}),Object(d.createElement)(Yl,{clientIds:i}))}))),w&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.a.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"}),Object(d.createElement)(ar.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"})),Object(d.createElement)(xs,{clientIds:i}))}var Fs=function(e){var t=e.focusOnMount,n=Object(pe.a)(e,["focusOnMount"]),r=Object(O.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getSelectedBlockClientIds,o=e("core/blocks").getBlockType,c=r()[0];return{blockType:c&&o(n(c))}}),[]).blockType;return r&&!Object(c.hasBlockSupport)(r,"__experimentalToolbar",!0)?null:Object(d.createElement)("div",{className:"block-editor-block-contextual-toolbar-wrapper"},Object(d.createElement)(Wl,Object(s.a)({focusOnMount:t,className:"block-editor-block-contextual-toolbar"
|
56 |
+
/* translators: accessibility text for the block toolbar */,"aria-label":Object(h.__)("Block tools")},n),Object(d.createElement)(Ls,null)))};function Vs(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 Hs(e){var t=e.clientId,n=e.rootClientId,r=e.isValid,o=e.isEmptyDefaultBlock,c=e.capturingClientId,i=Object(O.useSelect)(Vs,[]),a=i.isNavigationMode,s=i.isMultiSelecting,u=i.isTyping,b=i.isCaretWithinFormattedText,p=i.hasMultiSelection,v=i.hasFixedToolbar,g=i.lastClientId,h=Object(m.useViewportMatch)("medium"),k=Object(d.useState)(!1),y=Object(te.a)(k,2),_=y[0],E=y[1],C=Object(d.useState)(!1),w=Object(te.a)(C,2),S=w[0],I=w[1],x=Object(d.useContext)(Ks),B=!a&&o&&r,P=a,T=!a&&!v&&h&&!B&&!s&&(!u||b),N=!(a||T||v||o);if(Object(l.useShortcut)("core/block-editor/focus-toolbar",Object(d.useCallback)((function(){return E(!0)}),[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!N}),!(P||T||_||B))return null;var R=x[t];if(c&&(R=document.getElementById("block-"+c)),!R)return null;var D=R;if(p){var M=x[g];if(!M)return null;D={top:R,bottom:M}}var A=B?"top left right":"top right left";return Object(d.createElement)(j.Popover,{noArrow:!0,animate:!1,position:A,focusOnMount:!1,anchorRef:D,className:"block-editor-block-list__block-popover",__unstableSticky:!B,__unstableSlotName:"block-toolbar",__unstableBoundaryParent:!0,__unstableObserveElement:R,onBlur:function(){return E(!1)},shouldAnchorIncludePadding:!0},(T||_)&&Object(d.createElement)("div",{onFocus:function(){I(!0)},onBlur:function(){I(!1)},tabIndex:-1,className:f()("block-editor-block-list__block-popover-inserter",{"is-visible":S})},Object(d.createElement)(Pl,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(T||_)&&Object(d.createElement)(Fs,{focusOnMount:_}),P&&Object(d.createElement)(Ul,{clientId:t,rootClientId:n}),B&&Object(d.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},Object(d.createElement)(Pl,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function zs(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getFirstMultiSelectedBlockClientId,o=t.getBlockRootClientId,i=t.__unstableGetBlockWithoutInnerBlocks,a=t.getBlockParents,l=t.__experimentalGetBlockListSettingsForBlocks,s=n()||r();if(s){var u,d=i(s)||{},b=d.name,f=d.attributes,m=void 0===f?{}:f,v=d.isValid,O=a(s),g=l(O),h=Object(p.findIndex)(g,["__experimentalCaptureToolbars",!0]);return-1!==h&&(u=O[h]),{clientId:s,rootClientId:o(s),name:b,isValid:v,isEmptyDefaultBlock:b&&Object(c.isUnmodifiedDefaultBlock)({name:b,attributes:m}),capturingClientId:u}}}function Us(){var e=Object(O.useSelect)(zs,[]);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(d.createElement)(Hs,{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:c,capturingClientId:i}):null}var Gs=Object(d.createContext)(),Ks=Object(d.createContext)(),Ws=Object(d.createContext)();function qs(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.hasMultiSelection;return{selectedBlockClientId:n(),hasMultiSelection:r()}}function $s(e){Ue(e.target)&&e.preventDefault()}var Ys=Object(d.forwardRef)((function(e,t){var n=e.children,r=e.className,o=Object(O.useSelect)(qs,[]),c=o.selectedBlockClientId,i=o.hasMultiSelection,a=Object(O.useDispatch)("core/block-editor").selectBlock,l=function(e){var t=Object(O.useSelect)(Yr,[]),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.multiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.selectedBlockClientId,l=Object(O.useDispatch)("core/block-editor"),s=l.startMultiSelect,u=l.stopMultiSelect,b=l.multiSelect,f=l.selectBlock,p=Object(d.useRef)(),m=Object(d.useRef)(),v=Object(d.useRef)();Object(d.useEffect)((function(){if(c&&!r){var e=o.length;if(!(e<2)){var t=o[0],n=o[e-1],i=He(t),l=He(n),s=window.getSelection(),u=document.createRange();i=$r(i,"start"),l=$r(l,"end"),u.setStartBefore(i),u.setEndAfter(l),s.removeAllRanges(),s.addRange(u)}}else{if(!a||r)return;var d=window.getSelection();if(d.rangeCount&&!d.isCollapsed){var b=He(a),f=d.getRangeAt(0),p=f.startContainer,m=f.endContainer;!b||b.contains(p)&&b.contains(m)||d.removeAllRanges()}}}),[c,r,o,f,a]);var g=Object(d.useCallback)((function(t){var n=t.isSelectionEnd,r=window.getSelection();if(r.rangeCount&&!r.isCollapsed){var o=Ue(r.focusNode);if(m.current===o){if(f(o),n&&(Xr(e.current,!0),r.rangeCount)){var c=r.getRangeAt(0).commonAncestorContainer;v.current.contains(c)&&v.current.focus()}}else{var a=[].concat(Object(ee.a)(i(m.current)),[m.current]),l=[].concat(Object(ee.a)(i(o)),[o]),s=Math.min(a.length,l.length)-1;b(a[s],l[s])}}else Xr(e.current,!0)}),[f,i,b]),h=Object(d.useCallback)((function(){document.removeEventListener("selectionchange",g),window.removeEventListener("mouseup",h),p.current=window.requestAnimationFrame((function(){g({isSelectionEnd:!0}),u()}))}),[g,u]);return Object(d.useEffect)((function(){return function(){document.removeEventListener("selectionchange",g),window.removeEventListener("mouseup",h),window.cancelAnimationFrame(p.current)}}),[g,h]),Object(d.useCallback)((function(t){n&&(m.current=t,v.current=document.activeElement,s(),document.addEventListener("selectionchange",g),window.addEventListener("mouseup",h),Xr(e.current,!1))}),[n,s,h])}(t),s=Object(d.useState)({}),u=Object(te.a)(s,2),b=u[0],p=u[1];return Object(d.createElement)(zl,{containerRef:t},Object(d.createElement)(Ks.Provider,{value:b},Object(d.createElement)(Us,null),Object(d.createElement)("div",{ref:t,className:f()(r,"is-root-container"),onFocus:function(e){if(!i){var t=Ue(e.target);t&&t!==c&&a(t)}},onDragStart:$s},Object(d.createElement)(Ws.Provider,{value:p},Object(d.createElement)(Gs.Provider,{value:l},n)))))})),Xs=["p","div","h1","h2","h3","h4","h5","h6","ol","ul","li","figure","nav","pre","header","section","aside","footer","main"];function Qs(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 Zs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qs(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Js=Object(d.forwardRef)((function(e,t){var n=e.children,r=e.tagName,o=void 0===r?"div":r,c=e.__unstableIsHtml,i=Object(pe.a)(e,["children","tagName","__unstableIsHtml"]),a=Object(d.useContext)(Gs),l=Object(d.useContext)(Ws),b=Object(d.useContext)(ru),m=b.clientId,v=b.rootClientId,g=b.isSelected,j=b.isFirstMultiSelected,k=b.isLastMultiSelected,y=b.isPartOfMultiSelection,_=b.enableAnimation,E=b.index,C=b.className,w=b.isLocked,S=b.name,I=b.mode,x=b.blockTitle,B=b.wrapperProps,P=Object(O.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlocksInitialCaretPosition,r=t.isMultiSelecting,o=t.isNavigationMode;return{shouldFocusFirstElement:g&&!r()&&!o(),initialPosition:g?n():void 0,isNavigationMode:o}}),[g]),T=P.initialPosition,N=P.shouldFocusFirstElement,R=P.isNavigationMode,D=Object(O.useDispatch)("core/block-editor"),M=D.insertDefaultBlock,A=D.removeBlock,L=Object(d.useRef)(),F=B&&!!B["data-align"];t=t||L;var V=Object(d.useState)(!1),H=Object(te.a)(V,2),z=H[0],U=H[1];Object(d.useEffect)((function(){if(g||j||k){var e=t.current;return l((function(t){return Zs({},t,Object(u.a)({},m,e))})),function(){l((function(e){return Object(p.omit)(e,m)}))}}}),[g,j,k]);// translators: %s: Type of block (i.e. Text, Image etc)
|
57 |
+
var G=Object(h.sprintf)(Object(h.__)("Block: %s"),x);Object(d.useEffect)((function(){N&&function(){if(!document.activeElement||!ze(t.current,document.activeElement)){var e=fr.focus.tabbable.find(t.current).filter(fr.isTextField).filter((function(e){return ze(t.current,e)&&!e.closest(".block-list-appender")})),n=-1===T,r=(n?p.last:p.first)(e)||t.current;Object(fr.placeCaretAtHorizontalEdge)(r,n)}}()}),[N]),vr(t,g||y,g||j,_,E);var K="html"!==I||c?"":"-visual",W="block-".concat(m).concat(K);return Object(d.createElement)(o,Object(s.a)({"aria-label":G,role:"group"},Object(p.omit)(B,["data-align"]),i,{id:W,ref:t,className:f()(C,i.className,B&&B.className,{"is-hovered":z,"wp-block":!F}),"data-block":m,"data-type":S,"data-title":x,onKeyDown:g&&!w?function(e){var n=e.keyCode,r=e.target;i.onKeyDown&&i.onKeyDown(e),n!==et.ENTER&&n!==et.BACKSPACE&&n!==et.DELETE||r!==t.current||Object(fr.isTextField)(r)||(e.preventDefault(),n===et.ENTER?M({},v,E+1):A(m))}:void 0,onMouseLeave:g?function(e){var t=e.which;1===(e.buttons||t)&&a(m)}:void 0,onMouseOver:R?function(e){e.defaultPrevented||(e.preventDefault(),z||U(!0))}:void 0,onMouseOut:R?function(e){e.defaultPrevented||(e.preventDefault(),z&&U(!1))}:void 0,tabIndex:"0",style:Zs({},B?B.style:{},{},i.style||{})}),n)})),eu=Xs.reduce((function(e,t){return e[t]=Object(d.forwardRef)((function(e,n){return Object(d.createElement)(Js,Object(s.a)({},e,{ref:n,tagName:t}))})),e}),Js);function tu(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 nu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tu(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ru=Object(d.createContext)();var ou=Object(O.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=t.isLargeViewport,c=e("core/block-editor"),i=c.isBlockSelected,a=c.isAncestorMultiSelected,l=c.isBlockMultiSelected,s=c.isFirstMultiSelectedBlock,u=c.getLastMultiSelectedBlockClientId,d=c.isTyping,b=c.getBlockMode,f=c.isSelectionEnabled,p=c.getSettings,m=c.hasSelectedInnerBlock,v=c.getTemplateLock,O=c.__unstableGetBlockWithoutInnerBlocks,g=c.getMultiSelectedBlockClientIds,h=O(n),j=i(n),k=p(),y=k.focusMode,_=k.isRTL,E=v(r),C=m(n,!0),w=h||{},S=w.name,I=w.attributes,x=w.isValid,B=s(n);return{isMultiSelected:l(n),isPartOfMultiSelection:l(n)||a(n),isFirstMultiSelected:B,isLastMultiSelected:u()===n,multiSelectedClientIds:B?g():void 0,isTypingWithinBlock:(j||C)&&d(),mode:b(n),isSelectionEnabled:f(),isLocked:!!E,isFocusMode:y&&o,isRTL:_,block:h,name:S,attributes:I,isValid:x,isSelected:j,isAncestorOfSelectedBlock:C}})),cu=Object(O.withDispatch)((function(e,t,n){var r=n.select,o=e("core/block-editor"),i=o.updateBlockAttributes,a=o.insertBlocks,l=o.mergeBlocks,s=o.replaceBlocks,u=o.toggleSelection,d=o.__unstableMarkLastChangeAsPersistent;return{setAttributes:function(e){var n=t.clientId,r=t.isFirstMultiSelected,o=t.multiSelectedClientIds;i(r?o:[n],e)},onInsertBlocks:function(e,n){var r=t.rootClientId;a(e,n,r)},onInsertBlocksAfter:function(e){var n=t.clientId,o=t.rootClientId,c=(0,r("core/block-editor").getBlockIndex)(n,o);a(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 a=i(n);a&&l(n,a)}else{var s=c(n);s&&l(s,n)}},onReplace:function(e,n,r){e.length&&!Object(c.isUnmodifiedDefaultBlock)(e[e.length-1])&&d(),s([t.clientId],e,n,r)},toggleSelection:function(e){u(e)}}})),iu=Object(m.compose)(m.pure,Object(a.withViewportMatch)({isLargeViewport:"medium"}),ou,cu,Object(m.ifCondition)((function(e){return!!e.block})),Object(j.withFilters)("editor.BlockListBlock"))((function(e){var t,n,r,o=e.mode,i=e.isFocusMode,a=e.isLocked,l=e.clientId,u=e.rootClientId,b=e.isSelected,p=e.isMultiSelected,m=e.isPartOfMultiSelection,v=e.isFirstMultiSelected,g=e.isLastMultiSelected,h=e.isTypingWithinBlock,j=e.isAncestorOfSelectedBlock,k=e.isSelectionEnabled,y=e.className,_=e.name,E=e.isValid,C=e.attributes,w=e.wrapperProps,S=e.setAttributes,I=e.onReplace,x=e.onInsertBlocksAfter,B=e.onMerge,P=e.toggleSelection,T=e.index,N=e.enableAnimation,R=Object(O.useSelect)((function(e){var t=e("core/block-editor"),n=t.isDraggingBlocks,r=t.isBlockHighlighted;return{isDragging:n(),isHighlighted:r(l)}}),[l]),D=R.isDragging,M=R.isHighlighted,A=Object(O.useDispatch)("core/block-editor").removeBlock,L=Object(d.useCallback)((function(){return A(l)}),[l]),F=Object(d.useState)(!1),V=Object(te.a)(F,2),H=V[0],z=V[1],U=Object(c.getBlockType)(_),G=Object(c.hasBlockSupport)(U,"lightBlockWrapper",!1),K=_===Object(c.getUnregisteredTypeHandlerName)();U.getEditWrapperProps&&(t=w,n=U.getEditWrapperProps(C),r=nu({},t,{},n),t&&n&&t.className&&n.className&&(r.className=f()(t.className,n.className)),t&&n&&t.style&&n.style&&(r.style=nu({},t.style,{},n.style)),w=r);var W=G&&Object(c.hasBlockSupport)(U,"className",!0)?Object(c.getBlockDefaultClassName)(_):null,q=G?C.className:null,$=w&&!!w["data-align"],Y=f()(W,q,"block-editor-block-list__block",{"wp-block":!$,"has-warning":!E||!!H||K,"is-selected":b,"is-highlighted":M,"is-multi-selected":p,"is-reusable":Object(c.isReusableBlock)(U),"is-dragging":D&&(b||m),"is-typing":h,"is-focused":i&&(b||j),"is-focus-mode":i,"has-child-selected":j},y),X=Object(d.createElement)(nr,{name:_,isSelected:b,attributes:C,setAttributes:S,insertBlocksAfter:a?void 0:x,onReplace:a?void 0:I,onRemove:a?void 0:L,mergeBlocks:a?void 0:B,clientId:l,isSelectionEnabled:k,toggleSelection:P});if($){var Q={"data-align":w["data-align"]};X=Object(d.createElement)("div",Object(s.a)({className:"wp-block"},Q),X)}"visual"!==o&&(X=Object(d.createElement)("div",{style:{display:"none"}},X));var Z={clientId:l,rootClientId:u,isSelected:b,isFirstMultiSelected:v,isLastMultiSelected:g,isPartOfMultiSelection:m,enableAnimation:N,index:T,className:Y,isLocked:a,name:_,mode:o,blockTitle:U.title,wrapperProps:w},J=Object(d.useMemo)((function(){return Z}),Object.values(Z));return Object(d.createElement)(ru.Provider,{value:J},Object(d.createElement)(Gr,{onError:function(){return z(!0)}},E&&G&&Object(d.createElement)(d.Fragment,null,X,"html"===o&&Object(d.createElement)(eu.div,{__unstableIsHtml:!0},Object(d.createElement)(qr,{clientId:l}))),E&&!G&&Object(d.createElement)(eu.div,w,X,"html"===o&&Object(d.createElement)(qr,{clientId:l})),!E&&Object(d.createElement)(eu.div,null,Object(d.createElement)(Vr,{clientId:l}),Object(d.createElement)("div",null,Object(c.getSaveElement)(U,C)))),!!H&&Object(d.createElement)(eu.div,null,Object(d.createElement)(zr,null)))})),au=function(e,t,n){return Object(h.sprintf)(
|
58 |
+
/* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
|
59 |
+
Object(h.__)("Block %1$d of %2$d, Level %3$d"),e,t,n)};var lu=Object(d.forwardRef)((function e(t,n){var r=t.className,o=t.block,i=t.isSelected,a=t.onClick,l=t.position,s=t.siblingCount,u=t.level,b=t.tabIndex,p=t.onFocus,v=o.name,O=o.attributes,g=Object(c.getBlockType)(v),k=Object(c.__experimentalGetBlockLabel)(g,O),y=Object(m.useInstanceId)(e),_="block-navigation-block-select-button__".concat(y),E=au(l,s,u);return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(j.Button,{className:f()("block-editor-block-navigation-block-select-button",r),onClick:a,"aria-describedby":_,ref:n,tabIndex:b,onFocus:p},Object(d.createElement)(An,{icon:g.icon,showColors:!0}),k,i&&Object(d.createElement)(j.VisuallyHidden,null,Object(h.__)("(selected block)"))),Object(d.createElement)("div",{className:"block-editor-block-navigation-block-select-button__description",id:_},E))}));function su(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 uu=function(e){return"BlockNavigationBlock-".concat(e)};var du=Object(d.forwardRef)((function e(t,n){var r=Object(m.useInstanceId)(e),o=t.block.clientId;return Object(d.createElement)(j.Slot,{name:uu(o)},(function(e){if(!e.length)return Object(d.createElement)(lu,Object(s.a)({ref:n},t));var o=t.className,i=t.block,a=t.isSelected,l=t.position,b=t.siblingCount,p=t.level,m=t.tabIndex,v=t.onFocus,O=i.name,g=Object(c.getBlockType)(O),k="block-navigation-block-slot__".concat(r),y=au(l,b,p),_={tabIndex:m,onFocus:v,ref:n,"aria-describedby":k};return Object(d.createElement)(d.Fragment,null,Object(d.createElement)("div",{className:f()("block-editor-block-navigation-block-slot",o)},Object(d.createElement)(An,{icon:g.icon,showColors:!0}),d.Children.map(e,(function(e){return Object(d.cloneElement)(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?su(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):su(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.props,{},_))})),a&&Object(d.createElement)(j.VisuallyHidden,null,Object(h.__)("(selected block)")),Object(d.createElement)("div",{className:"block-editor-block-navigation-block-slot__description",id:k},y)))}))})),bu=function(e){var t=Object(d.useContext)(ru).clientId;return Object(d.createElement)(j.Fill,Object(s.a)({},e,{name:uu(t)}))},fu=Object(d.forwardRef)((function(e,t){var n=e.onClick,r=e.block,o=e.isSelected,c=e.position,i=e.siblingCount,a=e.level,l=Object(pe.a)(e,["onClick","block","isSelected","position","siblingCount","level"]);return Pr().__experimentalFeatures?Object(d.createElement)(du,Object(s.a)({ref:t,className:"block-editor-block-navigation-block-contents",block:r,onClick:n,isSelected:o,position:c,siblingCount:i,level:a},l)):Object(d.createElement)(lu,Object(s.a)({ref:t,className:"block-editor-block-navigation-block-contents",block:r,onClick:n,isSelected:o,position:c,siblingCount:i,level:a},l))}));function pu(e){var t=e.block,n=e.isSelected,r=e.onClick,o=e.position,c=e.level,i=e.rowCount,a=e.showBlockMovers,l=e.terminatedLevels,s=e.path,u=Object(d.useRef)(null),b=Object(d.useState)(!1),p=Object(te.a)(b,2),m=p[0],v=p[1],g=Object(d.useState)(!1),k=Object(te.a)(g,2),y=k[0],_=k[1],E=Object(O.useDispatch)("core/block-editor").selectBlock,C=t.clientId,w=i-1,S=a&&w>0,I=m||y,x=f()("block-editor-block-navigation-block__mover-cell",{"is-visible":I}),B=Pr().__experimentalFeatures,P=f()("block-editor-block-navigation-block__menu-cell",{"is-visible":I});return Object(d.useEffect)((function(){B&&n&&u.current.focus()}),[B,n]),Object(d.createElement)(gr,{className:f()({"is-selected":n}),onMouseEnter:function(){return v(!0)},onMouseLeave:function(){return v(!1)},onFocus:function(){return _(!0)},onBlur:function(){return _(!1)},level:c,position:o,rowCount:i,path:s},Object(d.createElement)(j.__experimentalTreeGridCell,{className:"block-editor-block-navigation-block__contents-cell",colSpan:S?void 0:2,ref:u},(function(e){var a=e.ref,s=e.tabIndex,u=e.onFocus;return Object(d.createElement)("div",{className:"block-editor-block-navigation-block__contents-container"},Object(d.createElement)(xr,{level:c,isLastRow:o===i,terminatedLevels:l}),Object(d.createElement)(fu,{block:t,onClick:function(){return r(t.clientId)},isSelected:n,position:o,siblingCount:w,level:c,ref:a,tabIndex:s,onFocus:u}))})),S&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(j.__experimentalTreeGridCell,{className:x,withoutGridItem:!0},Object(d.createElement)(j.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(d.createElement)(Sr,{orientation:"vertical",clientIds:[C],ref:t,tabIndex:n,onFocus:r})})),Object(d.createElement)(j.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(d.createElement)(Ir,{orientation:"vertical",clientIds:[C],ref:t,tabIndex:n,onFocus:r})})))),B&&Object(d.createElement)(j.__experimentalTreeGridCell,{className:P},(function(e){var t=e.ref,n=e.tabIndex,o=e.onFocus;return Object(d.createElement)(Is,{clientIds:[C],icon:dr.a,toggleProps:{ref:t,tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:r},(function(e){var t=e.onClose;return Object(d.createElement)(j.MenuGroup,null,Object(d.createElement)(j.MenuItem,{onClick:Object(ur.a)(sr.a.mark((function e(){return sr.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,E(null);case 2:return e.next=4,E(C);case 4:t();case 5:case"end":return e.stop()}}),e)})))},Object(h.__)("Go to block")))}))})))}function mu(e){var t=e.parentBlockClientId,n=e.position,r=e.level,o=e.rowCount,c=e.terminatedLevels,i=e.path,a=Object(m.useInstanceId)(mu),l="block-navigation-appender-row__description_".concat(a),s=Object(h.sprintf)(
|
60 |
+
/* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
|
61 |
+
Object(h.__)("Add block at position %1$d, Level %2$d"),n,r);return Object(d.createElement)(gr,{level:r,position:n,rowCount:o,path:i},Object(d.createElement)(j.__experimentalTreeGridCell,{className:"block-editor-block-navigation-appender__cell",colSpan:"3"},(function(e){var i=e.ref,a=e.tabIndex,u=e.onFocus;return Object(d.createElement)("div",{className:"block-editor-block-navigation-appender__container"},Object(d.createElement)(xr,{level:r,isLastRow:n===o,terminatedLevels:c}),Object(d.createElement)(Pl,{rootClientId:t,__experimentalIsQuick:!0,__experimentalSelectBlockOnInsert:!1,"aria-describedby":l,toggleProps:{ref:i,tabIndex:a,onFocus:u}}),Object(d.createElement)("div",{className:"block-editor-block-navigation-appender__description",id:l},s))})))}function vu(e){var t=e.blocks,n=e.selectBlock,r=e.selectedBlockClientId,o=e.showAppender,c=e.showBlockMovers,i=e.showNestedBlocks,a=e.parentBlockClientId,l=e.level,s=void 0===l?1:l,u=e.terminatedLevels,b=void 0===u?[]:u,f=e.path,m=void 0===f?[]:f,v=!a,O=Object(p.compact)(t),g=function(e){return o&&!v&&r===e},h=g(a),j=h?O.length+1:O.length,k=j;return Object(d.createElement)(d.Fragment,null,Object(p.map)(O,(function(e,t){var a=e.clientId,l=e.innerBlocks,u=t+1,f=j===u?[].concat(Object(ee.a)(b),[s]):b,p=[].concat(Object(ee.a)(m),[u]),v=i&&!!l&&!!l.length,O=g(a);return Object(d.createElement)(d.Fragment,{key:a},Object(d.createElement)(pu,{block:e,onClick:n,isSelected:r===a,level:s,position:u,rowCount:j,showBlockMovers:c,terminatedLevels:b,path:p}),(v||O)&&Object(d.createElement)(vu,{blocks:l,selectedBlockClientId:r,selectBlock:n,showAppender:o,showBlockMovers:c,showNestedBlocks:i,parentBlockClientId:a,level:s+1,terminatedLevels:f,path:p}))})),h&&Object(d.createElement)(mu,{parentBlockClientId:a,position:j,rowCount:k,level:s,terminatedLevels:b,path:[].concat(Object(ee.a)(m),[k])}))}function Ou(e){var t=e.__experimentalFeatures,n=Object(pe.a)(e,["__experimentalFeatures"]),r=Object(d.useMemo)((function(){return{__experimentalFeatures:t}}),[t]);return Object(d.createElement)(j.__experimentalTreeGrid,{className:"block-editor-block-navigation-tree","aria-label":Object(h.__)("Block navigation structure")},Object(d.createElement)(Br.Provider,{value:r},Object(d.createElement)(vu,n)))}vu.defaultProps={selectBlock:function(){}};var gu=Object(m.compose)(Object(O.withSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getBlockHierarchyRootClientId,o=t.getBlock,c=t.getBlocks,i=n();return{rootBlocks:c(),rootBlock:i?o(r(i)):null,selectedBlockClientId:i}})),Object(O.withDispatch)((function(e,t){var n=t.onSelect,r=void 0===n?p.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(d.createElement)("div",{className:"block-editor-block-navigation__container"},Object(d.createElement)("p",{className:"block-editor-block-navigation__label"},Object(h.__)("List view")),i&&Object(d.createElement)(Ou,{blocks:[t],selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c,showNestedBlocks:!0}),!i&&Object(d.createElement)(Ou,{blocks:n,selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c}))})),hu=Object(d.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},Object(d.createElement)(j.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));function ju(e){var t=e.isEnabled,n=e.onToggle,r=e.isOpen,o=e.innerRef,c=Object(pe.a)(e,["isEnabled","onToggle","isOpen","innerRef"]);Object(l.useShortcut)("core/edit-post/toggle-block-navigation",Object(d.useCallback)(n,[n]),{bindGlobal:!0,isDisabled:!t});var i=Object(O.useSelect)((function(e){return e("core/keyboard-shortcuts").getShortcutRepresentation("core/edit-post/toggle-block-navigation")}),[]);return Object(d.createElement)(j.Button,Object(s.a)({},c,{ref:o,icon:hu,"aria-expanded":r,onClick:t?n:void 0,label:Object(h.__)("Block navigation"),className:"block-editor-block-navigation",shortcut:i,"aria-disabled":!t}))}var ku=Object(d.forwardRef)((function(e,t){var n=e.isDisabled,r=e.__experimentalFeatures,o=Object(pe.a)(e,["isDisabled","__experimentalFeatures"]),c=Object(O.useSelect)((function(e){return!!e("core/block-editor").getBlockCount()}),[])&&!n;return Object(d.createElement)(j.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(d.createElement)(ju,Object(s.a)({},o,{innerRef:t,isOpen:n,onToggle:r,isEnabled:c}))},renderContent:function(e){var t=e.onClose;return Object(d.createElement)(gu,{onSelect:t,__experimentalFeatures:r})}})})),yu=n(126),_u=[et.rawShortcut.primary("z"),et.rawShortcut.primaryShift("z"),et.rawShortcut.primary("y")],Eu=Object(d.createElement)(j.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(p.fromPairs)(_u.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),Cu=function(){return Eu};function wu(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(ds.createBlobURL)(e),'">')})).join("")}var Su={position:"bottom right",isAlternate:!0},Iu=function(){return Object(d.createElement)("div",{className:"block-editor-format-toolbar"},Object(d.createElement)(j.ToolbarGroup,null,["bold","italic","link","text-color"].map((function(e){return Object(d.createElement)(j.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object(d.createElement)(j.Slot,{name:"RichText.ToolbarControls"},(function(e){return 0!==e.length&&Object(d.createElement)(j.__experimentalToolbarItem,null,(function(t){return Object(d.createElement)(j.DropdownMenu,{icon:yr.a,label:Object(h.__)("More rich text controls"),toggleProps:t,controls:Object(p.orderBy)(e.map((function(e){return Object(te.a)(e,1)[0].props})),"title"),popoverProps:Su})}))}))))},xu=function(e){var t=e.inline,n=e.anchorRef;return t?Object(d.createElement)(j.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar"},Object(d.createElement)(Iu,null)):Object(d.createElement)(ar,null,Object(d.createElement)(Iu,null))};function Bu(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 Pu(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function Tu(e){var t=e.allowedFormats,n=e.formattingControls;return e.disableFormats?Tu.EMPTY_ARRAY:t||n?t||(Jn()("wp.blockEditor.RichText formattingControls prop",{alternative:"allowedFormats"}),n.map((function(e){return"core/".concat(e)}))):void 0}Tu.EMPTY_ARRAY=[];var Nu=Object(d.forwardRef)((function e(t,n){var r=t.children,o=t.tagName,a=t.value,l=t.onChange,b=t.isSelected,p=t.multiline,v=t.inlineToolbar,g=t.wrapperClassName,h=t.className,j=t.autocompleters,k=t.onReplace,y=t.placeholder,_=t.keepPlaceholderOnFocus,E=t.allowedFormats,C=t.formattingControls,w=t.withoutInteractiveFormatting,S=t.onRemove,I=t.onMerge,x=t.onSplit,B=t.__unstableOnSplitAtEnd,P=t.__unstableOnSplitMiddle,T=t.identifier,N=t.start,R=t.reversed,D=t.style,M=t.preserveWhiteSpace,A=t.__unstableEmbedURLOnPaste,L=t.__unstableDisableFormats,F=t.disableLineBreaks,V=Object(pe.a)(t,["children","tagName","value","onChange","isSelected","multiline","inlineToolbar","wrapperClassName","className","autocompleters","onReplace","placeholder","keepPlaceholderOnFocus","allowedFormats","formattingControls","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","__unstableOnSplitMiddle","identifier","start","reversed","style","preserveWhiteSpace","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableLineBreaks"]),H=Object(m.useInstanceId)(e);T=T||H;var U=Object(d.useRef)(),G=n||U,K=Object(z.b)(),W=K.clientId,q=K.onCaretVerticalPositionChange,$=K.isSelected,Y=Object(O.useSelect)((function(e){var t,n=e("core/block-editor"),r=n.isCaretWithinFormattedText,o=n.getSelectionStart,i=n.getSelectionEnd,a=n.getSettings,l=n.didAutomaticChange,s=n.__unstableGetBlockWithoutInnerBlocks,f=n.isMultiSelecting,p=n.hasMultiSelection,m=o(),v=i(),O=a().__experimentalUndo;void 0===b?t=m.clientId===W&&m.attributeKey===T:b&&(t=m.clientId===W);var g={};if("native"===d.Platform.OS){var h=W&&s(W);g={shouldBlurOnUnmount:h&&t&&Object(c.isUnmodifiedDefaultBlock)(h)}}return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bu(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({isCaretWithinFormattedText:r(),selectionStart:t?m.offset:void 0,selectionEnd:t?v.offset:void 0,isSelected:t,didAutomaticChange:l(),disabled:f()||p(),undo:O},g)})),X=Y.isCaretWithinFormattedText,Q=Y.selectionStart,Z=Y.selectionEnd,J=Y.isSelected,ne=Y.didAutomaticChange,re=Y.disabled,oe=Y.undo,ce=Y.shouldBlurOnUnmount,ie=Object(O.useDispatch)("core/block-editor"),ae=ie.__unstableMarkLastChangeAsPersistent,le=ie.enterFormattedText,se=ie.exitFormattedText,ue=ie.selectionChange,de=ie.__unstableMarkAutomaticChange,be=Pu(p),fe=Tu({allowedFormats:E,formattingControls:C,disableFormats:L}),me=!fe||fe.length>0,ve=a,Oe=l;Array.isArray(a)&&(ve=c.children.toHTML(a),Oe=function(e){return l(c.children.fromDOM(Object(i.__unstableCreateElement)(document,e).childNodes))});var ge=Object(d.useCallback)((function(e,t){ue(W,T,e,t)}),[W,T]),he=Object(d.useCallback)((function(e){var t=e.value,n=e.isReverse;I&&I(!n),S&&Object(i.isEmpty)(t)&&n&&S(!n)}),[I,S]),je=Object(d.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(k&&x){var n=[],r=Object(i.split)(e),o=Object(te.a)(r,2),c=o[0],a=o[1],l=t.length>0,s=-1;l&&Object(i.isEmpty)(c)||(n.push(x(Object(i.toHTMLString)({value:c,multilineTag:be}))),s+=1),l?(n.push.apply(n,Object(ee.a)(t)),s+=t.length):P&&n.push(P()),(l||P)&&Object(i.isEmpty)(a)||n.push(x(Object(i.toHTMLString)({value:a,multilineTag:be})));var u=l?s:1,d=l?-1:null;k(n,u,d)}}),[k,x,be,P]),ke=Object(d.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.shiftKey,o=k&&x;if(k){var a=Object(c.getBlockTransforms)("from").filter((function(e){return"enter"===e.type})),l=Object(c.findTransform)(a,(function(e){return e.regExp.test(t.text)}));l&&(k([l.transform({content:t.text})]),de())}if(p)r?F||n(Object(i.insert)(t,"\n")):o&&Object(i.__unstableIsEmptyLine)(t)?je(t):n(Object(i.__unstableInsertLineSeparator)(t));else{var s=t.text,u=t.start,d=t.end,b=B&&u===d&&d===s.length;r||!o&&!b?F||n(Object(i.insert)(t,"\n")):!o&&b?B():o&&je(t)}}),[k,x,de,p,je,B]),ye=Object(d.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.html,a=e.plainText,l=e.files,s=e.activeFormats;if(l&&l.length&&!r){var u=Object(c.pasteHandler)({HTML:wu(l),mode:"BLOCKS",tagName:o});return window.console.log("Received items:\n\n",l),void(k&&Object(i.isEmpty)(t)?k(u):je(t,u))}var d,b=k&&x?"AUTO":"INLINE";"AUTO"===b&&Object(i.isEmpty)(t)&&(d=a,Object(yu.regexp)(".*").test(d))&&(b="BLOCKS"),A&&Object(i.isEmpty)(t)&&Object(fl.isURL)(a.trim())&&(b="BLOCKS");var f=Object(c.pasteHandler)({HTML:r,plainText:a,mode:b,tagName:o});if("string"==typeof f){var m=Object(i.create)({html:f});if(s.length)for(var v=m.formats.length;v--;)m.formats[v]=[].concat(Object(ee.a)(s),Object(ee.a)(m.formats[v]||[]));p&&(m=Object(i.replace)(m,/\n+/g,i.__UNSTABLE_LINE_SEPARATOR)),n(Object(i.insert)(t,m))}else f.length>0&&(k&&Object(i.isEmpty)(t)?k(f,f.length-1,-1):je(t,f))}),[o,k,x,je,A,p]),_e=Object(d.useCallback)((function(e,t){if(k){var n=e.start,r=e.text;if(" "===r.slice(n-1,n)){var o=r.slice(0,n).trim(),a=Object(c.getBlockTransforms)("from").filter((function(e){return"prefix"===e.type})),l=Object(c.findTransform)(a,(function(e){var t=e.prefix;return o===t}));if(l){var s=t(Object(i.slice)(e,n,r.length)),u=l.transform(s);k([u]),de()}}}}),[k,de]),Ee=Object(d.createElement)(i.__experimentalRichText,Object(s.a)({},V,{clientId:W,identifier:T,ref:G,value:ve,onChange:Oe,selectionStart:Q,selectionEnd:Z,onSelectionChange:ge,tagName:o,className:f()("block-editor-rich-text__editable",h,{"keep-placeholder-on-focus":_}),placeholder:y,allowedFormats:fe,withoutInteractiveFormatting:w,onEnter:ke,onDelete:he,onPaste:ye,__unstableIsSelected:J,__unstableInputRule:_e,__unstableMultilineTag:be,__unstableIsCaretWithinFormattedText:X,__unstableOnEnterFormattedText:le,__unstableOnExitFormattedText:se,__unstableOnCreateUndoLevel:ae,__unstableMarkAutomaticChange:de,__unstableDidAutomaticChange:ne,__unstableUndo:oe,__unstableDisableFormats:L,style:D,preserveWhiteSpace:M,disabled:re,start:N,reversed:R,onCaretVerticalPositionChange:q,blockIsSelected:void 0!==b?b:$,shouldBlurOnUnmount:ce}),(function(e){var t=e.isSelected,n=e.value,o=e.onChange,c=e.onFocus,i=e.editableProps,a=e.editableTagName;return Object(d.createElement)(d.Fragment,null,r&&r({value:n,onChange:o,onFocus:c}),t&&me&&Object(d.createElement)(xu,{inline:v,anchorRef:G.current}),t&&Object(d.createElement)(Cu,null),Object(d.createElement)(Hn,{onReplace:k,completers:j,record:n,onChange:o,isSelected:t},(function(e){var t=e.listBoxId,n=e.activeId,r=e.onKeyDown;return Object(d.createElement)(a,Object(s.a)({},i,{"aria-autocomplete":t?"list":void 0,"aria-owns":t,"aria-activedescendant":n,start:N,reversed:R,onKeyDown:function(e){r(e),i.onKeyDown(e)}}))})))}));return g?(Jn()("wp.blockEditor.RichText wrapperClassName prop",{alternative:"className prop or create your own wrapper div"}),Object(d.createElement)("div",{className:f()("block-editor-rich-text",g)},Ee)):Ee}));Nu.Content=function(e){var t=e.value,n=e.tagName,r=e.multiline,o=Object(pe.a)(e,["value","tagName","multiline"]);Array.isArray(t)&&(t=c.children.toHTML(t));var i=Pu(r);!t&&i&&(t="<".concat(i,"></").concat(i,">"));var a=Object(d.createElement)(d.RawHTML,null,t);return n?Object(d.createElement)(n,Object(p.omit)(o,["format"]),a):a},Nu.isEmpty=function(e){return!e||0===e.length},Nu.Content.defaultProps={format:"string",value:""};var Ru=Nu;function Du(e){var t=e.value,n=e.onChange;return Object(d.createElement)(bu,null,Object(d.createElement)(Ru,{value:t,onChange:n,placeholder:Object(h.__)("Navigation item"),keepPlaceholderOnFocus:!0,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var Mu=n(295);var Au=function(e){var t=e.icon,n=void 0===t?Mu.a:t,r=e.label,o=void 0===r?Object(h.__)("Choose variation"):r,c=e.instructions,i=void 0===c?Object(h.__)("Select a variation to start with."):c,a=e.variations,l=e.onSelect,s=e.allowSkip,u=f()("block-editor-block-variation-picker",{"has-many-variations":a.length>4});return Object(d.createElement)(j.Placeholder,{icon:n,label:o,instructions:i,className:u},Object(d.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(h.__)("Block variations")},a.map((function(e){return Object(d.createElement)("li",{key:e.name},Object(d.createElement)(j.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:function(){return l(e)},className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(d.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))}))),s&&Object(d.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(d.createElement)(j.Button,{isLink:!0,onClick:function(){return l()}},Object(h.__)("Skip"))))},Lu=Object(d.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(j.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Fu=Object(d.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(j.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"}));function Vu(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 Hu={top:{icon:Object(d.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(j.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(h._x)("Vertically Align Top","Block vertical alignment setting")},center:{icon:Fu,title:Object(h._x)("Vertically Align Middle","Block vertical alignment setting")},bottom:{icon:Lu,title:Object(h._x)("Vertically Align Bottom","Block vertical alignment setting")}},zu=["top","center","bottom"],Uu={isAlternate:!0};var Gu=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?zu:r,c=e.isCollapsed,i=void 0===c||c,a=Hu[t],l=Hu.top;return Object(d.createElement)(j.ToolbarGroup,{popoverProps:Uu,isCollapsed:i,icon:a?a.icon:l.icon,label:Object(h._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vu(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Hu[e],{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})},Ku=Object(m.createHigherOrderComponent)(Object(O.withSelect)((function(e,t){var n=e("core/block-editor").getSettings(),r=void 0===t.colors?n.colors:t.colors,o=void 0===t.disableCustomColors?n.disableCustomColors:t.disableCustomColors;return{colors:r,disableCustomColors:o,hasColorsToChoose:!Object(p.isEmpty)(r)||!o}})),"withColorContext"),Wu=Ku(j.ColorPalette);function qu(e){var t=e.onChange,n=e.value,r=Object(pe.a)(e,["onChange","value"]);return Object(d.createElement)(ye,Object(s.a)({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}function $u(e){var t=Object(O.useSelect)((function(e){return Object(p.pick)(e("core/block-editor").getSettings(),["gradients","disableCustomGradients"])}),[]),n=t.gradients,r=t.disableCustomGradients;return Object(d.createElement)(j.__experimentalGradientPicker,Object(s.a)({gradients:void 0!==e.gradients?e.gradient:n,disableCustomGradients:void 0!==e.disableCustomGradients?e.disableCustomGradients:r},e))}var Yu=function(e){var t=void 0!==e.gradients&&void 0!==e.disableCustomGradients?j.__experimentalGradientPicker:$u;return Object(d.createElement)(t,e)};function Xu(e){var t=e.className,n=e.value,r=e.onChange,o=e.label,c=void 0===o?Object(h.__)("Gradient Presets"):o,i=Object(pe.a)(e,["className","value","onChange","label"]),a=Object(O.useSelect)((function(e){return Object(p.pick)(e("core/block-editor").getSettings(),["gradients","disableCustomGradients"])}),[]),l=a.gradients,u=void 0===l?[]:l,b=a.disableCustomGradients;return Object(p.isEmpty)(u)&&b?null:Object(d.createElement)(j.BaseControl,{className:f()("block-editor-gradient-picker-control",t)},Object(d.createElement)(j.BaseControl.VisualLabel,null,c),Object(d.createElement)(Yu,Object(s.a)({value:n,onChange:r,className:"block-editor-gradient-picker-control__gradient-picker-presets",gradients:u,disableCustomGradients:b},i)))}function Qu(e){var t=Object(O.useSelect)((function(e){return e("core/block-editor").getSettings().gradients}),[]);return Object(p.isEmpty)(t)?null:Object(d.createElement)(j.PanelBody,{title:Object(h.__)("Gradient")},Object(d.createElement)(Xu,e))}var Zu=[25,50,75,100];function Ju(e){var t,n,r=e.imageWidth,o=e.imageHeight,c=e.imageSizeOptions,i=void 0===c?[]:c,a=e.isResizable,l=void 0===a||a,s=e.slug,u=e.width,b=e.height,f=e.onChange,m=e.onChangeImage,v=void 0===m?p.noop:m;function O(e,t){return function(){f({width:e,height:t})}}return Object(d.createElement)(d.Fragment,null,!Object(p.isEmpty)(i)&&Object(d.createElement)(j.SelectControl,{label:Object(h.__)("Image size"),value:s,options:i,onChange:v}),l&&Object(d.createElement)("div",{className:"block-editor-image-size-control"},Object(d.createElement)("p",{className:"block-editor-image-size-control__row"},Object(h.__)("Image dimensions")),Object(d.createElement)("div",{className:"block-editor-image-size-control__row"},Object(d.createElement)(j.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:Object(h.__)("Width"),value:null!==(t=null!=u?u:r)&&void 0!==t?t:"",min:1,onChange:function(e){return f({width:parseInt(e,10)})}}),Object(d.createElement)(j.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:Object(h.__)("Height"),value:null!==(n=null!=b?b:o)&&void 0!==n?n:"",min:1,onChange:function(e){return f({height:parseInt(e,10)})}})),Object(d.createElement)("div",{className:"block-editor-image-size-control__row"},Object(d.createElement)(j.ButtonGroup,{"aria-label":Object(h.__)("Image size presets")},Zu.map((function(e){var t=Math.round(r*(e/100)),n=Math.round(o*(e/100)),c=u===t&&b===n;return Object(d.createElement)(j.Button,{key:e,isSmall:!0,isPrimary:c,isPressed:c,onClick:O(t,n)},e,"%")}))),Object(d.createElement)(j.Button,{isSmall:!0,onClick:O()},Object(h.__)("Reset")))))}var ed=Object(m.createHigherOrderComponent)((function(e){return function(t){var n=Object(z.b)().clientId;return Object(d.createElement)(e,Object(s.a)({},t,{clientId:n}))}}),"withClientId"),td=ed((function(e){var t=e.clientId,n=e.showSeparator,r=e.isFloating,o=e.onAddBlock;return Object(d.createElement)(Na,{rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})})),nd=Object(m.compose)([ed,Object(O.withSelect)((function(e,t){var n=t.clientId,r=(0,e("core/block-editor").getBlockOrder)(n);return{lastBlockClientId:Object(p.last)(r)}}))])((function(e){var t=e.clientId,n=e.lastBlockClientId;return Object(d.createElement)(Ta,{rootClientId:t,lastBlockClientId:n})})),rd=n(63),od=n.n(rd);var cd=new WeakMap;function id(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 ad(e){var t=e.clientId,n=e.allowedBlocks,r=e.template,o=e.templateLock,i=e.forwardedRef,a=e.templateInsertUpdatesSelection,l=e.__experimentalCaptureToolbars,u=e.orientation,b=Object(m.useViewportMatch)("medium","<"),v=Object(O.useSelect)((function(e){var n=e("core/block-editor"),r=n.getBlock,o=n.isBlockSelected,c=n.hasSelectedInnerBlock,i=n.isNavigationMode,a=r(t);return{block:a,hasOverlay:"core/template"!==a.name&&!o(t)&&!c(t,!0),enableClickThrough:i()||b}})),g=v.hasOverlay,h=v.block,j=v.enableClickThrough;!function(e,t,n,r,o){var c=Object(O.useDispatch)("core/block-editor").updateBlockListSettings,i=Object(O.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,l=i.parentLock;Object(d.useLayoutEffect)((function(){var i={allowedBlocks:t,templateLock:void 0===n?l:n};void 0!==r&&(i.__experimentalCaptureToolbars=r),void 0!==o&&(i.orientation=o),od()(a,i)||c(e,i)}),[e,a,t,n,l,r,o,c])}(t,n,o,l,u),function(e,t,n,r){var o=Object(O.useDispatch)("core/block-editor").replaceInnerBlocks,i=Object(O.useSelect)((function(t){return t("core/block-editor").getBlocks(e)}),[e]),a=Object(d.useRef)(null);Object(d.useLayoutEffect)((function(){if((0===i.length||"all"===n)&&!Object(p.isEqual)(t,a.current)){a.current=t;var l=Object(c.synchronizeBlocksWithTemplate)(i,t);Object(p.isEqual)(l,i)||o(e,l,0===i.length&&r&&0!==l.length)}}),[i,n,e])}(t,r,o,a);var k=f()({"has-overlay":j&&g,"is-capturing-toolbar":l}),y=Object(d.createElement)(Fa,Object(s.a)({},e,{ref:i,rootClientId:t,className:k})),_=Object(c.getBlockType)(h.name);if(_&&_.providesContext){var E=function(e,t){cd.has(t)||cd.set(t,new WeakMap);var n=cd.get(t);if(!n.has(e)){var r=Object(p.mapValues)(t.providesContext,(function(t){return e[t]}));n.set(e,r)}return n.get(e)}(h.attributes,_);y=Object(d.createElement)(qn,{value:E},y)}return e.__experimentalTagName?y:Object(d.createElement)("div",{className:"block-editor-inner-blocks"},y)}function ld(e){return xa(e),Object(d.createElement)(ad,e)}var sd=Object(d.forwardRef)((function(e,t){var n=Object(z.b)().clientId,r=Object(d.useRef)(),o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?id(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):id(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({clientId:n,forwardedRef:t||r},e);return e.value&&e.onChange?Object(d.createElement)(ld,o):Object(d.createElement)(ad,o)}));sd.DefaultBlockAppender=nd,sd.ButtonBlockAppender=td,sd.Content=Object(c.withBlockContentContext)((function(e){var t=e.BlockContent;return Object(d.createElement)(t,null)}));var ud=sd,dd=n(208);function bd(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 fd=[{id:"opensInNewTab",title:Object(h.__)("Open in new tab")}],pd=function(e){var t=e.value,n=e.onChange,r=void 0===n?p.noop:n,o=e.settings,c=void 0===o?fd:o;if(!c||!c.length)return null;var i=function(e){return function(n){r(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bd(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,Object(u.a)({},e.id,n)))}},a=c.map((function(e){return Object(d.createElement)(j.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:i(e),checked:!!t&&!!t[e.id]})}));return Object(d.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(d.createElement)(j.VisuallyHidden,{as:"legend"},Object(h.__)("Currently selected link settings")),a)},md=n(124),vd=n.n(md);function Od(){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}}var gd=function(e){return e.stopPropagation()},hd=function(e){Object(Ht.a)(r,e);var t,n=(t=r,function(){var e,n=Object(Vt.a)(t);if(Od()){var r=Object(Vt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Ft.a)(this,e)});function r(e){var t;return Object(Mt.a)(this,r),(t=n.call(this,e)).onChange=t.onChange.bind(Object(Lt.a)(t)),t.onFocus=t.onFocus.bind(Object(Lt.a)(t)),t.onKeyDown=t.onKeyDown.bind(Object(Lt.a)(t)),t.selectLink=t.selectLink.bind(Object(Lt.a)(t)),t.handleOnClick=t.handleOnClick.bind(Object(Lt.a)(t)),t.bindSuggestionNode=t.bindSuggestionNode.bind(Object(Lt.a)(t)),t.autocompleteRef=e.autocompleteRef||Object(d.createRef)(),t.inputRef=Object(d.createRef)(),t.updateSuggestions=Object(p.throttle)(t.updateSuggestions.bind(Object(Lt.a)(t)),200),t.suggestionNodes=[],t.isUpdatingSuggestions=!1,t.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null},t}return Object(At.a)(r,[{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,vd()(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(fl.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(h.sprintf)(
|
62 |
+
/* translators: %s: number of results. */
|
63 |
+
Object(h._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(h.__)("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 et.UP:e.stopPropagation(),e.preventDefault();var a=r?r-1:o.length-1;this.setState({selectedSuggestion:a});break;case et.DOWN:e.stopPropagation(),e.preventDefault();var l=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:l});break;case et.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak(Object(h.__)("Link selected.")));break;case et.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(i))}}else switch(e.keyCode){case et.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case et.DOWN:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}}},{key:"selectLink",value:function(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}},{key:"handleOnClick",value:function(e){this.selectLink(e),this.inputRef.current.focus()}},{key:"render",value:function(){var e=this,t=this.props,n=t.label,r=t.instanceId,o=t.className,c=t.isFullWidth,i=t.__experimentalRenderSuggestions,a=t.placeholder,l=void 0===a?Object(h.__)("Paste URL or type to search"):a,u=t.value,b=void 0===u?"":u,m=t.autoFocus,v=void 0===m||m,O=t.__experimentalShowInitialSuggestions,g=void 0!==O&&O,k=this.state,y=k.showSuggestions,_=k.suggestions,E=k.selectedSuggestion,C=k.loading,w="url-input-control-".concat(r),S="block-editor-url-input-suggestions-".concat(r),I="block-editor-url-input-suggestion-".concat(r),x={id:S,ref:this.autocompleteRef,role:"listbox"},B=function(t,n){return{role:"option",tabIndex:"-1",id:"".concat(I,"-").concat(n),ref:e.bindSuggestionNode(n),"aria-selected":n===E}};return Object(d.createElement)(j.BaseControl,{label:n,id:w,className:f()("block-editor-url-input",o,{"is-full-width":c})},Object(d.createElement)("input",{className:"block-editor-url-input__input",autoFocus:v,type:"text","aria-label":Object(h.__)("URL"),required:!0,value:b,onChange:this.onChange,onFocus:this.onFocus,onInput:gd,placeholder:l,onKeyDown:this.onKeyDown,role:"combobox","aria-expanded":y,"aria-autocomplete":"list","aria-owns":S,"aria-activedescendant":null!==E?"".concat(I,"-").concat(E):void 0,ref:this.inputRef}),C&&Object(d.createElement)(j.Spinner,null),Object(p.isFunction)(i)&&y&&!!_.length&&i({suggestions:_,selectedSuggestion:E,suggestionsListProps:x,buildSuggestionItemProps:B,isLoading:C,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:g&&!(b&&b.length)}),!Object(p.isFunction)(i)&&y&&!!_.length&&Object(d.createElement)(j.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(d.createElement)("div",Object(s.a)({},x,{className:f()("block-editor-url-input__suggestions","".concat(o,"__suggestions"))}),_.map((function(t,n){return Object(d.createElement)(j.Button,Object(s.a)({},B(0,n),{key:t.id,className:f()("block-editor-url-input__suggestion",{"is-selected":n===E}),onClick:function(){return e.handleOnClick(t)}}),t.title)})))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.value,r=e.disableSuggestions,o=e.__experimentalShowInitialSuggestions,c=void 0!==o&&o,i=t.showSuggestions,a=n&&n.length;return c||a||(i=!1),!0===r&&(i=!1),{showSuggestions:i}}}]),r}(d.Component),jd=Object(m.compose)(m.withSafeTimeout,j.withSpokenMessages,m.withInstanceId,Object(O.withSelect)((function(e,t){if(!Object(p.isFunction)(t.__experimentalFetchLinkSuggestions))return{__experimentalFetchLinkSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}})))(hd),kd=function(e){var t=e.searchTerm,n=e.onClick,r=e.itemProps,o=e.isSelected;return t?Object(d.createElement)(j.Button,Object(s.a)({},r,{className:f()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":o}),onClick:n}),Object(d.createElement)(j.Icon,{className:"block-editor-link-control__search-item-icon",icon:"insert"}),Object(d.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(d.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(d.createInterpolateElement)(Object(h.sprintf)(
|
64 |
+
/* translators: %s: search term. */
|
65 |
+
Object(h.__)("New page: <mark>%s</mark>"),t),{mark:Object(d.createElement)("mark",null)})))):null},yd=Object(d.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(d.createElement)(k.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"})),_d=function(e){var t=e.itemProps,n=e.suggestion,r=e.isSelected,o=void 0!==r&&r,c=e.onClick,i=e.isURL,a=void 0!==i&&i,l=e.searchTerm,u=void 0===l?"":l;return Object(d.createElement)(j.Button,Object(s.a)({},t,{onClick:c,className:f()("block-editor-link-control__search-item",{"is-selected":o,"is-url":a,"is-entity":!a})}),a&&Object(d.createElement)(to.a,{className:"block-editor-link-control__search-item-icon",icon:yd}),Object(d.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(d.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(d.createElement)(j.TextHighlight,{text:n.title,highlight:u})),Object(d.createElement)("span",{"aria-hidden":!a,className:"block-editor-link-control__search-item-info"},!a&&(Object(fl.filterURLForDisplay)(Object(fl.safeDecodeURI)(n.url))||""),a&&Object(h.__)("Press ENTER to add this link"))),n.type&&Object(d.createElement)("span",{className:"block-editor-link-control__search-item-type"},n.type))};function Ed(e){var t=e.instanceId,n=e.withCreateSuggestion,r=e.currentInputValue,o=e.handleSuggestionClick,c=e.suggestionsListProps,i=e.buildSuggestionItemProps,a=e.suggestions,l=e.selectedSuggestion,u=e.isLoading,b=e.isInitialSuggestions,p=f()("block-editor-link-control__search-results",{"is-loading":u}),m=["url","mailto","tel","internal"],v=1===a.length&&m.includes(a[0].type.toLowerCase()),O=n&&!v&&!b,g="block-editor-link-control-search-results-label-".concat(t),k=b?Object(h.__)("Recently updated"):Object(h.sprintf)(
|
66 |
+
/* translators: %s: search term. */
|
67 |
+
Object(h.__)('Search results for "%s"'),r),y=Object(d.createElement)(b?d.Fragment:j.VisuallyHidden,{},Object(d.createElement)("span",{className:"block-editor-link-control__search-results-label",id:g},k));return Object(d.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},y,Object(d.createElement)("div",Object(s.a)({},c,{className:p,"aria-labelledby":g}),a.map((function(e,t){return O&&"__CREATE__"===e.type?Object(d.createElement)(kd,{searchTerm:r,onClick:function(){return o(e)},key:e.type,itemProps:i(e,t),isSelected:t===l}):"__CREATE__"===e.type?null:Object(d.createElement)(_d,{key:"".concat(e.id,"-").concat(e.type),itemProps:i(e,t),suggestion:e,index:t,onClick:function(){o(e)},isSelected:t===l,isURL:m.includes(e.type.toLowerCase()),searchTerm:r})}))))}function Cd(e){var t=Object(p.startsWith)(e,"#");return Object(fl.isURL)(e)||e&&e.includes("www.")||t}function wd(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){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wd(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Id=function(){return Promise.resolve([])},xd=function(e){var t="URL",n=Object(fl.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),Object(p.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?Object(fl.prependHTTP)(e):e,type:t}])},Bd=function(){var e=Object(ur.a)(sr.a.mark((function e(t,n,r,o){var c,i;return sr.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([r(t,Sd({},n.isInitialSuggestions?{perPage:3}:{})),o(t)]);case 2:if(c=e.sent,i=!t.includes(" "),c=i&&!n.isInitialSuggestions?c[0].concat(c[1]):c[0],!n.isInitialSuggestions){e.next=7;break}return e.abrupt("return",c);case 7:return e.abrupt("return",Cd(t)?c:c.concat({title:t,url:t,type:"__CREATE__"}));case 8:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}();function Pd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Td(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pd(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Nd=Promise.resolve([]),Rd=function e(t){var n=t.value,r=t.children,o=t.currentLink,c=void 0===o?{}:o,i=t.className,a=void 0===i?null:i,l=t.placeholder,s=void 0===l?null:l,u=t.withCreateSuggestion,b=void 0!==u&&u,f=t.onCreateSuggestion,v=void 0===f?p.noop:f,g=t.onChange,j=void 0===g?p.noop:g,k=t.onSelect,y=void 0===k?p.noop:k,_=t.showSuggestions,E=void 0===_||_,C=t.renderSuggestions,w=void 0===C?function(e){return Object(d.createElement)(Ed,e)}:C,S=t.fetchSuggestions,I=void 0===S?null:S,x=t.allowDirectEntry,B=void 0===x||x,P=t.showInitialSuggestions,T=void 0!==P&&P,N=function(e){var t=Object(O.useSelect)((function(e){return{fetchSearchSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}}),[]).fetchSearchSuggestions,n=e?xd:Id;return Object(d.useCallback)((function(e,r){return Cd(e)?n(e,r):Bd(e,r,t,n)}),[n,t])}(B),R=E?I||N:Nd,D=Object(m.useInstanceId)(e),M=Object(d.useState)(),A=Object(te.a)(M,2),L=A[0],F=A[1],V=function(){var e=Object(ur.a)(sr.a.mark((function e(t){var n,r;return sr.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,v(t.title);case 5:n=e.sent,(null===(r=n)||void 0===r?void 0:r.url)&&y(n),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(2);case 11:return e.abrupt("return");case 12:(B||n&&Object.keys(n).length>=1)&&y(Td({},Object(p.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(d.createElement)("form",{onSubmit:function(e){e.preventDefault(),V(L||{url:n})}},Object(d.createElement)(jd,{className:a,value:n,onChange:function(e,t){j(e),F(t)},placeholder:null!=s?s:Object(h.__)("Search or type url"),__experimentalRenderSuggestions:E?function(e){return w(Td({},e,{instanceId:D,withCreateSuggestion:b,currentInputValue:n,handleSuggestionClick:function(t){e.handleSuggestionClick&&e.handleSuggestionClick(t),V(t)}}))}:null,__experimentalFetchLinkSuggestions:R,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:T}),r)},Dd=Object(j.createSlotFill)("BlockEditorLinkControlViewer"),Md=Dd.Slot,Ad=Dd.Fill;function Ld(e){var t=e.value,n=e.onEditClick,r=t&&Object(fl.filterURLForDisplay)(Object(fl.safeDecodeURI)(t.url))||"";return Object(d.createElement)("div",{"aria-label":Object(h.__)("Currently selected"),"aria-selected":"true",className:f()("block-editor-link-control__search-item",{"is-current":!0})},Object(d.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(d.createElement)(j.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},t&&t.title||r),t&&t.title&&Object(d.createElement)("span",{className:"block-editor-link-control__search-item-info"},r)),Object(d.createElement)(j.Button,{isSecondary:!0,onClick:function(){return n()},className:"block-editor-link-control__search-item-action"},Object(h.__)("Edit")),Object(d.createElement)(Md,{fillProps:t}))}var Fd=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 Vd(e){var t=e.searchInputPlaceholder,n=e.value,r=e.settings,o=e.onChange,c=void 0===o?p.noop:o,i=e.noDirectEntry,a=void 0!==i&&i,l=e.showSuggestions,s=void 0===l||l,u=e.showInitialSuggestions,b=e.forceIsEditingLink,f=e.createSuggestion,m=e.withCreateSuggestion,v=e.inputValue,O=void 0===v?"":v;void 0===m&&f&&(m=!0);var g=Object(d.useRef)(),k=Object(d.useState)(n&&n.url||""),y=Object(te.a)(k,2),_=y[0],E=y[1],C=O||_,w=Object(d.useState)(void 0!==b?b:!n||!n.url),S=Object(te.a)(w,2),I=S[0],x=S[1],B=Object(d.useRef)(!1);Object(d.useEffect)((function(){void 0!==b&&b!==I&&x(b)}),[b]),Object(d.useEffect)((function(){B.current&&g.current&&!g.current.contains(document.activeElement)&&(fr.focus.focusable.find(g.current)[0]||g.current).focus();B.current=!1}),[I]);var P=function(e){var t=Object(d.useRef)(),n=Object(d.useState)(!1),r=Object(te.a)(n,2),o=r[0],c=r[1],i=Object(d.useState)(null),a=Object(te.a)(i,2),l=a[0],s=a[1],u=function(){var n=Object(ur.a)(sr.a.mark((function n(r){return sr.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!0),s(null),n.prev=2,t.current=Fd(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(h.__)("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(d.useEffect)((function(){return function(){t.current&&t.current.cancel()}}),[]),{createPage:u,isCreatingPage:o,errorMessage:l}}(f),T=P.createPage,N=P.isCreatingPage,R=P.errorMessage;return Object(d.createElement)("div",{tabIndex:-1,ref:g,className:"block-editor-link-control"},N&&Object(d.createElement)("div",{className:"block-editor-link-control__loading"},Object(d.createElement)(j.Spinner,null)," ",Object(h.__)("Creating"),"…"),(I||!n)&&!N&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(d.createElement)(Rd,{currentLink:n,className:"block-editor-link-control__search-input",placeholder:t,value:C,withCreateSuggestion:m,onCreateSuggestion:T,onChange:E,onSelect:function(e){var t;c(e),B.current=!!(null===(t=g.current)||void 0===t?void 0:t.contains(document.activeElement)),x(!1)},showInitialSuggestions:u,allowDirectEntry:!a,showSuggestions:s},Object(d.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(d.createElement)(j.Button,{type:"submit",label:Object(h.__)("Submit"),icon:dd.a,className:"block-editor-link-control__search-submit"})))),R&&Object(d.createElement)(j.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},R)),n&&!I&&!N&&Object(d.createElement)(Ld,{value:n,onEditClick:function(){return x(!0)}}),Object(d.createElement)(pd,{value:n,settings:r,onChange:c}))}Vd.ViewerFill=Ad;var Hd=Vd,zd=Object(d.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(d.createElement)(k.Path,{d:"M13 11V4c0-.55-.45-1-1-1h-1.67L9 1H5L3.67 3H2c-.55 0-1 .45-1 1v7c0 .55.45 1 1 1h10c.55 0 1-.45 1-1zM7 4.5c1.38 0 2.5 1.12 2.5 2.5S8.38 9.5 7 9.5 4.5 8.38 4.5 7 5.62 4.5 7 4.5zM14 6h5v10.5c0 1.38-1.12 2.5-2.5 2.5S14 17.88 14 16.5s1.12-2.5 2.5-2.5c.17 0 .34.02.5.05V9h-3V6zm-4 8.05V13h2v3.5c0 1.38-1.12 2.5-2.5 2.5S7 17.88 7 16.5 8.12 14 9.5 14c.17 0 .34.02.5.05z"})),Ud=n(209),Gd=Object(j.withFilters)("editor.MediaUpload")((function(){return null}));var Kd=function(e){var t=e.fallback,n=void 0===t?null:t,r=e.children;return Object(O.useSelect)((function(e){return!!(0,e("core/block-editor").getSettings)().mediaUpload}),[])?r:n},Wd=Object(m.compose)([Object(O.withDispatch)((function(e){var t=e("core/notices");return{createNotice:t.createNotice,removeNotice:t.removeNotice}})),Object(j.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,l=void 0===a?p.noop:a,s=e.name,u=void 0===s?Object(h.__)("Replace"):s,b=e.createNotice,f=e.removeNotice,m=Object(d.useState)(t),v=Object(te.a)(m,2),g=v[0],k=v[1],y=Object(O.useSelect)((function(e){return e("core/block-editor").getSettings().mediaUpload}),[]),_=Object(d.createRef)(),E=Object(p.uniqueId)("block-editor/media-replace-flow/error-notice/"),C=function(e){var t=document.createElement("div");t.innerHTML=Object(d.renderToString)(e);var n=t.textContent||t.innerText||"";setTimeout((function(){b("error",n,{speak:!0,id:E,isDismissible:!0})}),1e3)},w=function(e){c(e),k(e.url),Object(Te.speak)(Object(h.__)("The media file has been replaced")),f(E)},S=function(e){e.keyCode===et.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(d.createElement)(j.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(d.createElement)(j.ToolbarGroup,{className:"media-replace-flow"},Object(d.createElement)(j.ToolbarButton,{ref:_,"aria-expanded":t,onClick:n,onKeyDown:S},u))},renderContent:function(e){e.onClose;return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(j.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(d.createElement)(Gd,{value:n,onSelect:function(e){return w(e)},allowedTypes:r,render:function(e){var t=e.open;return Object(d.createElement)(j.MenuItem,{icon:zd,onClick:t},Object(h.__)("Open Media Library"))}}),Object(d.createElement)(Kd,null,Object(d.createElement)(j.FormFileUpload,{onChange:function(e){!function(e){var t=e.target.files;l(t);y({allowedTypes:r,filesList:t,onFileChange:function(e){var t=Object(te.a)(e,1)[0];w(t)},onError:C})}(e)},accept:o,render:function(e){var t=e.openFileDialog;return Object(d.createElement)(j.MenuItem,{icon:Ud.a,onClick:function(){t()}},Object(h.__)("Upload"))}}))),i&&Object(d.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:function(e){e.stopPropagation()},onKeyPress:function(e){e.stopPropagation()}},Object(d.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(h.__)("Current media URL:")),Object(d.createElement)(Hd,{value:{url:g},settings:[],showSuggestions:!1,onChange:function(e){var t=e.url;k(t),i(t),_.current.focus()}})))}})})),qd=n(210);function $d(e){var t=e.url,n=e.urlLabel,r=e.className,o=f()(r,"block-editor-url-popover__link-viewer-url");return t?Object(d.createElement)(j.ExternalLink,{className:o,href:t},n||Object(fl.filterURLForDisplay)(Object(fl.safeDecodeURI)(t))):Object(d.createElement)("span",{className:o})}function Yd(e){var t=e.additionalControls,n=e.children,r=e.renderSettings,o=e.position,c=void 0===o?"bottom center":o,i=e.focusOnMount,a=void 0===i?"firstElement":i,l=Object(pe.a)(e,["additionalControls","children","renderSettings","position","focusOnMount"]),u=Object(d.useState)(!1),b=Object(te.a)(u,2),f=b[0],p=b[1],m=!!r&&f;return Object(d.createElement)(j.Popover,Object(s.a)({className:"block-editor-url-popover",focusOnMount:a,position:c},l),Object(d.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(d.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&Object(d.createElement)(j.Button,{className:"block-editor-url-popover__settings-toggle",icon:yr.a,label:Object(h.__)("Link settings"),onClick:function(){p(!f)},"aria-expanded":f})),m&&Object(d.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!m&&Object(d.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}Yd.LinkEditor=function(e){var t=e.autocompleteRef,n=e.className,r=e.onChangeInputValue,o=e.value,c=Object(pe.a)(e,["autocompleteRef","className","onChangeInputValue","value"]);return Object(d.createElement)("form",Object(s.a)({className:f()("block-editor-url-popover__link-editor",n)},c),Object(d.createElement)(jd,{value:o,onChange:r,autocompleteRef:t}),Object(d.createElement)(j.Button,{icon:dd.a,label:Object(h.__)("Apply"),type:"submit"}))},Yd.LinkViewer=function(e){var t=e.className,n=e.linkClassName,r=e.onEditLinkClick,o=e.url,c=e.urlLabel,i=Object(pe.a)(e,["className","linkClassName","onEditLinkClick","url","urlLabel"]);return Object(d.createElement)("div",Object(s.a)({className:f()("block-editor-url-popover__link-viewer",t)},i),Object(d.createElement)($d,{url:o,urlLabel:c,className:n}),r&&Object(d.createElement)(j.Button,{icon:qd.a,label:Object(h.__)("Edit"),onClick:r}))};var Xd=Yd,Qd=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(d.createElement)(Xd,{onClose:o},Object(d.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},Object(d.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(h.__)("URL"),placeholder:Object(h.__)("Paste or type URL"),onChange:n,value:t}),Object(d.createElement)(j.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:dd.a,label:Object(h.__)("Apply"),type:"submit"})))};var Zd=Object(j.withFilters)("editor.MediaPlaceholder")((function(e){var t=e.value,n=void 0===t?{}:t,r=e.allowedTypes,o=void 0===r?[]:r,c=e.className,i=e.icon,a=e.labels,l=void 0===a?{}:a,s=e.mediaPreview,u=e.notices,b=e.isAppender,m=e.accept,v=e.addToGallery,g=e.multiple,k=void 0!==g&&g,y=e.dropZoneUIOnly,_=e.disableDropZone,E=e.disableMediaButtons,C=e.onError,w=e.onSelect,S=e.onCancel,I=e.onSelectURL,x=e.onDoubleClick,B=e.onFilesPreUpload,P=void 0===B?p.noop:B,T=e.onHTMLDrop,N=void 0===T?p.noop:T,R=e.children,D=Object(O.useSelect)((function(e){return(0,e("core/block-editor").getSettings)().mediaUpload}),[]),M=Object(d.useState)(""),A=Object(te.a)(M,2),L=A[0],F=A[1],V=Object(d.useState)(!1),H=Object(te.a)(V,2),z=H[0],U=H[1];Object(d.useEffect)((function(){var e;F(null!==(e=null==n?void 0:n.src)&&void 0!==e?e:"")}),[n]);var G=function(e){F(e.target.value)},K=function(){U(!0)},W=function(){U(!1)},q=function(e){e.preventDefault(),L&&I&&(I(L),W())},$=function(e){var t;if(P(e),k)if(v){var r=[];t=function(e){var t=(null!=n?n:[]).filter((function(e){return e.id?!r.some((function(t){var n=t.id;return Number(n)===Number(e.id)})):!r.some((function(t){var n=t.urlSlug;return e.url.includes(n)}))}));w(t.concat(e)),r=e.map((function(e){var t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else t=w;else t=function(e){var t=Object(te.a)(e,1)[0];return w(t)};D({allowedTypes:o,filesList:e,onFileChange:t,onError:C})},Y=function(e){$(e.target.files)},X=function(e,t){var n=l.instructions,r=l.title;if(D||I||(n=Object(h.__)("To edit this block, you need permission to upload media.")),void 0===n||void 0===r){var a=Object(te.a)(o,1)[0],p=1===o.length,m=p&&"audio"===a,v=p&&"image"===a,O=p&&"video"===a;void 0===n&&D&&(n=Object(h.__)("Upload a media file or pick one from your media library."),m?n=Object(h.__)("Upload an audio file, pick one from your media library, or add one with a URL."):v?n=Object(h.__)("Upload an image file, pick one from your media library, or add one with a URL."):O&&(n=Object(h.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===r&&(r=Object(h.__)("Media"),m?r=Object(h.__)("Audio"):v?r=Object(h.__)("Image"):O&&(r=Object(h.__)("Video")))}var g=f()("block-editor-media-placeholder",c,{"is-appender":b});return Object(d.createElement)(j.Placeholder,{icon:i,label:r,instructions:n,className:g,notices:u,onClick:t,onDoubleClick:x,preview:s},e,R)},Q=function(){return _?null:Object(d.createElement)(j.DropZone,{onFilesDrop:$,onHTMLDrop:N})},Z=function(){return S&&Object(d.createElement)(j.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(h.__)("Cancel"),isLink:!0,onClick:S},Object(h.__)("Cancel"))},J=function(){return I&&Object(d.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(d.createElement)(j.Button,{className:"block-editor-media-placeholder__button",onClick:K,isPressed:z,isTertiary:!0},Object(h.__)("Insert from URL")),z&&Object(d.createElement)(Qd,{src:L,onChange:G,onSubmit:q,onClose:W}))};return y||E?(y&&Jn()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{alternative:"disableMediaButtons"}),Object(d.createElement)(Kd,null,Q())):Object(d.createElement)(Kd,{fallback:X(J())},function(){var e=Object(d.createElement)(Gd,{addToGallery:v,gallery:k&&o.every((function(e){return"image"===e||e.startsWith("image/")})),multiple:k,onSelect:w,allowedTypes:o,value:Array.isArray(n)?n.map((function(e){return e.id})):n.id,render:function(e){var t=e.open;return Object(d.createElement)(j.Button,{isTertiary:!0,onClick:function(e){e.stopPropagation(),t()}},Object(h.__)("Media Library"))}});if(D&&b)return Object(d.createElement)(d.Fragment,null,Q(),Object(d.createElement)(j.FormFileUpload,{onChange:Y,accept:m,multiple:k,render:function(t){var n=t.openFileDialog,r=Object(d.createElement)(d.Fragment,null,Object(d.createElement)(j.Button,{isPrimary:!0,className:f()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(h.__)("Upload")),e,J(),Z());return X(r,n)}}));if(D){var t=Object(d.createElement)(d.Fragment,null,Q(),Object(d.createElement)(j.FormFileUpload,{isPrimary:!0,className:f()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:Y,accept:m,multiple:k},Object(h.__)("Upload")),e,J(),Z());return X(t)}return X(e)}())})),Jd=Object(d.forwardRef)((function(e,t){return Object(d.createElement)(Ru,Object(s.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))}));Jd.Content=function(e){var t=e.value,n=void 0===t?"":t,r=e.tagName,o=void 0===r?"div":r,c=Object(pe.a)(e,["value","tagName"]);return Object(d.createElement)(o,c,n)};var eb=Jd,tb=Object(d.forwardRef)((function(e,t){var n=e.__experimentalVersion,r=Object(pe.a)(e,["__experimentalVersion"]);if(2===n)return Object(d.createElement)(eb,Object(s.a)({ref:t},r));var o=r.className,c=r.onChange,i=Object(pe.a)(r,["className","onChange"]);return Object(d.createElement)(Wr.a,Object(s.a)({ref:t,className:f()("block-editor-plain-text",o),onChange:function(e){return c(e.target.value)}},i))}));function nb(e){var t=e.property,n=e.viewport,r=e.desc,o=Object(m.useInstanceId)(nb),c=r||Object(h.sprintf)(
|
68 |
+
/* translators: 1: property name. 2: viewport name. */
|
69 |
+
Object(h._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(d.createElement)(d.Fragment,null,Object(d.createElement)("span",{"aria-describedby":"rbc-desc-".concat(o)},n.label),Object(d.createElement)(j.VisuallyHidden,{as:"span",id:"rbc-desc-".concat(o)},c))}var rb=function(e){var t=e.title,n=e.property,r=e.toggleLabel,o=e.onIsResponsiveChange,c=e.renderDefaultControl,i=e.renderResponsiveControls,a=e.isResponsive,l=void 0!==a&&a,s=e.defaultLabel,u=void 0===s?{id:"all",
|
70 |
+
/* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
|
71 |
+
label:Object(h.__)("All")}:s,b=e.viewports,p=void 0===b?[{id:"small",label:Object(h.__)("Small screens")},{id:"medium",label:Object(h.__)("Medium screens")},{id:"large",label:Object(h.__)("Large screens")}]:b;if(!t||!n||!c)return null;var m=r||Object(h.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(h.__)("Use the same %s on all screensizes."),n),v=Object(h.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),O=c(Object(d.createElement)(nb,{property:n,viewport:u}),u);
|
74 |
+
/* translators: 'Help text for the responsive mode toggle control.' */return Object(d.createElement)("fieldset",{className:"block-editor-responsive-block-control"},Object(d.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),Object(d.createElement)("div",{className:"block-editor-responsive-block-control__inner"},Object(d.createElement)(j.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:m,checked:!l,onChange:o,help:v}),Object(d.createElement)("div",{className:f()("block-editor-responsive-block-control__group",{"is-responsive":l})},!l&&O,l&&(i?i(p):p.map((function(e){return Object(d.createElement)(d.Fragment,{key:e.id},c(Object(d.createElement)(nb,{property:n,viewport:e}),e))}))))))};function ob(e){var t=e.character,n=e.type,r=e.onUse;return Object(m.useKeyboardShortcut)(et.rawShortcut[n](t),(function(){return r(),!1}),{bindGlobal:!0}),null}function cb(e){var t,n=e.name,r=e.shortcutType,o=e.shortcutCharacter,c=Object(pe.a)(e,["name","shortcutType","shortcutCharacter"]),i="RichText.ToolbarControls";return n&&(i+=".".concat(n)),r&&o&&(t=et.displayShortcut[r](o)),Object(d.createElement)(j.Fill,{name:i},Object(d.createElement)(j.ToolbarButton,Object(s.a)({},c,{shortcut:t})))}function ib(){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}}var ab=function(e){Object(Ht.a)(r,e);var t,n=(t=r,function(){var e,n=Object(Vt.a)(t);if(ib()){var r=Object(Vt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Ft.a)(this,e)});function r(){var e;return Object(Mt.a)(this,r),(e=n.apply(this,arguments)).onInput=e.onInput.bind(Object(Lt.a)(e)),e}return Object(At.a)(r,[{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}}]),r}(d.Component),lb=n(296),sb=Object(d.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(d.createElement)(j.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"}));var ub=Object(d.forwardRef)((function(e,t){var n=Object(O.useSelect)((function(e){return e("core/block-editor").isNavigationMode()}),[]),r=Object(O.useDispatch)("core/block-editor").setNavigationMode,o=function(e){r("edit"!==e)};return Object(d.createElement)(j.Dropdown,{renderToggle:function(r){var o=r.isOpen,c=r.onToggle;return Object(d.createElement)(j.Button,Object(s.a)({},e,{ref:t,icon:n?sb:lb.a,"aria-expanded":o,onClick:c,label:Object(h.__)("Tools")}))},position:"bottom right",renderContent:function(){return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(j.NavigableMenu,{role:"menu","aria-label":Object(h.__)("Tools")},Object(d.createElement)(j.MenuItemsChoice,{value:n?"select":"edit",onSelect:o,choices:[{value:"edit",label:Object(d.createElement)(d.Fragment,null,Object(d.createElement)(to.a,{icon:lb.a}),Object(h.__)("Edit"))},{value:"select",label:Object(d.createElement)(d.Fragment,null,sb,Object(h.__)("Select"))}]})),Object(d.createElement)("div",{className:"block-editor-tool-selector__help"},Object(h.__)("Tools offer different interactions for block selection & editing. To select, press Escape, to go back to editing, press Enter.")))}})})),db=n(186),bb=Object(d.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(k.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"}));function fb(){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}}var pb=function(e){Object(Ht.a)(r,e);var t,n=(t=r,function(){var e,n=Object(Vt.a)(t);if(fb()){var r=Object(Vt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Ft.a)(this,e)});function r(){var e;return Object(Mt.a)(this,r),(e=n.apply(this,arguments)).toggle=e.toggle.bind(Object(Lt.a)(e)),e.submitLink=e.submitLink.bind(Object(Lt.a)(e)),e.state={expanded:!1},e}return Object(At.a)(r,[{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(h.__)("Edit link"):Object(h.__)("Insert link");return Object(d.createElement)("div",{className:"block-editor-url-input__button"},Object(d.createElement)(j.Button,{icon:db.a,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!t}),r&&Object(d.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},Object(d.createElement)("div",{className:"block-editor-url-input__button-modal-line"},Object(d.createElement)(j.Button,{className:"block-editor-url-input__back",icon:bb,label:Object(h.__)("Close"),onClick:this.toggle}),Object(d.createElement)(jd,{value:t||"",onChange:n}),Object(d.createElement)(j.Button,{icon:dd.a,label:Object(h.__)("Submit"),type:"submit"}))))}}]),r}(d.Component),mb=n(143),vb=["noreferrer","noopener"],Ob=Object(d.createElement)(j.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(j.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(d.createElement)(j.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(d.createElement)(j.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),gb=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,l=e.linkTarget,s=e.linkClass,u=e.rel,b=Object(d.useState)(!1),f=Object(te.a)(b,2),m=f[0],v=f[1],O=Object(d.useCallback)((function(){v(!0)})),g=Object(d.useState)(!1),k=Object(te.a)(g,2),y=k[0],_=k[1],E=Object(d.useState)(null),C=Object(te.a)(E,2),w=C[0],S=C[1],I=Object(d.useRef)(null),x=function(e){e.stopPropagation()},B=function(e){[et.LEFT,et.DOWN,et.RIGHT,et.UP,et.BACKSPACE,et.ENTER].indexOf(e.keyCode)>-1&&e.stopPropagation()},P=Object(d.useCallback)((function(){"media"!==t&&"attachment"!==t||S(""),_(!0)})),T=Object(d.useCallback)((function(){_(!1)})),N=Object(d.useCallback)((function(){S(null),T(),v(!1)})),R=function(e){var t=e;return void 0===e||Object(p.isEmpty)(t)||Object(p.isEmpty)(t)||(Object(p.each)(vb,(function(e){var n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),Object(p.isEmpty)(t)&&(t=void 0)),t},D=Object(d.useCallback)((function(){return function(e){var t=I.current;t&&t.contains(e.target)||(v(!1),S(null),T())}})),M=Object(d.useCallback)((function(){return function(e){w&&n({href:w}),T(),S(null),e.preventDefault()}})),A=Object(d.useCallback)((function(){n({linkDestination:"none",href:""})})),L=function(){return[{linkDestination:"media",title:Object(h.__)("Media File"),url:"image"===c?i:void 0,icon:Ob},{linkDestination:"attachment",title:Object(h.__)("Attachment Page"),url:"image"===c?a:void 0,icon:Object(d.createElement)(j.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(j.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(d.createElement)(j.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"}))}]},F=Object(d.createElement)(d.Fragment,null,Object(d.createElement)(j.ToggleControl,{label:Object(h.__)("Open in new tab"),onChange:function(e){var t=function(e){var t=e?"_blank":void 0;return{linkTarget:t,rel:t||u?R(u):void 0}}(e);n(t)},checked:"_blank"===l}),Object(d.createElement)(j.TextControl,{label:Object(h.__)("Link Rel"),value:R(u)||"",onChange:function(e){n({rel:e})},onKeyPress:x,onKeyDown:B}),Object(d.createElement)(j.TextControl,{label:Object(h.__)("Link CSS Class"),value:s||"",onKeyPress:x,onKeyDown:B,onChange:function(e){n({linkClass:e})}})),V=null!==w?w:r,H=(Object(p.find)(L(),["linkDestination",t])||{}).title;return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(j.ToolbarButton,{icon:db.a,className:"components-toolbar__control",label:r?Object(h.__)("Edit link"):Object(h.__)("Insert link"),"aria-expanded":m,onClick:O}),m&&Object(d.createElement)(Xd,{onFocusOutside:D(),onClose:N,renderSettings:function(){return F},additionalControls:!V&&Object(d.createElement)(j.NavigableMenu,null,Object(p.map)(L(),(function(e){return Object(d.createElement)(j.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:function(){var t,r,o;S(null),t=e.url,o=L(),r=t?(Object(p.find)(o,(function(e){return e.url===t}))||{linkDestination:"custom"}).linkDestination:"none",n({linkDestination:r,href:t}),T()}},e.title)})))},(!r||y)&&Object(d.createElement)(Xd.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:V,onChangeInputValue:S,onKeyDown:B,onKeyPress:x,onSubmit:M(),autocompleteRef:I}),r&&!y&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(Xd.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",onKeyPress:x,url:r,onEditLinkClick:P,urlLabel:H}),Object(d.createElement)(j.Button,{icon:mb.a,label:Object(h.__)("Remove link"),onClick:A}))))},hb=n(130);function jb(e){var t=e.children,n=e.className,r=e.isEnabled,o=void 0===r||r,c=e.deviceType,i=e.setDeviceType;return Object(d.createElement)(j.Dropdown,{className:"block-editor-post-preview__dropdown",contentClassName:f()(n,"block-editor-post-preview__dropdown-content"),popoverProps:{role:"menu"},position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(d.createElement)(j.Button,{isTertiary:!0,onClick:n,className:"block-editor-post-preview__button-toggle","aria-expanded":t,disabled:!o},Object(h.__)("Preview"))},renderContent:function(){return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(j.MenuGroup,null,Object(d.createElement)(j.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Desktop")},icon:"Desktop"===c&&hb.a},Object(h.__)("Desktop")),Object(d.createElement)(j.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Tablet")},icon:"Tablet"===c&&hb.a},Object(h.__)("Tablet")),Object(d.createElement)(j.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Mobile")},icon:"Mobile"===c&&hb.a},Object(h.__)("Mobile"))),t)}})}var kb=n(258),yb=/\((min|max)-width:[^\(]*?\)/g;function _b(e){return!!e.media&&!!e.media.mediaText.match(yb)}function Eb(e,t,n){e.deleteRule(n),e.insertRule(t,n)}function Cb(e,t){return e.replace(yb,(function(e){return Object(kb.match)(e,{type:"screen",width:t})?"(min-width:0px)":"(min-width:999999px)"}))}function wb(e,t){Object(d.useEffect)((function(){if(t){var n="undefined"==typeof window?[]:Object(p.filter)(Object(p.get)(window,["document","styleSheets"],[]),(function(e){return!!e.href&&Object(fl.getProtocol)(e.href)===window.location.protocol&&Object(fl.getAuthority)(e.href)===window.location.host})),r=[];return n.forEach((function(n,o){for(var c=!1,i=0;i<n.cssRules.length;++i){var a=n.cssRules[i];if((a.type===window.CSSRule.STYLE_RULE||a.type===window.CSSRule.MEDIA_RULE)&&(!c&&a.cssText.match(new RegExp("#start-".concat(e)))&&(c=!0),c&&a.cssText.match(new RegExp("#end-".concat(e)))&&(c=!1),c&&_b(a))){var l=a.cssText;r[o]||(r[o]=[]),r[o][i]=l,Eb(n,Cb(l,t),i)}}})),function(){r.forEach((function(e,t){if(e)for(var r=0;r<e.length;++r){var o=e[r];o&&Eb(n[t],o,r)}}))}}}),[t])}function Sb(e){var t=Object(d.useState)(window.innerWidth),n=Object(te.a)(t,2),r=n[0],o=n[1];Object(d.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 wb("resizable-editor-section",c(e)),function(e){switch(e){case"Tablet":case"Mobile":return{width:c(e),margin:(window.innerHeight<800?36:72)+"px auto",flexGrow:0,maxHeight:"Mobile"===e?"768px":"1024px",overflowY:"auto"};default:return null}}(e)}var Ib=Object(O.withSelect)((function(e){return{selectedBlockClientId:e("core/block-editor").getBlockSelectionStart()}}))((function(e){var t=e.selectedBlockClientId;return t&&Object(d.createElement)(j.Button,{isSecondary:!0,className:"block-editor-skip-to-selected-block",onClick:function(){He(t).focus()}},Object(h.__)("Skip to the selected block"))})),xb=n(149);var Bb=Object(O.withSelect)((function(e){return{blocks:(0,e("core/block-editor").getMultiSelectedBlocks)()}}))((function(e){var t=e.blocks,n=Object(xb.count)(Object(c.serialize)(t),"words");return Object(d.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},Object(d.createElement)(An,{icon:Ql,showColors:!0}),Object(d.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},Object(d.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},Object(h.sprintf)(
|
75 |
+
/* translators: %d: number of blocks */
|
76 |
+
Object(h._n)("%d block","%d blocks",t.length),t.length)),Object(d.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},Object(h.sprintf)(
|
77 |
+
/* translators: %d: number of words */
|
78 |
+
Object(h._n)("%d word","%d words",n),n))))}));function Pb(e){var t=e.blockName,n=Object(O.useSelect)((function(e){var n=e("core/block-editor").getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:Object(p.get)(n,["value",t]),onUpdatePreferredStyleVariations:Object(p.get)(n,["onChange"],null),styles:e("core/blocks").getBlockStyles(t)}}),[t]),r=n.preferredStyle,o=n.onUpdatePreferredStyleVariations,c=n.styles,i=Object(d.useMemo)((function(){return[{label:Object(h.__)("Not set"),value:""}].concat(Object(ee.a)(c.map((function(e){return{label:e.label,value:e.name}}))))}),[c]),a=Object(d.useCallback)((function(e){o(t,e)}),[t,o]);return o&&Object(d.createElement)(j.SelectControl,{options:i,value:r||"",label:Object(h.__)("Default Style"),onChange:a})}var Tb=function(e){var t=e.slotName,n=Object(j.__experimentalUseSlot)(t);return Boolean(n.fills&&n.fills.length)?Object(d.createElement)(j.PanelBody,{className:"block-editor-block-inspector__advanced",title:Object(h.__)("Advanced"),initialOpen:!1},Object(d.createElement)(q.Slot,{bubblesVirtually:!0})):null},Nb=Object(O.withSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getSelectedBlockCount,o=t.getBlockName,i=e("core/blocks").getBlockStyles,a=n(),l=a&&o(a),s=a&&Object(c.getBlockType)(l),u=a&&i(l);return{count:r(),hasBlockStyles:u&&u.length>0,selectedBlockName:l,selectedBlockClientId:a,blockType:s}}))((function(e){var t=e.blockType,n=e.count,r=e.hasBlockStyles,o=e.selectedBlockClientId,i=e.selectedBlockName,a=e.showNoBlockSelectedMessage,l=void 0===a||a;if(n>1)return Object(d.createElement)("div",{className:"block-editor-block-inspector"},Object(d.createElement)(Bb,null),Object(d.createElement)(Ve.Slot,{bubblesVirtually:!0}));var s=i===Object(c.getUnregisteredTypeHandlerName)();return t&&o&&!s?Object(d.createElement)("div",{className:"block-editor-block-inspector"},Object(d.createElement)(oo,{blockType:t}),r&&Object(d.createElement)("div",null,Object(d.createElement)(j.PanelBody,{title:Object(h.__)("Styles")},Object(d.createElement)(rs,{clientId:o}),Object(c.hasBlockSupport)(t.name,"defaultStylePicker",!0)&&Object(d.createElement)(Pb,{blockName:t.name}))),Object(d.createElement)(Ve.Slot,{bubblesVirtually:!0}),Object(d.createElement)("div",null,Object(d.createElement)(Tb,{slotName:q.slotName})),Object(d.createElement)(Ib,{key:"back"})):l?Object(d.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},Object(h.__)("No block selected.")):null}));function Rb(){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}}var Db=function(e){Object(Ht.a)(r,e);var t,n=(t=r,function(){var e,n=Object(Vt.a)(t);if(Rb()){var r=Object(Vt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Ft.a)(this,e)});function r(){var e;return Object(Mt.a)(this,r),(e=n.apply(this,arguments)).bindContainer=e.bindContainer.bind(Object(Lt.a)(e)),e.clearSelectionIfFocusTarget=e.clearSelectionIfFocusTarget.bind(Object(Lt.a)(e)),e}return Object(At.a)(r,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearSelectionIfFocusTarget",value:function(e){var t=this.props,n=t.hasSelectedBlock,r=t.hasMultiSelection,o=t.clearSelectedBlock,c=n||r;e.target===this.container&&c&&o()}},{key:"render",value:function(){return Object(d.createElement)("div",Object(s.a)({tabIndex:-1,onFocus:this.clearSelectionIfFocusTarget,ref:this.bindContainer},Object(p.omit)(this.props,["clearSelectedBlock","hasSelectedBlock","hasMultiSelection"])))}}]),r}(d.Component),Mb=Object(m.compose)([Object(O.withSelect)((function(e){var t=e("core/block-editor"),n=t.hasSelectedBlock,r=t.hasMultiSelection;return{hasSelectedBlock:n(),hasMultiSelection:r()}})),Object(O.withDispatch)((function(e){return{clearSelectedBlock:e("core/block-editor").clearSelectedBlock}}))])(Db),Ab=n(259),Lb=n.n(Ab),Fb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Vb=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 s(){return b(/^{\s*/)}function u(){return b(/^}/)}function d(){var t,n=[];for(f(),p(n);e.length&&"}"!==e.charAt(0)&&(t=C()||w());)!1!==t&&(n.push(t),p(n));return n}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 Hb(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=Hb(t[0]),!b(/^:\s*/))return l("property missing ':'");var n=b(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(Fb,""),value:n?Hb(n[0]).replace(Fb,""):""});return b(/^[;\s]*/),r}}function g(){var e,t=[];if(!s())return l("missing '{'");for(p(t);e=O();)!1!==e&&(t.push(e),p(t));return u()?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 C(){if("@"===e[0])return function(){var e=c(),t=b(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=b(/^([-\w]+)\s*/)))return l("@keyframes missing name");var r,o=t[1];if(!s())return l("@keyframes missing '{'");for(var i=p();r=h();)i.push(r),i=i.concat(p());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):l("@keyframes missing '}'")}}()||function(){var e=c(),t=b(/^@media *([^{]+)/);if(t){var n=Hb(t[1]);if(!s())return l("@media missing '{'");var r=p().concat(d());return u()?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:Hb(t[1]),media:Hb(t[2])})}()||function(){var e=c(),t=b(/^@supports *([^{]+)/);if(t){var n=Hb(t[1]);if(!s())return l("@supports missing '{'");var r=p().concat(d());return u()?e({type:"supports",supports:n,rules:r}):l("@supports missing '}'")}}()||k()||y()||_()||function(){var e=c(),t=b(/^@([-\w]+)?document *([^{]+)/);if(t){var n=Hb(t[1]),r=Hb(t[2]);if(!s())return l("@document missing '{'");var o=p().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):l("@document missing '}'")}}()||function(){var e=c();if(b(/^@page */)){var t=v()||[];if(!s())return l("@page missing '{'");for(var n,r=p();n=O();)r.push(n),r=r.concat(p());return u()?e({type:"page",selectors:t,declarations:r}):l("@page missing '}'")}}()||function(){var e=c();if(b(/^@host\s*/)){if(!s())return l("@host missing '{'");var t=p().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=c();if(b(/^@font-face\s*/)){if(!s())return l("@font-face missing '{'");for(var t,n=p();t=O();)n.push(t),n=n.concat(p());return u()?e({type:"font-face",declarations:n}):l("@font-face missing '}'")}}()}function w(){var e=c(),t=v();return t?(p(),e({type:"rule",selectors:t,declarations:g()})):l("selector missing")}return function e(t,n){var r=t&&"string"==typeof t.type,o=r?t:n;for(var c in t){var i=t[c];Array.isArray(i)?i.forEach((function(t){e(t,o)})):i&&"object"===Object(So.a)(i)&&e(i,o)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((j=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:j,parsingErrors:a}}))};function Hb(e){return e?e.replace(/^\s+|\s+$/g,""):""}var zb=n(168),Ub=n.n(zb),Gb=Kb;function Kb(e){this.options=e||{}}Kb.prototype.emit=function(e){return e},Kb.prototype.visit=function(e){return this[e.type](e)},Kb.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 Wb=qb;function qb(e){Gb.call(this,e)}Ub()(qb,Gb),qb.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},qb.prototype.comment=function(e){return this.emit("",e.position)},qb.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},qb.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},qb.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("}")},qb.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},qb.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},qb.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},qb.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},qb.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},qb.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("}")},qb.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},qb.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},qb.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},qb.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("}"):""},qb.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var $b=Yb;function Yb(e){e=e||{},Gb.call(this,e),this.indentation=e.indent}Ub()(Yb,Gb),Yb.prototype.compile=function(e){return this.stylesheet(e)},Yb.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Yb.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Yb.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Yb.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}")},Yb.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}")},Yb.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Yb.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Yb.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}")},Yb.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)+"}")},Yb.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")},Yb.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}")},Yb.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}")},Yb.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}")},Yb.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Yb.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()+"}"):""},Yb.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Yb.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var Xb=function(e,t){try{var n=Vb(e),r=Lb.a.map(n,(function(e){if(!e)return e;var n=t(e);return this.update(n)}));return o=r,((c=c||{}).compress?new Wb(c):new $b(c)).compile(o)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var o,c};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(u.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}function Jb(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 ef(e,t){return new URL(e,t).toString()}var tf=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]};Jb(o)&&r.push(o)}return r}(t.value).map((c=e,function(e){return Zb({},e,{newUrl:"url("+e.before+e.quote+ef(e.value,c)+e.quote+e.after+")"})}));return Zb({},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 nf(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 rf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nf(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var of=/^(body|html|:root).*$/,cf=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?rf({},n,{selectors:n.selectors.map((function(n){return t.includes(n.trim())?n:n.match(of)?n.replace(/^(body|html|:root)/,e):e+" "+n}))}):n}},af=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(p.map)(e,(function(e){var n=e.css,r=e.baseURL,o=[];return t&&o.push(cf(t)),r&&o.push(tf(r)),o.length?Xb(n,Object(m.compose)(o)):n}))};var lf=function(e){var t=e.styles;return Object(d.useEffect)((function(){var e=af(t,".editor-styles-wrapper"),n=Object(p.map)(Object(p.compact)(e),(function(e){var t=document.createElement("style");return t.innerHTML=e,document.body.appendChild(t),t}));return function(){return n.forEach((function(e){return document.body.removeChild(e)}))}}),[t]),null};var sf=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,l=e.onSelect,s=void 0===l?p.noop:l,u=Object(O.useSelect)((function(e){var r=e("core/block-editor").getBlockRootClientId;return t||r(n)||void 0}),[n,t]);return Object(d.createElement)(_l,{onSelect:s,rootClientId:u,clientId:n,isAppender:r,showInserterHelpPanel:o,showMostUsedBlocks:i,__experimentalSelectBlockOnInsert:a})};function uf(){var e=Object(O.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientIds,r=t.getBlockOrder,o=t.getBlockRootClientId,c=n(),i=Object(te.a)(c,1)[0];return{clientIds:c,rootBlocksClientIds:r(),rootClientId:o(i)}}),[]),t=e.clientIds,n=e.rootBlocksClientIds,r=e.rootClientId,o=Object(O.useDispatch)("core/block-editor"),c=o.duplicateBlocks,i=o.removeBlocks,a=o.insertAfterBlock,s=o.insertBeforeBlock,u=o.multiSelect,b=o.clearSelectedBlock,f=o.moveBlocksUp,m=o.moveBlocksDown;return Object(l.useShortcut)("core/block-editor/move-up",Object(d.useCallback)((function(e){e.preventDefault(),f(t,r)}),[t,f]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/move-down",Object(d.useCallback)((function(e){e.preventDefault(),m(t,r)}),[t,m]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/duplicate",Object(d.useCallback)((function(e){e.preventDefault(),c(t)}),[t,c]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/remove",Object(d.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/insert-after",Object(d.useCallback)((function(e){e.preventDefault(),a(Object(p.last)(t))}),[t,a]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/insert-before",Object(d.useCallback)((function(e){e.preventDefault(),s(Object(p.first)(t))}),[t,s]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/delete-multi-selection",Object(d.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{isDisabled:t.length<2}),Object(l.useShortcut)("core/block-editor/select-all",Object(d.useCallback)((function(e){e.preventDefault(),u(Object(p.first)(n),Object(p.last)(n))}),[n,u])),Object(l.useShortcut)("core/block-editor/unselect",Object(d.useCallback)((function(e){e.preventDefault(),b(),window.getSelection().removeAllRanges()}),[t,b]),{isDisabled:t.length<2}),null}uf.Register=function(){var e=Object(O.useDispatch)("core/keyboard-shortcuts").registerShortcut;return Object(d.useEffect)((function(){e({name:"core/block-editor/duplicate",category:"block",description:Object(h.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:Object(h.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:Object(h.__)("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(h.__)("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(h.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:Object(h.__)("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(h.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:Object(h.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:Object(h.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:Object(h.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var df=uf;function bf(){var e=Object(O.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockSelectionEnd,r=t.hasMultiSelection,o=t.isMultiSelecting;return{selectionEnd:n(),isMultiSelection:r(),isMultiSelecting:o()}}),[]),t=e.isMultiSelection,n=e.selectionEnd,r=e.isMultiSelecting;return Object(d.useEffect)((function(){if(n&&!r&&t){var e=He(n);if(e){var o=Object(fr.getScrollContainer)(e);o&&vd()(e,o,{onlyScrollIfNeeded:!0})}}}),[t,n,r]),null}var ff=[et.UP,et.RIGHT,et.DOWN,et.LEFT,et.ENTER,et.BACKSPACE];var pf=Object(m.withSafeTimeout)((function(e){var t=e.children,n=e.setTimeout,r=Object(d.useRef)(),o=Object(d.useRef)(),c=Object(O.useSelect)((function(e){return e("core/block-editor").isTyping()})),i=Object(O.useDispatch)("core/block-editor"),a=i.startTyping,l=i.stopTyping;function s(e){var t=e?"addEventListener":"removeEventListener";document[t]("selectionchange",b),document[t]("mousemove",u)}function u(e){var t=e.clientX,n=e.clientY;if(o.current){var r=o.current,c=r.clientX,i=r.clientY;c===t&&i===n||l()}o.current={clientX:t,clientY:n}}function b(){var e=window.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||l()}function f(e){var t=e.type,n=e.target;!c&&Object(fr.isTextField)(n)&&r.current.contains(n)&&("keydown"!==t||function(e){var t=e.keyCode;return!e.shiftKey&&ff.includes(t)}(e))&&a()}return Object(d.useEffect)((function(){return s(c),function(){return s(!1)}}),[c]),Object(d.createElement)("div",{ref:r,onFocus:function(e){var t=e.target;n((function(){c&&!Object(fr.isTextField)(t)&&l()}))},onKeyPress:f,onKeyDown:Object(p.over)([f,function(e){!c||e.keyCode!==et.ESCAPE&&e.keyCode!==et.TAB||l()}])},t)}));function mf(){return Jn()("PreserveScrollInReorder component",{hint:"This behavior is now built-in the block list"}),null}function vf(){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}}var Of=-1!==window.navigator.userAgent.indexOf("Trident"),gf=new Set([et.UP,et.DOWN,et.LEFT,et.RIGHT]),hf=function(e){Object(Ht.a)(r,e);var t,n=(t=r,function(){var e,n=Object(Vt.a)(t);if(vf()){var r=Object(Vt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Ft.a)(this,e)});function r(){var e;return Object(Mt.a)(this,r),(e=n.apply(this,arguments)).ref=Object(d.createRef)(),e.onKeyDown=e.onKeyDown.bind(Object(Lt.a)(e)),e.addSelectionChangeListener=e.addSelectionChangeListener.bind(Object(Lt.a)(e)),e.computeCaretRectOnSelectionChange=e.computeCaretRectOnSelectionChange.bind(Object(Lt.a)(e)),e.maintainCaretPosition=e.maintainCaretPosition.bind(Object(Lt.a)(e)),e.computeCaretRect=e.computeCaretRect.bind(Object(Lt.a)(e)),e.onScrollResize=e.onScrollResize.bind(Object(Lt.a)(e)),e.isSelectionEligibleForScroll=e.isSelectionEligibleForScroll.bind(Object(Lt.a)(e)),e}return Object(At.a)(r,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.onScrollResize,!0),window.addEventListener("resize",this.onScrollResize,!0)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("scroll",this.onScrollResize,!0),window.removeEventListener("resize",this.onScrollResize,!0),document.removeEventListener("selectionchange",this.computeCaretRectOnSelectionChange),this.onScrollResize.rafId&&window.cancelAnimationFrame(this.onScrollResize.rafId),this.onKeyDown.rafId&&window.cancelAnimationFrame(this.onKeyDown.rafId)}},{key:"computeCaretRect",value:function(){this.isSelectionEligibleForScroll()&&(this.caretRect=Object(fr.computeCaretRect)())}},{key:"computeCaretRectOnSelectionChange",value:function(){document.removeEventListener("selectionchange",this.computeCaretRectOnSelectionChange),this.computeCaretRect()}},{key:"onScrollResize",value:function(){var e=this;this.onScrollResize.rafId||(this.onScrollResize.rafId=window.requestAnimationFrame((function(){e.computeCaretRect(),delete e.onScrollResize.rafId})))}},{key:"isSelectionEligibleForScroll",value:function(){return this.props.selectedBlockClientId&&this.ref.current.contains(document.activeElement)&&document.activeElement.isContentEditable}},{key:"isLastEditableNode",value:function(){var e=this.ref.current.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===document.activeElement}},{key:"maintainCaretPosition",value:function(e){var t=e.keyCode;if(this.isSelectionEligibleForScroll()){var n=Object(fr.computeCaretRect)();if(n)if(this.caretRect)if(gf.has(t))this.caretRect=n;else{var r=n.top-this.caretRect.top;if(0!==r){var o=Object(fr.getScrollContainer)(this.ref.current);if(o){var c=o===document.body,i=c?window.scrollY:o.scrollTop,a=c?0:o.getBoundingClientRect().top,l=c?this.caretRect.top/window.innerHeight:(this.caretRect.top-a)/(window.innerHeight-a);if(0===i&&l<.75&&this.isLastEditableNode())this.caretRect=n;else{var s=c?window.innerHeight:o.clientHeight;this.caretRect.top+this.caretRect.height>a+s||this.caretRect.top<a?this.caretRect=n:c?window.scrollBy(0,r):o.scrollTop+=r}}}}else this.caretRect=n}}},{key:"addSelectionChangeListener",value:function(){document.addEventListener("selectionchange",this.computeCaretRectOnSelectionChange)}},{key:"onKeyDown",value:function(e){var t=this;e.persist(),this.onKeyDown.rafId&&window.cancelAnimationFrame(this.onKeyDown.rafId),this.onKeyDown.rafId=window.requestAnimationFrame((function(){t.maintainCaretPosition(e),delete t.onKeyDown.rafId}))}},{key:"render",value:function(){return Object(d.createElement)("div",{ref:this.ref,onKeyDown:this.onKeyDown,onKeyUp:this.maintainCaretPosition,onMouseDown:this.addSelectionChangeListener,onTouchStart:this.addSelectionChangeListener,className:"block-editor__typewriter"},this.props.children)}}]),r}(d.Component),jf=Of?function(e){return e.children}:Object(O.withSelect)((function(e){return{selectedBlockClientId:(0,e("core/block-editor").getSelectedBlockClientId)()}}))(hf);function kf(e){var t=Object(z.b)().name,n="__experimentalFeatures.".concat(e);return Object(O.useSelect)((function(e){var r=(0,e("core/blocks").getBlockSupport)(t,n);if(void 0!==r)return r;var o=e("core/block-editor").getSettings;return Object(p.get)(o(),n)}),[t,n])}}]);
|
build/block-editor/style-rtl.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}#start-resizable-editor-section{display:none}.block-editor-autocompleters__block .block-editor-block-icon{margin-left:8px}.block-editor-block-alignment-matrix-toolbar__popover .components-popover__content{min-width:0;width:auto}.block-editor-block-alignment-matrix-toolbar__popover .components-popover__content>div{padding:8px}.block-editor-block-icon{display:flex;align-items:center;justify-content:center;width:24px;height:24px}.block-editor-block-icon.has-colors svg{fill:currentColor}.block-editor-block-icon svg{min-width:20px;min-height:20px;max-width:24px;max-height:24px}.block-editor-block-inspector .components-base-control{margin-bottom:24px}.block-editor-block-inspector .components-base-control:last-child{margin-bottom:8px}.block-editor-block-inspector .components-panel__body{border:none;border-top:1px solid #f0f0f0}.block-editor-block-inspector .block-editor-block-card{padding:16px}.block-editor-block-inspector__no-blocks{display:block;font-size:13px;background:#fff;padding:32px 16px;text-align:center}.block-editor-block-list__layout .block-editor-block-list__block .reusable-block-edit-panel *{z-index:1}.block-editor-block-styles .block-editor-block-list__block{margin:0}.block-editor-block-list__layout .block-editor-block-list__block{position:relative;overflow-wrap:break-word}.block-editor-block-list__layout .block-editor-block-list__block .components-placeholder .components-with-notices-ui{margin:-10px 0 12px}.block-editor-block-list__layout .block-editor-block-list__block .components-with-notices-ui{margin:0 0 12px;width:100%}.block-editor-block-list__layout .block-editor-block-list__block .components-with-notices-ui .components-notice{margin-right:0;margin-left:0}.block-editor-block-list__layout .block-editor-block-list__block .components-with-notices-ui .components-notice .components-notice__content{font-size:13px}.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus{outline:none}.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus:after{position:absolute;z-index:1;pointer-events:none;content:"";top:1px;bottom:1px;right:1px;left:1px;box-shadow:0 0 0 1.5px #007cba;box-shadow:0 0 0 1.5px var(--wp-admin-theme-color);border-radius:1px}.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus:after{box-shadow:0 0 0 1.5px #fff}.block-editor-block-list__layout .block-editor-block-list__block.is-focus-mode:not(.is-multi-selected){opacity:.5;transition:opacity .1s linear}@media (prefers-reduced-motion:reduce){.block-editor-block-list__layout .block-editor-block-list__block.is-focus-mode:not(.is-multi-selected){transition-duration:0s}}.block-editor-block-list__layout .block-editor-block-list__block.is-focus-mode:not(.is-multi-selected).is-focused,.block-editor-block-list__layout .block-editor-block-list__block.is-focus-mode:not(.is-multi-selected):not(.is-focused) .block-editor-block-list__block{opacity:1}.block-editor-block-list__layout .block-editor-block-list__block,.block-editor-block-list__layout .block-list-appender{position:relative}.block-editor-block-list__layout .block-editor-block-list__block.is-drop-target:before,.block-editor-block-list__layout .block-list-appender.is-drop-target:before{content:"";position:absolute;z-index:0;pointer-events:none;transition:border-color .1s linear,border-style .1s linear,box-shadow .1s linear;top:-14px;left:0;right:0;border-top:4px solid #007cba;border-top:4px solid var(--wp-admin-theme-color)}.block-editor-block-list__layout .block-editor-block-list__block.is-drop-target.is-dropping-horizontally:before,.block-editor-block-list__layout .block-list-appender.is-drop-target.is-dropping-horizontally:before{top:0;bottom:0;right:-6px;border-top:none;border-right:4px solid #007cba;border-right:4px solid var(--wp-admin-theme-color)}.block-editor-block-list__layout{position:relative}.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:after,.is-navigate-mode .block-editor-block-list__layout .block-editor-block-list__block.is-hovered:after,.is-navigate-mode .block-editor-block-list__layout .block-editor-block-list__block.is-selected:after{position:absolute;z-index:1;pointer-events:none;content:"";top:1px;bottom:1px;right:1px;left:1px}.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:after,.is-navigate-mode .block-editor-block-list__layout .block-editor-block-list__block.is-hovered:after,.is-navigate-mode .block-editor-block-list__layout .block-editor-block-list__block.is-selected:after{box-shadow:0 0 0 1.5px #007cba;box-shadow:0 0 0 1.5px var(--wp-admin-theme-color);border-radius:1px;transition:box-shadow .2s ease-out;outline:2px solid transparent}@media (prefers-reduced-motion:reduce){.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:after,.is-navigate-mode .block-editor-block-list__layout .block-editor-block-list__block.is-hovered:after,.is-navigate-mode .block-editor-block-list__layout .block-editor-block-list__block.is-selected:after{transition-duration:0s}}.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:after,.is-dark-theme .is-navigate-mode .block-editor-block-list__layout .block-editor-block-list__block.is-hovered:after,.is-dark-theme .is-navigate-mode .block-editor-block-list__layout .block-editor-block-list__block.is-selected:after{box-shadow:0 0 0 1.5px #fff}.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted .components-placeholder ::selection,.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected .components-placeholder ::selection,.is-navigate-mode .block-editor-block-list__layout .block-editor-block-list__block.is-hovered .components-placeholder ::selection,.is-navigate-mode .block-editor-block-list__layout .block-editor-block-list__block.is-selected .components-placeholder ::selection{background:transparent}.is-navigate-mode .block-editor-block-list__layout .block-editor-block-list__block.is-hovered:not(.is-selected):after{box-shadow:0 0 0 1px #949494}.is-block-moving-mode .block-editor-block-list__layout .block-editor-block-list__block.has-child-selected{box-shadow:0 0 0 1.5px #007cba;box-shadow:0 0 0 1.5px var(--wp-admin-theme-color);outline:1.5px solid transparent}.is-block-moving-mode .block-editor-block-list__layout .block-editor-block-list__block.is-selected:before{content:"";position:absolute;z-index:0;pointer-events:none;transition:border-color .1s linear,border-style .1s linear,box-shadow .1s linear;left:0;right:0;top:-14px;border-radius:2px;border-top:4px solid #ccc}.is-block-moving-mode .block-editor-block-list__layout .block-editor-block-list__block.is-selected:after{content:none}.is-block-moving-mode.can-insert-moving-block .block-editor-block-list__layout .block-editor-block-list__block.is-selected:before{border-color:#007cba;border-color:var(--wp-admin-theme-color)}.is-block-moving-mode.block-editor-block-list__block-selection-button{opacity:0;font-size:1px;height:1px;padding:0}.block-editor-block-list__layout .block-editor-block-list__block.has-warning{min-height:36px}.block-editor-block-list__layout .block-editor-block-list__block:after{content:"";pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0;border-radius:2px;box-shadow:0 0 0 1.5px transparent;transition:box-shadow .1s ease-in}@media (prefers-reduced-motion:reduce){.block-editor-block-list__layout .block-editor-block-list__block:after{transition-duration:0s}}.block-editor-block-list__layout .block-editor-block-list__block.has-warning>*{pointer-events:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.block-editor-block-list__layout .block-editor-block-list__block.has-warning .block-editor-warning{pointer-events:all}.block-editor-block-list__layout .block-editor-block-list__block.has-warning:after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;border-radius:2px;background-color:hsla(0,0%,100%,.4)}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-multi-selected:after{background-color:transparent}.block-editor-block-list__layout .block-editor-block-list__block.is-reusable>.block-editor-inner-blocks>.block-editor-block-list__layout.has-overlay:after{display:none}.block-editor-block-list__layout .block-editor-block-list__block.is-reusable>.block-editor-inner-blocks>.block-editor-block-list__layout.has-overlay .block-editor-block-list__layout.has-overlay:after{display:block}.is-navigate-mode .block-editor-block-list__layout .block-editor-block-list__block{cursor:default}.block-editor-block-list__layout .block-editor-block-list__block[data-clear=true]{float:none}.block-editor-block-list__layout .block-editor-block-list__block .block-editor-block-list__layout .block-editor-default-block-appender .block-editor-inserter{right:auto;left:8px}.block-editor-block-list__layout .wp-block{margin-right:auto;margin-left:auto}.wp-block[data-align=left],.wp-block[data-align=right]{width:100%;height:0}.wp-block[data-align=left]:before,.wp-block[data-align=right]:before{content:none}.wp-block[data-align=left]>*,.wp-block[data-align=right]>*{z-index:21}.wp-block[data-align=left]>*{float:left;margin-right:2em}.wp-block[data-align=right]>*{float:right;margin-left:2em}.wp-block[data-align=full],.wp-block[data-align=wide]{clear:both}.block-editor-block-list .block-editor-inserter{margin:8px;cursor:move;cursor:grab}.block-editor-block-list__insertion-point{position:relative;z-index:6;margin-top:-14px}.block-editor-block-list__insertion-point-indicator{position:absolute;top:calc(50% - 1px);height:1.5px;right:0;left:0;background:#007cba;background:var(--wp-admin-theme-color)}.block-editor-block-list__insertion-point-inserter{display:none;justify-content:center;cursor:text}@media (min-width:480px){.block-editor-block-list__insertion-point-inserter{display:flex}}.block-editor-block-list__insertion-point-inserter.is-inserter-hidden .block-editor-inserter__toggle{opacity:0;pointer-events:none}.block-editor-block-list__block-popover-inserter{position:absolute;top:-9999em;margin-bottom:14px}.block-editor-block-list__block-popover-inserter.is-visible{position:static}.block-editor-block-list__block-popover-inserter .block-editor-inserter__toggle.components-button.has-icon,.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle.components-button.has-icon,.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button.has-icon,.block-editor-default-block-appender .block-editor-inserter__toggle.components-button.has-icon{background:#1e1e1e;border-radius:2px;color:#fff;padding:0;min-width:24px;height:24px}.block-editor-block-list__block-popover-inserter .block-editor-inserter__toggle.components-button.has-icon:hover,.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle.components-button.has-icon:hover,.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button.has-icon:hover,.block-editor-default-block-appender .block-editor-inserter__toggle.components-button.has-icon:hover{color:#fff}.block-editor-block-list__block-popover-inserter .block-editor-inserter__toggle.components-button,.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button{animation:block-editor-inserter__toggle__fade-in-animation-delayed .3s ease;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.block-editor-block-list__block-popover-inserter .block-editor-inserter__toggle.components-button,.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button{animation-duration:1ms}}@keyframes block-editor-inserter__toggle__fade-in-animation-delayed{0%{opacity:0}80%{opacity:0}to{opacity:1}}@keyframes block-editor-inserter__toggle__fade-in-animation{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}.wp-block .block-list-appender .block-editor-inserter__toggle{animation:block-editor-inserter__toggle__fade-in-animation .1s ease;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.wp-block .block-list-appender .block-editor-inserter__toggle{animation-duration:1ms}}.block-editor-block-list__block:not(.is-selected):not(.has-child-selected) .block-editor-default-block-appender{display:none}.block-editor-block-list__block:not(.is-selected):not(.has-child-selected) .block-editor-default-block-appender .block-editor-inserter__toggle{opacity:0;transform:scale(0)}.block-editor-block-list__block>.block-editor-block-list__insertion-point{position:absolute;top:-16px;height:28px;bottom:auto;right:14px;left:14px}.block-editor-block-list__block .block-editor-block-list__block-html-textarea{display:block;margin:0;width:100%;border:none;outline:none;box-shadow:none;resize:none;overflow:hidden;font-family:Menlo,Consolas,monaco,monospace;font-size:15px;line-height:150%;transition:padding .2s linear}@media (prefers-reduced-motion:reduce){.block-editor-block-list__block .block-editor-block-list__block-html-textarea{transition-duration:0s}}.block-editor-block-list__block .block-editor-block-list__block-html-textarea:focus{box-shadow:none}.block-editor-block-contextual-toolbar{border:1px solid #1e1e1e;border-radius:2px;background-color:#fff}.block-editor-block-contextual-toolbar .block-editor-block-toolbar .components-toolbar,.block-editor-block-contextual-toolbar .block-editor-block-toolbar .components-toolbar-group,.block-editor-block-contextual-toolbar .block-editor-block-toolbar__mover-switcher-container{border-left-color:#1e1e1e}.block-editor-block-contextual-toolbar .block-editor-block-toolbar__mover-switcher-container{border-left-style:solid;border-left-width:1px}.block-editor-block-contextual-toolbar .block-editor-block-toolbar__block-switcher-wrapper .block-editor-block-switcher__no-switcher-icon:before,.block-editor-block-contextual-toolbar .block-editor-block-toolbar__block-switcher-wrapper .block-editor-block-switcher__toggle:before{width:28px}.block-editor-block-contextual-toolbar .block-editor-block-toolbar__block-switcher-wrapper .block-editor-block-icon svg{margin-right:10px}.block-editor-block-contextual-toolbar .block-editor-block-toolbar__block-switcher-wrapper .block-editor-block-switcher:last-child .block-editor-block-icon svg{margin-right:auto}.block-editor-block-contextual-toolbar .block-editor-block-toolbar__block-switcher-wrapper .components-toolbar,.block-editor-block-contextual-toolbar .block-editor-block-toolbar__block-switcher-wrapper .components-toolbar-group{border-left:none}.block-editor-block-contextual-toolbar .block-editor-block-mover{margin-right:-12px;width:36px}.block-editor-block-contextual-toolbar .block-editor-block-mover.is-horizontal{width:48px}.block-editor-block-contextual-toolbar .block-editor-block-mover .components-button.has-icon.block-editor-block-mover-button.block-editor-block-mover-button{min-width:36px;width:36px}[draggable=true] .block-editor-block-contextual-toolbar .block-editor-block-mover .components-button.has-icon.block-editor-block-mover-button.block-editor-block-mover-button{cursor:grab}[draggable=true] .block-editor-block-contextual-toolbar .block-editor-block-mover .components-button.has-icon.block-editor-block-mover-button.block-editor-block-mover-button:active{cursor:grabbing}.block-editor-block-contextual-toolbar .block-editor-block-mover.is-horizontal .components-button.has-icon.block-editor-block-mover-button.block-editor-block-mover-button{min-width:24px;width:24px}.block-editor-block-contextual-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover-button>svg{margin-right:2px}.block-editor-block-contextual-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover-button.is-up-button svg{margin-top:3px}.block-editor-block-contextual-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover-button.is-down-button svg{margin-bottom:3px}.block-editor-block-contextual-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover-button:focus:before{right:0!important;min-width:0;width:28px}.block-editor-block-list__block-selection-button{display:block;z-index:22}.block-editor-block-list__block-selection-button .components-button{font-size:13px;height:46px;padding:12px 16px;position:relative;top:-1px;box-shadow:0 0 0 1px #1e1e1e;border-radius:1px;background-color:#fff}.block-editor-block-list__block-selection-button .components-button:focus{box-shadow:0 0 0 1.5px #007cba;box-shadow:0 0 0 1.5px var(--wp-admin-theme-color)}.block-editor-block-list__block .block-editor-warning{z-index:5;position:relative}.block-editor-block-list__block .block-editor-warning.block-editor-block-list__block-crash-warning{margin-bottom:auto}.block-editor-block-list__insertion-point-popover.is-without-arrow{z-index:28;position:absolute}.block-editor-block-list__insertion-point-popover.is-without-arrow .components-popover__content.components-popover__content{background:none;border:none;box-shadow:none;overflow-y:visible;margin-right:0}.components-popover.block-editor-block-list__block-popover{z-index:31;position:absolute}.components-popover.block-editor-block-list__block-popover .components-popover__content{margin:0!important;min-width:auto;width:max-content;background:none;border:none;box-shadow:none;overflow-y:visible;pointer-events:none}.components-popover.block-editor-block-list__block-popover .components-popover__content>*{pointer-events:all}.components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-contextual-toolbar,.components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-list__block-selection-button{margin-bottom:12px}.is-dragging-components-draggable .components-popover.block-editor-block-list__block-popover{opacity:0}.is-dragging-components-draggable .components-tooltip{display:none}.block-editor-block-list__block .block-list-appender{margin:8px 0}.has-background .block-editor-block-list__block .block-list-appender{margin:20px 8px}.block-editor-block-list__block .block-list-appender .block-list-appender__toggle{padding:0;opacity:1;transform:scale(1);transition:all .1s ease}@media (prefers-reduced-motion:reduce){.block-editor-block-list__block .block-list-appender .block-list-appender__toggle{transition-duration:0s}}.block-list-appender>.block-editor-inserter{display:block}.block-editor-block-list__block:not(.is-selected):not(.has-child-selected):not(.block-editor-block-list__layout) .block-editor-block-list__layout>.block-list-appender .block-list-appender__toggle{opacity:0;transform:scale(0)}.block-editor-block-breadcrumb{list-style:none;padding:0;margin:0}.block-editor-block-breadcrumb li{display:inline-block;margin:0}.block-editor-block-breadcrumb li:not(:last-child):after{content:"\2192"}.block-editor-block-breadcrumb__button.components-button{height:24px;line-height:24px;padding:0;position:relative}.block-editor-block-breadcrumb__button.components-button:hover:not(:disabled){text-decoration:underline;box-shadow:none}.block-editor-block-breadcrumb__button.components-button:focus{box-shadow:none}.block-editor-block-breadcrumb__button.components-button:focus:before{content:"";display:block;position:absolute;border-radius:2px;top:1px;left:1px;bottom:1px;right:1px;box-shadow:inset 0 0 0 1.5px #007cba;box-shadow:inset 0 0 0 1.5px var(--wp-admin-theme-color)}.block-editor-block-breadcrumb__current{cursor:default}.block-editor-block-breadcrumb__button.components-button,.block-editor-block-breadcrumb__current{color:#1e1e1e;padding:0 8px;font-size:inherit}.block-editor-block-card{display:flex;align-items:flex-start}.block-editor-block-card__icon{border:1px solid #ccd0d4;padding:7px;margin-left:10px;height:36px;width:36px}.block-editor-block-card__content{flex-grow:1}.block-editor-block-card__title{font-weight:500}.block-editor-block-card__title.block-editor-block-card__title{margin:0 0 5px}.block-editor-block-card__description{font-size:13px}.block-editor-block-card .block-editor-block-icon{margin-right:-2px;margin-left:10px;padding:0 3px;width:36px;height:24px}.block-editor-block-compare{overflow:auto;height:auto}@media (min-width:600px){.block-editor-block-compare{max-height:70%}}.block-editor-block-compare__wrapper{display:flex;padding-bottom:16px}.block-editor-block-compare__wrapper>div{display:flex;justify-content:space-between;flex-direction:column;width:50%;padding:0 0 0 16px;min-width:200px}.block-editor-block-compare__wrapper>div button{float:left}.block-editor-block-compare__wrapper .block-editor-block-compare__converted{border-right:1px solid #ddd;padding-right:15px;padding-left:0}.block-editor-block-compare__wrapper .block-editor-block-compare__html{font-family:Menlo,Consolas,monaco,monospace;font-size:12px;color:#1e1e1e;border-bottom:1px solid #ddd;padding-bottom:15px;line-height:1.7}.block-editor-block-compare__wrapper .block-editor-block-compare__html span{background-color:#e6ffed;padding-top:3px;padding-bottom:3px}.block-editor-block-compare__wrapper .block-editor-block-compare__html span.block-editor-block-compare__added{background-color:#acf2bd}.block-editor-block-compare__wrapper .block-editor-block-compare__html span.block-editor-block-compare__removed{background-color:#d94f4f}.block-editor-block-compare__wrapper .block-editor-block-compare__preview{padding:14px 0 0}.block-editor-block-compare__wrapper .block-editor-block-compare__preview p{font-size:12px;margin-top:0}.block-editor-block-compare__wrapper .block-editor-block-compare__action{margin-top:14px}.block-editor-block-compare__wrapper .block-editor-block-compare__heading{font-size:1em;font-weight:400;margin:.67em 0}.block-editor-block-draggable-chip-wrapper{position:absolute;top:-60px}.block-editor-block-draggable-chip{background-color:#1e1e1e;border-radius:2px;border:1px solid #1e1e1e;box-shadow:0 4px 6px rgba(0,0,0,.3);color:#fff;cursor:grabbing;display:inline-flex;height:48px;min-width:72px;padding:0 12px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.block-editor-block-draggable-chip svg{fill:currentColor}.block-editor-block-draggable-chip .block-editor-block-draggable-chip__content{margin:auto}.block-editor-block-draggable-chip .components-flex__item{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.is-dragging.is-multi-selected,.is-dragging.is-selected{display:none!important}.block-editor-block-mobile-toolbar{display:flex;flex-direction:row;border-left:1px solid #ddd}.block-editor-block-mobile-toolbar .block-editor-block-mover-button{width:36px;height:36px;border-radius:2px;padding:3px;margin:0;justify-content:center;align-items:center}.block-editor-block-mobile-toolbar .block-editor-block-mover-button .dashicon{margin:auto}.block-editor-block-mobile-toolbar .block-editor-block-mover{display:flex;margin-left:auto}.block-editor-block-mobile-toolbar .block-editor-block-mover .block-editor-block-mover-button{float:right}.block-editor-block-mover{display:inline-flex;flex-direction:row}.block-editor-block-mover-button__description{display:none}.block-editor-block-mover-button.has-icon{padding:0}.block-editor-block-mover .components-toolbar,.block-editor-block-mover .components-toolbar-group{flex-direction:column;flex:1}.block-editor-block-mover.is-horizontal .components-toolbar,.block-editor-block-mover.is-horizontal .components-toolbar-group{flex-direction:row}.block-editor-block-mover .block-editor-block-mover-button{height:24px;width:48px;padding:0!important}.block-editor-block-mover .block-editor-block-mover-button:before{right:8px!important;left:8px!important}.block-editor-block-mover .components-toolbar-group .block-editor-block-mover-button.is-up-button svg,.block-editor-block-mover .components-toolbar .block-editor-block-mover-button.is-up-button svg{margin-bottom:-8px}.block-editor-block-mover .components-toolbar-group .block-editor-block-mover-button.is-up-button:before,.block-editor-block-mover .components-toolbar .block-editor-block-mover-button.is-up-button:before{bottom:0;height:calc(100% - 8px)}.block-editor-block-mover .components-toolbar-group .block-editor-block-mover-button.is-down-button svg,.block-editor-block-mover .components-toolbar .block-editor-block-mover-button.is-down-button svg{margin-top:-8px}.block-editor-block-mover .components-toolbar-group .block-editor-block-mover-button.is-down-button:before,.block-editor-block-mover .components-toolbar .block-editor-block-mover-button.is-down-button:before{top:0;height:calc(100% - 8px)}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.has-icon{height:48px;width:24px;min-width:24px;padding-right:0;padding-left:0}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.has-icon:before{top:8px;bottom:8px;min-width:0;width:auto;height:auto}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-up-button.has-icon svg{margin-right:0;margin-left:-8px;margin-bottom:0}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-up-button.has-icon:before{right:8px!important;left:0!important}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-down-button.has-icon svg{margin-right:-8px;margin-left:0;margin-top:0}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-down-button.has-icon:before{right:0!important;left:8px!important}.block-editor-block-navigation__label{margin:0 0 12px;color:#757575;text-transform:uppercase;font-size:11px;font-weight:500}.block-editor-block-navigation__container{padding:7px}.block-editor-block-navigation-tree{width:100%;border-collapse:collapse;padding:0;margin:0}.block-editor-block-navigation-leaf{position:relative}.block-editor-block-navigation-leaf .block-editor-block-navigation-block-contents{display:flex;align-items:center;width:calc(100% - .8em);height:auto;padding:12px 6px;margin-top:auto;margin-bottom:auto;text-align:right;color:#40464d;border-radius:2px}.components-modal__content .block-editor-block-navigation-leaf .block-editor-block-navigation-block-contents{padding-right:0;padding-left:0}.block-editor-block-navigation-leaf.is-visible .block-editor-block-navigation-block-contents{opacity:1;animation:edit-post__fade-in-animation .2s ease-out 0s;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.block-editor-block-navigation-leaf.is-visible .block-editor-block-navigation-block-contents{animation-duration:1ms}}.block-editor-block-navigation-leaf .block-editor-block-icon{align-self:flex-start;margin-left:6px}.block-editor-block-navigation-leaf .block-editor-block-navigation-block__contents-cell,.block-editor-block-navigation-leaf .block-editor-block-navigation-block__menu-cell,.block-editor-block-navigation-leaf .block-editor-block-navigation-block__mover-cell{padding-top:0;padding-bottom:0}.block-editor-block-navigation-leaf .block-editor-block-navigation-block__menu-cell,.block-editor-block-navigation-leaf .block-editor-block-navigation-block__mover-cell{width:36px;opacity:0;vertical-align:top}@media (prefers-reduced-motion:reduce){.block-editor-block-navigation-leaf .block-editor-block-navigation-block__menu-cell,.block-editor-block-navigation-leaf .block-editor-block-navigation-block__mover-cell{transition-duration:0s}}.block-editor-block-navigation-leaf .block-editor-block-navigation-block__menu-cell.is-visible,.block-editor-block-navigation-leaf .block-editor-block-navigation-block__mover-cell.is-visible{opacity:1;animation:edit-post__fade-in-animation .2s ease-out 0s;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.block-editor-block-navigation-leaf .block-editor-block-navigation-block__menu-cell.is-visible,.block-editor-block-navigation-leaf .block-editor-block-navigation-block__mover-cell.is-visible{animation-duration:1ms}}.block-editor-block-navigation-leaf .block-editor-block-navigation-block__menu-cell,.block-editor-block-navigation-leaf .block-editor-block-navigation-block__menu-cell .components-button.has-icon,.block-editor-block-navigation-leaf .block-editor-block-navigation-block__mover-cell,.block-editor-block-navigation-leaf .block-editor-block-navigation-block__mover-cell .components-button.has-icon{width:24px;min-width:24px;padding:0}.block-editor-block-navigation-leaf .block-editor-block-navigation-block__menu-cell{padding-top:8px}.block-editor-block-navigation-leaf .block-editor-block-navigation-block__mover-cell-alignment-wrapper{display:flex;height:100%;flex-direction:column;align-items:center}.block-editor-block-navigation-leaf .block-editor-block-mover-button{position:relative;width:36px;height:24px}.block-editor-block-navigation-leaf .block-editor-block-mover-button svg{position:relative;height:24px}.block-editor-block-navigation-leaf .block-editor-block-mover-button.is-up-button{align-items:flex-end}.block-editor-block-navigation-leaf .block-editor-block-mover-button.is-up-button svg{bottom:-4px}.block-editor-block-navigation-leaf .block-editor-block-mover-button.is-down-button{align-items:flex-start}.block-editor-block-navigation-leaf .block-editor-block-mover-button.is-down-button svg{top:-4px}.block-editor-block-navigation-leaf .block-editor-block-mover-button:focus:enabled{box-shadow:none;outline:none}.block-editor-block-navigation-leaf .block-editor-block-mover-button:focus{box-shadow:none;outline:none}.block-editor-block-navigation-leaf .block-editor-block-mover-button:focus:before{box-shadow:inset 0 0 0 1.5px #007cba,inset 0 0 0 4px #fff;box-shadow:inset 0 0 0 1.5px var(--wp-admin-theme-color),inset 0 0 0 4px #fff;outline:2px solid transparent}.block-editor-block-navigation-leaf .block-editor-block-mover-button:before{content:"";position:absolute;display:block;border-radius:2px;height:16px;min-width:100%;right:0;left:0;animation:components-button__appear-animation .1s ease;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.block-editor-block-navigation-leaf .block-editor-block-mover-button:before{animation-duration:1ms}}.block-editor-block-navigation-leaf .block-editor-inserter__toggle{background:#1e1e1e;color:#fff;height:24px;margin:6px 1px 6px 6px;min-width:24px}.block-editor-block-navigation-leaf .block-editor-inserter__toggle:active{color:#fff}.block-editor-block-navigation-appender__description,.block-editor-block-navigation-block-select-button__description,.block-editor-block-navigation-block-slot__description{display:none}.block-editor-block-navigation-appender__cell .block-editor-block-navigation-appender__container,.block-editor-block-navigation-appender__cell .block-editor-block-navigation-block__contents-container,.block-editor-block-navigation-block__contents-cell .block-editor-block-navigation-appender__container,.block-editor-block-navigation-block__contents-cell .block-editor-block-navigation-block__contents-container{display:flex}.block-editor-block-navigation-appender__cell .block-editor-block-navigation-block__contents-container,.block-editor-block-navigation-block__contents-cell .block-editor-block-navigation-block__contents-container{min-height:56px}.block-editor-block-navigation-appender__cell .block-editor-block-navigator-descender-line,.block-editor-block-navigation-block__contents-cell .block-editor-block-navigator-descender-line{position:relative;flex-shrink:0;width:24px}.block-editor-block-navigation-appender__cell .block-editor-block-navigator-descender-line:first-child,.block-editor-block-navigation-block__contents-cell .block-editor-block-navigator-descender-line:first-child{width:18px}.block-editor-block-navigation-appender__cell .block-editor-block-navigator-descender-line.has-item,.block-editor-block-navigation-block__contents-cell .block-editor-block-navigator-descender-line.has-item{margin-left:6px}.block-editor-block-navigation-appender__cell .block-editor-block-navigator-descender-line:before,.block-editor-block-navigation-block__contents-cell .block-editor-block-navigator-descender-line:before{content:"";display:block;position:absolute;top:1px;bottom:-2px;left:-1px;border-left:2px solid #a2aab2}.block-editor-block-navigation-appender__cell .block-editor-block-navigator-descender-line.is-terminated:before,.block-editor-block-navigation-block__contents-cell .block-editor-block-navigator-descender-line.is-terminated:before{border-color:transparent}.block-editor-block-navigation-appender__cell .block-editor-block-navigator-descender-line.has-item.is-last-row,.block-editor-block-navigation-block__contents-cell .block-editor-block-navigator-descender-line.has-item.is-last-row{height:26px}.block-editor-block-navigation-appender__cell .block-editor-block-navigator-descender-line.has-item:after,.block-editor-block-navigation-block__contents-cell .block-editor-block-navigator-descender-line.has-item:after{content:"";display:block;position:absolute;top:26px;right:100%;width:5px;border-bottom:2px solid #a2aab2}.block-editor-block-navigation-appender__cell .block-editor-block-navigator-descender-line.has-item.is-last-row{height:16px}.block-editor-block-navigation-appender__cell .block-editor-block-navigator-descender-line.has-item.is-last-row:after{top:100%}.block-editor-block-parent-selector{background:#fff;border-radius:2px}.block-editor-block-parent-selector .block-editor-block-parent-selector__button{width:48px;height:48px;border:1px solid #1e1e1e;border-radius:2px}.block-editor-block-patterns-list__item{border-radius:2px;cursor:pointer;margin-top:16px;transition:all .05s ease-in-out;position:relative;border:1px solid transparent}.block-editor-block-patterns-list__item:hover{border:1px solid #007cba;border:1px solid var(--wp-admin-theme-color)}.block-editor-block-patterns-list__item:focus{box-shadow:inset 0 0 0 1px #fff,0 0 0 1.5px #007cba;box-shadow:inset 0 0 0 1px #fff,0 0 0 1.5px var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-block-patterns-list__item.is-placeholder{min-height:100px}.block-editor-block-patterns-list__item-title{padding:4px;font-size:12px;text-align:center}.block-editor-block-preview__container{position:relative;width:100%;overflow:hidden}.block-editor-block-preview__container.editor-styles-wrapper{padding:0;margin:0}.block-editor-block-preview__content{position:absolute;top:0;right:0;transform-origin:top right;text-align:initial;margin:0;overflow:visible;min-height:auto}.block-editor-block-preview__content .block-editor-block-drop-zone,.block-editor-block-preview__content .block-editor-block-list__insertion-point,.block-editor-block-preview__content .block-list-appender,.block-editor-block-preview__content .reusable-block-indicator{display:none}.block-editor-block-preview__content .block-editor-block-list__layout.is-root-container{padding-right:0;padding-left:0}.block-editor-block-preview__content .block-editor-block-list__layout.is-root-container>.wp-block[data-align=full]{margin-right:0;margin-left:0}.block-editor-block-settings-menu__popover .components-dropdown-menu__menu{padding:0}.block-editor-block-styles{display:flex;flex-wrap:wrap;justify-content:space-between}.block-editor-block-styles__item{width:calc(50% - 4px);margin:4px 0;flex-shrink:0;cursor:pointer;overflow:hidden;border-radius:2px;padding:6px;display:flex;flex-direction:column}.block-editor-block-styles__item:focus{box-shadow:0 0 0 1.5px #007cba;box-shadow:0 0 0 1.5px var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-block-styles__item:hover .block-editor-block-styles__item-preview{border-color:#007cba;border-color:var(--wp-admin-theme-color)}.block-editor-block-styles__item.is-active .block-editor-block-styles__item-label{font-weight:700}.block-editor-block-styles__item.is-active .block-editor-block-styles__item-preview{border:2px solid #1e1e1e}.block-editor-block-styles__item-preview{outline:1px solid transparent;padding:0;border-radius:2px;display:flex;overflow:hidden;background:#fff;align-items:center;flex-grow:1;min-height:80px}.block-editor-block-switcher__styles__menugroup{position:relative}.block-editor-block-styles__item-label{text-align:center;padding:4px 0}.block-editor-block-switcher,.block-editor-block-switcher__no-switcher-icon,.block-editor-block-switcher__toggle{position:relative}.components-button.block-editor-block-switcher__no-switcher-icon,.components-button.block-editor-block-switcher__toggle{margin:0;display:block;height:48px}.components-button.block-editor-block-switcher__no-switcher-icon .block-editor-block-icon,.components-button.block-editor-block-switcher__toggle .block-editor-block-icon{margin:auto}.components-button.block-editor-block-switcher__no-switcher-icon{width:48px}.components-button.block-editor-block-switcher__no-switcher-icon .block-editor-blocks-icon{margin-left:auto;margin-right:auto}.components-button.block-editor-block-switcher__no-switcher-icon:disabled{opacity:1}.components-button.block-editor-block-switcher__no-switcher-icon:disabled,.components-button.block-editor-block-switcher__no-switcher-icon:disabled .block-editor-block-icon.has-colors{color:#1e1e1e!important}.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon,.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__toggle.has-icon.has-icon,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__toggle.has-icon.has-icon{padding:0}.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon .block-editor-block-icon,.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__toggle.has-icon.has-icon .block-editor-block-icon,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon .block-editor-block-icon,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__toggle.has-icon.has-icon .block-editor-block-icon{height:100%;position:relative;margin:0 auto;display:flex;align-items:center}.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon:before,.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__toggle.has-icon.has-icon:before,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon:before,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__toggle.has-icon.has-icon:before{top:8px;left:8px;bottom:8px;right:8px}.components-popover.block-editor-block-switcher__popover .components-popover__content{min-width:300px}.components-popover.block-editor-block-switcher__popover .components-popover__content>div{min-width:auto;display:flex;background:#fff;padding:0}.components-popover.block-editor-block-switcher__popover .components-popover__content>div .components-menu-group{padding:16px;margin:0}.block-editor-block-switcher__popover .components-popover__content .block-editor-block-styles{margin:0 -3px}.block-editor-block-switcher__popover .components-popover__content .components-panel__body{border:0;position:relative;z-index:1}.block-editor-block-switcher__popover .components-popover__content .components-panel__body+.components-panel__body{border-top:1px solid #f0f0f0}.block-editor-block-switcher__popover__preview__parent .block-editor-block-switcher__popover__preview__container{position:absolute;top:-12px;right:calc(100% + 32px)}.block-editor-block-switcher__preview__popover{display:none}.block-editor-block-switcher__preview__popover.components-popover{margin-right:4px;margin-top:11px}@media (min-width:782px){.block-editor-block-switcher__preview__popover{display:block}}.block-editor-block-switcher__preview__popover .components-popover__content{box-shadow:none;border:1px solid #1e1e1e;background:#fff;border-radius:2px}.block-editor-block-switcher__preview__popover .block-editor-block-switcher__preview{width:300px;height:auto;padding:16px}.block-editor-block-switcher__preview-title{margin-bottom:12px;color:#757575;text-transform:uppercase;font-size:11px;font-weight:500}.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__toggle{height:48px}.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon{width:48px}.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon .block-editor-block-icon,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon .block-editor-block-switcher__transform,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__toggle .block-editor-block-icon,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__toggle .block-editor-block-switcher__transform{width:48px;height:48px}.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon .block-editor-block-switcher__transform,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__toggle .block-editor-block-switcher__transform{padding:12px}.block-editor-block-types-list{list-style:none;padding:4px;margin-right:-4px;margin-left:-4px;overflow:hidden;display:flex;flex-wrap:wrap}.block-editor-block-variation-picker .components-placeholder__instructions{margin-bottom:0}.block-editor-block-variation-picker .components-placeholder__fieldset{flex-direction:column}.block-editor-block-variation-picker.has-many-variations .components-placeholder__fieldset{max-width:90%}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations{display:flex;justify-content:flex-start;flex-direction:row;flex-wrap:wrap;width:100%;margin:16px 0;padding:0;list-style:none}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations>li{list-style:none;margin:8px 0 0 8px;flex-shrink:1;max-width:100px}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations>li button{display:flex}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations .block-editor-block-variation-picker__variation{padding:8px}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations .block-editor-block-variation-picker__variation-label{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:12px;display:block;margin-left:12px;text-align:center}.block-editor-block-variation-picker__variation{width:100%}.block-editor-block-variation-picker__variation.components-button.has-icon{justify-content:center;width:auto}.block-editor-block-variation-picker__variation.components-button.has-icon.is-secondary{background-color:#fff}.block-editor-block-variation-picker__variation.components-button{height:auto;padding:0}.block-editor-block-variation-picker__variation:before{content:"";padding-bottom:100%}.block-editor-block-variation-picker__variation:first-child{margin-right:0}.block-editor-block-variation-picker__variation:last-child{margin-left:0}.block-editor-button-block-appender{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px;width:100%;height:auto;color:#1e1e1e;box-shadow:inset 0 0 0 1px #1e1e1e}.block-editor-button-block-appender:hover{box-shadow:inset 0 0 0 1px #007cba;box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color)}.block-editor-button-block-appender:focus{box-shadow:inset 0 0 0 2px #007cba;box-shadow:inset 0 0 0 2px var(--wp-admin-theme-color)}.block-editor-button-block-appender:active{color:#000}.block-editor-button-block-appender.block-list-appender__toggle{display:flex;flex-direction:row;color:#1e1e1e;box-shadow:none;height:24px;padding:0;margin-right:8px}.block-editor-button-block-appender.block-list-appender__toggle:active{color:#fff}.block-editor-button-block-appender.block-list-appender__toggle>svg{width:24px;background-color:#1e1e1e;color:#fff;border-radius:2px}.block-editor-color-gradient-control__color-indicator{margin-bottom:8px}.block-editor-color-gradient-control__button-tabs{display:block;margin-bottom:8px}.block-editor-panel-color-gradient-settings .component-color-indicator{vertical-align:text-bottom}.block-editor-panel-color-gradient-settings__panel-title .component-color-indicator{display:inline-block}.block-editor-panel-color-gradient-settings.is-opened .block-editor-panel-color-gradient-settings__panel-title .component-color-indicator{display:none}.block-editor-contrast-checker>.components-notice{margin:0}.block-editor-default-block-appender{clear:both;margin-right:auto;margin-left:auto;position:relative}.block-editor-default-block-appender[data-root-client-id=""] .block-editor-default-block-appender__content:hover{outline:1px solid transparent}.block-editor-default-block-appender textarea.block-editor-default-block-appender__content{font-family:inherit;font-size:inherit;border:none;background:none;box-shadow:none;display:block;cursor:text;width:100%;outline:1px solid transparent;transition:outline .2s;resize:none;margin-top:28px;margin-bottom:28px;padding:0 0 0 50px;color:rgba(30,30,30,.62)}@media (prefers-reduced-motion:reduce){.block-editor-default-block-appender textarea.block-editor-default-block-appender__content{transition-duration:0s}}.is-dark-theme .block-editor-default-block-appender textarea.block-editor-default-block-appender__content{color:hsla(0,0%,100%,.65)}.block-editor-default-block-appender .components-drop-zone__content-icon{display:none}.block-editor-default-block-appender__content{line-height:1.8}.block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter,.block-editor-default-block-appender .block-editor-inserter{position:absolute;top:0;height:32px}.block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle,.block-editor-default-block-appender .block-editor-inserter .block-editor-inserter__toggle{margin-left:0}.block-editor-block-list__empty-block-inserter,.block-editor-default-block-appender .block-editor-inserter{left:8px}@media (min-width:600px){.block-editor-block-list__empty-block-inserter,.block-editor-default-block-appender .block-editor-inserter{display:flex;height:100%}}.block-editor-block-list__empty-block-inserter:disabled,.block-editor-default-block-appender .block-editor-inserter:disabled{display:none}@media (min-width:600px){.block-editor-default-block-appender .block-editor-inserter{align-items:center}}.block-editor-link-control{position:relative;min-width:360px}.components-popover__content .block-editor-link-control{min-width:auto;width:90vw;max-width:360px}.block-editor-link-control__search-input-wrapper{position:relative}.block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;font-size:16px;line-height:normal;width:calc(100% - 32px);display:block;padding:11px 16px 11px 36px;margin:16px;position:relative;border:1px solid #ddd;border-radius:2px}@media (prefers-reduced-motion:reduce){.block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]{transition-duration:0s}}@media (min-width:600px){.block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]{font-size:13px;line-height:normal}}.block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px #007cba;box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.is-dark-theme .block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]::-webkit-input-placeholder{color:hsla(0,0%,100%,.65)}.is-dark-theme .block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]::-moz-placeholder{opacity:1;color:hsla(0,0%,100%,.65)}.is-dark-theme .block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]:-ms-input-placeholder{color:hsla(0,0%,100%,.65)}.block-editor-link-control .block-editor-link-control__search-input .components-base-control__field{margin-bottom:0}.block-editor-link-control__search-error{margin:-8px 16px 16px}.block-editor-link-control__search-actions{position:absolute;top:19px;left:19px}.block-editor-link-control__search-results-wrapper{position:relative;margin-top:-15px}.block-editor-link-control__search-results-wrapper:after,.block-editor-link-control__search-results-wrapper:before{content:"";position:absolute;right:-1px;left:16px;display:block;pointer-events:none;z-index:100}.block-editor-link-control__search-results-wrapper:before{height:8px;top:0;bottom:auto;background:linear-gradient(180deg,#fff 0,hsla(0,0%,100%,0))}.block-editor-link-control__search-results-wrapper:after{height:16px;bottom:0;top:auto;background:linear-gradient(180deg,hsla(0,0%,100%,0) 0,#fff)}.block-editor-link-control__search-results-label{padding:15px 30px 0;display:block;font-size:1.1em}.block-editor-link-control__search-results{margin:0;padding:8px 16px;max-height:200px;overflow-y:auto}.block-editor-link-control__search-results.is-loading{opacity:.2}.block-editor-link-control__search-item{position:relative;display:flex;align-items:center;font-size:13px;cursor:pointer;background:#fff;width:100%;border:none;text-align:right;padding:10px 15px;border-radius:5px;height:auto}.block-editor-link-control__search-item:focus,.block-editor-link-control__search-item:hover{background-color:#ddd}.block-editor-link-control__search-item:focus:not(:disabled){box-shadow:inset 0 0 0 1.5px #007cba;box-shadow:0 0 0 1.5px var(--wp-admin-theme-color) inset}.block-editor-link-control__search-item.is-selected{background:#f0f0f0}.block-editor-link-control__search-item.is-selected .block-editor-link-control__search-item-type{background:#fff}.block-editor-link-control__search-item.is-current{background:transparent;border:0;width:100%;cursor:default;padding:16px 24px 16px 16px}.block-editor-link-control__search-item .block-editor-link-control__search-item-header{display:block;margin-left:24px;overflow:hidden;white-space:nowrap}.block-editor-link-control__search-item .block-editor-link-control__search-item-icon{margin-left:1em;min-width:24px}.block-editor-link-control__search-item .block-editor-link-control__search-item-info,.block-editor-link-control__search-item .block-editor-link-control__search-item-title{max-width:230px;overflow:hidden;text-overflow:ellipsis}.block-editor-link-control__search-item .block-editor-link-control__search-item-title mark{color:#1e1e1e}.block-editor-link-control__search-item .block-editor-link-control__search-item-title{display:block;margin-bottom:.2em;font-weight:500}.block-editor-link-control__search-item .block-editor-link-control__search-item-title mark{font-weight:700;color:#000;background-color:transparent}.block-editor-link-control__search-item .block-editor-link-control__search-item-title span{font-weight:400}.block-editor-link-control__search-item .block-editor-link-control__search-item-info{display:block;color:#6c7781;font-size:.9em;line-height:1.3}.block-editor-link-control__search-item .block-editor-link-control__search-item-type{display:block;padding:3px 8px;margin-right:auto;font-size:.9em;background-color:#f0f0f0;border-radius:2px}.block-editor-link-control__loading{margin:16px;display:flex;align-items:center}.block-editor-link-control__loading .components-spinner{margin-top:0}.components-button+.block-editor-link-control__search-create{margin-top:20px;overflow:visible;padding:12px 15px}.components-button+.block-editor-link-control__search-create:before{content:"";position:absolute;top:-10px;right:0;display:block;width:100%;border-top:1px solid #ddd}.block-editor-link-control__search-results div[role=menu]>.block-editor-link-control__search-item.block-editor-link-control__search-item{padding:10px}.block-editor-link-control__settings{border-top:1px solid #ddd;margin:0;padding:16px 24px}.block-editor-link-control__settings :last-child{margin-bottom:0}.block-editor-link-control__setting{margin-bottom:16px}.block-editor-link-control__setting :last-child{margin-bottom:0}.block-editor-link-control .block-editor-link-control__search-input .components-spinner{display:block}.block-editor-link-control .block-editor-link-control__search-input .components-spinner.components-spinner{position:absolute;right:auto;bottom:auto;top:28px;left:62px}.block-editor-link-control__search-item-action{margin-right:auto;flex-shrink:0}.block-editor-line-height-control{margin-bottom:24px}.block-editor-line-height-control input{display:block;max-width:60px}.block-editor-image-size-control{margin-bottom:1em}.block-editor-image-size-control .block-editor-image-size-control__row{display:flex;justify-content:space-between}.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height,.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width{margin-bottom:.5em}.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height input,.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width input{line-height:1.25}.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width{margin-left:5px}.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height{margin-right:5px}.block-editor-block-list__layout.has-overlay:after{content:"";position:absolute;top:-14px;left:-14px;bottom:-14px;right:-14px;z-index:60}[data-align=full] .has-overlay:after{left:0;right:0}.block-editor-block-types-list__list-item{display:block;width:33.33%;padding:0;margin:0}.components-button.block-editor-block-types-list__item{display:flex;flex-direction:column;width:100%;font-size:13px;color:#32373c;padding:8px;align-items:stretch;justify-content:center;cursor:pointer;background:transparent;word-break:break-word;border-radius:2px;border:1px solid transparent;transition:all .05s ease-in-out;position:relative;height:auto}@media (prefers-reduced-motion:reduce){.components-button.block-editor-block-types-list__item{transition-duration:0s}}.components-button.block-editor-block-types-list__item:disabled{opacity:.6;cursor:default}.components-button.block-editor-block-types-list__item:not(:disabled):hover{border-color:#007cba;border-color:var(--wp-admin-theme-color);color:#007cba!important;color:var(--wp-admin-theme-color)!important}.components-button.block-editor-block-types-list__item:not(:disabled).is-active{color:#fff;background:#1e1e1e;outline:2px solid transparent;outline-offset:-2px}.block-editor-block-types-list__item-icon{padding:12px 20px;border-radius:2px;color:#1e1e1e;transition:all .05s ease-in-out}@media (prefers-reduced-motion:reduce){.block-editor-block-types-list__item-icon{transition-duration:0s}}.block-editor-block-types-list__item-icon .block-editor-block-icon{margin-right:auto;margin-left:auto}.block-editor-block-types-list__item-icon svg{transition:all .15s ease-out}@media (prefers-reduced-motion:reduce){.block-editor-block-types-list__item-icon svg{transition-duration:0s}}.block-editor-block-types-list__item-title{padding:4px 2px 8px;font-size:12px}.modal-open .block-editor-media-replace-flow__options{display:none}.block-editor-media-replace-flow__options .components-popover__content>div{padding-top:16px}.block-editor-media-replace-flow__indicator{margin-right:4px}.block-editor-media-replace-flow__media-upload-menu{margin-bottom:16px}.block-editor-media-flow__url-input .block-editor-media-replace-flow__image-url-label{top:16px}.block-editor-media-flow__url-input .block-editor-link-control{margin-top:-16px;width:auto}.block-editor-media-flow__url-input .block-editor-link-control .components-base-control .components-base-control__field{margin-bottom:0}.block-editor-media-flow__url-input .block-editor-link-control .block-editor-link-control__search-item-title{max-width:180px;margin-top:16px}.block-editor-media-flow__url-input .block-editor-link-control .block-editor-link-control__search-item.is-current{width:auto;padding:0}.block-editor-media-flow__url-input .block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]{margin:16px 0 0;width:100%}.block-editor-media-flow__url-input .block-editor-link-control .block-editor-link-control__search-actions{left:4px}.block-editor-media-flow__error{padding:0 20px 20px;max-width:255px}.block-editor-media-flow__error .components-with-notices-ui{max-width:255px}.block-editor-media-flow__error .components-with-notices-ui .components-notice__content{overflow:hidden;word-wrap:break-word}.block-editor-media-flow__error .components-with-notices-ui .components-notice__dismiss{position:absolute;left:10px}.block-editor-media-placeholder__url-input-container .block-editor-media-placeholder__button{margin-bottom:0}.block-editor-media-placeholder__url-input-form{display:flex}.block-editor-media-placeholder__url-input-form input[type=url].block-editor-media-placeholder__url-input-field{width:100%;flex-grow:1;border:none;border-radius:0;margin:2px}@media (min-width:600px){.block-editor-media-placeholder__url-input-form input[type=url].block-editor-media-placeholder__url-input-field{width:300px}}.block-editor-media-placeholder__url-input-submit-button{flex-shrink:1}.block-editor-media-placeholder__button{margin-bottom:.5rem}.block-editor-media-placeholder__cancel-button.is-link{margin:1em;display:block}.block-editor-media-placeholder.is-appender{min-height:0}.block-editor-media-placeholder.is-appender:hover{cursor:pointer;box-shadow:0 0 0 1px #007cba;box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.block-editor-multi-selection-inspector__card{display:flex;align-items:flex-start;padding:16px}.block-editor-multi-selection-inspector__card-content{flex-grow:1}.block-editor-multi-selection-inspector__card-title{font-weight:500;margin-bottom:5px}.block-editor-multi-selection-inspector__card-description{font-size:13px}.block-editor-multi-selection-inspector__card .block-editor-block-icon{margin-right:-2px;margin-left:10px;padding:0 3px;width:36px;height:24px}.block-editor .block-editor-plain-text{box-shadow:none;font-family:inherit;font-size:inherit;color:inherit;line-height:inherit;border:none;padding:0;margin:0;width:100%}.block-editor-responsive-block-control{margin-bottom:28px;border-bottom:1px solid #d7dade;padding-bottom:14px}.block-editor-responsive-block-control:last-child{padding-bottom:0;border-bottom:0}.block-editor-responsive-block-control__title{margin:0 -3px .6em 0}.block-editor-responsive-block-control__label{font-weight:600;margin-bottom:.6em;margin-right:-3px}.block-editor-responsive-block-control__inner{margin-right:-1px}.block-editor-responsive-block-control__toggle{margin-right:1px}.block-editor-responsive-block-control .components-base-control__help{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.block-editor-format-toolbar .components-dropdown-menu__toggle{justify-content:center}.block-editor-rich-text__editable>p:first-child{margin-top:0}.block-editor-rich-text__editable [data-rich-text-placeholder]{pointer-events:none}.block-editor-rich-text__editable [data-rich-text-placeholder]:after{content:attr(data-rich-text-placeholder);opacity:.62}.block-editor-rich-text__editable:focus{outline:none}.block-editor-rich-text__editable:focus [data-rich-text-format-boundary]{border-radius:2px}.block-editor-rich-text__editable:focus:not(.keep-placeholder-on-focus) [data-rich-text-placeholder]:after{display:none}figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]:before{opacity:.8}.components-popover.block-editor-rich-text__inline-format-toolbar{z-index:99998}.components-popover.block-editor-rich-text__inline-format-toolbar .components-popover__content{width:auto;min-width:auto;margin-bottom:8px;box-shadow:none;border:1px solid #1e1e1e;border-radius:2px;background-color:#fff}.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar,.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar-group{border:none}.components-popover.block-editor-rich-text__inline-format-toolbar .components-dropdown-menu__toggle,.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar__control{min-width:48px;min-height:48px;padding-right:12px;padding-left:12px}.block-editor-skip-to-selected-block{position:absolute;top:-9999em}.block-editor-skip-to-selected-block:focus{height:auto;width:auto;display:block;font-size:14px;font-weight:600;padding:15px 23px 14px;background:#f1f1f1;color:#007cba;color:var(--wp-admin-theme-color);line-height:normal;box-shadow:0 0 2px 2px rgba(0,0,0,.6);text-decoration:none;outline:none;z-index:100000}.block-editor-tool-selector__help{margin:8px -12px -12px;padding:12px 20px;border-top:1px solid #ddd;color:#6c7781}.block-editor-block-list__block .block-editor-url-input,.block-editor-url-input,.components-popover .block-editor-url-input{flex-grow:1;position:relative;padding:1px}.block-editor-block-list__block .block-editor-url-input input[type=text],.block-editor-url-input input[type=text],.components-popover .block-editor-url-input input[type=text]{width:100%;padding:8px;border:none;border-radius:0;margin-right:0;margin-left:0;font-size:16px}@media (min-width:600px){.block-editor-block-list__block .block-editor-url-input input[type=text],.block-editor-url-input input[type=text],.components-popover .block-editor-url-input input[type=text]{width:300px}}@media (min-width:600px){.block-editor-block-list__block .block-editor-url-input input[type=text],.block-editor-url-input input[type=text],.components-popover .block-editor-url-input input[type=text]{font-size:13px}}.block-editor-block-list__block .block-editor-url-input input[type=text]::-ms-clear,.block-editor-url-input input[type=text]::-ms-clear,.components-popover .block-editor-url-input input[type=text]::-ms-clear{display:none}.block-editor-block-list__block .block-editor-url-input.is-full-width,.block-editor-url-input.is-full-width,.components-popover .block-editor-url-input.is-full-width{width:100%}.block-editor-block-list__block .block-editor-url-input.is-full-width .block-editor-url-input__input[type=text],.block-editor-url-input.is-full-width .block-editor-url-input__input[type=text],.components-popover .block-editor-url-input.is-full-width .block-editor-url-input__input[type=text]{width:100%}.block-editor-block-list__block .block-editor-url-input.is-full-width__suggestions,.block-editor-url-input.is-full-width__suggestions,.components-popover .block-editor-url-input.is-full-width__suggestions{width:100%}.block-editor-block-list__block .block-editor-url-input .components-spinner,.block-editor-url-input .components-spinner,.components-popover .block-editor-url-input .components-spinner{position:absolute;left:8px;bottom:17px;margin:0}.block-editor-url-input__input[type=text]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal}@media (prefers-reduced-motion:reduce){.block-editor-url-input__input[type=text]{transition-duration:0s}}@media (min-width:600px){.block-editor-url-input__input[type=text]{font-size:13px;line-height:normal}}.block-editor-url-input__input[type=text]:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px #007cba;box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-url-input__input[type=text]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.block-editor-url-input__input[type=text]::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.block-editor-url-input__input[type=text]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.is-dark-theme .block-editor-url-input__input[type=text]::-webkit-input-placeholder{color:hsla(0,0%,100%,.65)}.is-dark-theme .block-editor-url-input__input[type=text]::-moz-placeholder{opacity:1;color:hsla(0,0%,100%,.65)}.is-dark-theme .block-editor-url-input__input[type=text]:-ms-input-placeholder{color:hsla(0,0%,100%,.65)}.block-editor-url-input__suggestions{max-height:200px;transition:all .15s ease-in-out;padding:4px 0;width:302px;overflow-y:auto}@media (prefers-reduced-motion:reduce){.block-editor-url-input__suggestions{transition-duration:0s}}.block-editor-url-input .components-spinner,.block-editor-url-input__suggestions{display:none}@media (min-width:600px){.block-editor-url-input .components-spinner,.block-editor-url-input__suggestions{display:inherit}}.block-editor-url-input__suggestion{padding:4px 8px;color:#6c7781;display:block;font-size:13px;cursor:pointer;background:#fff;width:100%;border:none;text-align:right;box-shadow:none}.block-editor-url-input__suggestion:hover{background:#ddd}.block-editor-url-input__suggestion.is-selected,.block-editor-url-input__suggestion:focus{background:#005a87;background:var(--wp-admin-theme-color-darker-20);color:#fff;outline:none}.components-toolbar-group>.block-editor-url-input__button,.components-toolbar>.block-editor-url-input__button{position:inherit}.block-editor-url-input__button .block-editor-url-input__back{margin-left:4px;overflow:visible}.block-editor-url-input__button .block-editor-url-input__back:after{content:"";position:absolute;display:block;width:1px;height:24px;left:-1px;background:#ddd}.block-editor-url-input__button-modal{box-shadow:0 2px 6px rgba(0,0,0,.05);border:1px solid #ddd;background:#fff}.block-editor-url-input__button-modal-line{display:flex;flex-direction:row;flex-grow:1;flex-shrink:1;min-width:0;align-items:flex-start}.block-editor-url-input__button-modal-line .components-button{flex-shrink:0;width:36px;height:36px}.block-editor-url-popover__additional-controls{border-top:1px solid #ddd}.block-editor-url-popover__additional-controls>div[role=menu] .components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary)>svg{box-shadow:none}.block-editor-url-popover__additional-controls div[role=menu]>.components-button{padding-right:2px}.block-editor-url-popover__row{display:flex}.block-editor-url-popover__row>:not(.block-editor-url-popover__settings-toggle){flex-grow:1}.block-editor-url-popover .components-button.has-icon{padding:3px}.block-editor-url-popover .components-button.has-icon>svg{padding:5px;border-radius:2px;height:30px;width:30px}.block-editor-url-popover .components-button.has-icon:not(:disabled):focus{box-shadow:none}.block-editor-url-popover .components-button.has-icon:not(:disabled):focus>svg{box-shadow:inset 0 0 0 1.5px #007cba,inset 0 0 0 4px #fff;box-shadow:inset 0 0 0 1.5px var(--wp-admin-theme-color),inset 0 0 0 4px #fff;outline:2px solid transparent}.block-editor-url-popover__settings-toggle{flex-shrink:0;border-radius:0;border-right:1px solid #ddd;margin-right:1px}.block-editor-url-popover__settings-toggle[aria-expanded=true] .dashicon{transform:rotate(-180deg)}.block-editor-url-popover__input-container .components-base-control:last-child,.block-editor-url-popover__input-container .components-base-control:last-child .components-base-control__field{margin-bottom:0}.block-editor-url-popover__settings{display:block;padding:16px;border-top:1px solid #ddd}.block-editor-url-popover__link-editor,.block-editor-url-popover__link-viewer{display:flex}.block-editor-url-popover__link-editor .block-editor-url-input .components-base-control__field,.block-editor-url-popover__link-viewer .block-editor-url-input .components-base-control__field{margin-bottom:0}.block-editor-url-popover__link-editor .block-editor-url-input .components-spinner,.block-editor-url-popover__link-viewer .block-editor-url-input .components-spinner{bottom:9px}.block-editor-url-popover__link-viewer-url{margin:7px;flex-grow:1;flex-shrink:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:150px;max-width:500px}.block-editor-url-popover__link-viewer-url.has-invalid-link{color:#d94f4f}.block-editor-warning{align-items:center;display:flex;flex-wrap:wrap;padding:6px 12px;border:1px solid #1e1e1e;border-radius:2px;background-color:#fff}.block-editor-warning,.block-editor-warning .block-editor-warning__message{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.block-editor-warning .block-editor-warning__message{line-height:1.4;margin:1em 0}.block-editor-warning p.block-editor-warning__message.block-editor-warning__message{min-height:auto}.block-editor-warning .block-editor-warning__contents{display:flex;flex-direction:row;justify-content:space-between;flex-wrap:wrap;align-items:baseline;width:100%}.block-editor-warning .block-editor-warning__actions{display:flex}.block-editor-warning .block-editor-warning__action{margin:0 8px 0 0}.block-editor-warning__secondary{margin:auto 8px auto 0}.block-editor-writing-flow{display:flex;flex-direction:column}.block-editor-writing-flow__click-redirect{cursor:text}.html-anchor-control .components-external-link{display:block;margin-top:8px}#end-resizable-editor-section{display:none}.block-editor-block-toolbar{display:flex;flex-grow:1;width:100%;overflow:auto;position:relative;transition:border-color .1s linear,box-shadow .1s linear}@media (prefers-reduced-motion:reduce){.block-editor-block-toolbar{transition-duration:0s}}@media (min-width:600px){.block-editor-block-toolbar{overflow:inherit}}.block-editor-block-toolbar .components-toolbar,.block-editor-block-toolbar .components-toolbar-group{background:none;line-height:0;margin-top:-1px;margin-bottom:-1px;border:0;border-left:1px solid #ddd}.block-editor-block-toolbar>:last-child,.block-editor-block-toolbar>:last-child .components-toolbar,.block-editor-block-toolbar>:last-child .components-toolbar-group{border-left:none}.block-editor-block-toolbar .components-toolbar,.block-editor-block-toolbar .components-toolbar-group,.block-editor-format-toolbar .components-toolbar,.block-editor-format-toolbar .components-toolbar-group{display:flex;flex-wrap:nowrap}.block-editor-block-toolbar__slot{display:inline-block;line-height:0}@supports ((position:-webkit-sticky) or (position:sticky)){.block-editor-block-toolbar__slot{display:inline-flex}}.block-editor-block-toolbar__block-parent-selector-wrapper{position:absolute;top:-1px;right:-1px;opacity:0;transition:all 60ms linear;z-index:-1}@media (prefers-reduced-motion:reduce){.block-editor-block-toolbar__block-parent-selector-wrapper{transition-duration:0s}}.is-showing-movers .block-editor-block-toolbar__block-parent-selector-wrapper{opacity:1;transform:translateY(-60px)}.edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar__block-parent-selector-wrapper{display:none}.block-editor-block-toolbar__block-switcher-wrapper,.block-editor-block-toolbar__mover-switcher-container{display:flex}.block-editor-block-toolbar__block-switcher-wrapper:not([draggable=false]) *{cursor:grab}.block-editor-block-toolbar__block-switcher-wrapper .block-editor-block-switcher{display:block}.block-editor-inserter{display:inline-block;background:none;border:none;padding:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4}@media (min-width:782px){.block-editor-inserter{position:relative}}.block-editor-inserter__popover .block-editor-inserter__menu{margin:-12px}.block-editor-inserter__popover .block-editor-inserter__menu .block-editor-inserter__search{top:-12px}.block-editor-inserter__popover .block-editor-inserter__menu .block-editor-inserter__tabs .components-tab-panel__tabs{top:60px}.block-editor-inserter__popover .block-editor-inserter__menu .block-editor-inserter__main-area{overflow:visible;height:auto}.block-editor-inserter__toggle.components-button{display:inline-flex;align-items:center;cursor:pointer;b
|
|