diff --git a/wp-includes/assets/script-loader-packages.min.php b/wp-includes/assets/script-loader-packages.min.php index d66e0fd1d3..43a5d14f2c 100644 --- a/wp-includes/assets/script-loader-packages.min.php +++ b/wp-includes/assets/script-loader-packages.min.php @@ -1 +1 @@ - array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'ecce20f002eda4c19664'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '1720fc5d5c76f53a1740'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'bc0029ca2c943aec5311'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '43197d709df445ccf849'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'a078f260190acf405764'), 'block-directory.min.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '000a47d4ebe2ceac3593'), 'block-editor.min.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', '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-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '0c7c9b9a74ceb717d6eb'), 'block-library.min.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '8adfaccd027d4d509d5e'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'eb2cdc8cd7a7975d49d9'), 'blocks.min.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => '69022aed79bfd45b3b1d'), 'components.min.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-warning'), 'version' => '4b876f1ff2e5c93b8fb1'), 'compose.min.js' => array('dependencies' => array('lodash', 'react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '37228270687b2a94e518'), 'core-data.min.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => 'd8d458b31912f858bcdf'), 'customize-widgets.min.js' => array('dependencies' => array('lodash', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-widgets'), 'version' => '1fddf6d27e5c3aeddd54'), 'data.min.js' => array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => 'd8cf5b24f99c64ae47d6'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'e10d473d392daa8501e8'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'ce7daf24092d87ff18be'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '6c963cb9494ba26b77eb'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '133a042fbbef48f38107'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '392bdd43726760d1f3ca'), 'edit-post.min.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => '2baffbeec6cbe5171dee'), 'edit-site.min.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-style-engine', 'wp-url', 'wp-viewport'), 'version' => '3ab3e2570a5c4c270c72'), 'edit-widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => 'f920c6385e705b28f823'), 'editor.min.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'c9102d37531f38da0681'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '47162ff4492c7ec4956b'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03e27a7b6ae14f7afaa6'), 'format-library.min.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '57876a359eac66da202b'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4169d3cf8e8d95a3d6d5'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '36a4a255da7dd2e1bf8e'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '9e794f35a71bb98672ae'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '20c2b06ecf04afb14fee'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => 'b696c16720133edfc065'), 'keycodes.min.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => '6e0aadc0106bd8aadc89'), 'list-reusable-blocks.min.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'f97bc9cc3a1cd21b8c8e'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '17f6455b0630582352a4'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '9c1575b7a31659f45a45'), 'nux.min.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '038c48e26a91639ae8ab'), 'plugins.min.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => '0d1b90278bae7df6ecf9'), 'preferences.min.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '5e6c91c252c0e040f379'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => 'c5543628aa7ff5bd5be4'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'ae0bece54c0487c976b1'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '99e325da95c5a35c7dc2'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c9ea6c0df793258797e6'), 'reusable-blocks.min.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '3fb4b31e589a583a362e'), 'rich-text.min.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => 'c704284bebe26cf1dd51'), 'server-side-render.min.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'ba8027ee85d65ae23ec7'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7539044b04e6bca57f2e'), 'style-engine.min.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '10341d6e6decffab850e'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f2cf0bb3ae80de227e43'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'bb0ef862199bcae73aa7'), 'viewport.min.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => 'a9868d184d07e4c94fe4'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4acee5fc2fd9a24cefc2'), 'widgets.min.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => 'ec7c547bc8a579c6061e'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'feb9569307aec24292f2')); + array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'ecce20f002eda4c19664'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '1720fc5d5c76f53a1740'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'bc0029ca2c943aec5311'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '43197d709df445ccf849'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'a078f260190acf405764'), 'block-directory.min.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '000a47d4ebe2ceac3593'), 'block-editor.min.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', '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-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'f1f1760886849bc652b7'), 'block-library.min.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '774410615710895b6b04'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'eb2cdc8cd7a7975d49d9'), 'blocks.min.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => '2fecdd1687581f909b45'), 'components.min.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-warning'), 'version' => '1c92d014eb546f059fd5'), 'compose.min.js' => array('dependencies' => array('lodash', 'react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '37228270687b2a94e518'), 'core-data.min.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => 'd8d458b31912f858bcdf'), 'customize-widgets.min.js' => array('dependencies' => array('lodash', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-widgets'), 'version' => '323c27f4fff5e87062f9'), 'data.min.js' => array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => '9b749ae7704d9d899e1a'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'e10d473d392daa8501e8'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'b49d8d73e4d1439f54c6'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '6c963cb9494ba26b77eb'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '133a042fbbef48f38107'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '392bdd43726760d1f3ca'), 'edit-post.min.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => 'a6bfa98deeb2849463de'), 'edit-site.min.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-style-engine', 'wp-url', 'wp-viewport'), 'version' => '73c4a8f9594b8602c618'), 'edit-widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '6d3b6608a3faab94a771'), 'editor.min.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'e2d02ccf09214921ba82'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '47162ff4492c7ec4956b'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03e27a7b6ae14f7afaa6'), 'format-library.min.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '57876a359eac66da202b'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4169d3cf8e8d95a3d6d5'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '36a4a255da7dd2e1bf8e'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '9e794f35a71bb98672ae'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '20c2b06ecf04afb14fee'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => 'b696c16720133edfc065'), 'keycodes.min.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => '6e0aadc0106bd8aadc89'), 'list-reusable-blocks.min.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'f97bc9cc3a1cd21b8c8e'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '17f6455b0630582352a4'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '9c1575b7a31659f45a45'), 'nux.min.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '038c48e26a91639ae8ab'), 'plugins.min.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => '0d1b90278bae7df6ecf9'), 'preferences.min.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '5e6c91c252c0e040f379'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => 'c5543628aa7ff5bd5be4'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '0d5f586fa7f5f18d4e7a'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '99e325da95c5a35c7dc2'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b2e4ef03f84699189f29'), 'reusable-blocks.min.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '3fb4b31e589a583a362e'), 'rich-text.min.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => 'c704284bebe26cf1dd51'), 'server-side-render.min.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'ba8027ee85d65ae23ec7'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7539044b04e6bca57f2e'), 'style-engine.min.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '10341d6e6decffab850e'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f2cf0bb3ae80de227e43'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6620854ab4f8532bcdbc'), 'viewport.min.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => 'a9868d184d07e4c94fe4'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4acee5fc2fd9a24cefc2'), 'widgets.min.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => 'a8bd49d4d3625a16a255'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'feb9569307aec24292f2')); diff --git a/wp-includes/assets/script-loader-packages.php b/wp-includes/assets/script-loader-packages.php index 425f33c232..ebeb2b7e2e 100644 --- a/wp-includes/assets/script-loader-packages.php +++ b/wp-includes/assets/script-loader-packages.php @@ -1 +1 @@ - array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '0ee61caf926b8a5c5f27'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '4d49f11a15c40df3bf3c'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '68af4ed41fa8a1b94f61'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9dfc70c5ecb460ef802d'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f399de5d2cca2ba06e55'), 'block-directory.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '3744c8dc27f3ae6090eb'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', '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-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '9163831602133591bad9'), 'block-library.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '3d93da7fa8e4ea7c6e81'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '30a33cdc4ffbbc35a130'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => '4d97a7efd3d56d35b3d7'), 'components.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-warning'), 'version' => '2415973c4227a31b8a15'), 'compose.js' => array('dependencies' => array('lodash', 'react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '70668e5bb5fde21b1e2c'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => '7f0e550a9fa7a0fe5852'), 'customize-widgets.js' => array('dependencies' => array('lodash', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-widgets'), 'version' => 'c43a48e08b8beee21fd2'), 'data.js' => array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => '03a7e3ef4d75081d1a5e'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'a9db8689c0dc134496f2'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => '485183e63bb8d23353c7'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '9a578dedacc95dee5274'), 'dom.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '0bdd7e8b5f3e6b3e4f23'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7c25017459f1da90355d'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => '78b9ccdebe3cb8c66859'), 'edit-site.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-style-engine', 'wp-url', 'wp-viewport'), 'version' => '75c5e45b997122ee587a'), 'edit-widgets.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '05b5e2f232ce98a657de'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '04f9e2ef78d16f9a9f44'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '01c7e9b5b7aeb483b671'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6cf743ecc1ac531a8ee6'), 'format-library.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '4d9518b6c2303134d04d'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3ad9b2919ff3fc96ce63'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => '87ef261e846b76e5a37b'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '0343553cc8c879477a4a'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b8f723a062b0818425f1'), 'keyboard-shortcuts.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => 'd9997e5c243ce7427d4e'), 'keycodes.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => 'b526e3a0b3efe3e1db57'), 'list-reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '99e9d883544fb82def11'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'fa3efd57b99e42de2511'), 'notices.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '72014f2e1361090a48e0'), 'nux.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'cd90e6b2a9140895480a'), 'plugins.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => 'bd218e027784d4206e23'), 'preferences.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '1ccaf796fd08f9846fee'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => 'a37f96da541fc329d755'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '2d223a09b836a1055c76'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => '89a06fece4e5da47ee3c'), 'redux-routine.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'd427502c4125dcb97f11'), 'reusable-blocks.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '6e19595079613bf52004'), 'rich-text.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => '00fbc94ef96d29308b79'), 'server-side-render.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '4d1012bd15711f69169c'), 'shortcode.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'dd642c4c64afd77fed8c'), 'style-engine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '98b21ce036e0b1524d64'), 'token-list.js' => array('dependencies' => array('wp-polyfill'), 'version' => '0aa873f736c379f28e78'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2d2e951909e9f41b4163'), 'viewport.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '25d1cb7fe23c635dedf9'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'aa73c6d9a1563e863795'), 'widgets.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '61d80b9002317922373b'), 'wordcount.js' => array('dependencies' => array('wp-polyfill'), 'version' => '27e23086e41dbb80f874')); + array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '0ee61caf926b8a5c5f27'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '4d49f11a15c40df3bf3c'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '68af4ed41fa8a1b94f61'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9dfc70c5ecb460ef802d'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f399de5d2cca2ba06e55'), 'block-directory.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '3744c8dc27f3ae6090eb'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', '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-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '1e7f7c7888ee73e0f3cb'), 'block-library.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '406e036ca0bc1cf3282d'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '30a33cdc4ffbbc35a130'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => '762d49474178725cd28e'), 'components.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-warning'), 'version' => '262cd00f2dff84d53d89'), 'compose.js' => array('dependencies' => array('lodash', 'react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '70668e5bb5fde21b1e2c'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => '7f0e550a9fa7a0fe5852'), 'customize-widgets.js' => array('dependencies' => array('lodash', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-widgets'), 'version' => 'e629e25b9a742df8c186'), 'data.js' => array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => 'babacd37e605700aa494'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'a9db8689c0dc134496f2'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => '979f2f6cd48deabfe6fc'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '9a578dedacc95dee5274'), 'dom.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '0bdd7e8b5f3e6b3e4f23'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7c25017459f1da90355d'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => 'aec21d72969ced58e454'), 'edit-site.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-style-engine', 'wp-url', 'wp-viewport'), 'version' => '9d96b03daea5b81cb8bd'), 'edit-widgets.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '29e58c7604bb5224c863'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '1246cb85d0da1a502a36'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '01c7e9b5b7aeb483b671'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6cf743ecc1ac531a8ee6'), 'format-library.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '4d9518b6c2303134d04d'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3ad9b2919ff3fc96ce63'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => '87ef261e846b76e5a37b'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '0343553cc8c879477a4a'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b8f723a062b0818425f1'), 'keyboard-shortcuts.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => 'd9997e5c243ce7427d4e'), 'keycodes.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => 'b526e3a0b3efe3e1db57'), 'list-reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '99e9d883544fb82def11'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'fa3efd57b99e42de2511'), 'notices.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '72014f2e1361090a48e0'), 'nux.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'cd90e6b2a9140895480a'), 'plugins.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => 'bd218e027784d4206e23'), 'preferences.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '1ccaf796fd08f9846fee'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => 'a37f96da541fc329d755'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'e53677d484ef371a4bd1'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => '89a06fece4e5da47ee3c'), 'redux-routine.js' => array('dependencies' => array('wp-polyfill'), 'version' => '06330ca9f4c42e7b8516'), 'reusable-blocks.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '6e19595079613bf52004'), 'rich-text.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => '00fbc94ef96d29308b79'), 'server-side-render.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '4d1012bd15711f69169c'), 'shortcode.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'dd642c4c64afd77fed8c'), 'style-engine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '98b21ce036e0b1524d64'), 'token-list.js' => array('dependencies' => array('wp-polyfill'), 'version' => '0aa873f736c379f28e78'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f8a2f224776f8b8f1e9d'), 'viewport.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '25d1cb7fe23c635dedf9'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'aa73c6d9a1563e863795'), 'widgets.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '45656c89e2ff75021c7c'), 'wordcount.js' => array('dependencies' => array('wp-polyfill'), 'version' => '27e23086e41dbb80f874')); diff --git a/wp-includes/blocks/avatar.php b/wp-includes/blocks/avatar.php index f6e3f6a7ee..5a821f5573 100644 --- a/wp-includes/blocks/avatar.php +++ b/wp-includes/blocks/avatar.php @@ -97,7 +97,7 @@ function render_block_core_avatar( $attributes, $content, $block ) { $label = ''; if ( '_blank' === $attributes['linkTarget'] ) { // translators: %s is the Author name. - $label = 'aria-label="' . sprintf( esc_attr__( '(%s author archive, opens in a new tab)' ), $author_name ) . '"'; + $label = 'aria-label="' . esc_attr( sprintf( __( '(%s author archive, opens in a new tab)' ), $author_name ) ) . '"'; } // translators: %1$s: Author archive link. %2$s: Link target. %3$s Aria label. %4$s Avatar image. $avatar_block = sprintf( '%4$s', get_author_posts_url( $author_id ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block ); @@ -124,7 +124,7 @@ function render_block_core_avatar( $attributes, $content, $block ) { $label = ''; if ( '_blank' === $attributes['linkTarget'] ) { // translators: %s is the Comment Author name. - $label = 'aria-label="' . sprintf( esc_attr__( '(%s website link, opens in a new tab)' ), $comment->comment_author ) . '"'; + $label = 'aria-label="' . esc_attr( sprintf( __( '(%s website link, opens in a new tab)' ), $comment->comment_author ) ) . '"'; } // translators: %1$s: Comment Author website link. %2$s: Link target. %3$s Aria label. %4$s Avatar image. $avatar_block = sprintf( '%4$s', esc_url( $comment->comment_author_url ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block ); diff --git a/wp-includes/js/dist/block-editor.js b/wp-includes/js/dist/block-editor.js index 627f0433a3..566fefd678 100644 --- a/wp-includes/js/dist/block-editor.js +++ b/wp-includes/js/dist/block-editor.js @@ -1,6 +1,637 @@ /******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ +/***/ 480: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBound = __webpack_require__(5304); +var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true); + +var isArrayBuffer = __webpack_require__(4602); + +/** @type {import('.')} */ +module.exports = function byteLength(ab) { + if (!isArrayBuffer(ab)) { + return NaN; + } + return $byteLength ? $byteLength(ab) : ab.byteLength; +}; // in node < 0.11, byteLength is an own nonconfigurable property + + +/***/ }), + +/***/ 5304: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(3803); + +var callBind = __webpack_require__(6427); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 6427: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(7870); +var GetIntrinsic = __webpack_require__(3803); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 3303: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 7870: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(3303); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 3803: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(8040)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(7870); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 8040: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(9063); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 9063: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + /***/ 6411: /***/ (function(module, exports) { @@ -288,72 +919,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ module.exports = exports['default']; }); -/***/ }), - -/***/ 4403: -/***/ (function(module, exports) { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ -/* global define */ - -(function () { - 'use strict'; - - var hasOwn = {}.hasOwnProperty; - var nativeCodeString = '[native code]'; - - function classNames() { - var classes = []; - - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i]; - if (!arg) continue; - - var argType = typeof arg; - - if (argType === 'string' || argType === 'number') { - classes.push(arg); - } else if (Array.isArray(arg)) { - if (arg.length) { - var inner = classNames.apply(null, arg); - if (inner) { - classes.push(inner); - } - } - } else if (argType === 'object') { - if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { - classes.push(arg.toString()); - continue; - } - - for (var key in arg) { - if (hasOwn.call(arg, key) && arg[key]) { - classes.push(key); - } - } - } - } - - return classes.join(' '); - } - - if ( true && module.exports) { - classNames.default = classNames; - module.exports = classNames; - } else if (true) { - // register as 'classnames', consistent with npm package name - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return classNames; - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} -}()); - - /***/ }), /***/ 4827: @@ -388,6 +953,70 @@ var computedStyle = function (el, prop, getComputedStyle) { module.exports = computedStyle; +/***/ }), + +/***/ 2656: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $defineProperty = __webpack_require__(8918); + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); + +var gopd = __webpack_require__(3828); + +/** @type {import('.')} */ +module.exports = function defineDataProperty( + obj, + property, + value +) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new $TypeError('`obj` must be an object or a function`'); + } + if (typeof property !== 'string' && typeof property !== 'symbol') { + throw new $TypeError('`property` must be a string or a symbol`'); + } + if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) { + throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null'); + } + if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) { + throw new $TypeError('`nonWritable`, if provided, must be a boolean or null'); + } + if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) { + throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null'); + } + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('`loose`, if provided, must be a boolean'); + } + + var nonEnumerable = arguments.length > 3 ? arguments[3] : null; + var nonWritable = arguments.length > 4 ? arguments[4] : null; + var nonConfigurable = arguments.length > 5 ? arguments[5] : null; + var loose = arguments.length > 6 ? arguments[6] : false; + + /* @type {false | TypedPropertyDescriptor} */ + var desc = !!gopd && gopd(obj, property); + + if ($defineProperty) { + $defineProperty(obj, property, { + configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, + enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, + value: value, + writable: nonWritable === null && desc ? desc.writable : !nonWritable + }); + } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) { + // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable + obj[property] = value; // eslint-disable-line no-param-reassign + } else { + throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.'); + } +}; + + /***/ }), /***/ 1198: @@ -1336,6 +1965,1720 @@ module.exports = _extends({ viewportHeight: 0 }, domUtils); +/***/ }), + +/***/ 8918: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(292); + +/** @type {import('.')} */ +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false; +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} + +module.exports = $defineProperty; + + +/***/ }), + +/***/ 3592: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 5903: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(3592); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 292: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(4482)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(5903); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 4482: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(7457); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 7457: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 6788: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./eval')} */ +module.exports = EvalError; + + +/***/ }), + +/***/ 6716: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('.')} */ +module.exports = Error; + + +/***/ }), + +/***/ 9204: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./range')} */ +module.exports = RangeError; + + +/***/ }), + +/***/ 9908: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./ref')} */ +module.exports = ReferenceError; + + +/***/ }), + +/***/ 6724: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./syntax')} */ +module.exports = SyntaxError; + + +/***/ }), + +/***/ 1642: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./type')} */ +module.exports = TypeError; + + +/***/ }), + +/***/ 1451: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./uri')} */ +module.exports = URIError; + + +/***/ }), + +/***/ 7998: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +/** @type {import('./RequireObjectCoercible')} */ +module.exports = function RequireObjectCoercible(value) { + if (value == null) { + throw new $TypeError((arguments.length > 0 && arguments[1]) || ('Cannot call method on ' + value)); + } + return value; +}; + + +/***/ }), + +/***/ 5249: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; + +var isPrimitive = __webpack_require__(3777); +var isCallable = __webpack_require__(5443); +var isDate = __webpack_require__(8659); +var isSymbol = __webpack_require__(3082); + +var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) { + if (typeof O === 'undefined' || O === null) { + throw new TypeError('Cannot call method on ' + O); + } + if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) { + throw new TypeError('hint must be "string" or "number"'); + } + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + var method, result, i; + for (i = 0; i < methodNames.length; ++i) { + method = O[methodNames[i]]; + if (isCallable(method)) { + result = method.call(O); + if (isPrimitive(result)) { + return result; + } + } + } + throw new TypeError('No default value'); +}; + +var GetMethod = function GetMethod(O, P) { + var func = O[P]; + if (func !== null && typeof func !== 'undefined') { + if (!isCallable(func)) { + throw new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function'); + } + return func; + } + return void 0; +}; + +// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive +module.exports = function ToPrimitive(input) { + if (isPrimitive(input)) { + return input; + } + var hint = 'default'; + if (arguments.length > 1) { + if (arguments[1] === String) { + hint = 'string'; + } else if (arguments[1] === Number) { + hint = 'number'; + } + } + + var exoticToPrim; + if (hasSymbols) { + if (Symbol.toPrimitive) { + exoticToPrim = GetMethod(input, Symbol.toPrimitive); + } else if (isSymbol(input)) { + exoticToPrim = Symbol.prototype.valueOf; + } + } + if (typeof exoticToPrim !== 'undefined') { + var result = exoticToPrim.call(input, hint); + if (isPrimitive(result)) { + return result; + } + throw new TypeError('unable to convert exotic object to primitive'); + } + if (hint === 'default' && (isDate(input) || isSymbol(input))) { + hint = 'string'; + } + return ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint); +}; + + +/***/ }), + +/***/ 3777: +/***/ (function(module) { + +"use strict"; + + +module.exports = function isPrimitive(value) { + return value === null || (typeof value !== 'function' && typeof value !== 'object'); +}; + + +/***/ }), + +/***/ 4843: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var isCallable = __webpack_require__(5443); + +var toStr = Object.prototype.toString; +var hasOwnProperty = Object.prototype.hasOwnProperty; + +var forEachArray = function forEachArray(array, iterator, receiver) { + for (var i = 0, len = array.length; i < len; i++) { + if (hasOwnProperty.call(array, i)) { + if (receiver == null) { + iterator(array[i], i, array); + } else { + iterator.call(receiver, array[i], i, array); + } + } + } +}; + +var forEachString = function forEachString(string, iterator, receiver) { + for (var i = 0, len = string.length; i < len; i++) { + // no such thing as a sparse string. + if (receiver == null) { + iterator(string.charAt(i), i, string); + } else { + iterator.call(receiver, string.charAt(i), i, string); + } + } +}; + +var forEachObject = function forEachObject(object, iterator, receiver) { + for (var k in object) { + if (hasOwnProperty.call(object, k)) { + if (receiver == null) { + iterator(object[k], k, object); + } else { + iterator.call(receiver, object[k], k, object); + } + } + } +}; + +var forEach = function forEach(list, iterator, thisArg) { + if (!isCallable(iterator)) { + throw new TypeError('iterator must be a function'); + } + + var receiver; + if (arguments.length >= 3) { + receiver = thisArg; + } + + if (toStr.call(list) === '[object Array]') { + forEachArray(list, iterator, receiver); + } else if (typeof list === 'string') { + forEachString(list, iterator, receiver); + } else { + forEachObject(list, iterator, receiver); + } +}; + +module.exports = forEach; + + +/***/ }), + +/***/ 3828: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(2473); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); + +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } +} + +module.exports = $gOPD; + + +/***/ }), + +/***/ 8819: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 8729: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(8819); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 2473: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(5810)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(8729); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 5810: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(1759); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 1759: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 8198: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $defineProperty = __webpack_require__(8918); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + return !!$defineProperty; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!$defineProperty) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; + + +/***/ }), + +/***/ 1856: +/***/ (function(module) { + +"use strict"; + + +var test = { + __proto__: null, + foo: {} +}; + +var $Object = Object; + +/** @type {import('.')} */ +module.exports = function hasProto() { + // @ts-expect-error: TS errors on an inherited property for some reason + return { __proto__: test }.foo === test.foo + && !(test instanceof $Object); +}; + + +/***/ }), + +/***/ 9905: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = __webpack_require__.g.Symbol; +var hasSymbolSham = __webpack_require__(5682); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 5682: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 81: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 4111: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasSymbols = __webpack_require__(81); + +/** @type {import('.')} */ +module.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; +}; + + +/***/ }), + +/***/ 9429: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = __webpack_require__(766); + +/** @type {import('.')} */ +module.exports = bind.call(call, $hasOwn); + + +/***/ }), + +/***/ 2075: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 766: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(2075); + +module.exports = Function.prototype.bind || implementation; + + /***/ }), /***/ 8575: @@ -1370,6 +3713,1471 @@ if (typeof Object.create === 'function') { } +/***/ }), + +/***/ 4602: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBind = __webpack_require__(4374); +var callBound = __webpack_require__(7442); +var GetIntrinsic = __webpack_require__(3767); + +var $ArrayBuffer = GetIntrinsic('%ArrayBuffer%', true); +/** @type {undefined | ((receiver: ArrayBuffer) => number) | ((receiver: unknown) => never)} */ +var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true); +var $toString = callBound('Object.prototype.toString'); + +// in node 0.10, ArrayBuffers have no prototype methods, but have an own slot-checking `slice` method +var abSlice = !!$ArrayBuffer && !$byteLength && new $ArrayBuffer(0).slice; +var $abSlice = !!abSlice && callBind(abSlice); + +/** @type {import('.')} */ +module.exports = $byteLength || $abSlice + ? function isArrayBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + try { + if ($byteLength) { + // @ts-expect-error no idea why TS can't handle the overload + $byteLength(obj); + } else { + // @ts-expect-error TS chooses not to type-narrow inside a closure + $abSlice(obj, 0); + } + return true; + } catch (e) { + return false; + } + } + : $ArrayBuffer + // in node 0.8, ArrayBuffers have no prototype or own methods, but also no Symbol.toStringTag + ? function isArrayBuffer(obj) { + return $toString(obj) === '[object ArrayBuffer]'; + } + : function isArrayBuffer(obj) { // eslint-disable-line no-unused-vars + return false; + }; + + +/***/ }), + +/***/ 7442: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(3767); + +var callBind = __webpack_require__(4374); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 4374: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(7410); +var GetIntrinsic = __webpack_require__(3767); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 1818: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 7410: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(1818); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 3767: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(6945)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(7410); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 6945: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(6992); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 6992: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 5443: +/***/ (function(module) { + +"use strict"; + + +var fnToStr = Function.prototype.toString; +var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply; +var badArrayLike; +var isCallableMarker; +if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') { + try { + badArrayLike = Object.defineProperty({}, 'length', { + get: function () { + throw isCallableMarker; + } + }); + isCallableMarker = {}; + // eslint-disable-next-line no-throw-literal + reflectApply(function () { throw 42; }, null, badArrayLike); + } catch (_) { + if (_ !== isCallableMarker) { + reflectApply = null; + } + } +} else { + reflectApply = null; +} + +var constructorRegex = /^\s*class\b/; +var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; // not a function + } +}; + +var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { return false; } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var fnClass = '[object Function]'; +var genClass = '[object GeneratorFunction]'; +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + +module.exports = reflectApply + ? function isCallable(value) { + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (typeof value === 'function' && !value.prototype) { return true; } + try { + reflectApply(value, null, badArrayLike); + } catch (e) { + if (e !== isCallableMarker) { return false; } + } + return !isES6ClassFn(value); + } + : function isCallable(value) { + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (typeof value === 'function' && !value.prototype) { return true; } + if (hasToStringTag) { return tryFunctionObject(value); } + if (isES6ClassFn(value)) { return false; } + var strClass = toStr.call(value); + return strClass === fnClass || strClass === genClass; + }; + + +/***/ }), + +/***/ 8659: +/***/ (function(module) { + +"use strict"; + + +var getDay = Date.prototype.getDay; +var tryDateObject = function tryDateGetDayCall(value) { + try { + getDay.call(value); + return true; + } catch (e) { + return false; + } +}; + +var toStr = Object.prototype.toString; +var dateClass = '[object Date]'; +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + +module.exports = function isDateObject(value) { + if (typeof value !== 'object' || value === null) { + return false; + } + return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; +}; + + +/***/ }), + +/***/ 5604: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBound = __webpack_require__(6131); + +var $byteLength = callBound('SharedArrayBuffer.prototype.byteLength', true); + +/** @type {import('.')} */ +module.exports = $byteLength + ? function isSharedArrayBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + try { + $byteLength(obj); + return true; + } catch (e) { + return false; + } + } + : function isSharedArrayBuffer(obj) { // eslint-disable-line no-unused-vars + return false; + }; + + +/***/ }), + +/***/ 6131: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(6254); + +var callBind = __webpack_require__(7679); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 7679: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(578); +var GetIntrinsic = __webpack_require__(6254); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 901: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 578: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(901); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 6254: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(2665)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(578); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 2665: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(2408); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 2408: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 3082: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var toStr = Object.prototype.toString; +var hasSymbols = __webpack_require__(9905)(); + +if (hasSymbols) { + var symToStr = Symbol.prototype.toString; + var symStringRegex = /^Symbol\(.*\)$/; + var isSymbolObject = function isRealSymbolObject(value) { + if (typeof value.valueOf() !== 'symbol') { + return false; + } + return symStringRegex.test(symToStr.call(value)); + }; + + module.exports = function isSymbol(value) { + if (typeof value === 'symbol') { + return true; + } + if (toStr.call(value) !== '[object Symbol]') { + return false; + } + try { + return isSymbolObject(value); + } catch (e) { + return false; + } + }; +} else { + + module.exports = function isSymbol(value) { + // this environment does not support Symbols. + return false && 0; + }; +} + + +/***/ }), + +/***/ 2527: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var whichTypedArray = __webpack_require__(4010); + +/** @type {import('.')} */ +module.exports = function isTypedArray(value) { + return !!whichTypedArray(value); +}; + + /***/ }), /***/ 9894: @@ -2082,6 +5890,225 @@ normalizeWheel.getEventType = function() /*string*/ { module.exports = normalizeWheel; +/***/ }), + +/***/ 8383: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var keysShim; +if (!Object.keys) { + // modified from https://github.com/es-shims/es5-shim + var has = Object.prototype.hasOwnProperty; + var toStr = Object.prototype.toString; + var isArgs = __webpack_require__(4418); // eslint-disable-line global-require + var isEnumerable = Object.prototype.propertyIsEnumerable; + var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); + var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + var hasAutomationEqualityBug = (function () { + /* global window */ + if (typeof window === 'undefined') { return false; } + for (var k in window) { + try { + if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; + }()); + var equalsConstructorPrototypeIfNotBuggy = function (o) { + /* global window */ + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } + }; + + keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object'; + var isFunction = toStr.call(object) === '[object Function]'; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === '[object String]'; + var theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError('Object.keys called on a non-object'); + } + + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; + }; +} +module.exports = keysShim; + + +/***/ }), + +/***/ 806: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var slice = Array.prototype.slice; +var isArgs = __webpack_require__(4418); + +var origKeys = Object.keys; +var keysShim = origKeys ? function keys(o) { return origKeys(o); } : __webpack_require__(8383); + +var originalKeys = Object.keys; + +keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = (function () { + // Safari 5.0 bug + var args = Object.keys(arguments); + return args && args.length === arguments.length; + }(1, 2)); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { // eslint-disable-line func-name-matching + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; +}; + +module.exports = keysShim; + + +/***/ }), + +/***/ 4418: +/***/ (function(module) { + +"use strict"; + + +var toStr = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === '[object Arguments]'; + if (!isArgs) { + isArgs = str !== '[object Array]' && + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value.callee) === '[object Function]'; + } + return isArgs; +}; + + +/***/ }), + +/***/ 131: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('.')} */ +module.exports = [ + 'Float32Array', + 'Float64Array', + 'Int8Array', + 'Int16Array', + 'Int32Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Uint16Array', + 'Uint32Array', + 'BigInt64Array', + 'BigUint64Array' +]; + + /***/ }), /***/ 5372: @@ -2567,6 +6594,7 @@ var characterMap = { "ş": "s", "Š": "S", "š": "s", + "ß": "ss", "Ţ": "T", "ţ": "t", "ț": "t", @@ -2746,6 +6774,10 @@ var characterMap = { "x̧": "x", "Z̧": "Z", "z̧": "z", + "й":"и", + "Й":"И", + "ё":"е", + "Ё":"Е", }; var chars = Object.keys(characterMap).join('|'); @@ -2771,12 +6803,2753 @@ module.exports.remove = removeAccents; /***/ }), -/***/ 3124: +/***/ 3002: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(8024); +var $concat = GetIntrinsic('%Array.prototype.concat%'); + +var callBind = __webpack_require__(9386); + +var callBound = __webpack_require__(3315); +var $slice = callBound('Array.prototype.slice'); + +var hasSymbols = __webpack_require__(1489)(); +var isConcatSpreadable = hasSymbols && Symbol.isConcatSpreadable; + +/** @type {never[]} */ var empty = []; +var $concatApply = isConcatSpreadable ? callBind.apply($concat, empty) : null; + +// eslint-disable-next-line no-extra-parens +var isArray = isConcatSpreadable ? /** @type {(value: unknown) => value is unknown[]} */ (__webpack_require__(9277)) : null; + +/** @type {import('.')} */ +module.exports = isConcatSpreadable + // eslint-disable-next-line no-unused-vars + ? function safeArrayConcat(item) { + for (var i = 0; i < arguments.length; i += 1) { + /** @type {typeof item} */ var arg = arguments[i]; + // @ts-expect-error ts(2538) see https://github.com/microsoft/TypeScript/issues/9998#issuecomment-1890787975; works if `const` + if (arg && typeof arg === 'object' && typeof arg[isConcatSpreadable] === 'boolean') { + // @ts-expect-error ts(7015) TS doesn't yet support Symbol indexing + if (!empty[isConcatSpreadable]) { + // @ts-expect-error ts(7015) TS doesn't yet support Symbol indexing + empty[isConcatSpreadable] = true; + } + // @ts-expect-error ts(2721) ts(18047) not sure why TS can't figure out this can't be null + var arr = isArray(arg) ? $slice(arg) : [arg]; + // @ts-expect-error ts(7015) TS can't handle expandos on an array + arr[isConcatSpreadable] = true; // shadow the property. TODO: use [[Define]] + arguments[i] = arr; + } + } + // @ts-expect-error ts(2345) https://github.com/microsoft/TypeScript/issues/57164 TS doesn't understand that apply can take an arguments object + return $concatApply(arguments); + } + : callBind($concat, empty); + + +/***/ }), + +/***/ 3315: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(8024); + +var callBind = __webpack_require__(9386); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 9386: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(5127); +var GetIntrinsic = __webpack_require__(8024); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 6850: /***/ (function(module) { "use strict"; +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 5127: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(6850); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 8024: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(330)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(5127); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 330: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(1489); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 1489: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 9277: +/***/ (function(module) { + +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; + + +/***/ }), + +/***/ 1312: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBound = __webpack_require__(2137); +var isRegex = __webpack_require__(6073); + +var $exec = callBound('RegExp.prototype.exec'); +var $TypeError = __webpack_require__(1642); + +module.exports = function regexTester(regex) { + if (!isRegex(regex)) { + throw new $TypeError('`regex` must be a RegExp'); + } + return function test(s) { + return $exec(regex, s) !== null; + }; +}; + + +/***/ }), + +/***/ 2137: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(5273); + +var callBind = __webpack_require__(381); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 381: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(3331); +var GetIntrinsic = __webpack_require__(5273); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 7780: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 3331: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(7780); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 5273: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(6339)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(3331); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 6339: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(6789); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 6789: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 6073: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBound = __webpack_require__(2137); +var hasToStringTag = __webpack_require__(4111)(); +var has; +var $exec; +var isRegexMarker; +var badStringifier; + +if (hasToStringTag) { + has = callBound('Object.prototype.hasOwnProperty'); + $exec = callBound('RegExp.prototype.exec'); + isRegexMarker = {}; + + var throwRegexMarker = function () { + throw isRegexMarker; + }; + badStringifier = { + toString: throwRegexMarker, + valueOf: throwRegexMarker + }; + + if (typeof Symbol.toPrimitive === 'symbol') { + badStringifier[Symbol.toPrimitive] = throwRegexMarker; + } +} + +var $toString = callBound('Object.prototype.toString'); +var gOPD = Object.getOwnPropertyDescriptor; +var regexClass = '[object RegExp]'; + +module.exports = hasToStringTag + // eslint-disable-next-line consistent-return + ? function isRegex(value) { + if (!value || typeof value !== 'object') { + return false; + } + + var descriptor = gOPD(value, 'lastIndex'); + var hasLastIndexDataProperty = descriptor && has(descriptor, 'value'); + if (!hasLastIndexDataProperty) { + return false; + } + + try { + $exec(value, badStringifier); + } catch (e) { + return e === isRegexMarker; + } + } + : function isRegex(value) { + // In older browsers, typeof regex incorrectly returns 'function' + if (!value || (typeof value !== 'object' && typeof value !== 'function')) { + return false; + } + + return $toString(value) === regexClass; + }; + + +/***/ }), + +/***/ 4521: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(1757); +var define = __webpack_require__(2656); +var hasDescriptors = __webpack_require__(8198)(); +var gOPD = __webpack_require__(3828); + +var $TypeError = __webpack_require__(1642); +var $floor = GetIntrinsic('%Math.floor%'); + +/** @type {import('.')} */ +module.exports = function setFunctionLength(fn, length) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { + throw new $TypeError('`length` must be a positive 32-bit integer'); + } + + var loose = arguments.length > 2 && !!arguments[2]; + + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ('length' in fn && gOPD) { + var desc = gOPD(fn, 'length'); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } + + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define(/** @type {Parameters[0]} */ (fn), 'length', length, true, true); + } else { + define(/** @type {Parameters[0]} */ (fn), 'length', length); + } + } + return fn; +}; + + +/***/ }), + +/***/ 5371: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 9015: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(5371); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 1757: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(1207)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(9015); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 1207: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(2326); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 2326: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 5467: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var RequireObjectCoercible = __webpack_require__(7998); +var ToString = __webpack_require__(6245); +var callBound = __webpack_require__(6907); +var $replace = callBound('String.prototype.replace'); + +var mvsIsWS = (/^\s$/).test('\u180E'); +/* eslint-disable no-control-regex */ +var leftWhitespace = mvsIsWS + ? /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/ + : /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/; +var rightWhitespace = mvsIsWS + ? /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/ + : /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/; +/* eslint-enable no-control-regex */ + +module.exports = function trim() { + var S = ToString(RequireObjectCoercible(this)); + return $replace($replace(S, leftWhitespace, ''), rightWhitespace, ''); +}; + + +/***/ }), + +/***/ 4113: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBind = __webpack_require__(7618); +var define = __webpack_require__(5213); +var RequireObjectCoercible = __webpack_require__(7998); + +var implementation = __webpack_require__(5467); +var getPolyfill = __webpack_require__(5626); +var shim = __webpack_require__(1029); + +var bound = callBind(getPolyfill()); +var boundMethod = function trim(receiver) { + RequireObjectCoercible(receiver); + return bound(receiver); +}; + +define(boundMethod, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = boundMethod; + + +/***/ }), + +/***/ 6907: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(5037); + +var callBind = __webpack_require__(7618); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 7618: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(1769); +var GetIntrinsic = __webpack_require__(5037); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 5213: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var keys = __webpack_require__(806); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; + +var toStr = Object.prototype.toString; +var concat = Array.prototype.concat; +var defineDataProperty = __webpack_require__(2656); + +var isFunction = function (fn) { + return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; +}; + +var supportsDescriptors = __webpack_require__(8198)(); + +var defineProperty = function (object, name, value, predicate) { + if (name in object) { + if (predicate === true) { + if (object[name] === value) { + return; + } + } else if (!isFunction(predicate) || !predicate()) { + return; + } + } + + if (supportsDescriptors) { + defineDataProperty(object, name, value, true); + } else { + defineDataProperty(object, name, value); + } +}; + +var defineProperties = function (object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } +}; + +defineProperties.supportsDescriptors = !!supportsDescriptors; + +module.exports = defineProperties; + + +/***/ }), + +/***/ 1032: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 1769: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(1032); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 5037: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(5570)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(1769); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 5570: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(5889); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 5889: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 5626: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(5467); + +var zeroWidthSpace = '\u200b'; +var mongolianVowelSeparator = '\u180E'; + +module.exports = function getPolyfill() { + if ( + String.prototype.trim + && zeroWidthSpace.trim() === zeroWidthSpace + && mongolianVowelSeparator.trim() === mongolianVowelSeparator + && ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator) + && (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_') + ) { + return String.prototype.trim; + } + return implementation; +}; + + +/***/ }), + +/***/ 1029: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__(5213); +var getPolyfill = __webpack_require__(5626); + +module.exports = function shimStringTrim() { + var polyfill = getPolyfill(); + define(String.prototype, { trim: polyfill }, { + trim: function testTrim() { + return String.prototype.trim !== polyfill; + } + }); + return polyfill; +}; + + +/***/ }), + +/***/ 3124: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var whichTypedArray = __webpack_require__(4010); +var taSlice = __webpack_require__(1140); +var gopd = __webpack_require__(3828); + // TODO: use call-bind, is-date, is-regex, is-string, is-boolean-object, is-number-object function toS(obj) { return Object.prototype.toString.call(obj); } function isDate(obj) { return toS(obj) === '[object Date]'; } @@ -2807,12 +9580,39 @@ var objectKeys = Object.keys || function keys(obj) { return res; }; +var propertyIsEnumerable = Object.prototype.propertyIsEnumerable; +var getOwnPropertySymbols = Object.getOwnPropertySymbols; // eslint-disable-line id-length + +// TODO: use reflect.ownkeys and filter out non-enumerables +function ownEnumerableKeys(obj) { + var res = objectKeys(obj); + + // Include enumerable symbol properties. + if (getOwnPropertySymbols) { + var symbols = getOwnPropertySymbols(obj); + for (var i = 0; i < symbols.length; i++) { + if (propertyIsEnumerable.call(obj, symbols[i])) { + res.push(symbols[i]); + } + } + } + return res; +} + // TODO: use object.hasown var hasOwnProperty = Object.prototype.hasOwnProperty || function (obj, key) { return key in obj; }; -function copy(src) { +function isWritable(object, key) { + if (typeof gopd !== 'function') { + return true; + } + + return !gopd(object, key).writable; +} + +function copy(src, options) { if (typeof src === 'object' && src !== null) { var dst; @@ -2826,20 +9626,26 @@ function copy(src) { dst = { message: src.message }; } else if (isBoolean(src) || isNumber(src) || isString(src)) { dst = Object(src); - } else if (Object.create && Object.getPrototypeOf) { - dst = Object.create(Object.getPrototypeOf(src)); - } else if (src.constructor === Object) { - dst = {}; } else { - var proto = (src.constructor && src.constructor.prototype) - || src.__proto__ - || {}; - var T = function T() {}; // eslint-disable-line func-style, func-name-matching - T.prototype = proto; - dst = new T(); + var ta = whichTypedArray(src); + if (ta) { + return taSlice(src); + } else if (Object.create && Object.getPrototypeOf) { + dst = Object.create(Object.getPrototypeOf(src)); + } else if (src.constructor === Object) { + dst = {}; + } else { + var proto = (src.constructor && src.constructor.prototype) + || src.__proto__ + || {}; + var T = function T() {}; // eslint-disable-line func-style, func-name-matching + T.prototype = proto; + dst = new T(); + } } - forEach(objectKeys(src), function (key) { + var iteratorFunction = options.includeSymbols ? ownEnumerableKeys : objectKeys; + forEach(iteratorFunction(src), function (key) { dst[key] = src[key]; }); return dst; @@ -2847,13 +9653,19 @@ function copy(src) { return src; } -function walk(root, cb, immutable) { +/** @type {TraverseOptions} */ +var emptyNull = { __proto__: null }; + +function walk(root, cb) { var path = []; var parents = []; var alive = true; + var options = arguments.length > 2 ? arguments[2] : emptyNull; + var iteratorFunction = options.includeSymbols ? ownEnumerableKeys : objectKeys; + var immutable = !!options.immutable; return (function walker(node_) { - var node = immutable ? copy(node_) : node_; + var node = immutable ? copy(node_, options) : node_; var modifiers = {}; var keepGoing = true; @@ -2901,7 +9713,7 @@ function walk(root, cb, immutable) { function updateState() { if (typeof state.node === 'object' && state.node !== null) { if (!state.keys || state.node_ !== state.node) { - state.keys = objectKeys(state.node); + state.keys = iteratorFunction(state.node); } state.isLeaf = state.keys.length === 0; @@ -2946,7 +9758,11 @@ function walk(root, cb, immutable) { if (modifiers.pre) { modifiers.pre.call(state, state.node[key], key); } var child = walker(state.node[key]); - if (immutable && hasOwnProperty.call(state.node, key)) { + if ( + immutable + && hasOwnProperty.call(state.node, key) + && !isWritable(state.node, key) + ) { state.node[key] = child.node; } @@ -2966,15 +9782,29 @@ function walk(root, cb, immutable) { }(root)).node; } +/** @typedef {{ immutable?: boolean, includeSymbols?: boolean }} TraverseOptions */ + +/** + * A traverse constructor + * @param {object} obj - the object to traverse + * @param {TraverseOptions | undefined} [options] - options for the traverse + * @constructor + */ function Traverse(obj) { + /** @type {TraverseOptions} */ + this.options = arguments.length > 1 ? arguments[1] : emptyNull; this.value = obj; } +/** @type {(ps: PropertyKey[]) => Traverse['value']} */ Traverse.prototype.get = function (ps) { var node = this.value; - for (var i = 0; i < ps.length; i++) { + for (var i = 0; node && i < ps.length; i++) { var key = ps[i]; - if (!node || !hasOwnProperty.call(node, key)) { + if ( + !hasOwnProperty.call(node, key) + || (!this.options.includeSymbols && typeof key === 'symbol') + ) { return void undefined; } node = node[key]; @@ -2982,11 +9812,12 @@ Traverse.prototype.get = function (ps) { return node; }; +/** @type {(ps: PropertyKey[]) => boolean} */ Traverse.prototype.has = function (ps) { var node = this.value; - for (var i = 0; i < ps.length; i++) { + for (var i = 0; node && i < ps.length; i++) { var key = ps[i]; - if (!node || !hasOwnProperty.call(node, key)) { + if (!hasOwnProperty.call(node, key) || (!this.options.includeSymbols && typeof key === 'symbol')) { return false; } node = node[key]; @@ -3006,11 +9837,11 @@ Traverse.prototype.set = function (ps, value) { }; Traverse.prototype.map = function (cb) { - return walk(this.value, cb, true); + return walk(this.value, cb, { __proto__: null, immutable: true, includeSymbols: !!this.options.includeSymbols }); }; Traverse.prototype.forEach = function (cb) { - this.value = walk(this.value, cb, false); + this.value = walk(this.value, cb, this.options); return this.value; }; @@ -3044,6 +9875,11 @@ Traverse.prototype.nodes = function () { Traverse.prototype.clone = function () { var parents = []; var nodes = []; + var options = this.options; + + if (whichTypedArray(this.value)) { + return taSlice(this.value); + } return (function clone(src) { for (var i = 0; i < parents.length; i++) { @@ -3053,12 +9889,13 @@ Traverse.prototype.clone = function () { } if (typeof src === 'object' && src !== null) { - var dst = copy(src); + var dst = copy(src, options); parents.push(src); nodes.push(dst); - forEach(objectKeys(src), function (key) { + var iteratorFunction = options.includeSymbols ? ownEnumerableKeys : objectKeys; + forEach(iteratorFunction(src), function (key) { dst[key] = clone(src[key]); }); @@ -3072,12 +9909,14 @@ Traverse.prototype.clone = function () { }(this.value)); }; +/** @type {(obj: object, options?: TraverseOptions) => Traverse} */ function traverse(obj) { - return new Traverse(obj); + var options = arguments.length > 1 ? arguments[1] : emptyNull; + return new Traverse(obj, options); } // TODO: replace with object.assign? -forEach(objectKeys(Traverse.prototype), function (key) { +forEach(ownEnumerableKeys(Traverse.prototype), function (key) { traverse[key] = function (obj) { var args = [].slice.call(arguments, 1); var t = new Traverse(obj); @@ -3088,6 +9927,4193 @@ forEach(objectKeys(Traverse.prototype), function (key) { module.exports = traverse; +/***/ }), + +/***/ 6740: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var callBound = __webpack_require__(6798); + +var $typedArrayBuffer = callBound('TypedArray.prototype.buffer', true); + +var isTypedArray = __webpack_require__(2527); + +/** @type {import('.')} */ +// node <= 0.10, < 0.11.4 has a nonconfigurable own property instead of a prototype getter +module.exports = $typedArrayBuffer || function typedArrayBuffer(x) { + if (!isTypedArray(x)) { + throw new $TypeError('Not a Typed Array'); + } + return x.buffer; +}; + + +/***/ }), + +/***/ 6798: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(1634); + +var callBind = __webpack_require__(8388); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 8388: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(7715); +var GetIntrinsic = __webpack_require__(1634); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 9003: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 7715: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(9003); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 1634: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(263)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(7715); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 263: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(9184); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 9184: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 7046: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var forEach = __webpack_require__(4843); +var callBind = __webpack_require__(2526); + +var typedArrays = __webpack_require__(4343)(); + +/** @typedef {Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array} TypedArray */ +/** @typedef {(x: TypedArray) => number} ByteOffsetGetter */ + +/** @type {Object.} */ +var getters = {}; +var hasProto = __webpack_require__(1856)(); + +var gOPD = __webpack_require__(3828); +var oDP = Object.defineProperty; +if (gOPD) { + /** @type {ByteOffsetGetter} */ + var getByteOffset = function (x) { + return x.byteOffset; + }; + forEach(typedArrays, function (typedArray) { + // In Safari 7, Typed Array constructors are typeof object + if (typeof __webpack_require__.g[typedArray] === 'function' || typeof __webpack_require__.g[typedArray] === 'object') { + var Proto = __webpack_require__.g[typedArray].prototype; + // @ts-expect-error TS can't guarantee the callback is invoked sync + var descriptor = gOPD(Proto, 'byteOffset'); + if (!descriptor && hasProto) { + // @ts-expect-error hush, TS, every object has a dunder proto + var superProto = Proto.__proto__; // eslint-disable-line no-proto + // @ts-expect-error TS can't guarantee the callback is invoked sync + descriptor = gOPD(superProto, 'byteOffset'); + } + // Opera 12.16 has a magic byteOffset data property on instances AND on Proto + if (descriptor && descriptor.get) { + getters[typedArray] = callBind(descriptor.get); + } else if (oDP) { + // this is likely an engine where instances have a magic byteOffset data property + var arr = new __webpack_require__.g[typedArray](2); + // @ts-expect-error TS can't guarantee the callback is invoked sync + descriptor = gOPD(arr, 'byteOffset'); + if (descriptor && descriptor.configurable) { + oDP(arr, 'length', { value: 3 }); + } + if (arr.length === 2) { + getters[typedArray] = getByteOffset; + } + } + } + }); +} + +/** @type {ByteOffsetGetter} */ +var tryTypedArrays = function tryAllTypedArrays(value) { + /** @type {number} */ var foundOffset; + forEach(getters, /** @type {(getter: ByteOffsetGetter) => void} */ function (getter) { + if (typeof foundOffset !== 'number') { + try { + var offset = getter(value); + if (typeof offset === 'number') { + foundOffset = offset; + } + } catch (e) {} + } + }); + // @ts-expect-error TS can't guarantee the callback is invoked sync + return foundOffset; +}; + +var isTypedArray = __webpack_require__(2527); + +/** @type {import('.')} */ +module.exports = function typedArrayByteOffset(value) { + if (!isTypedArray(value)) { + return false; + } + return tryTypedArrays(value); +}; + + +/***/ }), + +/***/ 2526: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(1530); +var GetIntrinsic = __webpack_require__(3699); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 1609: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 1530: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(1609); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 3699: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(5162)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(1530); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 5162: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(3903); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 3903: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 8150: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// / + +var callBind = __webpack_require__(4888); +var forEach = __webpack_require__(4843); +var gOPD = __webpack_require__(3828); +var hasProto = __webpack_require__(1856)(); +var isTypedArray = __webpack_require__(2527); +var typedArrays = __webpack_require__(131); + +/** @typedef {(value: import('.').TypedArray) => number} TypedArrayLengthGetter */ +/** @typedef {{ [k in `$${import('.').TypedArrayName}` | '__proto__']: k extends '__proto__' ? null : TypedArrayLengthGetter }} Cache */ + +/** @type {Cache} */ +// @ts-expect-error TS doesn't seem to have a "will eventually satisfy" type +var getters = { __proto__: null }; +var oDP = Object.defineProperty; +if (gOPD) { + var getLength = /** @type {TypedArrayLengthGetter} */ function (x) { + return x.length; + }; + forEach(typedArrays, /** @type {(typedArray: import('.').TypedArrayName) => void} */ function (typedArray) { + var TA = __webpack_require__.g[typedArray]; + // In Safari 7, Typed Array constructors are typeof object + if (typeof TA === 'function' || typeof TA === 'object') { + var Proto = TA.prototype; + // @ts-expect-error TS doesn't narrow types inside callbacks, which is weird + var descriptor = gOPD(Proto, 'length'); + if (!descriptor && hasProto) { + var superProto = Proto.__proto__; // eslint-disable-line no-proto + // @ts-expect-error TS doesn't narrow types inside callbacks, which is weird + descriptor = gOPD(superProto, 'length'); + } + // Opera 12.16 has a magic length data property on instances AND on Proto + if (descriptor && descriptor.get) { + // eslint-disable-next-line no-extra-parens + getters[/** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray)] = callBind(descriptor.get); + } else if (oDP) { + // this is likely an engine where instances have a magic length data property + var arr = new __webpack_require__.g[typedArray](2); + // @ts-expect-error TS doesn't narrow types inside callbacks, which is weird + descriptor = gOPD(arr, 'length'); + if (descriptor && descriptor.configurable) { + oDP(arr, 'length', { value: 3 }); + } + if (arr.length === 2) { + // eslint-disable-next-line no-extra-parens + getters[/** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray)] = getLength; + } + } + } + }); +} + +/** @type {TypedArrayLengthGetter} */ +var tryTypedArrays = function tryAllTypedArrays(value) { + /** @type {number} */ var foundLength; + // @ts-expect-error not sure why this won't work + forEach(getters, /** @type {(getter: TypedArrayLengthGetter) => void} */ function (getter) { + if (typeof foundLength !== 'number') { + try { + var length = getter(value); + if (typeof length === 'number') { + foundLength = length; + } + } catch (e) {} + } + }); + // @ts-expect-error TS can't guarantee the above callback is invoked sync + return foundLength; +}; + +/** @type {import('.')} */ +module.exports = function typedArrayLength(value) { + if (!isTypedArray(value)) { + return false; + } + return tryTypedArrays(value); +}; + + +/***/ }), + +/***/ 4888: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(3576); +var GetIntrinsic = __webpack_require__(8031); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 7380: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 3576: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(7380); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 8031: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(307)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(3576); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 307: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(1766); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 1766: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 4073: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var Get = __webpack_require__(3675); +var GetValueFromBuffer = __webpack_require__(9661); +var IsDetachedBuffer = __webpack_require__(1320); +var max = __webpack_require__(1367); +var min = __webpack_require__(2967); +var Set = __webpack_require__(8055); +var SetValueInBuffer = __webpack_require__(3383); +var ToIntegerOrInfinity = __webpack_require__(2897); +var ToString = __webpack_require__(7249); +var TypedArrayElementSize = __webpack_require__(9149); +var TypedArrayElementType = __webpack_require__(1586); +var TypedArraySpeciesCreate = __webpack_require__(817); +var ValidateTypedArray = __webpack_require__(3842); + +var typedArrayBuffer = __webpack_require__(6740); +var typedArrayByteOffset = __webpack_require__(7046); + +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice + +module.exports = function slice(start, end) { + var O = this; // step 1 + + ValidateTypedArray(O, 'SEQ-CST'); // step 2 + + // 3. Let len be O.[[ArrayLength]]. + var len = O.length; // steps 3 + + var relativeStart = ToIntegerOrInfinity(start); // step 4 + + var k; + if (relativeStart === -Infinity) { + k = 0; // step 5 + } else if (relativeStart < 0) { + k = max(len + relativeStart, 0); // step 6 + } else { + k = min(relativeStart, len); // step 7 + } + + var relativeEnd = typeof end === 'undefined' ? len : ToIntegerOrInfinity(end); // step 8 + + var final; + if (relativeEnd === -Infinity) { + final = 0; // step 9 + } else if (relativeEnd < 0) { + final = max(len + relativeEnd, 0); // step 10 + } else { + final = min(relativeEnd, len); // step 11 + } + + var count = max(final - k, 0); // step 12 + + var A = TypedArraySpeciesCreate(O, [count]); // step 13 + + if (count > 0) { // step 14 + if (IsDetachedBuffer(typedArrayBuffer(O))) { + throw new $TypeError('Cannot use a Typed Array with an underlying ArrayBuffer that is detached'); // step 14.a + } + var srcType = TypedArrayElementType(O); // step 14.b + var targetType = TypedArrayElementType(A); // step 14.c + if (srcType === targetType) { // step 14.d + // 1. NOTE: The transfer must be performed in a manner that preserves the bit-level encoding of the source data. + var srcBuffer = typedArrayBuffer(O); // step 14.d.ii + var targetBuffer = typedArrayBuffer(A); // step 14.d.iii + var elementSize = TypedArrayElementSize(O); // step 14.d.iv + var srcByteOffset = typedArrayByteOffset(O); // step 14.d.v + var srcByteIndex = (k * elementSize) + srcByteOffset; // step 14.d.vi + var targetByteIndex = typedArrayByteOffset(A); // step 14.d.vii + var limit = targetByteIndex + (count * elementSize); // step 14.d.viii + while (targetByteIndex < limit) { // step 14.d.ix + var value = GetValueFromBuffer(srcBuffer, srcByteIndex, 'UINT8', true, 'UNORDERED'); // step 14.d.ix.1 + SetValueInBuffer(targetBuffer, targetByteIndex, 'UINT8', value, true, 'UNORDERED'); // step 14.d.ix.2 + srcByteIndex += 1; // step 14.d.ix.3 + targetByteIndex += 1; // step 14.d.ix.4 + } + } else { // step 14.e + var n = 0; // step 14.e.i + while (k < final) { // step 14.e.ii + var Pk = ToString(k); // step 14.e.ii.1 + var kValue = Get(O, Pk); // step 14.e.ii.2 + Set(A, ToString(n), kValue, true); // step 14.e.ii.3 + k += 1; // step 14.e.ii.4 + n += 1; // step 14.e.ii.5 + } + } + } + + return A; // step 15 +}; + + +/***/ }), + +/***/ 1140: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__(6776); +var callBind = __webpack_require__(8374); + +var implementation = __webpack_require__(4073); +var getPolyfill = __webpack_require__(5046); +var shim = __webpack_require__(8564); + +var bound = callBind(getPolyfill()); + +define(bound, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = bound; + + +/***/ }), + +/***/ 1154: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var callBind = __webpack_require__(8374); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 8374: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(8474); +var GetIntrinsic = __webpack_require__(682); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 6776: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var keys = __webpack_require__(806); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; + +var toStr = Object.prototype.toString; +var concat = Array.prototype.concat; +var defineDataProperty = __webpack_require__(2656); + +var isFunction = function (fn) { + return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; +}; + +var supportsDescriptors = __webpack_require__(8198)(); + +var defineProperty = function (object, name, value, predicate) { + if (name in object) { + if (predicate === true) { + if (object[name] === value) { + return; + } + } else if (!isFunction(predicate) || !predicate()) { + return; + } + } + + if (supportsDescriptors) { + defineDataProperty(object, name, value, true); + } else { + defineDataProperty(object, name, value); + } +}; + +var defineProperties = function (object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } +}; + +defineProperties.supportsDescriptors = !!supportsDescriptors; + +module.exports = defineProperties; + + +/***/ }), + +/***/ 2855: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 8474: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(2855); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 682: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(5314)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(8474); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 5314: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(6188); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 6188: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 6841: +/***/ (function(module) { + +"use strict"; + + +var fnToStr = Function.prototype.toString; +var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply; +var badArrayLike; +var isCallableMarker; +if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') { + try { + badArrayLike = Object.defineProperty({}, 'length', { + get: function () { + throw isCallableMarker; + } + }); + isCallableMarker = {}; + // eslint-disable-next-line no-throw-literal + reflectApply(function () { throw 42; }, null, badArrayLike); + } catch (_) { + if (_ !== isCallableMarker) { + reflectApply = null; + } + } +} else { + reflectApply = null; +} + +var constructorRegex = /^\s*class\b/; +var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; // not a function + } +}; + +var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { return false; } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var objectClass = '[object Object]'; +var fnClass = '[object Function]'; +var genClass = '[object GeneratorFunction]'; +var ddaClass = '[object HTMLAllCollection]'; // IE 11 +var ddaClass2 = '[object HTML document.all class]'; +var ddaClass3 = '[object HTMLCollection]'; // IE 9-10 +var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag` + +var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing + +var isDDA = function isDocumentDotAll() { return false; }; +if (typeof document === 'object') { + // Firefox 3 canonicalizes DDA to undefined when it's not accessed directly + var all = document.all; + if (toStr.call(all) === toStr.call(document.all)) { + isDDA = function isDocumentDotAll(value) { + /* globals document: false */ + // in IE 6-8, typeof document.all is "object" and it's truthy + if ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) { + try { + var str = toStr.call(value); + return ( + str === ddaClass + || str === ddaClass2 + || str === ddaClass3 // opera 12.16 + || str === objectClass // IE 6-8 + ) && value('') == null; // eslint-disable-line eqeqeq + } catch (e) { /**/ } + } + return false; + }; + } +} + +module.exports = reflectApply + ? function isCallable(value) { + if (isDDA(value)) { return true; } + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + try { + reflectApply(value, null, badArrayLike); + } catch (e) { + if (e !== isCallableMarker) { return false; } + } + return !isES6ClassFn(value) && tryFunctionObject(value); + } + : function isCallable(value) { + if (isDDA(value)) { return true; } + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (hasToStringTag) { return tryFunctionObject(value); } + if (isES6ClassFn(value)) { return false; } + var strClass = toStr.call(value); + if (strClass !== fnClass && strClass !== genClass && !(/^\[object HTML/).test(strClass)) { return false; } + return tryFunctionObject(value); + }; + + +/***/ }), + +/***/ 5726: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var hasMap = typeof Map === 'function' && Map.prototype; +var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; +var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; +var mapForEach = hasMap && Map.prototype.forEach; +var hasSet = typeof Set === 'function' && Set.prototype; +var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; +var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; +var setForEach = hasSet && Set.prototype.forEach; +var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; +var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; +var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; +var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; +var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; +var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; +var booleanValueOf = Boolean.prototype.valueOf; +var objectToString = Object.prototype.toString; +var functionToString = Function.prototype.toString; +var $match = String.prototype.match; +var $slice = String.prototype.slice; +var $replace = String.prototype.replace; +var $toUpperCase = String.prototype.toUpperCase; +var $toLowerCase = String.prototype.toLowerCase; +var $test = RegExp.prototype.test; +var $concat = Array.prototype.concat; +var $join = Array.prototype.join; +var $arrSlice = Array.prototype.slice; +var $floor = Math.floor; +var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; +var gOPS = Object.getOwnPropertySymbols; +var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; +var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; +// ie, `has-tostringtag/shams +var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') + ? Symbol.toStringTag + : null; +var isEnumerable = Object.prototype.propertyIsEnumerable; + +var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( + [].__proto__ === Array.prototype // eslint-disable-line no-proto + ? function (O) { + return O.__proto__; // eslint-disable-line no-proto + } + : null +); + +function addNumericSeparator(num, str) { + if ( + num === Infinity + || num === -Infinity + || num !== num + || (num && num > -1000 && num < 1000) + || $test.call(/e/, str) + ) { + return str; + } + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num === 'number') { + var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) + if (int !== num) { + var intStr = String(int); + var dec = $slice.call(str, intStr.length + 1); + return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); + } + } + return $replace.call(str, sepRegex, '$&_'); +} + +var utilInspect = __webpack_require__(5794); +var inspectCustom = utilInspect.custom; +var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; + +module.exports = function inspect_(obj, options, depth, seen) { + var opts = options || {}; + + if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); + } + if ( + has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' + ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity + : opts.maxStringLength !== null + ) + ) { + throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); + } + var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; + if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { + throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); + } + + if ( + has(opts, 'indent') + && opts.indent !== null + && opts.indent !== '\t' + && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) + ) { + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + } + if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + } + var numericSeparator = opts.numericSeparator; + + if (typeof obj === 'undefined') { + return 'undefined'; + } + if (obj === null) { + return 'null'; + } + if (typeof obj === 'boolean') { + return obj ? 'true' : 'false'; + } + + if (typeof obj === 'string') { + return inspectString(obj, opts); + } + if (typeof obj === 'number') { + if (obj === 0) { + return Infinity / obj > 0 ? '0' : '-0'; + } + var str = String(obj); + return numericSeparator ? addNumericSeparator(obj, str) : str; + } + if (typeof obj === 'bigint') { + var bigIntStr = String(obj) + 'n'; + return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + } + + var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; + if (typeof depth === 'undefined') { depth = 0; } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { + return isArray(obj) ? '[Array]' : '[Object]'; + } + + var indent = getIndent(opts, depth); + + if (typeof seen === 'undefined') { + seen = []; + } else if (indexOf(seen, obj) >= 0) { + return '[Circular]'; + } + + function inspect(value, from, noIndent) { + if (from) { + seen = $arrSlice.call(seen); + seen.push(from); + } + if (noIndent) { + var newOpts = { + depth: opts.depth + }; + if (has(opts, 'quoteStyle')) { + newOpts.quoteStyle = opts.quoteStyle; + } + return inspect_(value, newOpts, depth + 1, seen); + } + return inspect_(value, opts, depth + 1, seen); + } + + if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable + var name = nameOf(obj); + var keys = arrObjKeys(obj, inspect); + return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); + return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement(obj)) { + var s = '<' + $toLowerCase.call(String(obj.nodeName)); + var attrs = obj.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); + } + s += '>'; + if (obj.childNodes && obj.childNodes.length) { s += '...'; } + s += ''; + return s; + } + if (isArray(obj)) { + if (obj.length === 0) { return '[]'; } + var xs = arrObjKeys(obj, inspect); + if (indent && !singleLineValues(xs)) { + return '[' + indentedJoin(xs, indent) + ']'; + } + return '[ ' + $join.call(xs, ', ') + ' ]'; + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect); + if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { + return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; + } + if (parts.length === 0) { return '[' + String(obj) + ']'; } + return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; + } + if (typeof obj === 'object' && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { + return utilInspect(obj, { depth: maxDepth - depth }); + } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + if (mapForEach) { + mapForEach.call(obj, function (value, key) { + mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); + }); + } + return collectionOf('Map', mapSize.call(obj), mapParts, indent); + } + if (isSet(obj)) { + var setParts = []; + if (setForEach) { + setForEach.call(obj, function (value) { + setParts.push(inspect(value, obj)); + }); + } + return collectionOf('Set', setSize.call(obj), setParts, indent); + } + if (isWeakMap(obj)) { + return weakCollectionOf('WeakMap'); + } + if (isWeakSet(obj)) { + return weakCollectionOf('WeakSet'); + } + if (isWeakRef(obj)) { + return weakCollectionOf('WeakRef'); + } + if (isNumber(obj)) { + return markBoxed(inspect(Number(obj))); + } + if (isBigInt(obj)) { + return markBoxed(inspect(bigIntValueOf.call(obj))); + } + if (isBoolean(obj)) { + return markBoxed(booleanValueOf.call(obj)); + } + if (isString(obj)) { + return markBoxed(inspect(String(obj))); + } + // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other + /* eslint-env browser */ + if (typeof window !== 'undefined' && obj === window) { + return '{ [object Window] }'; + } + if (obj === __webpack_require__.g) { + return '{ [object globalThis] }'; + } + if (!isDate(obj) && !isRegExp(obj)) { + var ys = arrObjKeys(obj, inspect); + var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; + var protoTag = obj instanceof Object ? '' : 'null prototype'; + var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; + var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; + var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); + if (ys.length === 0) { return tag + '{}'; } + if (indent) { + return tag + '{' + indentedJoin(ys, indent) + '}'; + } + return tag + '{ ' + $join.call(ys, ', ') + ' }'; + } + return String(obj); +}; + +function wrapQuotes(s, defaultStyle, opts) { + var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; + return quoteChar + s + quoteChar; +} + +function quote(s) { + return $replace.call(String(s), /"/g, '"'); +} + +function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } + +// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives +function isSymbol(obj) { + if (hasShammedSymbols) { + return obj && typeof obj === 'object' && obj instanceof Symbol; + } + if (typeof obj === 'symbol') { + return true; + } + if (!obj || typeof obj !== 'object' || !symToString) { + return false; + } + try { + symToString.call(obj); + return true; + } catch (e) {} + return false; +} + +function isBigInt(obj) { + if (!obj || typeof obj !== 'object' || !bigIntValueOf) { + return false; + } + try { + bigIntValueOf.call(obj); + return true; + } catch (e) {} + return false; +} + +var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; +function has(obj, key) { + return hasOwn.call(obj, key); +} + +function toStr(obj) { + return objectToString.call(obj); +} + +function nameOf(f) { + if (f.name) { return f.name; } + var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); + if (m) { return m[1]; } + return null; +} + +function indexOf(xs, x) { + if (xs.indexOf) { return xs.indexOf(x); } + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) { return i; } + } + return -1; +} + +function isMap(x) { + if (!mapSize || !x || typeof x !== 'object') { + return false; + } + try { + mapSize.call(x); + try { + setSize.call(x); + } catch (s) { + return true; + } + return x instanceof Map; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakMap(x) { + if (!weakMapHas || !x || typeof x !== 'object') { + return false; + } + try { + weakMapHas.call(x, weakMapHas); + try { + weakSetHas.call(x, weakSetHas); + } catch (s) { + return true; + } + return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakRef(x) { + if (!weakRefDeref || !x || typeof x !== 'object') { + return false; + } + try { + weakRefDeref.call(x); + return true; + } catch (e) {} + return false; +} + +function isSet(x) { + if (!setSize || !x || typeof x !== 'object') { + return false; + } + try { + setSize.call(x); + try { + mapSize.call(x); + } catch (m) { + return true; + } + return x instanceof Set; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakSet(x) { + if (!weakSetHas || !x || typeof x !== 'object') { + return false; + } + try { + weakSetHas.call(x, weakSetHas); + try { + weakMapHas.call(x, weakMapHas); + } catch (s) { + return true; + } + return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isElement(x) { + if (!x || typeof x !== 'object') { return false; } + if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { + return true; + } + return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; +} + +function inspectString(str, opts) { + if (str.length > opts.maxStringLength) { + var remaining = str.length - opts.maxStringLength; + var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); + return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; + } + // eslint-disable-next-line no-control-regex + var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s, 'single', opts); +} + +function lowbyte(c) { + var n = c.charCodeAt(0); + var x = { + 8: 'b', + 9: 't', + 10: 'n', + 12: 'f', + 13: 'r' + }[n]; + if (x) { return '\\' + x; } + return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); +} + +function markBoxed(str) { + return 'Object(' + str + ')'; +} + +function weakCollectionOf(type) { + return type + ' { ? }'; +} + +function collectionOf(type, size, entries, indent) { + var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); + return type + ' (' + size + ') {' + joinedEntries + '}'; +} + +function singleLineValues(xs) { + for (var i = 0; i < xs.length; i++) { + if (indexOf(xs[i], '\n') >= 0) { + return false; + } + } + return true; +} + +function getIndent(opts, depth) { + var baseIndent; + if (opts.indent === '\t') { + baseIndent = '\t'; + } else if (typeof opts.indent === 'number' && opts.indent > 0) { + baseIndent = $join.call(Array(opts.indent + 1), ' '); + } else { + return null; + } + return { + base: baseIndent, + prev: $join.call(Array(depth + 1), baseIndent) + }; +} + +function indentedJoin(xs, indent) { + if (xs.length === 0) { return ''; } + var lineJoiner = '\n' + indent.prev + indent.base; + return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; +} + +function arrObjKeys(obj, inspect) { + var isArr = isArray(obj); + var xs = []; + if (isArr) { + xs.length = obj.length; + for (var i = 0; i < obj.length; i++) { + xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; + } + } + var syms = typeof gOPS === 'function' ? gOPS(obj) : []; + var symMap; + if (hasShammedSymbols) { + symMap = {}; + for (var k = 0; k < syms.length; k++) { + symMap['$' + syms[k]] = syms[k]; + } + } + + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { + // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section + continue; // eslint-disable-line no-restricted-syntax, no-continue + } else if ($test.call(/[^\w$]/, key)) { + xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); + } else { + xs.push(key + ': ' + inspect(obj[key], obj)); + } + } + if (typeof gOPS === 'function') { + for (var j = 0; j < syms.length; j++) { + if (isEnumerable.call(obj, syms[j])) { + xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); + } + } + } + return xs; +} + + +/***/ }), + +/***/ 5046: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(4073); + +module.exports = function getPolyfill() { + return (typeof Uint8Array === 'function' && Uint8Array.prototype.slice) || implementation; +}; + + +/***/ }), + +/***/ 8564: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__(6776); +var getProto = __webpack_require__(9495); + +var getPolyfill = __webpack_require__(5046); + +module.exports = function shimTypedArraySlice() { + if (typeof Uint8Array === 'function') { + var polyfill = getPolyfill(); + var proto = getProto(Uint8Array.prototype); + define( + proto, + { slice: polyfill }, + { slice: function () { return proto.slice !== polyfill; } } + ); + } + + return polyfill; +}; + + +/***/ }), + +/***/ 4010: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var forEach = __webpack_require__(4843); +var availableTypedArrays = __webpack_require__(4343); +var callBind = __webpack_require__(4899); +var callBound = __webpack_require__(7120); +var gOPD = __webpack_require__(3828); + +/** @type {(O: object) => string} */ +var $toString = callBound('Object.prototype.toString'); +var hasToStringTag = __webpack_require__(4111)(); + +var g = typeof globalThis === 'undefined' ? __webpack_require__.g : globalThis; +var typedArrays = availableTypedArrays(); + +var $slice = callBound('String.prototype.slice'); +var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof'); + +/** @type {(array: readonly T[], value: unknown) => number} */ +var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) { + for (var i = 0; i < array.length; i += 1) { + if (array[i] === value) { + return i; + } + } + return -1; +}; + +/** @typedef {(receiver: import('.').TypedArray) => string | typeof Uint8Array.prototype.slice.call | typeof Uint8Array.prototype.set.call} Getter */ +/** @type {{ [k in `\$${import('.').TypedArrayName}`]?: Getter } & { __proto__: null }} */ +var cache = { __proto__: null }; +if (hasToStringTag && gOPD && getPrototypeOf) { + forEach(typedArrays, function (typedArray) { + var arr = new g[typedArray](); + if (Symbol.toStringTag in arr) { + var proto = getPrototypeOf(arr); + // @ts-expect-error TS won't narrow inside a closure + var descriptor = gOPD(proto, Symbol.toStringTag); + if (!descriptor) { + var superProto = getPrototypeOf(proto); + // @ts-expect-error TS won't narrow inside a closure + descriptor = gOPD(superProto, Symbol.toStringTag); + } + // @ts-expect-error TODO: fix + cache['$' + typedArray] = callBind(descriptor.get); + } + }); +} else { + forEach(typedArrays, function (typedArray) { + var arr = new g[typedArray](); + var fn = arr.slice || arr.set; + if (fn) { + // @ts-expect-error TODO: fix + cache['$' + typedArray] = callBind(fn); + } + }); +} + +/** @type {(value: object) => false | import('.').TypedArrayName} */ +var tryTypedArrays = function tryAllTypedArrays(value) { + /** @type {ReturnType} */ var found = false; + forEach( + // eslint-disable-next-line no-extra-parens + /** @type {Record<`\$${TypedArrayName}`, Getter>} */ /** @type {any} */ (cache), + /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */ + function (getter, typedArray) { + if (!found) { + try { + // @ts-expect-error TODO: fix + if ('$' + getter(value) === typedArray) { + found = $slice(typedArray, 1); + } + } catch (e) { /**/ } + } + } + ); + return found; +}; + +/** @type {(value: object) => false | import('.').TypedArrayName} */ +var trySlices = function tryAllSlices(value) { + /** @type {ReturnType} */ var found = false; + forEach( + // eslint-disable-next-line no-extra-parens + /** @type {Record<`\$${TypedArrayName}`, Getter>} */ /** @type {any} */ (cache), + /** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */ function (getter, name) { + if (!found) { + try { + // @ts-expect-error TODO: fix + getter(value); + found = $slice(name, 1); + } catch (e) { /**/ } + } + } + ); + return found; +}; + +/** @type {import('.')} */ +module.exports = function whichTypedArray(value) { + if (!value || typeof value !== 'object') { return false; } + if (!hasToStringTag) { + /** @type {string} */ + var tag = $slice($toString(value), 8, -1); + if ($indexOf(typedArrays, tag) > -1) { + return tag; + } + if (tag !== 'Object') { + return false; + } + // node < 0.6 hits here on real Typed Arrays + return trySlices(value); + } + if (!gOPD) { return null; } // unknown engine + return tryTypedArrays(value); +}; + + +/***/ }), + +/***/ 7120: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(6883); + +var callBind = __webpack_require__(4899); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 4899: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(7961); +var GetIntrinsic = __webpack_require__(6883); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 7562: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 7961: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(7562); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 6883: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(8861)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(7961); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 8861: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(704); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 704: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + /***/ }), /***/ 9196: @@ -3096,6 +14122,3086 @@ module.exports = traverse; "use strict"; module.exports = window["React"]; +/***/ }), + +/***/ 5794: +/***/ (function() { + +/* (ignored) */ + +/***/ }), + +/***/ 4343: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var possibleNames = __webpack_require__(131); + +var g = typeof globalThis === 'undefined' ? __webpack_require__.g : globalThis; + +/** @type {import('.')} */ +module.exports = function availableTypedArrays() { + var /** @type {ReturnType} */ out = []; + for (var i = 0; i < possibleNames.length; i++) { + if (typeof g[possibleNames[i]] === 'function') { + // @ts-expect-error + out[out.length] = possibleNames[i]; + } + } + return out; +}; + + +/***/ }), + +/***/ 7153: +/***/ (function(module, exports) { + +var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ +/* global define */ + +(function () { + 'use strict'; + + var hasOwn = {}.hasOwnProperty; + + function classNames () { + var classes = ''; + + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + if (arg) { + classes = appendClass(classes, parseValue(arg)); + } + } + + return classes; + } + + function parseValue (arg) { + if (typeof arg === 'string' || typeof arg === 'number') { + return arg; + } + + if (typeof arg !== 'object') { + return ''; + } + + if (Array.isArray(arg)) { + return classNames.apply(null, arg); + } + + if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { + return arg.toString(); + } + + var classes = ''; + + for (var key in arg) { + if (hasOwn.call(arg, key) && arg[key]) { + classes = appendClass(classes, key); + } + } + + return classes; + } + + function appendClass (value, newClass) { + if (!newClass) { + return value; + } + + if (value) { + return value + ' ' + newClass; + } + + return value + newClass; + } + + if ( true && module.exports) { + classNames.default = classNames; + module.exports = classNames; + } else if (true) { + // register as 'classnames', consistent with npm package name + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { + return classNames; + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +}()); + + +/***/ }), + +/***/ 6245: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(5037); + +var $String = GetIntrinsic('%String%'); +var $TypeError = __webpack_require__(1642); + +// https://262.ecma-international.org/6.0/#sec-tostring + +module.exports = function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); +}; + + +/***/ }), + +/***/ 2981: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +// https://tc39.es/ecma262/#sec-arraybufferbytelength + +var IsDetachedBuffer = __webpack_require__(1320); + +var isArrayBuffer = __webpack_require__(4602); +var isSharedArrayBuffer = __webpack_require__(5604); +var arrayBufferByteLength = __webpack_require__(480); + +var isGrowable = false; // TODO: support this + +module.exports = function ArrayBufferByteLength(arrayBuffer, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + if (order !== 'SEQ-CST' && order !== 'UNORDERED') { + throw new $TypeError('Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~'); + } + + // 1. If IsSharedArrayBuffer(arrayBuffer) is true and arrayBuffer has an [[ArrayBufferByteLengthData]] internal slot, then + // TODO: see if IsFixedLengthArrayBuffer can be used here in the spec instead + if (isSAB && isGrowable) { // step 1 + // a. Let bufferByteLengthBlock be arrayBuffer.[[ArrayBufferByteLengthData]]. + // b. Let rawLength be GetRawBytesFromSharedBlock(bufferByteLengthBlock, 0, BIGUINT64, true, order). + // c. Let isLittleEndian be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record. + // d. Return ℝ(RawBytesToNumeric(BIGUINT64, rawLength, isLittleEndian)). + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must not be detached'); // step 2 + } + + return arrayBufferByteLength(arrayBuffer); +}; + + +/***/ }), + +/***/ 6548: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = __webpack_require__(9204); +var $TypeError = __webpack_require__(1642); + +var zero = $BigInt && $BigInt(0); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder + +module.exports = function BigIntRemainder(n, d) { + if (typeof n !== 'bigint' || typeof d !== 'bigint') { + throw new $TypeError('Assertion failed: `n` and `d` arguments must be BigInts'); + } + + if (d === zero) { + throw new $RangeError('Division by zero'); + } + + if (n === zero) { + return zero; + } + + // shortcut for the actual spec mechanics + return n % d; +}; + + +/***/ }), + +/***/ 9002: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var isPropertyDescriptor = __webpack_require__(6862); +var DefineOwnProperty = __webpack_require__(208); + +var FromPropertyDescriptor = __webpack_require__(8367); +var IsDataDescriptor = __webpack_require__(4065); +var IsPropertyKey = __webpack_require__(9762); +var SameValue = __webpack_require__(3392); +var ToPropertyDescriptor = __webpack_require__(8110); +var Type = __webpack_require__(9655); + +// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow + +module.exports = function DefinePropertyOrThrow(O, P, desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc); + if (!isPropertyDescriptor(Desc)) { + throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor'); + } + + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); +}; + + +/***/ }), + +/***/ 8367: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var isPropertyDescriptor = __webpack_require__(6862); +var fromPropertyDescriptor = __webpack_require__(2646); + +// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor + +module.exports = function FromPropertyDescriptor(Desc) { + if (typeof Desc !== 'undefined' && !isPropertyDescriptor(Desc)) { + throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor'); + } + + return fromPropertyDescriptor(Desc); +}; + + +/***/ }), + +/***/ 3675: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var inspect = __webpack_require__(5726); + +var IsPropertyKey = __webpack_require__(9762); +var Type = __webpack_require__(9655); + +// https://262.ecma-international.org/6.0/#sec-get-o-p + +module.exports = function Get(O, P) { + // 7.3.1.1 + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + // 7.3.1.2 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + // 7.3.1.3 + return O[P]; +}; + + +/***/ }), + +/***/ 9661: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); + +var callBound = __webpack_require__(1154); + +var $slice = callBound('Array.prototype.slice'); + +var isInteger = __webpack_require__(6156); + +var IsDetachedBuffer = __webpack_require__(1320); +var RawBytesToNumeric = __webpack_require__(9219); + +var isArrayBuffer = __webpack_require__(4602); +var isSharedArrayBuffer = __webpack_require__(5604); +var safeConcat = __webpack_require__(3002); + +var tableTAO = __webpack_require__(2170); + +var defaultEndianness = __webpack_require__(2142); + +// https://262.ecma-international.org/15.0/#sec-getvaluefrombuffer + +module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string' || typeof tableTAO.size['$' + type] !== 'number') { + throw new $TypeError('Assertion failed: `type` must be a Typed Array element type'); + } + + if (typeof isTypedArray !== 'boolean') { + throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean'); + } + + if (order !== 'SEQ-CST' && order !== 'UNORDERED') { + throw new $TypeError('Assertion failed: `order` must be either `SEQ-CST` or `UNORDERED`'); + } + + if (arguments.length > 5 && typeof arguments[5] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + // 4. Let block be arrayBuffer.[[ArrayBufferData]]. + + var elementSize = tableTAO.size['$' + type]; // step 5 + if (!elementSize) { + throw new $TypeError('Assertion failed: `type` must be one of "INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT32", or "FLOAT64"'); + } + + var rawValue; + if (isSAB) { // step 6 + /* + a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record. + b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier(). + c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false. + d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values. + e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency. + f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }. + g. Append readEvent to eventList. + h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]]. + */ + throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation'); + } else { + // 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex]. + rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6 + } + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation. + var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8 + + var bytes = isLittleEndian + ? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize) + : $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize); + + return RawBytesToNumeric(type, bytes, isLittleEndian); +}; + + +/***/ }), + +/***/ 5584: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var hasOwn = __webpack_require__(9429); + +var IsPropertyKey = __webpack_require__(9762); +var Type = __webpack_require__(9655); + +// https://262.ecma-international.org/6.0/#sec-hasownproperty + +module.exports = function HasOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return hasOwn(O, P); +}; + + +/***/ }), + +/***/ 2985: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// https://262.ecma-international.org/6.0/#sec-isarray +module.exports = __webpack_require__(692); + + +/***/ }), + +/***/ 4734: +/***/ (function(module) { + +"use strict"; + + +// https://262.ecma-international.org/15.0/#sec-isbigintelementtype + +module.exports = function IsBigIntElementType(type) { + return type === 'BIGUINT64' || type === 'BIGINT64'; +}; + + +/***/ }), + +/***/ 3071: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// http://262.ecma-international.org/5.1/#sec-9.11 + +module.exports = __webpack_require__(6841); + + +/***/ }), + +/***/ 7010: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(4342); + +var $construct = GetIntrinsic('%Reflect.construct%', true); + +var DefinePropertyOrThrow = __webpack_require__(9002); +try { + DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} }); +} catch (e) { + // Accessor properties aren't supported + DefinePropertyOrThrow = null; +} + +// https://262.ecma-international.org/6.0/#sec-isconstructor + +if (DefinePropertyOrThrow && $construct) { + var isConstructorMarker = {}; + var badArrayLike = {}; + DefinePropertyOrThrow(badArrayLike, 'length', { + '[[Get]]': function () { + throw isConstructorMarker; + }, + '[[Enumerable]]': true + }); + + module.exports = function IsConstructor(argument) { + try { + // `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`: + $construct(argument, badArrayLike); + } catch (err) { + return err === isConstructorMarker; + } + }; +} else { + module.exports = function IsConstructor(argument) { + // unfortunately there's no way to truly check this without try/catch `new argument` in old environments + return typeof argument === 'function' && !!argument.prototype; + }; +} + + +/***/ }), + +/***/ 4065: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var hasOwn = __webpack_require__(9429); + +var isPropertyDescriptor = __webpack_require__(6862); + +// https://262.ecma-international.org/5.1/#sec-8.10.2 + +module.exports = function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + if (!isPropertyDescriptor(Desc)) { + throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor'); + } + + if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) { + return false; + } + + return true; +}; + + +/***/ }), + +/***/ 1320: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var $byteLength = __webpack_require__(480); +var availableTypedArrays = __webpack_require__(4343)(); +var callBound = __webpack_require__(1154); +var isArrayBuffer = __webpack_require__(4602); +var isSharedArrayBuffer = __webpack_require__(5604); + +var $sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true); + +// https://262.ecma-international.org/8.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ((isSAB ? $sabByteLength : $byteLength)(arrayBuffer) === 0) { + try { + new __webpack_require__.g[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return !!error && error.name === 'TypeError'; + } + } + return false; +}; + + +/***/ }), + +/***/ 9442: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var callBound = __webpack_require__(1154); + +var $arrayBufferResizable = callBound('%ArrayBuffer.prototype.resizable%', true); +var $sharedArrayGrowable = callBound('%SharedArrayBuffer.prototype.growable%', true); + +var isArrayBuffer = __webpack_require__(4602); +var isSharedArrayBuffer = __webpack_require__(5604); + +// https://262.ecma-international.org/15.0/#sec-isfixedlengtharraybuffer + +module.exports = function IsFixedLengthArrayBuffer(arrayBuffer) { + var isAB = isArrayBuffer(arrayBuffer); + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isAB && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer'); + } + + if (isAB && $arrayBufferResizable) { + return !$arrayBufferResizable(arrayBuffer); // step 1 + } + if (isSAB && $sharedArrayGrowable) { + return !$sharedArrayGrowable(arrayBuffer); // step 1 + } + return true; // step 2 +}; + + +/***/ }), + +/***/ 9762: +/***/ (function(module) { + +"use strict"; + + +// https://262.ecma-international.org/6.0/#sec-ispropertykey + +module.exports = function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; +}; + + +/***/ }), + +/***/ 9954: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var IsDetachedBuffer = __webpack_require__(1320); +var TypedArrayElementSize = __webpack_require__(9149); + +var isTypedArrayWithBufferWitnessRecord = __webpack_require__(359); + +var typedArrayBuffer = __webpack_require__(6740); +var typedArrayByteOffset = __webpack_require__(7046); +var typedArrayLength = __webpack_require__(8150); + +// https://tc39.es/ecma262/#sec-istypedarrayoutofbounds + +module.exports = function IsTypedArrayOutOfBounds(taRecord) { + if (!isTypedArrayWithBufferWitnessRecord(taRecord)) { + throw new $TypeError('Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record'); + } + + var O = taRecord['[[Object]]']; // step 1 + + var bufferByteLength = taRecord['[[CachedBufferByteLength]]']; // step 2 + + if (IsDetachedBuffer(typedArrayBuffer(O)) && bufferByteLength !== 'DETACHED') { + throw new $TypeError('Assertion failed: typed array is detached only if the byte length is ~DETACHED~'); // step 3 + } + + if (bufferByteLength === 'DETACHED') { + return true; // step 4 + } + + var byteOffsetStart = typedArrayByteOffset(O); // step 5 + + var byteOffsetEnd; + var length = typedArrayLength(O); + // TODO: probably use package for array length + // seems to apply when TA is backed by a resizable/growable AB + if (length === 'AUTO') { // step 6 + byteOffsetEnd = bufferByteLength; // step 6.a + } else { + var elementSize = TypedArrayElementSize(O); // step 7.a + + byteOffsetEnd = byteOffsetStart + (length * elementSize); // step 7.b + } + + if (byteOffsetStart > bufferByteLength || byteOffsetEnd > bufferByteLength) { + return true; // step 8 + } + + // 9. NOTE: 0-length TypedArrays are not considered out-of-bounds. + + return false; // step 10 +}; + + +/***/ }), + +/***/ 7551: +/***/ (function(module) { + +"use strict"; + + +// https://262.ecma-international.org/15.0/#sec-isunsignedelementtype + +module.exports = function IsUnsignedElementType(type) { + return type === 'UINT8' + || type === 'UINT8C' + || type === 'UINT16' + || type === 'UINT32' + || type === 'BIGUINT64'; +}; + + +/***/ }), + +/***/ 6005: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var ArrayBufferByteLength = __webpack_require__(2981); +var IsDetachedBuffer = __webpack_require__(1320); + +var isTypedArray = __webpack_require__(2527); +var typedArrayBuffer = __webpack_require__(6740); + +// https://tc39.es/ecma262/#sec-maketypedarraywithbufferwitnessrecord + +module.exports = function MakeTypedArrayWithBufferWitnessRecord(obj, order) { + if (!isTypedArray(obj)) { + throw new $TypeError('Assertion failed: `obj` must be a Typed Array'); + } + if (order !== 'SEQ-CST' && order !== 'UNORDERED') { + throw new $TypeError('Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~'); + } + + var buffer = typedArrayBuffer(obj); // step 1 + + var byteLength = IsDetachedBuffer(buffer) ? 'DETACHED' : ArrayBufferByteLength(buffer, order); // steps 2 - 3 + + return { '[[Object]]': obj, '[[CachedBufferByteLength]]': byteLength }; // step 4 +}; + + +/***/ }), + +/***/ 4604: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var hasOwnProperty = __webpack_require__(5584); +var ToBigInt64 = __webpack_require__(1242); +var ToBigUint64 = __webpack_require__(2947); +var ToInt16 = __webpack_require__(3181); +var ToInt32 = __webpack_require__(2587); +var ToInt8 = __webpack_require__(5562); +var ToUint16 = __webpack_require__(5465); +var ToUint32 = __webpack_require__(5964); +var ToUint8 = __webpack_require__(9496); +var ToUint8Clamp = __webpack_require__(6550); + +var valueToFloat32Bytes = __webpack_require__(3647); +var valueToFloat64Bytes = __webpack_require__(7511); +var integerToNBytes = __webpack_require__(1520); + +var keys = __webpack_require__(806); + +// https://262.ecma-international.org/15.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + INT8: 1, + UINT8: 1, + UINT8C: 1, + INT16: 2, + UINT16: 2, + INT32: 4, + UINT32: 4, + BIGINT64: 8, + BIGUINT64: 8, + FLOAT32: 4, + FLOAT64: 8 +}; + +var TypeToAO = { + __proto__: null, + INT8: ToInt8, + UINT8: ToUint8, + UINT8C: ToUint8Clamp, + INT16: ToInt16, + UINT16: ToUint16, + INT32: ToInt32, + UINT32: ToUint32, + BIGINT64: ToBigInt64, + BIGUINT64: ToBigUint64 +}; + +// https://262.ecma-international.org/15.0/#sec-numerictorawbytes + +module.exports = function NumericToRawBytes(type, value, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (typeof value !== 'number' && typeof value !== 'bigint') { + throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt'); + } + if (typeof isLittleEndian !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + if (type === 'FLOAT32') { // step 1 + return valueToFloat32Bytes(value, isLittleEndian); + } else if (type === 'FLOAT64') { // step 2 + return valueToFloat64Bytes(value, isLittleEndian); + } // step 3 + + var n = TypeToSizes[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4 +}; + + +/***/ }), + +/***/ 9219: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); +var callBound = __webpack_require__(1154); + +var $RangeError = __webpack_require__(9204); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $BigInt = GetIntrinsic('%BigInt%', true); + +var hasOwnProperty = __webpack_require__(5584); +var IsArray = __webpack_require__(2985); +var IsBigIntElementType = __webpack_require__(4734); +var IsUnsignedElementType = __webpack_require__(7551); + +var bytesAsFloat32 = __webpack_require__(8727); +var bytesAsFloat64 = __webpack_require__(7604); +var bytesAsInteger = __webpack_require__(2367); +var every = __webpack_require__(8172); +var isByteValue = __webpack_require__(1824); + +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var keys = __webpack_require__(806); + +// https://262.ecma-international.org/15.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + INT8: 1, + UINT8: 1, + UINT8C: 1, + INT16: 2, + UINT16: 2, + INT32: 4, + UINT32: 4, + BIGINT64: 8, + BIGUINT64: 8, + FLOAT32: 4, + FLOAT64: 8 +}; + +// https://262.ecma-international.org/15.0/#sec-rawbytestonumeric + +module.exports = function RawBytesToNumeric(type, rawBytes, isLittleEndian) { + if (!hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) { + throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes'); + } + if (typeof isLittleEndian !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var elementSize = TypeToSizes[type]; // step 1 + + if (rawBytes.length !== elementSize) { + // this assertion is not in the spec, but it'd be an editorial error if it were ever violated + throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type); + } + + var isBigInt = IsBigIntElementType(type); + if (isBigInt && !$BigInt) { + throw new $SyntaxError('this environment does not support BigInts'); + } + + // eslint-disable-next-line no-param-reassign + rawBytes = $slice(rawBytes, 0, elementSize); + if (!isLittleEndian) { + $reverse(rawBytes); // step 2 + } + + if (type === 'FLOAT32') { // step 3 + return bytesAsFloat32(rawBytes); + } + + if (type === 'FLOAT64') { // step 4 + return bytesAsFloat64(rawBytes); + } + + return bytesAsInteger(rawBytes, elementSize, IsUnsignedElementType(type), isBigInt); +}; + + +/***/ }), + +/***/ 3392: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $isNaN = __webpack_require__(9404); + +// http://262.ecma-international.org/5.1/#sec-9.12 + +module.exports = function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); +}; + + +/***/ }), + +/***/ 8055: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var IsPropertyKey = __webpack_require__(9762); +var SameValue = __webpack_require__(3392); +var Type = __webpack_require__(9655); + +// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated +var noThrowOnStrictViolation = (function () { + try { + delete [].length; + return true; + } catch (e) { + return false; + } +}()); + +// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw + +module.exports = function Set(O, P, V, Throw) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + if (typeof Throw !== 'boolean') { + throw new $TypeError('Assertion failed: `Throw` must be a Boolean'); + } + if (Throw) { + O[P] = V; // eslint-disable-line no-param-reassign + if (noThrowOnStrictViolation && !SameValue(O[P], V)) { + throw new $TypeError('Attempted to assign to readonly property.'); + } + return true; + } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + +}; + + +/***/ }), + +/***/ 3383: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); + +var isInteger = __webpack_require__(6156); + +var IsBigIntElementType = __webpack_require__(4734); +var IsDetachedBuffer = __webpack_require__(1320); +var NumericToRawBytes = __webpack_require__(4604); + +var isArrayBuffer = __webpack_require__(4602); +var isSharedArrayBuffer = __webpack_require__(5604); +var has = __webpack_require__(9429); + +var tableTAO = __webpack_require__(2170); + +var defaultEndianness = __webpack_require__(2142); +var forEach = __webpack_require__(9065); + +// https://262.ecma-international.org/15.0/#sec-setvalueinbuffer + +/* eslint max-params: 0 */ + +module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + + if (!isInteger(byteIndex) || byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be a non-negative integer'); + } + + if (typeof type !== 'string' || !has(tableTAO.size, '$' + type)) { + throw new $TypeError('Assertion failed: `type` must be a Typed Array Element Type'); + } + + if (typeof value !== 'number' && typeof value !== 'bigint') { + throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt'); + } + + if (typeof isTypedArray !== 'boolean') { + throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean'); + } + if (order !== 'SEQ-CST' && order !== 'UNORDERED' && order !== 'INIT') { + throw new $TypeError('Assertion failed: `order` must be `"SEQ-CST"`, `"UNORDERED"`, or `"INIT"`'); + } + + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (IsBigIntElementType(type) ? typeof value !== 'bigint' : typeof value !== 'number') { // step 3 + throw new $TypeError('Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number'); + } + + // 4. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot. + + var elementSize = tableTAO.size['$' + type]; // step 5 + + // 6. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the GetValueFromBuffer abstract operation. + var isLittleEndian = arguments.length > 6 ? arguments[6] : defaultEndianness === 'little'; // step 6 + + var rawBytes = NumericToRawBytes(type, value, isLittleEndian); // step 7 + + if (isSAB) { // step 8 + /* + Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record. + Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). + If isTypedArray is true and IsNoTearConfiguration(type, order) is true, let noTear be true; otherwise let noTear be false. + Append WriteSharedMemory { [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize, [[Payload]]: rawBytes } to eventList. + */ + throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation'); + } else { + // 9. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex]. + var arr = new $Uint8Array(arrayBuffer, byteIndex, elementSize); + forEach(rawBytes, function (rawByte, i) { + arr[i] = rawByte; + }); + } + + // 10. Return NormalCompletion(undefined). +}; + + +/***/ }), + +/***/ 5994: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = __webpack_require__(1642); + +var IsConstructor = __webpack_require__(7010); +var Type = __webpack_require__(9655); + +// https://262.ecma-international.org/6.0/#sec-speciesconstructor + +module.exports = function SpeciesConstructor(O, defaultConstructor) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var C = O.constructor; + if (typeof C === 'undefined') { + return defaultConstructor; + } + if (Type(C) !== 'Object') { + throw new $TypeError('O.constructor is not an Object'); + } + var S = $species ? C[$species] : void 0; + if (S == null) { + return defaultConstructor; + } + if (IsConstructor(S)) { + return S; + } + throw new $TypeError('no constructor found'); +}; + + +/***/ }), + +/***/ 907: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = __webpack_require__(1642); +var $SyntaxError = __webpack_require__(6724); + +// https://262.ecma-international.org/14.0/#sec-stringtobigint + +module.exports = function StringToBigInt(argument) { + if (typeof argument !== 'string') { + throw new $TypeError('`argument` must be a string'); + } + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + try { + return $BigInt(argument); + } catch (e) { + return void undefined; + } +}; + + +/***/ }), + +/***/ 4967: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $Number = GetIntrinsic('%Number%'); +var $RegExp = GetIntrinsic('%RegExp%'); +var $TypeError = __webpack_require__(1642); +var $parseInteger = GetIntrinsic('%parseInt%'); + +var callBound = __webpack_require__(1154); +var regexTester = __webpack_require__(1312); + +var $strSlice = callBound('String.prototype.slice'); +var isBinary = regexTester(/^0b[01]+$/i); +var isOctal = regexTester(/^0o[0-7]+$/i); +var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); +var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); +var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); +var hasNonWS = regexTester(nonWSregex); + +var $trim = __webpack_require__(4113); + +// https://262.ecma-international.org/13.0/#sec-stringtonumber + +module.exports = function StringToNumber(argument) { + if (typeof argument !== 'string') { + throw new $TypeError('Assertion failed: `argument` is not a String'); + } + if (isBinary(argument)) { + return $Number($parseInteger($strSlice(argument, 2), 2)); + } + if (isOctal(argument)) { + return $Number($parseInteger($strSlice(argument, 2), 8)); + } + if (hasNonWS(argument) || isInvalidHexLiteral(argument)) { + return NaN; + } + var trimmed = $trim(argument); + if (trimmed !== argument) { + return StringToNumber(trimmed); + } + return $Number(argument); +}; + + +/***/ }), + +/***/ 9752: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $Number = GetIntrinsic('%Number%'); +var $TypeError = __webpack_require__(1642); +var $SyntaxError = __webpack_require__(6724); + +var StringToBigInt = __webpack_require__(907); +var ToPrimitive = __webpack_require__(210); + +// https://262.ecma-international.org/13.0/#sec-tobigint + +module.exports = function ToBigInt(argument) { + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + + var prim = ToPrimitive(argument, $Number); + + if (prim == null) { + throw new $TypeError('Cannot convert null or undefined to a BigInt'); + } + + if (typeof prim === 'boolean') { + return prim ? $BigInt(1) : $BigInt(0); + } + + if (typeof prim === 'number') { + throw new $TypeError('Cannot convert a Number value to a BigInt'); + } + + if (typeof prim === 'string') { + var n = StringToBigInt(prim); + if (typeof n === 'undefined') { + throw new $TypeError('Failed to parse String to BigInt'); + } + return n; + } + + if (typeof prim === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a BigInt'); + } + + if (typeof prim !== 'bigint') { + throw new $SyntaxError('Assertion failed: unknown primitive type'); + } + + return prim; +}; + + +/***/ }), + +/***/ 1242: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = __webpack_require__(9752); +var BigIntRemainder = __webpack_require__(6548); + +var modBigInt = __webpack_require__(8626); + +// BigInt(2**63), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyThree = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 31))); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobigint64 + +module.exports = function ToBigInt64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit >= twoSixtyThree ? int64bit - twoSixtyFour : int64bit; +}; + + +/***/ }), + +/***/ 2947: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = __webpack_require__(9752); +var BigIntRemainder = __webpack_require__(6548); + +var modBigInt = __webpack_require__(8626); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobiguint64 + +module.exports = function ToBigUint64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit; +}; + + +/***/ }), + +/***/ 6440: +/***/ (function(module) { + +"use strict"; + + +// http://262.ecma-international.org/5.1/#sec-9.2 + +module.exports = function ToBoolean(value) { return !!value; }; + + +/***/ }), + +/***/ 3181: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-toint16 + +var two16 = 0x10000; // Math.pow(2, 16); + +module.exports = function ToInt16(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int16bit = modulo(int, two16); + return int16bit >= 0x8000 ? int16bit - two16 : int16bit; +}; + + +/***/ }), + +/***/ 2587: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-toint32 + +var two31 = 0x80000000; // Math.pow(2, 31); +var two32 = 0x100000000; // Math.pow(2, 32); + +module.exports = function ToInt32(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int32bit = modulo(int, two32); + var result = int32bit >= two31 ? int32bit - two32 : int32bit; + return result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here +}; + + +/***/ }), + +/***/ 5562: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-toint8 + +module.exports = function ToInt8(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int8bit = modulo(int, 0x100); + return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; +}; + + +/***/ }), + +/***/ 2897: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var $isNaN = __webpack_require__(9404); +var $isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity + +module.exports = function ToIntegerOrInfinity(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0) { return 0; } + if (!$isFinite(number)) { return number; } + return truncate(number); +}; + + +/***/ }), + +/***/ 3438: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $TypeError = __webpack_require__(1642); +var $Number = GetIntrinsic('%Number%'); +var isPrimitive = __webpack_require__(4968); + +var ToPrimitive = __webpack_require__(210); +var StringToNumber = __webpack_require__(4967); + +// https://262.ecma-international.org/13.0/#sec-tonumber + +module.exports = function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a number'); + } + if (typeof value === 'bigint') { + throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.'); + } + if (typeof value === 'string') { + return StringToNumber(value); + } + return $Number(value); +}; + + +/***/ }), + +/***/ 210: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var toPrimitive = __webpack_require__(5249); + +// https://262.ecma-international.org/6.0/#sec-toprimitive + +module.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); +}; + + +/***/ }), + +/***/ 8110: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasOwn = __webpack_require__(9429); + +var $TypeError = __webpack_require__(1642); + +var Type = __webpack_require__(9655); +var ToBoolean = __webpack_require__(6440); +var IsCallable = __webpack_require__(3071); + +// https://262.ecma-international.org/5.1/#sec-8.10.5 + +module.exports = function ToPropertyDescriptor(Obj) { + if (Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (hasOwn(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable); + } + if (hasOwn(Obj, 'configurable')) { + desc['[[Configurable]]'] = ToBoolean(Obj.configurable); + } + if (hasOwn(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (hasOwn(Obj, 'writable')) { + desc['[[Writable]]'] = ToBoolean(Obj.writable); + } + if (hasOwn(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !IsCallable(getter)) { + throw new $TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (hasOwn(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; +}; + + +/***/ }), + +/***/ 7249: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $String = GetIntrinsic('%String%'); +var $TypeError = __webpack_require__(1642); + +// https://262.ecma-international.org/6.0/#sec-tostring + +module.exports = function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); +}; + + +/***/ }), + +/***/ 5465: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-touint16 + +var two16 = 0x10000; // Math.pow(2, 16) + +module.exports = function ToUint16(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int16bit = modulo(int, two16); + return int16bit === 0 ? 0 : int16bit; // in the spec, these are math values, so we filter out -0 here +}; + + +/***/ }), + +/***/ 5964: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-touint32 + +var two32 = 0x100000000; // Math.pow(2, 32); + +module.exports = function ToUint32(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int32bit = modulo(int, two32); + return int32bit === 0 ? 0 : int32bit; // in the spec, these are math values, so we filter out -0 here +}; + + +/***/ }), + +/***/ 9496: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var isFinite = __webpack_require__(7991); + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +// https://262.ecma-international.org/14.0/#sec-touint8 + +module.exports = function ToUint8(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int8bit = modulo(int, 0x100); + return int8bit; +}; + + +/***/ }), + +/***/ 6550: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var clamp = __webpack_require__(3832); + +var ToNumber = __webpack_require__(3438); +var floor = __webpack_require__(3473); + +var $isNaN = __webpack_require__(9404); + +// https://262.ecma-international.org/15.0/#sec-touint8clamp + +module.exports = function ToUint8Clamp(argument) { + var number = ToNumber(argument); // step 1 + + if ($isNaN(number)) { return 0; } // step 2 + + var clamped = clamp(number, 0, 255); // step 4 + + var f = floor(clamped); // step 5 + + if (clamped < (f + 0.5)) { return f; } // step 6 + + if (clamped > (f + 0.5)) { return f + 1; } // step 7 + + return f % 2 === 0 ? f : f + 1; // step 8 +}; + + +/***/ }), + +/***/ 9655: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var ES5Type = __webpack_require__(1528); + +// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values + +module.exports = function Type(x) { + if (typeof x === 'symbol') { + return 'Symbol'; + } + if (typeof x === 'bigint') { + return 'BigInt'; + } + return ES5Type(x); +}; + + +/***/ }), + +/***/ 7265: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); + +var IsArray = __webpack_require__(2985); +var IsConstructor = __webpack_require__(7010); +var IsTypedArrayOutOfBounds = __webpack_require__(9954); +var TypedArrayLength = __webpack_require__(8921); +var ValidateTypedArray = __webpack_require__(3842); + +var availableTypedArrays = __webpack_require__(4343)(); + +// https://262.ecma-international.org/15.0/#typedarraycreatefromconstructor + +module.exports = function TypedArrayCreateFromConstructor(constructor, argumentList) { + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); + } + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + // var newTypedArray = Construct(constructor, argumentList); // step 1 + var newTypedArray; + if (argumentList.length === 0) { + newTypedArray = new constructor(); + } else if (argumentList.length === 1) { + newTypedArray = new constructor(argumentList[0]); + } else if (argumentList.length === 2) { + newTypedArray = new constructor(argumentList[0], argumentList[1]); + } else { + newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]); + } + + var taRecord = ValidateTypedArray(newTypedArray, 'SEQ-CST'); // step 2 + + if (argumentList.length === 1 && typeof argumentList[0] === 'number') { // step 3 + if (IsTypedArrayOutOfBounds(taRecord)) { + throw new $TypeError('new Typed Array is out of bounds'); // step 3.a + } + var length = TypedArrayLength(taRecord); // step 3.b + if (length < argumentList[0]) { + throw new $TypeError('`argumentList[0]` must be <= `newTypedArray.length`'); // step 3.c + } + } + + return newTypedArray; // step 4 +}; + + +/***/ }), + +/***/ 9149: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); + +var isInteger = __webpack_require__(6156); + +var whichTypedArray = __webpack_require__(4010); + +// https://262.ecma-international.org/13.0/#sec-typedarrayelementsize + +var tableTAO = __webpack_require__(2170); + +module.exports = function TypedArrayElementSize(O) { + var type = whichTypedArray(O); + if (type === false) { + throw new $TypeError('Assertion failed: `O` must be a TypedArray'); + } + var size = tableTAO.size['$' + tableTAO.name['$' + type]]; + if (!isInteger(size) || size < 0) { + throw new $SyntaxError('Assertion failed: Unknown TypedArray type `' + type + '`'); + } + + return size; +}; + + +/***/ }), + +/***/ 1586: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); + +var whichTypedArray = __webpack_require__(4010); + +// https://262.ecma-international.org/15.0/#sec-typedarrayelementtype + +var tableTAO = __webpack_require__(2170); + +module.exports = function TypedArrayElementType(O) { + var type = whichTypedArray(O); + if (type === false) { + throw new $TypeError('Assertion failed: `O` must be a TypedArray'); + } + var result = tableTAO.name['$' + type]; + if (typeof result !== 'string') { + throw new $SyntaxError('Assertion failed: Unknown TypedArray type `' + type + '`'); + } + + return result; +}; + + +/***/ }), + +/***/ 8921: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var floor = __webpack_require__(3473); +var IsFixedLengthArrayBuffer = __webpack_require__(9442); +var IsTypedArrayOutOfBounds = __webpack_require__(9954); +var TypedArrayElementSize = __webpack_require__(9149); + +var isTypedArrayWithBufferWitnessRecord = __webpack_require__(359); + +var typedArrayBuffer = __webpack_require__(6740); +var typedArrayByteOffset = __webpack_require__(7046); +var typedArrayLength = __webpack_require__(8150); + +// http://www.ecma-international.org/ecma-262/15.0/#sec-typedarraylength + +module.exports = function TypedArrayLength(taRecord) { + if (!isTypedArrayWithBufferWitnessRecord(taRecord)) { + throw new $TypeError('Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record'); + } + + if (IsTypedArrayOutOfBounds(taRecord)) { + throw new $TypeError('Assertion failed: `taRecord` is out of bounds'); // step 1 + } + + var O = taRecord['[[Object]]']; // step 2 + + var length = typedArrayLength(O); + if (length !== 'AUTO') { + return length; // step 3 + } + + if (IsFixedLengthArrayBuffer(typedArrayBuffer(O))) { + throw new $TypeError('Assertion failed: array buffer is not fixed length'); // step 4 + } + + var byteOffset = typedArrayByteOffset(O); // step 5 + + var elementSize = TypedArrayElementSize(O); // step 6 + + var byteLength = taRecord['[[CachedBufferByteLength]]']; // step 7 + + if (byteLength === 'DETACHED') { + throw new $TypeError('Assertion failed: typed array is detached'); // step 8 + } + + return floor((byteLength - byteOffset) / elementSize); // step 9 +}; + + +/***/ }), + +/***/ 817: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); + +var whichTypedArray = __webpack_require__(4010); +var availableTypedArrays = __webpack_require__(4343)(); + +var IsArray = __webpack_require__(2985); +var SpeciesConstructor = __webpack_require__(5994); +var TypedArrayCreateFromConstructor = __webpack_require__(7265); + +var getConstructor = __webpack_require__(9660); + +// https://262.ecma-international.org/15.0/#typedarray-species-create + +module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) { + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + var kind = whichTypedArray(exemplar); + if (!kind) { + throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1 + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1 + } + + var defaultConstructor = getConstructor(kind); // step 2 + if (typeof defaultConstructor !== 'function') { + throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!'); + } + var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3 + + return TypedArrayCreateFromConstructor(constructor, argumentList); // step 4 +}; + + +/***/ }), + +/***/ 3842: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var IsTypedArrayOutOfBounds = __webpack_require__(9954); +var MakeTypedArrayWithBufferWitnessRecord = __webpack_require__(6005); +var Type = __webpack_require__(9655); + +var isTypedArray = __webpack_require__(2527); + +// https://262.ecma-international.org/15.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O, order) { + if (order !== 'SEQ-CST' && order !== 'UNORDERED') { + throw new $TypeError('Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~'); + } + + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); // step 1 + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: `O` must be a Typed Array'); // steps 1 - 2 + } + + var taRecord = MakeTypedArrayWithBufferWitnessRecord(O, order); // step 3 + + if (IsTypedArrayOutOfBounds(taRecord)) { + throw new $TypeError('`O` must be in-bounds and backed by a non-detached buffer'); // step 4 + } + + return taRecord; // step 5 +}; + + +/***/ }), + +/***/ 3832: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $TypeError = __webpack_require__(1642); +var max = GetIntrinsic('%Math.max%'); +var min = GetIntrinsic('%Math.min%'); + +// https://262.ecma-international.org/12.0/#clamping + +module.exports = function clamp(x, lower, upper) { + if (typeof x !== 'number' || typeof lower !== 'number' || typeof upper !== 'number' || !(lower <= upper)) { + throw new $TypeError('Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`'); + } + return min(max(lower, x), upper); +}; + + +/***/ }), + +/***/ 3473: +/***/ (function(module) { + +"use strict"; + + +// var modulo = require('./modulo'); +var $floor = Math.floor; + +// http://262.ecma-international.org/11.0/#eqn-floor + +module.exports = function floor(x) { + // return x - modulo(x, 1); + if (typeof x === 'bigint') { + return x; + } + return $floor(x); +}; + + +/***/ }), + +/***/ 1367: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); + + +/***/ }), + +/***/ 2967: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); + + +/***/ }), + +/***/ 8457: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var mod = __webpack_require__(2076); + +// https://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function modulo(x, y) { + return mod(x, y); +}; + + +/***/ }), + +/***/ 2170: +/***/ (function(module) { + +"use strict"; + + +// https://262.ecma-international.org/15.0/#table-the-typedarray-constructors + +module.exports = { + __proto__: null, + name: { + __proto__: null, + $Int8Array: 'INT8', + $Uint8Array: 'UINT8', + $Uint8ClampedArray: 'UINT8C', + $Int16Array: 'INT16', + $Uint16Array: 'UINT16', + $Int32Array: 'INT32', + $Uint32Array: 'UINT32', + $BigInt64Array: 'BIGINT64', + $BigUint64Array: 'BIGUINT64', + $Float32Array: 'FLOAT32', + $Float64Array: 'FLOAT64' + }, + size: { + __proto__: null, + $INT8: 1, + $UINT8: 1, + $UINT8C: 1, + $INT16: 2, + $UINT16: 2, + $INT32: 4, + $UINT32: 4, + $BIGINT64: 8, + $BIGUINT64: 8, + $FLOAT32: 4, + $FLOAT64: 8 + } +}; + + +/***/ }), + +/***/ 736: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var floor = __webpack_require__(3473); + +var $TypeError = __webpack_require__(1642); + +// https://262.ecma-international.org/14.0/#eqn-truncate + +module.exports = function truncate(x) { + if (typeof x !== 'number' && typeof x !== 'bigint') { + throw new $TypeError('argument must be a Number or a BigInt'); + } + var result = x < 0 ? -floor(-x) : floor(x); + return result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here +}; + + +/***/ }), + +/***/ 1528: +/***/ (function(module) { + +"use strict"; + + +// https://262.ecma-international.org/5.1/#sec-8 + +module.exports = function Type(x) { + if (x === null) { + return 'Null'; + } + if (typeof x === 'undefined') { + return 'Undefined'; + } + if (typeof x === 'function' || typeof x === 'object') { + return 'Object'; + } + if (typeof x === 'number') { + return 'Number'; + } + if (typeof x === 'boolean') { + return 'Boolean'; + } + if (typeof x === 'string') { + return 'String'; + } +}; + + +/***/ }), + +/***/ 4342: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// TODO: remove, semver-major + +module.exports = __webpack_require__(682); + + +/***/ }), + +/***/ 208: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasPropertyDescriptors = __webpack_require__(8198); + +var $defineProperty = __webpack_require__(8918); + +var hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug(); + +// eslint-disable-next-line global-require +var isArray = hasArrayLengthDefineBug && __webpack_require__(692); + +var callBound = __webpack_require__(1154); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +// eslint-disable-next-line max-params +module.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) { + if (!$defineProperty) { + if (!IsDataDescriptor(desc)) { + // ES3 does not support getters/setters + return false; + } + if (!desc['[[Configurable]]'] || !desc['[[Writable]]']) { + return false; + } + + // fallback for ES3 + if (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) { + // a non-enumerable existing property + return false; + } + + // property does not exist at all, or exists but is enumerable + var V = desc['[[Value]]']; + // eslint-disable-next-line no-param-reassign + O[P] = V; // will use [[Define]] + return SameValue(O[P], V); + } + if ( + hasArrayLengthDefineBug + && P === 'length' + && '[[Value]]' in desc + && isArray(O) + && O.length !== desc['[[Value]]'] + ) { + // eslint-disable-next-line no-param-reassign + O.length = desc['[[Value]]']; + return O.length === desc['[[Value]]']; + } + + $defineProperty(O, P, FromPropertyDescriptor(desc)); + return true; +}; + + +/***/ }), + +/***/ 692: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $Array = GetIntrinsic('%Array%'); + +// eslint-disable-next-line global-require +var toStr = !$Array.isArray && __webpack_require__(1154)('Object.prototype.toString'); + +module.exports = $Array.isArray || function IsArray(argument) { + return toStr(argument) === '[object Array]'; +}; + + +/***/ }), + +/***/ 8727: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $pow = GetIntrinsic('%Math.pow%'); + +module.exports = function bytesAsFloat32(rawBytes) { + // return new $Float32Array(new $Uint8Array(rawBytes).buffer)[0]; + + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary32 value. +If value is an IEEE 754-2008 binary32 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = rawBytes[3] & 0x80 ? -1 : 1; // Check the sign bit + var exponent = ((rawBytes[3] & 0x7F) << 1) + | (rawBytes[2] >> 7); // Combine bits for exponent + var mantissa = ((rawBytes[2] & 0x7F) << 16) + | (rawBytes[1] << 8) + | rawBytes[0]; // Combine bits for mantissa + + if (exponent === 0 && mantissa === 0) { + return sign === 1 ? 0 : -0; + } + if (exponent === 0xFF && mantissa === 0) { + return sign === 1 ? Infinity : -Infinity; + } + if (exponent === 0xFF && mantissa !== 0) { + return NaN; + } + + exponent -= 127; // subtract the bias + + if (exponent === -127) { + return sign * mantissa * $pow(2, -126 - 23); + } + return sign * (1 + (mantissa * $pow(2, -23))) * $pow(2, exponent); +}; + + +/***/ }), + +/***/ 7604: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $pow = GetIntrinsic('%Math.pow%'); + +module.exports = function bytesAsFloat64(rawBytes) { + // return new $Float64Array(new $Uint8Array(rawBytes).buffer)[0]; + + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary64 value. +If value is an IEEE 754-2008 binary64 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = rawBytes[7] & 0x80 ? -1 : 1; // first bit + var exponent = ((rawBytes[7] & 0x7F) << 4) // 7 bits from index 7 + | ((rawBytes[6] & 0xF0) >> 4); // 4 bits from index 6 + var mantissa = ((rawBytes[6] & 0x0F) * 0x1000000000000) // 4 bits from index 6 + + (rawBytes[5] * 0x10000000000) // 8 bits from index 5 + + (rawBytes[4] * 0x100000000) // 8 bits from index 4 + + (rawBytes[3] * 0x1000000) // 8 bits from index 3 + + (rawBytes[2] * 0x10000) // 8 bits from index 2 + + (rawBytes[1] * 0x100) // 8 bits from index 1 + + rawBytes[0]; // 8 bits from index 0 + + if (exponent === 0 && mantissa === 0) { + return sign * 0; + } + if (exponent === 0x7FF && mantissa !== 0) { + return NaN; + } + if (exponent === 0x7FF && mantissa === 0) { + return sign * Infinity; + } + + exponent -= 1023; // subtract the bias + + // Handle subnormal numbers + if (exponent === -1023) { + return sign * mantissa * 5e-324; // $pow(2, -1022 - 52) + } + + return sign * (1 + (mantissa / 0x10000000000000)) * $pow(2, exponent); +}; + + +/***/ }), + +/***/ 2367: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $pow = GetIntrinsic('%Math.pow%'); +var $Number = GetIntrinsic('%Number%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +module.exports = function bytesAsInteger(rawBytes, elementSize, isUnsigned, isBigInt) { + var Z = isBigInt ? $BigInt : $Number; + + // this is common to both branches + var intValue = Z(0); + for (var i = 0; i < rawBytes.length; i++) { + intValue += Z(rawBytes[i] * $pow(2, 8 * i)); + } + /* + Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of an unsigned little-endian binary number. + */ + + if (!isUnsigned) { // steps 5-6 + // Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of a binary little-endian 2's complement number of bit length elementSize × 8. + var bitLength = elementSize * 8; + + if (rawBytes[elementSize - 1] & 0x80) { + intValue -= Z($pow(2, bitLength)); + } + } + + return intValue; // step 7 +}; + + +/***/ }), + +/***/ 2142: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); +var $Uint32Array = GetIntrinsic('%Uint32Array%', true); + +var typedArrayBuffer = __webpack_require__(6740); + +var uInt32 = $Uint32Array && new $Uint32Array([0x12345678]); +var uInt8 = uInt32 && new $Uint8Array(typedArrayBuffer(uInt32)); + +module.exports = uInt8 + ? uInt8[0] === 0x78 + ? 'little' + : uInt8[0] === 0x12 + ? 'big' + : uInt8[0] === 0x34 + ? 'mixed' // https://developer.mozilla.org/en-US/docs/Glossary/Endianness + : 'unknown' // ??? + : 'indeterminate'; // no way to know + + +/***/ }), + +/***/ 8172: +/***/ (function(module) { + +"use strict"; + + +module.exports = function every(array, predicate) { + for (var i = 0; i < array.length; i += 1) { + if (!predicate(array[i], i, array)) { + return false; + } + } + return true; +}; + + +/***/ }), + +/***/ 9065: +/***/ (function(module) { + +"use strict"; + + +module.exports = function forEach(array, callback) { + for (var i = 0; i < array.length; i += 1) { + callback(array[i], i, array); // eslint-disable-line callback-return + } +}; + + +/***/ }), + +/***/ 1211: +/***/ (function(module) { + +"use strict"; + + +var MAX_ITER = 1075; // 1023+52 (subnormals) => BIAS+NUM_SIGNFICAND_BITS-1 +var maxBits = 54; // only 53 bits for fraction + +module.exports = function fractionToBitString(x) { + var str = ''; + if (x === 0) { + return str; + } + var j = MAX_ITER; + + var y; + // Each time we multiply by 2 and find a ones digit, add a '1'; otherwise, add a '0'.. + for (var i = 0; i < MAX_ITER; i += 1) { + y = x * 2; + if (y >= 1) { + x = y - 1; // eslint-disable-line no-param-reassign + str += '1'; + if (j === MAX_ITER) { + j = i; // first 1 + } + } else { + x = y; // eslint-disable-line no-param-reassign + str += '0'; + } + // Stop when we have no more decimals to process or in the event we found a fraction which cannot be represented in a finite number of bits... + if (y === 1 || i - j > maxBits) { + return str; + } + } + return str; +}; + + +/***/ }), + +/***/ 2646: +/***/ (function(module) { + +"use strict"; + + +module.exports = function fromPropertyDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return Desc; + } + var obj = {}; + if ('[[Value]]' in Desc) { + obj.value = Desc['[[Value]]']; + } + if ('[[Writable]]' in Desc) { + obj.writable = !!Desc['[[Writable]]']; + } + if ('[[Get]]' in Desc) { + obj.get = Desc['[[Get]]']; + } + if ('[[Set]]' in Desc) { + obj.set = Desc['[[Set]]']; + } + if ('[[Enumerable]]' in Desc) { + obj.enumerable = !!Desc['[[Enumerable]]']; + } + if ('[[Configurable]]' in Desc) { + obj.configurable = !!Desc['[[Configurable]]']; + } + return obj; +}; + + +/***/ }), + +/***/ 9495: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var originalGetProto = GetIntrinsic('%Object.getPrototypeOf%', true); + +var hasProto = __webpack_require__(1856)(); + +module.exports = originalGetProto || ( + hasProto + ? function (O) { + return O.__proto__; // eslint-disable-line no-proto + } + : null +); + + +/***/ }), + +/***/ 20: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $floor = GetIntrinsic('%Math.floor%'); + +// https://runestone.academy/ns/books/published/pythonds/BasicDS/ConvertingDecimalNumberstoBinaryNumbers.html#:~:text=The%20Divide%20by%202%20algorithm,have%20a%20remainder%20of%200 + +module.exports = function intToBinaryString(x) { + var str = ''; + var y; + + while (x > 0) { + y = x / 2; + x = $floor(y); // eslint-disable-line no-param-reassign + if (y === x) { + str = '0' + str; + } else { + str = '1' + str; + } + } + return str; +}; + + +/***/ }), + +/***/ 1520: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $Number = GetIntrinsic('%Number%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +module.exports = function integerToNBytes(intValue, n, isLittleEndian) { + var Z = typeof intValue === 'bigint' ? $BigInt : $Number; + /* + if (intValue >= 0) { // step 3.d + // Let rawBytes be a List containing the n-byte binary encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } else { // step 3.e + // Let rawBytes be a List containing the n-byte binary 2's complement encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } + */ + if (intValue < 0) { + intValue >>>= 0; // eslint-disable-line no-param-reassign + } + + var rawBytes = []; + for (var i = 0; i < n; i++) { + rawBytes[isLittleEndian ? i : n - 1 - i] = $Number(intValue & Z(0xFF)); + intValue >>= Z(8); // eslint-disable-line no-param-reassign + } + + return rawBytes; // step 4 +}; + + +/***/ }), + +/***/ 1824: +/***/ (function(module) { + +"use strict"; + + +module.exports = function isByteValue(value) { + return typeof value === 'number' && value >= 0 && value <= 255 && (value | 0) === value; +}; + + +/***/ }), + +/***/ 7991: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $isNaN = __webpack_require__(9404); + +module.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; }; + + +/***/ }), + +/***/ 6156: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $abs = GetIntrinsic('%Math.abs%'); +var $floor = GetIntrinsic('%Math.floor%'); + +var $isNaN = __webpack_require__(9404); +var $isFinite = __webpack_require__(7991); + +module.exports = function isInteger(argument) { + if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) { + return false; + } + var absValue = $abs(argument); + return $floor(absValue) === absValue; +}; + + + +/***/ }), + +/***/ 9404: +/***/ (function(module) { + +"use strict"; + + +module.exports = Number.isNaN || function isNaN(a) { + return a !== a; +}; + + +/***/ }), + +/***/ 2745: +/***/ (function(module) { + +"use strict"; + + +module.exports = function isNegativeZero(x) { + return x === 0 && 1 / x === 1 / -0; +}; + + +/***/ }), + +/***/ 4968: +/***/ (function(module) { + +"use strict"; + + +module.exports = function isPrimitive(value) { + return value === null || (typeof value !== 'function' && typeof value !== 'object'); +}; + + +/***/ }), + +/***/ 2076: +/***/ (function(module) { + +"use strict"; + + +var $floor = Math.floor; + +module.exports = function mod(number, modulo) { + var remain = number % modulo; + return $floor(remain >= 0 ? remain : remain + modulo); +}; + + +/***/ }), + +/***/ 8626: +/***/ (function(module) { + +"use strict"; + + +module.exports = function bigIntMod(BigIntRemainder, bigint, modulo) { + var remain = BigIntRemainder(bigint, modulo); + return remain >= 0 ? remain : remain + modulo; +}; + + +/***/ }), + +/***/ 6862: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var hasOwn = __webpack_require__(9429); + +var allowed = { + __proto__: null, + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Get]]': true, + '[[Set]]': true, + '[[Value]]': true, + '[[Writable]]': true +}; + +// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type + +module.exports = function isPropertyDescriptor(Desc) { + if (!Desc || typeof Desc !== 'object') { + return false; + } + + for (var key in Desc) { // eslint-disable-line + if (hasOwn(Desc, key) && !allowed[key]) { + return false; + } + } + + var isData = hasOwn(Desc, '[[Value]]') || hasOwn(Desc, '[[Writable]]'); + var IsAccessor = hasOwn(Desc, '[[Get]]') || hasOwn(Desc, '[[Set]]'); + if (isData && IsAccessor) { + throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); + } + return true; +}; + + +/***/ }), + +/***/ 359: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasOwn = __webpack_require__(9429); +var isTypedArray = __webpack_require__(2527); + +var isInteger = __webpack_require__(6156); + +module.exports = function isTypedArrayWithBufferWitnessRecord(value) { + return !!value + && typeof value === 'object' + && hasOwn(value, '[[Object]]') + && hasOwn(value, '[[CachedBufferByteLength]]') + && ( + (isInteger(value['[[CachedBufferByteLength]]']) && value['[[CachedBufferByteLength]]'] >= 0) + || value['[[CachedBufferByteLength]]'] === 'DETACHED' + ) + && isTypedArray(value['[[Object]]']); +}; + + +/***/ }), + +/***/ 9660: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var constructors = { + __proto__: null, + $Int8Array: GetIntrinsic('%Int8Array%', true), + $Uint8Array: GetIntrinsic('%Uint8Array%', true), + $Uint8ClampedArray: GetIntrinsic('%Uint8ClampedArray%', true), + $Int16Array: GetIntrinsic('%Int16Array%', true), + $Uint16Array: GetIntrinsic('%Uint16Array%', true), + $Int32Array: GetIntrinsic('%Int32Array%', true), + $Uint32Array: GetIntrinsic('%Uint32Array%', true), + $BigInt64Array: GetIntrinsic('%BigInt64Array%', true), + $BigUint64Array: GetIntrinsic('%BigUint64Array%', true), + $Float32Array: GetIntrinsic('%Float32Array%', true), + $Float64Array: GetIntrinsic('%Float64Array%', true) +}; + +module.exports = function getConstructor(kind) { + return constructors['$' + kind]; +}; + + +/***/ }), + +/***/ 3647: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $abs = GetIntrinsic('%Math.abs%'); +var $floor = GetIntrinsic('%Math.floor%'); +var $pow = GetIntrinsic('%Math.pow%'); + +var isFinite = __webpack_require__(7991); +var isNaN = __webpack_require__(9404); +var isNegativeZero = __webpack_require__(2745); + +var maxFiniteFloat32 = 3.4028234663852886e+38; // roughly 2 ** 128 - 1 + +module.exports = function valueToFloat32Bytes(value, isLittleEndian) { + if (isNaN(value)) { + return isLittleEndian ? [0, 0, 192, 127] : [127, 192, 0, 0]; // hardcoded + } + + var leastSig; + + if (value === 0) { + leastSig = isNegativeZero(value) ? 0x80 : 0; + return isLittleEndian ? [0, 0, 0, leastSig] : [leastSig, 0, 0, 0]; + } + + if ($abs(value) > maxFiniteFloat32 || !isFinite(value)) { + leastSig = value < 0 ? 255 : 127; + return isLittleEndian ? [0, 0, 128, leastSig] : [leastSig, 128, 0, 0]; + } + + var sign = value < 0 ? 1 : 0; + value = $abs(value); // eslint-disable-line no-param-reassign + + var exponent = 0; + while (value >= 2) { + exponent += 1; + value /= 2; // eslint-disable-line no-param-reassign + } + + while (value < 1) { + exponent -= 1; + value *= 2; // eslint-disable-line no-param-reassign + } + + var mantissa = value - 1; + mantissa *= $pow(2, 23) + 0.5; + mantissa = $floor(mantissa); + + exponent += 127; + exponent <<= 23; + + var result = (sign << 31) + | exponent + | mantissa; + + var byte0 = result & 255; + result >>= 8; + var byte1 = result & 255; + result >>= 8; + var byte2 = result & 255; + result >>= 8; + var byte3 = result & 255; + + if (isLittleEndian) { + return [byte0, byte1, byte2, byte3]; + } + return [byte3, byte2, byte1, byte0]; +}; + + +/***/ }), + +/***/ 7511: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $parseInt = GetIntrinsic('%parseInt%'); +var $abs = GetIntrinsic('%Math.abs%'); +var $floor = GetIntrinsic('%Math.floor%'); + +var callBound = __webpack_require__(1154); + +var $strIndexOf = callBound('String.prototype.indexOf'); +var $strSlice = callBound('String.prototype.slice'); + +var fractionToBitString = __webpack_require__(1211); +var intToBinString = __webpack_require__(20); +var isNegativeZero = __webpack_require__(2745); + +var float64bias = 1023; + +var elevenOnes = '11111111111'; +var elevenZeroes = '00000000000'; +var fiftyOneZeroes = elevenZeroes + elevenZeroes + elevenZeroes + elevenZeroes + '0000000'; + +// IEEE 754-1985 +module.exports = function valueToFloat64Bytes(value, isLittleEndian) { + var signBit = value < 0 || isNegativeZero(value) ? '1' : '0'; + var exponentBits; + var significandBits; + + if (isNaN(value)) { + exponentBits = elevenOnes; + significandBits = '1' + fiftyOneZeroes; + } else if (!isFinite(value)) { + exponentBits = elevenOnes; + significandBits = '0' + fiftyOneZeroes; + } else if (value === 0) { + exponentBits = elevenZeroes; + significandBits = '0' + fiftyOneZeroes; + } else { + value = $abs(value); // eslint-disable-line no-param-reassign + + // Isolate the integer part (digits before the decimal): + var integerPart = $floor(value); + + var intBinString = intToBinString(integerPart); // bit string for integer part + var fracBinString = fractionToBitString(value - integerPart); // bit string for fractional part + + var numberOfBits; + // find exponent needed to normalize integer+fractional parts + if (intBinString) { + exponentBits = intBinString.length - 1; // move the decimal to the left + } else { + var first1 = $strIndexOf(fracBinString, '1'); + if (first1 > -1) { + numberOfBits = first1 + 1; + } + exponentBits = -numberOfBits; // move the decimal to the right + } + + significandBits = intBinString + fracBinString; + if (exponentBits < 0) { + // subnormals + if (exponentBits <= -float64bias) { + numberOfBits = float64bias - 1; // limit number of removed bits + } + significandBits = $strSlice(significandBits, numberOfBits); // remove all leading 0s and the first 1 for normal values; for subnormals, remove up to `float64bias - 1` leading bits + } else { + significandBits = $strSlice(significandBits, 1); // remove the leading '1' (implicit/hidden bit) + } + exponentBits = $strSlice(elevenZeroes + intToBinString(exponentBits + float64bias), -11); // Convert the exponent to a bit string + + significandBits = $strSlice(significandBits + fiftyOneZeroes + '0', 0, 52); // fill in any trailing zeros and ensure we have only 52 fraction bits + } + + var bits = signBit + exponentBits + significandBits; + var rawBytes = []; + for (var i = 0; i < 8; i++) { + var targetIndex = isLittleEndian ? 8 - i - 1 : i; + rawBytes[targetIndex] = $parseInt($strSlice(bits, i * 8, (i + 1) * 8), 2); + } + + return rawBytes; +}; + + /***/ }) /******/ }); @@ -3149,6 +17255,18 @@ module.exports = window["React"]; /******/ }; /******/ }(); /******/ +/******/ /* webpack/runtime/global */ +/******/ !function() { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ }(); +/******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ !function() { /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } @@ -3554,7 +17672,7 @@ function _extends() { ;// CONCATENATED MODULE: external ["wp","element"] var external_wp_element_namespaceObject = window["wp"]["element"]; // EXTERNAL MODULE: ./node_modules/classnames/index.js -var classnames = __webpack_require__(4403); +var classnames = __webpack_require__(7153); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); ;// CONCATENATED MODULE: external "lodash" var external_lodash_namespaceObject = window["lodash"]; @@ -15354,66 +29472,68 @@ function BlockHTML(_ref) { /* harmony default export */ var block_html = (BlockHTML); -;// CONCATENATED MODULE: ./node_modules/@react-spring/rafz/dist/react-spring-rafz.esm.js -let updateQueue = makeQueue(); -const raf = fn => schedule(fn, updateQueue); -let writeQueue = makeQueue(); +// EXTERNAL MODULE: external "React" +var external_React_ = __webpack_require__(9196); +var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_); +;// CONCATENATED MODULE: ./node_modules/@react-spring/shared/dist/react-spring_shared.modern.mjs +var __defProp = Object.defineProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; -raf.write = fn => schedule(fn, writeQueue); - -let onStartQueue = makeQueue(); - -raf.onStart = fn => schedule(fn, onStartQueue); - -let onFrameQueue = makeQueue(); - -raf.onFrame = fn => schedule(fn, onFrameQueue); - -let onFinishQueue = makeQueue(); - -raf.onFinish = fn => schedule(fn, onFinishQueue); - -let timeouts = []; +// src/globals.ts +var globals_exports = {}; +__export(globals_exports, { + assign: () => react_spring_shared_modern_assign, + colors: () => colors, + createStringInterpolator: () => createStringInterpolator, + skipAnimation: () => skipAnimation, + to: () => to, + willAdvance: () => willAdvance +}); +// ../rafz/dist/react-spring_rafz.modern.mjs +var updateQueue = makeQueue(); +var raf = (fn) => schedule(fn, updateQueue); +var writeQueue = makeQueue(); +raf.write = (fn) => schedule(fn, writeQueue); +var onStartQueue = makeQueue(); +raf.onStart = (fn) => schedule(fn, onStartQueue); +var onFrameQueue = makeQueue(); +raf.onFrame = (fn) => schedule(fn, onFrameQueue); +var onFinishQueue = makeQueue(); +raf.onFinish = (fn) => schedule(fn, onFinishQueue); +var timeouts = []; raf.setTimeout = (handler, ms) => { - let time = raf.now() + ms; - - let cancel = () => { - let i = timeouts.findIndex(t => t.cancel == cancel); - if (~i) timeouts.splice(i, 1); + const time = raf.now() + ms; + const cancel = () => { + const i = timeouts.findIndex((t) => t.cancel == cancel); + if (~i) + timeouts.splice(i, 1); pendingCount -= ~i ? 1 : 0; }; - - let timeout = { - time, - handler, - cancel - }; + const timeout = { time, handler, cancel }; timeouts.splice(findTimeout(time), 0, timeout); pendingCount += 1; start(); return timeout; }; - -let findTimeout = time => ~(~timeouts.findIndex(t => t.time > time) || ~timeouts.length); - -raf.cancel = fn => { +var findTimeout = (time) => ~(~timeouts.findIndex((t) => t.time > time) || ~timeouts.length); +raf.cancel = (fn) => { onStartQueue.delete(fn); onFrameQueue.delete(fn); onFinishQueue.delete(fn); updateQueue.delete(fn); writeQueue.delete(fn); }; - -raf.sync = fn => { +raf.sync = (fn) => { sync = true; raf.batchedUpdates(fn); sync = false; }; - -raf.throttle = fn => { +raf.throttle = (fn) => { let lastArgs; - function queuedFn() { try { fn(...lastArgs); @@ -15421,45 +29541,39 @@ raf.throttle = fn => { lastArgs = null; } } - function throttled(...args) { lastArgs = args; raf.onStart(queuedFn); } - throttled.handler = fn; - throttled.cancel = () => { onStartQueue.delete(queuedFn); lastArgs = null; }; - return throttled; }; - -let nativeRaf = typeof window != 'undefined' ? window.requestAnimationFrame : () => {}; - -raf.use = impl => nativeRaf = impl; - -raf.now = typeof performance != 'undefined' ? () => performance.now() : Date.now; - -raf.batchedUpdates = fn => fn(); - +var nativeRaf = typeof window != "undefined" ? window.requestAnimationFrame : ( + // eslint-disable-next-line @typescript-eslint/no-empty-function + () => { + } +); +raf.use = (impl) => nativeRaf = impl; +raf.now = typeof performance != "undefined" ? () => performance.now() : Date.now; +raf.batchedUpdates = (fn) => fn(); raf.catch = console.error; -raf.frameLoop = 'always'; - +raf.frameLoop = "always"; raf.advance = () => { - if (raf.frameLoop !== 'demand') { - console.warn('Cannot call the manual advancement of rafz whilst frameLoop is not set as demand'); + if (raf.frameLoop !== "demand") { + console.warn( + "Cannot call the manual advancement of rafz whilst frameLoop is not set as demand" + ); } else { update(); } }; - -let ts = -1; -let pendingCount = 0; -let sync = false; - +var ts = -1; +var pendingCount = 0; +var sync = false; function schedule(fn, queue) { if (sync) { queue.delete(fn); @@ -15469,209 +29583,160 @@ function schedule(fn, queue) { start(); } } - function start() { if (ts < 0) { ts = 0; - - if (raf.frameLoop !== 'demand') { + if (raf.frameLoop !== "demand") { nativeRaf(loop); } } } - function stop() { ts = -1; } - function loop() { if (~ts) { nativeRaf(loop); raf.batchedUpdates(update); } } - function update() { - let prevTs = ts; + const prevTs = ts; ts = raf.now(); - let count = findTimeout(ts); - + const count = findTimeout(ts); if (count) { - eachSafely(timeouts.splice(0, count), t => t.handler()); + eachSafely(timeouts.splice(0, count), (t) => t.handler()); pendingCount -= count; } - if (!pendingCount) { stop(); return; } - onStartQueue.flush(); updateQueue.flush(prevTs ? Math.min(64, ts - prevTs) : 16.667); onFrameQueue.flush(); writeQueue.flush(); onFinishQueue.flush(); } - function makeQueue() { - let next = new Set(); + let next = /* @__PURE__ */ new Set(); let current = next; return { add(fn) { pendingCount += current == next && !next.has(fn) ? 1 : 0; next.add(fn); }, - delete(fn) { pendingCount -= current == next && next.has(fn) ? 1 : 0; return next.delete(fn); }, - flush(arg) { if (current.size) { - next = new Set(); + next = /* @__PURE__ */ new Set(); pendingCount -= current.size; - eachSafely(current, fn => fn(arg) && next.add(fn)); + eachSafely(current, (fn) => fn(arg) && next.add(fn)); pendingCount += next.size; current = next; } } - }; } - -function eachSafely(values, each) { - values.forEach(value => { +function eachSafely(values, each2) { + values.forEach((value) => { try { - each(value); + each2(value); } catch (e) { raf.catch(e); } }); } -const __raf = { - count() { - return pendingCount; - }, - - isRunning() { - return ts >= 0; - }, - - clear() { - ts = -1; - timeouts = []; - onStartQueue = makeQueue(); - updateQueue = makeQueue(); - onFrameQueue = makeQueue(); - writeQueue = makeQueue(); - onFinishQueue = makeQueue(); - pendingCount = 0; - } - -}; - - - -// EXTERNAL MODULE: external "React" -var external_React_ = __webpack_require__(9196); -var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_); -;// CONCATENATED MODULE: ./node_modules/@react-spring/shared/dist/react-spring-shared.esm.js - - - - -function noop() {} -const defineHidden = (obj, key, value) => Object.defineProperty(obj, key, { - value, - writable: true, - configurable: true -}); -const react_spring_shared_esm_is = { +// src/helpers.ts +function noop() { +} +var defineHidden = (obj, key, value) => Object.defineProperty(obj, key, { value, writable: true, configurable: true }); +var is = { arr: Array.isArray, - obj: a => !!a && a.constructor.name === 'Object', - fun: a => typeof a === 'function', - str: a => typeof a === 'string', - num: a => typeof a === 'number', - und: a => a === undefined + obj: (a) => !!a && a.constructor.name === "Object", + fun: (a) => typeof a === "function", + str: (a) => typeof a === "string", + num: (a) => typeof a === "number", + und: (a) => a === void 0 }; function isEqual(a, b) { - if (react_spring_shared_esm_is.arr(a)) { - if (!react_spring_shared_esm_is.arr(b) || a.length !== b.length) return false; - + if (is.arr(a)) { + if (!is.arr(b) || a.length !== b.length) + return false; for (let i = 0; i < a.length; i++) { - if (a[i] !== b[i]) return false; + if (a[i] !== b[i]) + return false; } - return true; } - return a === b; } -const react_spring_shared_esm_each = (obj, fn) => obj.forEach(fn); +var react_spring_shared_modern_each = (obj, fn) => obj.forEach(fn); function eachProp(obj, fn, ctx) { - if (react_spring_shared_esm_is.arr(obj)) { + if (is.arr(obj)) { for (let i = 0; i < obj.length; i++) { fn.call(ctx, obj[i], `${i}`); } - return; } - for (const key in obj) { if (obj.hasOwnProperty(key)) { fn.call(ctx, obj[key], key); } } } -const react_spring_shared_esm_toArray = a => react_spring_shared_esm_is.und(a) ? [] : react_spring_shared_esm_is.arr(a) ? a : [a]; +var toArray = (a) => is.und(a) ? [] : is.arr(a) ? a : [a]; function flush(queue, iterator) { if (queue.size) { const items = Array.from(queue); queue.clear(); - react_spring_shared_esm_each(items, iterator); + react_spring_shared_modern_each(items, iterator); } } -const flushCalls = (queue, ...args) => flush(queue, fn => fn(...args)); -const isSSR = () => typeof window === 'undefined' || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent); +var flushCalls = (queue, ...args) => flush(queue, (fn) => fn(...args)); +var isSSR = () => typeof window === "undefined" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent); -let createStringInterpolator$1; -let to; -let colors$1 = null; -let skipAnimation = false; -let willAdvance = noop; -const react_spring_shared_esm_assign = globals => { - if (globals.to) to = globals.to; - if (globals.now) raf.now = globals.now; - if (globals.colors !== undefined) colors$1 = globals.colors; - if (globals.skipAnimation != null) skipAnimation = globals.skipAnimation; - if (globals.createStringInterpolator) createStringInterpolator$1 = globals.createStringInterpolator; - if (globals.requestAnimationFrame) raf.use(globals.requestAnimationFrame); - if (globals.batchedUpdates) raf.batchedUpdates = globals.batchedUpdates; - if (globals.willAdvance) willAdvance = globals.willAdvance; - if (globals.frameLoop) raf.frameLoop = globals.frameLoop; +// src/globals.ts +var createStringInterpolator; +var to; +var colors = null; +var skipAnimation = false; +var willAdvance = noop; +var react_spring_shared_modern_assign = (globals) => { + if (globals.to) + to = globals.to; + if (globals.now) + raf.now = globals.now; + if (globals.colors !== void 0) + colors = globals.colors; + if (globals.skipAnimation != null) + skipAnimation = globals.skipAnimation; + if (globals.createStringInterpolator) + createStringInterpolator = globals.createStringInterpolator; + if (globals.requestAnimationFrame) + raf.use(globals.requestAnimationFrame); + if (globals.batchedUpdates) + raf.batchedUpdates = globals.batchedUpdates; + if (globals.willAdvance) + willAdvance = globals.willAdvance; + if (globals.frameLoop) + raf.frameLoop = globals.frameLoop; }; -var globals = /*#__PURE__*/Object.freeze({ - __proto__: null, - get createStringInterpolator () { return createStringInterpolator$1; }, - get to () { return to; }, - get colors () { return colors$1; }, - get skipAnimation () { return skipAnimation; }, - get willAdvance () { return willAdvance; }, - assign: react_spring_shared_esm_assign -}); - -const startQueue = new Set(); -let currentFrame = []; -let prevFrame = []; -let priority = 0; -const frameLoop = { +// src/FrameLoop.ts +var startQueue = /* @__PURE__ */ new Set(); +var currentFrame = []; +var prevFrame = []; +var priority = 0; +var frameLoop = { get idle() { return !startQueue.size && !currentFrame.length; }, - + /** Advance the given animation on every frame until idle. */ start(animation) { if (priority > animation.priority) { startQueue.add(animation); @@ -15681,292 +29746,328 @@ const frameLoop = { raf(advance); } }, - + /** Advance all animations by the given time. */ advance, - + /** Call this when an animation's priority changes. */ sort(animation) { if (priority) { raf.onFrame(() => frameLoop.sort(animation)); } else { const prevIndex = currentFrame.indexOf(animation); - if (~prevIndex) { currentFrame.splice(prevIndex, 1); startUnsafely(animation); } } }, - + /** + * Clear all animations. For testing purposes. + * + * ☠️ Never call this from within the frameloop. + */ clear() { currentFrame = []; startQueue.clear(); } - }; - function flushStartQueue() { startQueue.forEach(startSafely); startQueue.clear(); raf(advance); } - function startSafely(animation) { - if (!currentFrame.includes(animation)) startUnsafely(animation); + if (!currentFrame.includes(animation)) + startUnsafely(animation); } - function startUnsafely(animation) { - currentFrame.splice(findIndex(currentFrame, other => other.priority > animation.priority), 0, animation); + currentFrame.splice( + findIndex(currentFrame, (other) => other.priority > animation.priority), + 0, + animation + ); } - function advance(dt) { const nextFrame = prevFrame; - for (let i = 0; i < currentFrame.length; i++) { const animation = currentFrame[i]; priority = animation.priority; - if (!animation.idle) { willAdvance(animation); animation.advance(dt); - if (!animation.idle) { nextFrame.push(animation); } } } - priority = 0; prevFrame = currentFrame; prevFrame.length = 0; currentFrame = nextFrame; return currentFrame.length > 0; } - function findIndex(arr, test) { const index = arr.findIndex(test); return index < 0 ? arr.length : index; } -const colors = { - transparent: 0x00000000, - aliceblue: 0xf0f8ffff, - antiquewhite: 0xfaebd7ff, - aqua: 0x00ffffff, - aquamarine: 0x7fffd4ff, - azure: 0xf0ffffff, - beige: 0xf5f5dcff, - bisque: 0xffe4c4ff, - black: 0x000000ff, - blanchedalmond: 0xffebcdff, - blue: 0x0000ffff, - blueviolet: 0x8a2be2ff, - brown: 0xa52a2aff, - burlywood: 0xdeb887ff, - burntsienna: 0xea7e5dff, - cadetblue: 0x5f9ea0ff, - chartreuse: 0x7fff00ff, - chocolate: 0xd2691eff, - coral: 0xff7f50ff, - cornflowerblue: 0x6495edff, - cornsilk: 0xfff8dcff, - crimson: 0xdc143cff, - cyan: 0x00ffffff, - darkblue: 0x00008bff, - darkcyan: 0x008b8bff, - darkgoldenrod: 0xb8860bff, - darkgray: 0xa9a9a9ff, - darkgreen: 0x006400ff, - darkgrey: 0xa9a9a9ff, - darkkhaki: 0xbdb76bff, - darkmagenta: 0x8b008bff, - darkolivegreen: 0x556b2fff, - darkorange: 0xff8c00ff, - darkorchid: 0x9932ccff, - darkred: 0x8b0000ff, - darksalmon: 0xe9967aff, - darkseagreen: 0x8fbc8fff, - darkslateblue: 0x483d8bff, - darkslategray: 0x2f4f4fff, - darkslategrey: 0x2f4f4fff, - darkturquoise: 0x00ced1ff, - darkviolet: 0x9400d3ff, - deeppink: 0xff1493ff, - deepskyblue: 0x00bfffff, - dimgray: 0x696969ff, - dimgrey: 0x696969ff, - dodgerblue: 0x1e90ffff, - firebrick: 0xb22222ff, - floralwhite: 0xfffaf0ff, - forestgreen: 0x228b22ff, - fuchsia: 0xff00ffff, - gainsboro: 0xdcdcdcff, - ghostwhite: 0xf8f8ffff, - gold: 0xffd700ff, - goldenrod: 0xdaa520ff, - gray: 0x808080ff, - green: 0x008000ff, - greenyellow: 0xadff2fff, - grey: 0x808080ff, - honeydew: 0xf0fff0ff, - hotpink: 0xff69b4ff, - indianred: 0xcd5c5cff, - indigo: 0x4b0082ff, - ivory: 0xfffff0ff, - khaki: 0xf0e68cff, - lavender: 0xe6e6faff, - lavenderblush: 0xfff0f5ff, - lawngreen: 0x7cfc00ff, - lemonchiffon: 0xfffacdff, - lightblue: 0xadd8e6ff, - lightcoral: 0xf08080ff, - lightcyan: 0xe0ffffff, - lightgoldenrodyellow: 0xfafad2ff, - lightgray: 0xd3d3d3ff, - lightgreen: 0x90ee90ff, - lightgrey: 0xd3d3d3ff, - lightpink: 0xffb6c1ff, - lightsalmon: 0xffa07aff, - lightseagreen: 0x20b2aaff, - lightskyblue: 0x87cefaff, - lightslategray: 0x778899ff, - lightslategrey: 0x778899ff, - lightsteelblue: 0xb0c4deff, - lightyellow: 0xffffe0ff, - lime: 0x00ff00ff, - limegreen: 0x32cd32ff, - linen: 0xfaf0e6ff, - magenta: 0xff00ffff, - maroon: 0x800000ff, - mediumaquamarine: 0x66cdaaff, - mediumblue: 0x0000cdff, - mediumorchid: 0xba55d3ff, - mediumpurple: 0x9370dbff, - mediumseagreen: 0x3cb371ff, - mediumslateblue: 0x7b68eeff, - mediumspringgreen: 0x00fa9aff, - mediumturquoise: 0x48d1ccff, - mediumvioletred: 0xc71585ff, - midnightblue: 0x191970ff, - mintcream: 0xf5fffaff, - mistyrose: 0xffe4e1ff, - moccasin: 0xffe4b5ff, - navajowhite: 0xffdeadff, - navy: 0x000080ff, - oldlace: 0xfdf5e6ff, - olive: 0x808000ff, - olivedrab: 0x6b8e23ff, - orange: 0xffa500ff, - orangered: 0xff4500ff, - orchid: 0xda70d6ff, - palegoldenrod: 0xeee8aaff, - palegreen: 0x98fb98ff, - paleturquoise: 0xafeeeeff, - palevioletred: 0xdb7093ff, - papayawhip: 0xffefd5ff, - peachpuff: 0xffdab9ff, - peru: 0xcd853fff, - pink: 0xffc0cbff, - plum: 0xdda0ddff, - powderblue: 0xb0e0e6ff, - purple: 0x800080ff, - rebeccapurple: 0x663399ff, - red: 0xff0000ff, - rosybrown: 0xbc8f8fff, - royalblue: 0x4169e1ff, - saddlebrown: 0x8b4513ff, - salmon: 0xfa8072ff, - sandybrown: 0xf4a460ff, - seagreen: 0x2e8b57ff, - seashell: 0xfff5eeff, - sienna: 0xa0522dff, - silver: 0xc0c0c0ff, - skyblue: 0x87ceebff, - slateblue: 0x6a5acdff, - slategray: 0x708090ff, - slategrey: 0x708090ff, - snow: 0xfffafaff, - springgreen: 0x00ff7fff, - steelblue: 0x4682b4ff, - tan: 0xd2b48cff, - teal: 0x008080ff, - thistle: 0xd8bfd8ff, - tomato: 0xff6347ff, - turquoise: 0x40e0d0ff, - violet: 0xee82eeff, - wheat: 0xf5deb3ff, - white: 0xffffffff, - whitesmoke: 0xf5f5f5ff, - yellow: 0xffff00ff, - yellowgreen: 0x9acd32ff +// src/clamp.ts +var clamp = (min, max, v) => Math.min(Math.max(v, min), max); + +// src/colors.ts +var colors2 = { + 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 }; -const NUMBER = '[-+]?\\d*\\.?\\d+'; -const PERCENTAGE = NUMBER + '%'; - +// src/colorMatchers.ts +var NUMBER = "[-+]?\\d*\\.?\\d+"; +var PERCENTAGE = NUMBER + "%"; function call(...parts) { - return '\\(\\s*(' + parts.join(')\\s*,\\s*(') + ')\\s*\\)'; + return "\\(\\s*(" + parts.join(")\\s*,\\s*(") + ")\\s*\\)"; } +var rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER)); +var rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER)); +var hsl = new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE)); +var hsla = new RegExp( + "hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER) +); +var hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/; +var hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/; +var hex6 = /^#([0-9a-fA-F]{6})$/; +var hex8 = /^#([0-9a-fA-F]{8})$/; -const rgb = new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER)); -const rgba = new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER)); -const hsl = new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE)); -const hsla = new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER)); -const hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/; -const hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/; -const hex6 = /^#([0-9a-fA-F]{6})$/; -const hex8 = /^#([0-9a-fA-F]{8})$/; - +// src/normalizeColor.ts function normalizeColor(color) { let match; - - if (typeof color === 'number') { - return color >>> 0 === color && color >= 0 && color <= 0xffffffff ? color : null; + if (typeof color === "number") { + return color >>> 0 === color && color >= 0 && color <= 4294967295 ? color : null; } - - if (match = hex6.exec(color)) return parseInt(match[1] + 'ff', 16) >>> 0; - - if (colors$1 && colors$1[color] !== undefined) { - return colors$1[color]; + if (match = hex6.exec(color)) + return parseInt(match[1] + "ff", 16) >>> 0; + if (colors && colors[color] !== void 0) { + return colors[color]; } - if (match = rgb.exec(color)) { - return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | 0x000000ff) >>> 0; + return (parse255(match[1]) << 24 | // r + parse255(match[2]) << 16 | // g + parse255(match[3]) << 8 | // b + 255) >>> // a + 0; } - if (match = rgba.exec(color)) { - return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | parse1(match[4])) >>> 0; + return (parse255(match[1]) << 24 | // r + parse255(match[2]) << 16 | // g + parse255(match[3]) << 8 | // b + parse1(match[4])) >>> // a + 0; } - if (match = hex3.exec(color)) { - return parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + 'ff', 16) >>> 0; + return parseInt( + match[1] + match[1] + // r + match[2] + match[2] + // g + match[3] + match[3] + // b + "ff", + // a + 16 + ) >>> 0; } - - if (match = hex8.exec(color)) return parseInt(match[1], 16) >>> 0; - + if (match = hex8.exec(color)) + return parseInt(match[1], 16) >>> 0; if (match = hex4.exec(color)) { - return parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + match[4] + match[4], 16) >>> 0; + return parseInt( + match[1] + match[1] + // r + match[2] + match[2] + // g + match[3] + match[3] + // b + match[4] + match[4], + // a + 16 + ) >>> 0; } - if (match = hsl.exec(color)) { - return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | 0x000000ff) >>> 0; + return (hslToRgb( + parse360(match[1]), + // h + parsePercentage(match[2]), + // s + parsePercentage(match[3]) + // l + ) | 255) >>> // a + 0; } - if (match = hsla.exec(color)) { - return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0; + return (hslToRgb( + parse360(match[1]), + // h + parsePercentage(match[2]), + // s + parsePercentage(match[3]) + // l + ) | parse1(match[4])) >>> // a + 0; } - return null; } - function hue2rgb(p, q, t) { - if (t < 0) t += 1; - if (t > 1) t -= 1; - if (t < 1 / 6) return p + (q - p) * 6 * t; - if (t < 1 / 2) return q; - if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; + if (t < 0) + t += 1; + if (t > 1) + t -= 1; + if (t < 1 / 6) + return p + (q - p) * 6 * t; + if (t < 1 / 2) + return q; + if (t < 2 / 3) + return p + (q - p) * (2 / 3 - t) * 6; return p; } - function hslToRgb(h, s, l) { const q = l < 0.5 ? l * (1 + s) : l + s - l * s; const p = 2 * l - q; @@ -15975,226 +30076,270 @@ function hslToRgb(h, s, l) { const b = hue2rgb(p, q, h - 1 / 3); return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8; } - function parse255(str) { const int = parseInt(str, 10); - if (int < 0) return 0; - if (int > 255) return 255; + if (int < 0) + return 0; + if (int > 255) + return 255; return int; } - function parse360(str) { const int = parseFloat(str); return (int % 360 + 360) % 360 / 360; } - function parse1(str) { const num = parseFloat(str); - if (num < 0) return 0; - if (num > 1) return 255; + if (num < 0) + return 0; + if (num > 1) + return 255; return Math.round(num * 255); } - function parsePercentage(str) { const int = parseFloat(str); - if (int < 0) return 0; - if (int > 100) return 1; + if (int < 0) + return 0; + if (int > 100) + return 1; return int / 100; } +// src/colorToRgba.ts function colorToRgba(input) { let int32Color = normalizeColor(input); - if (int32Color === null) return input; + if (int32Color === null) + return input; int32Color = int32Color || 0; - let r = (int32Color & 0xff000000) >>> 24; - let g = (int32Color & 0x00ff0000) >>> 16; - let b = (int32Color & 0x0000ff00) >>> 8; - let a = (int32Color & 0x000000ff) / 255; + const r = (int32Color & 4278190080) >>> 24; + const g = (int32Color & 16711680) >>> 16; + const b = (int32Color & 65280) >>> 8; + const a = (int32Color & 255) / 255; return `rgba(${r}, ${g}, ${b}, ${a})`; } -const createInterpolator = (range, output, extrapolate) => { - if (react_spring_shared_esm_is.fun(range)) { +// src/createInterpolator.ts +var createInterpolator = (range, output, extrapolate) => { + if (is.fun(range)) { return range; } - - if (react_spring_shared_esm_is.arr(range)) { + if (is.arr(range)) { return createInterpolator({ range, - output: output, + output, extrapolate }); } - - if (react_spring_shared_esm_is.str(range.output[0])) { - return createStringInterpolator$1(range); + if (is.str(range.output[0])) { + return createStringInterpolator(range); } - const config = range; const outputRange = config.output; const inputRange = config.range || [0, 1]; - const extrapolateLeft = config.extrapolateLeft || config.extrapolate || 'extend'; - const extrapolateRight = config.extrapolateRight || config.extrapolate || 'extend'; - - const easing = config.easing || (t => t); - - return input => { - const range = findRange(input, inputRange); - return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight, config.map); + const extrapolateLeft = config.extrapolateLeft || config.extrapolate || "extend"; + const extrapolateRight = config.extrapolateRight || config.extrapolate || "extend"; + const easing = config.easing || ((t) => t); + return (input) => { + const range2 = findRange(input, inputRange); + return interpolate( + input, + inputRange[range2], + inputRange[range2 + 1], + outputRange[range2], + outputRange[range2 + 1], + easing, + extrapolateLeft, + extrapolateRight, + config.map + ); }; }; - function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) { let result = map ? map(input) : input; - if (result < inputMin) { - if (extrapolateLeft === 'identity') return result;else if (extrapolateLeft === 'clamp') result = inputMin; + if (extrapolateLeft === "identity") + return result; + else if (extrapolateLeft === "clamp") + result = inputMin; } - if (result > inputMax) { - if (extrapolateRight === 'identity') return result;else if (extrapolateRight === 'clamp') result = inputMax; + if (extrapolateRight === "identity") + return result; + else if (extrapolateRight === "clamp") + result = inputMax; } - - if (outputMin === outputMax) return outputMin; - if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax; - if (inputMin === -Infinity) result = -result;else if (inputMax === Infinity) result = result - inputMin;else result = (result - inputMin) / (inputMax - inputMin); + if (outputMin === outputMax) + return outputMin; + if (inputMin === inputMax) + return input <= inputMin ? outputMin : outputMax; + if (inputMin === -Infinity) + result = -result; + else if (inputMax === Infinity) + result = result - inputMin; + else + result = (result - inputMin) / (inputMax - inputMin); result = easing(result); - if (outputMin === -Infinity) result = -result;else if (outputMax === Infinity) result = result + outputMin;else result = result * (outputMax - outputMin) + outputMin; + if (outputMin === -Infinity) + result = -result; + else if (outputMax === Infinity) + result = result + outputMin; + else + result = result * (outputMax - outputMin) + outputMin; return result; } - function findRange(input, inputRange) { - for (var i = 1; i < inputRange.length - 1; ++i) if (inputRange[i] >= input) break; - + for (var i = 1; i < inputRange.length - 1; ++i) + if (inputRange[i] >= input) + break; return i - 1; } -function react_spring_shared_esm_extends() { - react_spring_shared_esm_extends = Object.assign ? Object.assign.bind() : function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; - }; - return react_spring_shared_esm_extends.apply(this, arguments); -} - -const $get = Symbol.for('FluidValue.get'); -const $observers = Symbol.for('FluidValue.observers'); - -const hasFluidValue = arg => Boolean(arg && arg[$get]); - -const getFluidValue = arg => arg && arg[$get] ? arg[$get]() : arg; - -const getFluidObservers = target => target[$observers] || null; - -function callFluidObserver(observer, event) { - if (observer.eventObserved) { - observer.eventObserved(event); +// src/easings.ts +var steps = (steps2, direction = "end") => (progress2) => { + progress2 = direction === "end" ? Math.min(progress2, 0.999) : Math.max(progress2, 1e-3); + const expanded = progress2 * steps2; + const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded); + return clamp(0, 1, rounded / steps2); +}; +var c1 = 1.70158; +var c2 = c1 * 1.525; +var c3 = c1 + 1; +var c4 = 2 * Math.PI / 3; +var c5 = 2 * Math.PI / 4.5; +var bounceOut = (x) => { + const n1 = 7.5625; + const d1 = 2.75; + if (x < 1 / d1) { + return n1 * x * x; + } else if (x < 2 / d1) { + return n1 * (x -= 1.5 / d1) * x + 0.75; + } else if (x < 2.5 / d1) { + return n1 * (x -= 2.25 / d1) * x + 0.9375; } else { - observer(event); + return n1 * (x -= 2.625 / d1) * x + 0.984375; + } +}; +var easings = { + linear: (x) => x, + easeInQuad: (x) => x * x, + easeOutQuad: (x) => 1 - (1 - x) * (1 - x), + easeInOutQuad: (x) => x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2, + easeInCubic: (x) => x * x * x, + easeOutCubic: (x) => 1 - Math.pow(1 - x, 3), + easeInOutCubic: (x) => x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2, + easeInQuart: (x) => x * x * x * x, + easeOutQuart: (x) => 1 - Math.pow(1 - x, 4), + easeInOutQuart: (x) => x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2, + easeInQuint: (x) => x * x * x * x * x, + easeOutQuint: (x) => 1 - Math.pow(1 - x, 5), + easeInOutQuint: (x) => x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2, + easeInSine: (x) => 1 - Math.cos(x * Math.PI / 2), + easeOutSine: (x) => Math.sin(x * Math.PI / 2), + easeInOutSine: (x) => -(Math.cos(Math.PI * x) - 1) / 2, + easeInExpo: (x) => x === 0 ? 0 : Math.pow(2, 10 * x - 10), + easeOutExpo: (x) => x === 1 ? 1 : 1 - Math.pow(2, -10 * x), + easeInOutExpo: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? Math.pow(2, 20 * x - 10) / 2 : (2 - Math.pow(2, -20 * x + 10)) / 2, + easeInCirc: (x) => 1 - Math.sqrt(1 - Math.pow(x, 2)), + easeOutCirc: (x) => Math.sqrt(1 - Math.pow(x - 1, 2)), + easeInOutCirc: (x) => x < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2, + easeInBack: (x) => c3 * x * x * x - c1 * x * x, + easeOutBack: (x) => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2), + easeInOutBack: (x) => x < 0.5 ? Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2, + easeInElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4), + easeOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1, + easeInOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2 : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5) / 2 + 1, + easeInBounce: (x) => 1 - bounceOut(1 - x), + easeOutBounce: bounceOut, + easeInOutBounce: (x) => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2, + steps +}; + +// src/fluids.ts +var $get = Symbol.for("FluidValue.get"); +var $observers = Symbol.for("FluidValue.observers"); +var hasFluidValue = (arg) => Boolean(arg && arg[$get]); +var getFluidValue = (arg) => arg && arg[$get] ? arg[$get]() : arg; +var getFluidObservers = (target) => target[$observers] || null; +function callFluidObserver(observer2, event) { + if (observer2.eventObserved) { + observer2.eventObserved(event); + } else { + observer2(event); } } - function callFluidObservers(target, event) { - let observers = target[$observers]; - + const observers = target[$observers]; if (observers) { - observers.forEach(observer => { - callFluidObserver(observer, event); + observers.forEach((observer2) => { + callFluidObserver(observer2, event); }); } } - -class FluidValue { +var FluidValue = class { constructor(get) { - this[$get] = void 0; - this[$observers] = void 0; - if (!get && !(get = this.get)) { - throw Error('Unknown getter'); + throw Error("Unknown getter"); } - setFluidGetter(this, get); } - -} - -const setFluidGetter = (target, get) => setHidden(target, $get, get); - -function addFluidObserver(target, observer) { +}; +$get, $observers; +var setFluidGetter = (target, get) => setHidden(target, $get, get); +function addFluidObserver(target, observer2) { if (target[$get]) { let observers = target[$observers]; - if (!observers) { - setHidden(target, $observers, observers = new Set()); + setHidden(target, $observers, observers = /* @__PURE__ */ new Set()); } - - if (!observers.has(observer)) { - observers.add(observer); - + if (!observers.has(observer2)) { + observers.add(observer2); if (target.observerAdded) { - target.observerAdded(observers.size, observer); + target.observerAdded(observers.size, observer2); } } } - - return observer; + return observer2; } - -function removeFluidObserver(target, observer) { - let observers = target[$observers]; - - if (observers && observers.has(observer)) { +function removeFluidObserver(target, observer2) { + const observers = target[$observers]; + if (observers && observers.has(observer2)) { const count = observers.size - 1; - if (count) { - observers.delete(observer); + observers.delete(observer2); } else { target[$observers] = null; } - if (target.observerRemoved) { - target.observerRemoved(count, observer); + target.observerRemoved(count, observer2); } } } - -const setHidden = (target, key, value) => Object.defineProperty(target, key, { +var setHidden = (target, key, value) => Object.defineProperty(target, key, { value, writable: true, configurable: true }); -const numberRegex = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g; -const colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi; -const unitRegex = new RegExp(`(${numberRegex.source})(%|[a-z]+)`, 'i'); -const rgbaRegex = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi; -const cssVariableRegex = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/; +// src/regexs.ts +var numberRegex = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g; +var colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi; +var unitRegex = new RegExp(`(${numberRegex.source})(%|[a-z]+)`, "i"); +var rgbaRegex = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi; +var cssVariableRegex = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/; -const variableToRgba = input => { +// src/variableToRgba.ts +var variableToRgba = (input) => { const [token, fallback] = parseCSSVariable(input); - if (!token || isSSR()) { return input; } - const value = window.getComputedStyle(document.documentElement).getPropertyValue(token); - if (value) { return value.trim(); - } else if (fallback && fallback.startsWith('--')) { - const _value = window.getComputedStyle(document.documentElement).getPropertyValue(fallback); - - if (_value) { - return _value; + } else if (fallback && fallback.startsWith("--")) { + const value2 = window.getComputedStyle(document.documentElement).getPropertyValue(fallback); + if (value2) { + return value2; } else { return input; } @@ -16203,56 +30348,61 @@ const variableToRgba = input => { } else if (fallback) { return fallback; } - return input; }; - -const parseCSSVariable = current => { +var parseCSSVariable = (current) => { const match = cssVariableRegex.exec(current); - if (!match) return [,]; + if (!match) + return [,]; const [, token, fallback] = match; return [token, fallback]; }; -let namedColorRegex; - -const rgbaRound = (_, p1, p2, p3, p4) => `rgba(${Math.round(p1)}, ${Math.round(p2)}, ${Math.round(p3)}, ${p4})`; - -const createStringInterpolator = config => { - if (!namedColorRegex) namedColorRegex = colors$1 ? new RegExp(`(${Object.keys(colors$1).join('|')})(?!\\w)`, 'g') : /^\b$/; - const output = config.output.map(value => { +// src/stringInterpolation.ts +var namedColorRegex; +var rgbaRound = (_, p1, p2, p3, p4) => `rgba(${Math.round(p1)}, ${Math.round(p2)}, ${Math.round(p3)}, ${p4})`; +var createStringInterpolator2 = (config) => { + if (!namedColorRegex) + namedColorRegex = colors ? ( + // match color names, ignore partial matches + new RegExp(`(${Object.keys(colors).join("|")})(?!\\w)`, "g") + ) : ( + // never match + /^\b$/ + ); + const output = config.output.map((value) => { return getFluidValue(value).replace(cssVariableRegex, variableToRgba).replace(colorRegex, colorToRgba).replace(namedColorRegex, colorToRgba); }); - const keyframes = output.map(value => value.match(numberRegex).map(Number)); - const outputRanges = keyframes[0].map((_, i) => keyframes.map(values => { - if (!(i in values)) { - throw Error('The arity of each "output" value must be equal'); - } - - return values[i]; - })); - const interpolators = outputRanges.map(output => createInterpolator(react_spring_shared_esm_extends({}, config, { - output - }))); - return input => { - var _output$find; - - const missingUnit = !unitRegex.test(output[0]) && ((_output$find = output.find(value => unitRegex.test(value))) == null ? void 0 : _output$find.replace(numberRegex, '')); + const keyframes = output.map((value) => value.match(numberRegex).map(Number)); + const outputRanges = keyframes[0].map( + (_, i) => keyframes.map((values) => { + if (!(i in values)) { + throw Error('The arity of each "output" value must be equal'); + } + return values[i]; + }) + ); + const interpolators = outputRanges.map( + (output2) => createInterpolator({ ...config, output: output2 }) + ); + return (input) => { + const missingUnit = !unitRegex.test(output[0]) && output.find((value) => unitRegex.test(value))?.replace(numberRegex, ""); let i = 0; - return output[0].replace(numberRegex, () => `${interpolators[i++](input)}${missingUnit || ''}`).replace(rgbaRegex, rgbaRound); + return output[0].replace( + numberRegex, + () => `${interpolators[i++](input)}${missingUnit || ""}` + ).replace(rgbaRegex, rgbaRound); }; }; -const prefix = 'react-spring: '; - -const once = fn => { +// src/deprecations.ts +var prefix = "react-spring: "; +var once = (fn) => { const func = fn; let called = false; - - if (typeof func != 'function') { + if (typeof func != "function") { throw new TypeError(`${prefix}once requires a function parameter`); } - return (...args) => { if (!called) { func(...args); @@ -16260,25 +30410,216 @@ const once = fn => { } }; }; - -const warnInterpolate = once(console.warn); -function react_spring_shared_esm_deprecateInterpolate() { - warnInterpolate(`${prefix}The "interpolate" function is deprecated in v9 (use "to" instead)`); +var warnInterpolate = once(console.warn); +function deprecateInterpolate() { + warnInterpolate( + `${prefix}The "interpolate" function is deprecated in v9 (use "to" instead)` + ); } -const warnDirectCall = once(console.warn); +var warnDirectCall = once(console.warn); function deprecateDirectCall() { - warnDirectCall(`${prefix}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`); + warnDirectCall( + `${prefix}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions` + ); } +// src/isAnimatedString.ts function isAnimatedString(value) { - return react_spring_shared_esm_is.str(value) && (value[0] == '#' || /\d/.test(value) || !isSSR() && cssVariableRegex.test(value) || value in (colors$1 || {})); + return is.str(value) && (value[0] == "#" || /\d/.test(value) || // Do not identify a CSS variable as an AnimatedString if its SSR + !isSSR() && cssVariableRegex.test(value) || value in (colors || {})); } -const react_spring_shared_esm_useIsomorphicLayoutEffect = isSSR() ? external_React_.useEffect : external_React_.useLayoutEffect; +// src/dom-events/resize/resizeElement.ts +var observer; +var resizeHandlers = /* @__PURE__ */ new WeakMap(); +var handleObservation = (entries) => entries.forEach(({ target, contentRect }) => { + return resizeHandlers.get(target)?.forEach((handler) => handler(contentRect)); +}); +function resizeElement(handler, target) { + if (!observer) { + if (typeof ResizeObserver !== "undefined") { + observer = new ResizeObserver(handleObservation); + } + } + let elementHandlers = resizeHandlers.get(target); + if (!elementHandlers) { + elementHandlers = /* @__PURE__ */ new Set(); + resizeHandlers.set(target, elementHandlers); + } + elementHandlers.add(handler); + if (observer) { + observer.observe(target); + } + return () => { + const elementHandlers2 = resizeHandlers.get(target); + if (!elementHandlers2) + return; + elementHandlers2.delete(handler); + if (!elementHandlers2.size && observer) { + observer.unobserve(target); + } + }; +} -const useIsMounted = () => { +// src/dom-events/resize/resizeWindow.ts +var listeners = /* @__PURE__ */ new Set(); +var cleanupWindowResizeHandler; +var createResizeHandler = () => { + const handleResize = () => { + listeners.forEach( + (callback) => callback({ + width: window.innerWidth, + height: window.innerHeight + }) + ); + }; + window.addEventListener("resize", handleResize); + return () => { + window.removeEventListener("resize", handleResize); + }; +}; +var resizeWindow = (callback) => { + listeners.add(callback); + if (!cleanupWindowResizeHandler) { + cleanupWindowResizeHandler = createResizeHandler(); + } + return () => { + listeners.delete(callback); + if (!listeners.size && cleanupWindowResizeHandler) { + cleanupWindowResizeHandler(); + cleanupWindowResizeHandler = void 0; + } + }; +}; + +// src/dom-events/resize/index.ts +var react_spring_shared_modern_onResize = (callback, { container = document.documentElement } = {}) => { + if (container === document.documentElement) { + return resizeWindow(callback); + } else { + return resizeElement(callback, container); + } +}; + +// src/progress.ts +var progress = (min, max, value) => max - min === 0 ? 1 : (value - min) / (max - min); + +// src/dom-events/scroll/ScrollHandler.ts +var SCROLL_KEYS = { + x: { + length: "Width", + position: "Left" + }, + y: { + length: "Height", + position: "Top" + } +}; +var ScrollHandler = class { + constructor(callback, container) { + this.createAxis = () => ({ + current: 0, + progress: 0, + scrollLength: 0 + }); + this.updateAxis = (axisName) => { + const axis = this.info[axisName]; + const { length, position } = SCROLL_KEYS[axisName]; + axis.current = this.container[`scroll${position}`]; + axis.scrollLength = this.container["scroll" + length] - this.container["client" + length]; + axis.progress = progress(0, axis.scrollLength, axis.current); + }; + this.update = () => { + this.updateAxis("x"); + this.updateAxis("y"); + }; + this.sendEvent = () => { + this.callback(this.info); + }; + this.advance = () => { + this.update(); + this.sendEvent(); + }; + this.callback = callback; + this.container = container; + this.info = { + time: 0, + x: this.createAxis(), + y: this.createAxis() + }; + } +}; + +// src/dom-events/scroll/index.ts +var scrollListeners = /* @__PURE__ */ new WeakMap(); +var resizeListeners = /* @__PURE__ */ new WeakMap(); +var onScrollHandlers = /* @__PURE__ */ new WeakMap(); +var getTarget = (container) => container === document.documentElement ? window : container; +var react_spring_shared_modern_onScroll = (callback, { container = document.documentElement } = {}) => { + let containerHandlers = onScrollHandlers.get(container); + if (!containerHandlers) { + containerHandlers = /* @__PURE__ */ new Set(); + onScrollHandlers.set(container, containerHandlers); + } + const containerHandler = new ScrollHandler(callback, container); + containerHandlers.add(containerHandler); + if (!scrollListeners.has(container)) { + const listener = () => { + containerHandlers?.forEach((handler) => handler.advance()); + return true; + }; + scrollListeners.set(container, listener); + const target = getTarget(container); + window.addEventListener("resize", listener, { passive: true }); + if (container !== document.documentElement) { + resizeListeners.set(container, react_spring_shared_modern_onResize(listener, { container })); + } + target.addEventListener("scroll", listener, { passive: true }); + } + const animateScroll = scrollListeners.get(container); + raf(animateScroll); + return () => { + raf.cancel(animateScroll); + const containerHandlers2 = onScrollHandlers.get(container); + if (!containerHandlers2) + return; + containerHandlers2.delete(containerHandler); + if (containerHandlers2.size) + return; + const listener = scrollListeners.get(container); + scrollListeners.delete(container); + if (listener) { + getTarget(container).removeEventListener("scroll", listener); + window.removeEventListener("resize", listener); + resizeListeners.get(container)?.(); + } + }; +}; + +// src/hooks/useConstant.ts + +function react_spring_shared_modern_useConstant(init) { + const ref = useRef(null); + if (ref.current === null) { + ref.current = init(); + } + return ref.current; +} + +// src/hooks/useForceUpdate.ts + + +// src/hooks/useIsMounted.ts + + +// src/hooks/useIsomorphicLayoutEffect.ts + +var react_spring_shared_modern_useIsomorphicLayoutEffect = isSSR() ? external_React_.useEffect : external_React_.useLayoutEffect; + +// src/hooks/useIsMounted.ts +var useIsMounted = () => { const isMounted = (0,external_React_.useRef)(false); - react_spring_shared_esm_useIsomorphicLayoutEffect(() => { + react_spring_shared_modern_useIsomorphicLayoutEffect(() => { isMounted.current = true; return () => { isMounted.current = false; @@ -16287,28 +30628,33 @@ const useIsMounted = () => { return isMounted; }; -function react_spring_shared_esm_useForceUpdate() { - const update = (0,external_React_.useState)()[1]; +// src/hooks/useForceUpdate.ts +function useForceUpdate() { + const update2 = (0,external_React_.useState)()[1]; const isMounted = useIsMounted(); return () => { if (isMounted.current) { - update(Math.random()); + update2(Math.random()); } }; } +// src/hooks/useMemoOne.ts + function useMemoOne(getResult, inputs) { - const [initial] = (0,external_React_.useState)(() => ({ - inputs, - result: getResult() - })); + const [initial] = (0,external_React_.useState)( + () => ({ + inputs, + result: getResult() + }) + ); const committed = (0,external_React_.useRef)(); const prevCache = committed.current; let cache = prevCache; - if (cache) { - const useCache = Boolean(inputs && cache.inputs && areInputsEqual(inputs, cache.inputs)); - + const useCache = Boolean( + inputs && cache.inputs && areInputsEqual(inputs, cache.inputs) + ); if (!useCache) { cache = { inputs, @@ -16318,35 +30664,34 @@ function useMemoOne(getResult, inputs) { } else { cache = initial; } - (0,external_React_.useEffect)(() => { committed.current = cache; - if (prevCache == initial) { - initial.inputs = initial.result = undefined; + initial.inputs = initial.result = void 0; } }, [cache]); return cache.result; } - function areInputsEqual(next, prev) { if (next.length !== prev.length) { return false; } - for (let i = 0; i < next.length; i++) { if (next[i] !== prev[i]) { return false; } } - return true; } -const react_spring_shared_esm_useOnce = effect => (0,external_React_.useEffect)(effect, emptyDeps); -const emptyDeps = []; +// src/hooks/useOnce.ts -function react_spring_shared_esm_usePrev(value) { +var useOnce = (effect) => (0,external_React_.useEffect)(effect, emptyDeps); +var emptyDeps = []; + +// src/hooks/usePrev.ts + +function usePrev(value) { const prevRef = (0,external_React_.useRef)(); (0,external_React_.useEffect)(() => { prevRef.current = value; @@ -16354,142 +30699,121 @@ function react_spring_shared_esm_usePrev(value) { return prevRef.current; } -const useReducedMotion = () => { - const [reducedMotion, setReducedMotion] = useState(null); - react_spring_shared_esm_useIsomorphicLayoutEffect(() => { - const mql = window.matchMedia('(prefers-reduced-motion)'); +// src/hooks/useReducedMotion.ts - const handleMediaChange = e => { +var useReducedMotion = () => { + const [reducedMotion, setReducedMotion] = useState3(null); + react_spring_shared_modern_useIsomorphicLayoutEffect(() => { + const mql = window.matchMedia("(prefers-reduced-motion)"); + const handleMediaChange = (e) => { setReducedMotion(e.matches); - react_spring_shared_esm_assign({ + react_spring_shared_modern_assign({ skipAnimation: e.matches }); }; - handleMediaChange(mql); - mql.addEventListener('change', handleMediaChange); + mql.addEventListener("change", handleMediaChange); return () => { - mql.removeEventListener('change', handleMediaChange); + mql.removeEventListener("change", handleMediaChange); }; }, []); return reducedMotion; }; +//# sourceMappingURL=react-spring_shared.modern.mjs.map +;// CONCATENATED MODULE: ./node_modules/@react-spring/animated/dist/react-spring_animated.modern.mjs +// src/Animated.ts - -;// CONCATENATED MODULE: ./node_modules/@react-spring/animated/dist/react-spring-animated.esm.js - - - - -const $node = Symbol.for('Animated:node'); -const isAnimated = value => !!value && value[$node] === value; -const getAnimated = owner => owner && owner[$node]; -const setAnimated = (owner, node) => defineHidden(owner, $node, node); -const getPayload = owner => owner && owner[$node] && owner[$node].getPayload(); -class Animated { +var $node = Symbol.for("Animated:node"); +var isAnimated = (value) => !!value && value[$node] === value; +var getAnimated = (owner) => owner && owner[$node]; +var setAnimated = (owner, node) => defineHidden(owner, $node, node); +var getPayload = (owner) => owner && owner[$node] && owner[$node].getPayload(); +var Animated = class { constructor() { - this.payload = void 0; setAnimated(this, this); } - + /** Get every `AnimatedValue` used by this node. */ getPayload() { return this.payload || []; } +}; -} +// src/AnimatedValue.ts -class AnimatedValue extends Animated { +var AnimatedValue = class extends Animated { constructor(_value) { super(); - this.done = true; - this.elapsedTime = void 0; - this.lastPosition = void 0; - this.lastVelocity = void 0; - this.v0 = void 0; - this.durationProgress = 0; this._value = _value; - - if (react_spring_shared_esm_is.num(this._value)) { + this.done = true; + this.durationProgress = 0; + if (is.num(this._value)) { this.lastPosition = this._value; } } - + /** @internal */ static create(value) { return new AnimatedValue(value); } - getPayload() { return [this]; } - getValue() { return this._value; } - setValue(value, step) { - if (react_spring_shared_esm_is.num(value)) { + if (is.num(value)) { this.lastPosition = value; - if (step) { value = Math.round(value / step) * step; - if (this.done) { this.lastPosition = value; } } } - if (this._value === value) { return false; } - this._value = value; return true; } - reset() { - const { - done - } = this; + const { done } = this; this.done = false; - - if (react_spring_shared_esm_is.num(this._value)) { + if (is.num(this._value)) { this.elapsedTime = 0; this.durationProgress = 0; this.lastPosition = this._value; - if (done) this.lastVelocity = null; + if (done) + this.lastVelocity = null; this.v0 = null; } } +}; -} +// src/AnimatedString.ts -class AnimatedString extends AnimatedValue { +var AnimatedString = class extends AnimatedValue { constructor(value) { super(0); this._string = null; - this._toString = void 0; this._toString = createInterpolator({ output: [value, value] }); } - + /** @internal */ static create(value) { return new AnimatedString(value); } - getValue() { - let value = this._string; + const value = this._string; return value == null ? this._string = this._toString(this._value) : value; } - setValue(value) { - if (react_spring_shared_esm_is.str(value)) { + if (is.str(value)) { if (value == this._string) { return false; } - this._string = value; this._value = 1; } else if (super.setValue(value)) { @@ -16497,34 +30821,35 @@ class AnimatedString extends AnimatedValue { } else { return false; } - return true; } - reset(goal) { if (goal) { this._toString = createInterpolator({ output: [this.getValue(), goal] }); } - this._value = 0; super.reset(); } - -} - -const TreeContext = { - dependencies: null }; -class AnimatedObject extends Animated { +// src/AnimatedArray.ts + + +// src/AnimatedObject.ts + + +// src/context.ts +var TreeContext = { dependencies: null }; + +// src/AnimatedObject.ts +var AnimatedObject = class extends Animated { constructor(source) { super(); this.source = source; this.setValue(source); } - getValue(animated) { const values = {}; eachProp(this.source, (source, key) => { @@ -16538,272 +30863,233 @@ class AnimatedObject extends Animated { }); return values; } - + /** Replace the raw object data */ setValue(source) { this.source = source; this.payload = this._makePayload(source); } - reset() { if (this.payload) { - react_spring_shared_esm_each(this.payload, node => node.reset()); + react_spring_shared_modern_each(this.payload, (node) => node.reset()); } } - + /** Create a payload set. */ _makePayload(source) { if (source) { - const payload = new Set(); + const payload = /* @__PURE__ */ new Set(); eachProp(source, this._addToPayload, payload); return Array.from(payload); } } - + /** Add to a payload set. */ _addToPayload(source) { if (TreeContext.dependencies && hasFluidValue(source)) { TreeContext.dependencies.add(source); } - const payload = getPayload(source); - if (payload) { - react_spring_shared_esm_each(payload, node => this.add(node)); + react_spring_shared_modern_each(payload, (node) => this.add(node)); } } +}; -} - -class AnimatedArray extends AnimatedObject { +// src/AnimatedArray.ts +var AnimatedArray = class extends AnimatedObject { constructor(source) { super(source); } - + /** @internal */ static create(source) { return new AnimatedArray(source); } - getValue() { - return this.source.map(node => node.getValue()); + return this.source.map((node) => node.getValue()); } - setValue(source) { const payload = this.getPayload(); - if (source.length == payload.length) { return payload.map((node, i) => node.setValue(source[i])).some(Boolean); } - super.setValue(source.map(makeAnimated)); return true; } - -} - +}; function makeAnimated(value) { const nodeType = isAnimatedString(value) ? AnimatedString : AnimatedValue; return nodeType.create(value); } +// src/getAnimatedType.ts + function getAnimatedType(value) { const parentNode = getAnimated(value); - return parentNode ? parentNode.constructor : react_spring_shared_esm_is.arr(value) ? AnimatedArray : isAnimatedString(value) ? AnimatedString : AnimatedValue; + return parentNode ? parentNode.constructor : is.arr(value) ? AnimatedArray : isAnimatedString(value) ? AnimatedString : AnimatedValue; } -function react_spring_animated_esm_extends() { - react_spring_animated_esm_extends = Object.assign ? Object.assign.bind() : function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; +// src/createHost.ts - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - return target; - }; - return react_spring_animated_esm_extends.apply(this, arguments); -} +// src/withAnimated.tsx -const withAnimated = (Component, host) => { - const hasInstance = !react_spring_shared_esm_is.fun(Component) || Component.prototype && Component.prototype.isReactComponent; + + +var withAnimated = (Component, host) => { + const hasInstance = ( + // Function components must use "forwardRef" to avoid being + // re-rendered on every animation frame. + !is.fun(Component) || Component.prototype && Component.prototype.isReactComponent + ); return (0,external_React_.forwardRef)((givenProps, givenRef) => { const instanceRef = (0,external_React_.useRef)(null); - const ref = hasInstance && (0,external_React_.useCallback)(value => { - instanceRef.current = updateRef(givenRef, value); - }, [givenRef]); + const ref = hasInstance && // eslint-disable-next-line react-hooks/rules-of-hooks + (0,external_React_.useCallback)( + (value) => { + instanceRef.current = updateRef(givenRef, value); + }, + [givenRef] + ); const [props, deps] = getAnimatedState(givenProps, host); - const forceUpdate = react_spring_shared_esm_useForceUpdate(); - + const forceUpdate = useForceUpdate(); const callback = () => { const instance = instanceRef.current; - if (hasInstance && !instance) { return; } - const didUpdate = instance ? host.applyAnimatedValues(instance, props.getValue(true)) : false; - if (didUpdate === false) { forceUpdate(); } }; - const observer = new PropsObserver(callback, deps); const observerRef = (0,external_React_.useRef)(); - react_spring_shared_esm_useIsomorphicLayoutEffect(() => { + react_spring_shared_modern_useIsomorphicLayoutEffect(() => { observerRef.current = observer; - react_spring_shared_esm_each(deps, dep => addFluidObserver(dep, observer)); + react_spring_shared_modern_each(deps, (dep) => addFluidObserver(dep, observer)); return () => { if (observerRef.current) { - react_spring_shared_esm_each(observerRef.current.deps, dep => removeFluidObserver(dep, observerRef.current)); + react_spring_shared_modern_each( + observerRef.current.deps, + (dep) => removeFluidObserver(dep, observerRef.current) + ); raf.cancel(observerRef.current.update); } }; }); (0,external_React_.useEffect)(callback, []); - react_spring_shared_esm_useOnce(() => () => { - const observer = observerRef.current; - react_spring_shared_esm_each(observer.deps, dep => removeFluidObserver(dep, observer)); + useOnce(() => () => { + const observer2 = observerRef.current; + react_spring_shared_modern_each(observer2.deps, (dep) => removeFluidObserver(dep, observer2)); }); const usedProps = host.getComponentProps(props.getValue()); - return external_React_.createElement(Component, react_spring_animated_esm_extends({}, usedProps, { - ref: ref - })); + return /* @__PURE__ */ external_React_.createElement(Component, { ...usedProps, ref }); }); }; - -class PropsObserver { +var PropsObserver = class { constructor(update, deps) { this.update = update; this.deps = deps; } - eventObserved(event) { - if (event.type == 'change') { + if (event.type == "change") { raf.write(this.update); } } - -} - +}; function getAnimatedState(props, host) { - const dependencies = new Set(); + const dependencies = /* @__PURE__ */ new Set(); TreeContext.dependencies = dependencies; - if (props.style) props = react_spring_animated_esm_extends({}, props, { - style: host.createAnimatedStyle(props.style) - }); + if (props.style) + props = { + ...props, + style: host.createAnimatedStyle(props.style) + }; props = new AnimatedObject(props); TreeContext.dependencies = null; return [props, dependencies]; } - function updateRef(ref, value) { if (ref) { - if (react_spring_shared_esm_is.fun(ref)) ref(value);else ref.current = value; + if (is.fun(ref)) + ref(value); + else + ref.current = value; } - return value; } -const cacheKey = Symbol.for('AnimatedComponent'); -const createHost = (components, { - applyAnimatedValues: _applyAnimatedValues = () => false, - createAnimatedStyle: _createAnimatedStyle = style => new AnimatedObject(style), - getComponentProps: _getComponentProps = props => props +// src/createHost.ts +var cacheKey = Symbol.for("AnimatedComponent"); +var createHost = (components, { + applyAnimatedValues = () => false, + createAnimatedStyle = (style) => new AnimatedObject(style), + getComponentProps = (props) => props } = {}) => { const hostConfig = { - applyAnimatedValues: _applyAnimatedValues, - createAnimatedStyle: _createAnimatedStyle, - getComponentProps: _getComponentProps + applyAnimatedValues, + createAnimatedStyle, + getComponentProps }; - - const animated = Component => { - const displayName = getDisplayName(Component) || 'Anonymous'; - - if (react_spring_shared_esm_is.str(Component)) { + const animated = (Component) => { + const displayName = getDisplayName(Component) || "Anonymous"; + if (is.str(Component)) { Component = animated[Component] || (animated[Component] = withAnimated(Component, hostConfig)); } else { Component = Component[cacheKey] || (Component[cacheKey] = withAnimated(Component, hostConfig)); } - Component.displayName = `Animated(${displayName})`; return Component; }; - eachProp(components, (Component, key) => { - if (react_spring_shared_esm_is.arr(components)) { + if (is.arr(components)) { key = getDisplayName(Component); } - animated[key] = animated(Component); }); return { animated }; }; +var getDisplayName = (arg) => is.str(arg) ? arg : arg && is.str(arg.displayName) ? arg.displayName : is.fun(arg) && arg.name || null; -const getDisplayName = arg => react_spring_shared_esm_is.str(arg) ? arg : arg && react_spring_shared_esm_is.str(arg.displayName) ? arg.displayName : react_spring_shared_esm_is.fun(arg) && arg.name || null; +//# sourceMappingURL=react-spring_animated.modern.mjs.map +;// CONCATENATED MODULE: ./node_modules/@react-spring/core/dist/react-spring_core.modern.mjs +// src/hooks/useChain.ts - -;// CONCATENATED MODULE: ./node_modules/@react-spring/core/dist/react-spring-core.esm.js - - - - - - - - -function react_spring_core_esm_extends() { - react_spring_core_esm_extends = Object.assign ? Object.assign.bind() : function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; - }; - return react_spring_core_esm_extends.apply(this, arguments); -} +// src/helpers.ts function callProp(value, ...args) { - return react_spring_shared_esm_is.fun(value) ? value(...args) : value; + return is.fun(value) ? value(...args) : value; } -const matchProp = (value, key) => value === true || !!(key && value && (react_spring_shared_esm_is.fun(value) ? value(key) : react_spring_shared_esm_toArray(value).includes(key))); -const resolveProp = (prop, key) => react_spring_shared_esm_is.obj(prop) ? key && prop[key] : prop; -const getDefaultProp = (props, key) => props.default === true ? props[key] : props.default ? props.default[key] : undefined; - -const noopTransform = value => value; - -const getDefaultProps = (props, transform = noopTransform) => { +var matchProp = (value, key) => value === true || !!(key && value && (is.fun(value) ? value(key) : toArray(value).includes(key))); +var resolveProp = (prop, key) => is.obj(prop) ? key && prop[key] : prop; +var getDefaultProp = (props, key) => props.default === true ? props[key] : props.default ? props.default[key] : void 0; +var noopTransform = (value) => value; +var getDefaultProps = (props, transform = noopTransform) => { let keys = DEFAULT_PROPS; - if (props.default && props.default !== true) { props = props.default; keys = Object.keys(props); } - - const defaults = {}; - + const defaults2 = {}; for (const key of keys) { const value = transform(props[key], key); - - if (!react_spring_shared_esm_is.und(value)) { - defaults[key] = value; + if (!is.und(value)) { + defaults2[key] = value; } } - - return defaults; + return defaults2; }; -const DEFAULT_PROPS = ['config', 'onProps', 'onStart', 'onChange', 'onPause', 'onResume', 'onRest']; -const RESERVED_PROPS = { +var DEFAULT_PROPS = [ + "config", + "onProps", + "onStart", + "onChange", + "onPause", + "onResume", + "onRest" +]; +var RESERVED_PROPS = { config: 1, from: 1, to: 1, @@ -16823,6 +31109,7 @@ const RESERVED_PROPS = { onResume: 1, onRest: 1, onResolve: 1, + // Transition props items: 1, trail: 1, sort: 1, @@ -16833,11 +31120,11 @@ const RESERVED_PROPS = { leave: 1, children: 1, onDestroyed: 1, + // Internal props keys: 1, callId: 1, parentId: 1 }; - function getForwardProps(props) { const forward = {}; let count = 0; @@ -16847,71 +31134,63 @@ function getForwardProps(props) { count++; } }); - if (count) { return forward; } } - function inferTo(props) { - const to = getForwardProps(props); - - if (to) { - const out = { - to - }; - eachProp(props, (val, key) => key in to || (out[key] = val)); + const to2 = getForwardProps(props); + if (to2) { + const out = { to: to2 }; + eachProp(props, (val, key) => key in to2 || (out[key] = val)); return out; } - - return react_spring_core_esm_extends({}, props); + return { ...props }; } function computeGoal(value) { value = getFluidValue(value); - return react_spring_shared_esm_is.arr(value) ? value.map(computeGoal) : isAnimatedString(value) ? globals.createStringInterpolator({ + return is.arr(value) ? value.map(computeGoal) : isAnimatedString(value) ? globals_exports.createStringInterpolator({ range: [0, 1], output: [value, value] })(1) : value; } function hasProps(props) { - for (const _ in props) return true; - + for (const _ in props) + return true; return false; } -function isAsyncTo(to) { - return react_spring_shared_esm_is.fun(to) || react_spring_shared_esm_is.arr(to) && react_spring_shared_esm_is.obj(to[0]); +function isAsyncTo(to2) { + return is.fun(to2) || is.arr(to2) && is.obj(to2[0]); } function detachRefs(ctrl, ref) { - var _ctrl$ref; - - (_ctrl$ref = ctrl.ref) == null ? void 0 : _ctrl$ref.delete(ctrl); - ref == null ? void 0 : ref.delete(ctrl); + ctrl.ref?.delete(ctrl); + ref?.delete(ctrl); } function replaceRef(ctrl, ref) { if (ref && ctrl.ref !== ref) { - var _ctrl$ref2; - - (_ctrl$ref2 = ctrl.ref) == null ? void 0 : _ctrl$ref2.delete(ctrl); + ctrl.ref?.delete(ctrl); ref.add(ctrl); ctrl.ref = ref; } } -function useChain(refs, timeSteps, timeFrame = 1000) { +// src/hooks/useChain.ts +function useChain(refs, timeSteps, timeFrame = 1e3) { useIsomorphicLayoutEffect(() => { if (timeSteps) { let prevDelay = 0; each(refs, (ref, i) => { const controllers = ref.current; - if (controllers.length) { let delay = timeFrame * timeSteps[i]; - if (isNaN(delay)) delay = prevDelay;else prevDelay = delay; - each(controllers, ctrl => { - each(ctrl.queue, props => { + if (isNaN(delay)) + delay = prevDelay; + else + prevDelay = delay; + each(controllers, (ctrl) => { + each(ctrl.queue, (props) => { const memoizedDelayProp = props.delay; - - props.delay = key => delay + callProp(memoizedDelayProp || 0, key); + props.delay = (key) => delay + callProp(memoizedDelayProp || 0, key); }); }); ref.start(); @@ -16919,17 +31198,19 @@ function useChain(refs, timeSteps, timeFrame = 1000) { }); } else { let p = Promise.resolve(); - each(refs, ref => { + each(refs, (ref) => { const controllers = ref.current; - if (controllers.length) { - const queues = controllers.map(ctrl => { + const queues = controllers.map((ctrl) => { const q = ctrl.queue; ctrl.queue = []; return q; }); p = p.then(() => { - each(controllers, (ctrl, i) => each(queues[i] || [], update => ctrl.queue.push(update))); + each( + controllers, + (ctrl, i) => each(queues[i] || [], (update2) => ctrl.queue.push(update2)) + ); return Promise.all(ref.start()); }); } @@ -16938,208 +31219,120 @@ function useChain(refs, timeSteps, timeFrame = 1000) { }); } -const 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 - } -}; -const c1 = 1.70158; -const c2 = c1 * 1.525; -const c3 = c1 + 1; -const c4 = 2 * Math.PI / 3; -const c5 = 2 * Math.PI / 4.5; +// src/hooks/useSpring.ts -const bounceOut = x => { - const n1 = 7.5625; - const d1 = 2.75; - if (x < 1 / d1) { - return n1 * x * x; - } else if (x < 2 / d1) { - return n1 * (x -= 1.5 / d1) * x + 0.75; - } else if (x < 2.5 / d1) { - return n1 * (x -= 2.25 / d1) * x + 0.9375; - } else { - return n1 * (x -= 2.625 / d1) * x + 0.984375; - } +// src/hooks/useSprings.ts + + + +// src/SpringValue.ts + + + +// src/AnimationConfig.ts + + +// src/constants.ts +var 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 } }; -const easings = { - linear: x => x, - easeInQuad: x => x * x, - easeOutQuad: x => 1 - (1 - x) * (1 - x), - easeInOutQuad: x => x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2, - easeInCubic: x => x * x * x, - easeOutCubic: x => 1 - Math.pow(1 - x, 3), - easeInOutCubic: x => x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2, - easeInQuart: x => x * x * x * x, - easeOutQuart: x => 1 - Math.pow(1 - x, 4), - easeInOutQuart: x => x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2, - easeInQuint: x => x * x * x * x * x, - easeOutQuint: x => 1 - Math.pow(1 - x, 5), - easeInOutQuint: x => x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2, - easeInSine: x => 1 - Math.cos(x * Math.PI / 2), - easeOutSine: x => Math.sin(x * Math.PI / 2), - easeInOutSine: x => -(Math.cos(Math.PI * x) - 1) / 2, - easeInExpo: x => x === 0 ? 0 : Math.pow(2, 10 * x - 10), - easeOutExpo: x => x === 1 ? 1 : 1 - Math.pow(2, -10 * x), - easeInOutExpo: x => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? Math.pow(2, 20 * x - 10) / 2 : (2 - Math.pow(2, -20 * x + 10)) / 2, - easeInCirc: x => 1 - Math.sqrt(1 - Math.pow(x, 2)), - easeOutCirc: x => Math.sqrt(1 - Math.pow(x - 1, 2)), - easeInOutCirc: x => x < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2, - easeInBack: x => c3 * x * x * x - c1 * x * x, - easeOutBack: x => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2), - easeInOutBack: x => x < 0.5 ? Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2, - easeInElastic: x => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4), - easeOutElastic: x => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1, - easeInOutElastic: x => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2 : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5) / 2 + 1, - easeInBounce: x => 1 - bounceOut(1 - x), - easeOutBounce: bounceOut, - easeInOutBounce: x => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2 -}; - -const defaults = react_spring_core_esm_extends({}, config.default, { +// src/AnimationConfig.ts +var defaults = { + ...config.default, mass: 1, damping: 1, easing: easings.linear, clamp: false -}); - -class AnimationConfig { +}; +var AnimationConfig = class { constructor() { - this.tension = void 0; - this.friction = void 0; - this.frequency = void 0; - this.damping = void 0; - this.mass = void 0; + /** + * The initial velocity of one or more values. + * + * @default 0 + */ this.velocity = 0; - this.restVelocity = void 0; - this.precision = void 0; - this.progress = void 0; - this.duration = void 0; - this.easing = void 0; - this.clamp = void 0; - this.bounce = void 0; - this.decay = void 0; - this.round = void 0; Object.assign(this, defaults); } - -} -function mergeConfig(config, newConfig, defaultConfig) { +}; +function mergeConfig(config2, newConfig, defaultConfig) { if (defaultConfig) { - defaultConfig = react_spring_core_esm_extends({}, defaultConfig); + defaultConfig = { ...defaultConfig }; sanitizeConfig(defaultConfig, newConfig); - newConfig = react_spring_core_esm_extends({}, defaultConfig, newConfig); + newConfig = { ...defaultConfig, ...newConfig }; } - - sanitizeConfig(config, newConfig); - Object.assign(config, newConfig); - + sanitizeConfig(config2, newConfig); + Object.assign(config2, newConfig); for (const key in defaults) { - if (config[key] == null) { - config[key] = defaults[key]; + if (config2[key] == null) { + config2[key] = defaults[key]; } } - - let { - mass, - frequency, - damping - } = config; - - if (!react_spring_shared_esm_is.und(frequency)) { - if (frequency < 0.01) frequency = 0.01; - if (damping < 0) damping = 0; - config.tension = Math.pow(2 * Math.PI / frequency, 2) * mass; - config.friction = 4 * Math.PI * damping * mass / frequency; + let { frequency, damping } = config2; + const { mass } = config2; + if (!is.und(frequency)) { + if (frequency < 0.01) + frequency = 0.01; + if (damping < 0) + damping = 0; + config2.tension = Math.pow(2 * Math.PI / frequency, 2) * mass; + config2.friction = 4 * Math.PI * damping * mass / frequency; } - - return config; + return config2; } - -function sanitizeConfig(config, props) { - if (!react_spring_shared_esm_is.und(props.decay)) { - config.duration = undefined; +function sanitizeConfig(config2, props) { + if (!is.und(props.decay)) { + config2.duration = void 0; } else { - const isTensionConfig = !react_spring_shared_esm_is.und(props.tension) || !react_spring_shared_esm_is.und(props.friction); - - if (isTensionConfig || !react_spring_shared_esm_is.und(props.frequency) || !react_spring_shared_esm_is.und(props.damping) || !react_spring_shared_esm_is.und(props.mass)) { - config.duration = undefined; - config.decay = undefined; + const isTensionConfig = !is.und(props.tension) || !is.und(props.friction); + if (isTensionConfig || !is.und(props.frequency) || !is.und(props.damping) || !is.und(props.mass)) { + config2.duration = void 0; + config2.decay = void 0; } - if (isTensionConfig) { - config.frequency = undefined; + config2.frequency = void 0; } } } -const emptyArray = []; -class Animation { +// src/Animation.ts +var emptyArray = []; +var Animation = class { constructor() { this.changed = false; this.values = emptyArray; this.toValues = null; this.fromValues = emptyArray; - this.to = void 0; - this.from = void 0; this.config = new AnimationConfig(); this.immediate = false; } +}; -} +// src/scheduleProps.ts -function scheduleProps(callId, { - key, - props, - defaultProps, - state, - actions -}) { +function scheduleProps(callId, { key, props, defaultProps, state, actions }) { return new Promise((resolve, reject) => { - var _props$cancel; - let delay; let timeout; - let cancel = matchProp((_props$cancel = props.cancel) != null ? _props$cancel : defaultProps == null ? void 0 : defaultProps.cancel, key); - + let cancel = matchProp(props.cancel ?? defaultProps?.cancel, key); if (cancel) { onStart(); } else { - if (!react_spring_shared_esm_is.und(props.pause)) { + if (!is.und(props.pause)) { state.paused = matchProp(props.pause, key); } - - let pause = defaultProps == null ? void 0 : defaultProps.pause; - + let pause = defaultProps?.pause; if (pause !== true) { pause = state.paused || matchProp(pause, key); } - delay = callProp(props.delay || 0, key); - if (pause) { state.resumeQueue.add(onResume); actions.pause(); @@ -17148,16 +31341,14 @@ function scheduleProps(callId, { onResume(); } } - function onPause() { state.resumeQueue.add(onResume); state.timeouts.delete(timeout); timeout.cancel(); delay = timeout.time - raf.now(); } - function onResume() { - if (delay > 0 && !globals.skipAnimation) { + if (delay > 0 && !globals_exports.skipAnimation) { state.delayed = true; timeout = raf.setTimeout(onStart, delay); state.pauseQueue.add(onPause); @@ -17166,24 +31357,17 @@ function scheduleProps(callId, { onStart(); } } - function onStart() { if (state.delayed) { state.delayed = false; } - state.pauseQueue.delete(onPause); state.timeouts.delete(timeout); - if (callId <= (state.cancelId || 0)) { cancel = true; } - try { - actions.start(react_spring_core_esm_extends({}, props, { - callId, - cancel - }), resolve); + actions.start({ ...props, callId, cancel }, resolve); } catch (err) { reject(err); } @@ -17191,117 +31375,115 @@ function scheduleProps(callId, { }); } -const getCombinedResult = (target, results) => results.length == 1 ? results[0] : results.some(result => result.cancelled) ? getCancelledResult(target.get()) : results.every(result => result.noop) ? getNoopResult(target.get()) : getFinishedResult(target.get(), results.every(result => result.finished)); -const getNoopResult = value => ({ +// src/runAsync.ts + + +// src/AnimationResult.ts +var getCombinedResult = (target, results) => results.length == 1 ? results[0] : results.some((result) => result.cancelled) ? getCancelledResult(target.get()) : results.every((result) => result.noop) ? getNoopResult(target.get()) : getFinishedResult( + target.get(), + results.every((result) => result.finished) +); +var getNoopResult = (value) => ({ value, noop: true, finished: true, cancelled: false }); -const getFinishedResult = (value, finished, cancelled = false) => ({ +var getFinishedResult = (value, finished, cancelled = false) => ({ value, finished, cancelled }); -const getCancelledResult = value => ({ +var getCancelledResult = (value) => ({ value, cancelled: true, finished: false }); -function runAsync(to, props, state, target) { - const { - callId, - parentId, - onRest - } = props; - const { - asyncTo: prevTo, - promise: prevPromise - } = state; - - if (!parentId && to === prevTo && !props.reset) { +// src/runAsync.ts +function runAsync(to2, props, state, target) { + const { callId, parentId, onRest } = props; + const { asyncTo: prevTo, promise: prevPromise } = state; + if (!parentId && to2 === prevTo && !props.reset) { return prevPromise; } - return state.promise = (async () => { state.asyncId = callId; - state.asyncTo = to; - const defaultProps = getDefaultProps(props, (value, key) => key === 'onRest' ? undefined : value); + state.asyncTo = to2; + const defaultProps = getDefaultProps( + props, + (value, key) => ( + // The `onRest` prop is only called when the `runAsync` promise is resolved. + key === "onRest" ? void 0 : value + ) + ); let preventBail; let bail; - const bailPromise = new Promise((resolve, reject) => (preventBail = resolve, bail = reject)); - - const bailIfEnded = bailSignal => { - const bailResult = callId <= (state.cancelId || 0) && getCancelledResult(target) || callId !== state.asyncId && getFinishedResult(target, false); - + const bailPromise = new Promise( + (resolve, reject) => (preventBail = resolve, bail = reject) + ); + const bailIfEnded = (bailSignal) => { + const bailResult = ( + // The `cancel` prop or `stop` method was used. + callId <= (state.cancelId || 0) && getCancelledResult(target) || // The async `to` prop was replaced. + callId !== state.asyncId && getFinishedResult(target, false) + ); if (bailResult) { bailSignal.result = bailResult; bail(bailSignal); throw bailSignal; } }; - const animate = (arg1, arg2) => { const bailSignal = new BailSignal(); - const skipAnimationSignal = new SkipAniamtionSignal(); + const skipAnimationSignal = new SkipAnimationSignal(); return (async () => { - if (globals.skipAnimation) { + if (globals_exports.skipAnimation) { stopAsync(state); skipAnimationSignal.result = getFinishedResult(target, false); bail(skipAnimationSignal); throw skipAnimationSignal; } - bailIfEnded(bailSignal); - const props = react_spring_shared_esm_is.obj(arg1) ? react_spring_core_esm_extends({}, arg1) : react_spring_core_esm_extends({}, arg2, { - to: arg1 - }); - props.parentId = callId; + const props2 = is.obj(arg1) ? { ...arg1 } : { ...arg2, to: arg1 }; + props2.parentId = callId; eachProp(defaultProps, (value, key) => { - if (react_spring_shared_esm_is.und(props[key])) { - props[key] = value; + if (is.und(props2[key])) { + props2[key] = value; } }); - const result = await target.start(props); + const result2 = await target.start(props2); bailIfEnded(bailSignal); - if (state.paused) { - await new Promise(resume => { + await new Promise((resume) => { state.resumeQueue.add(resume); }); } - - return result; + return result2; })(); }; - let result; - - if (globals.skipAnimation) { + if (globals_exports.skipAnimation) { stopAsync(state); return getFinishedResult(target, false); } - try { let animating; - - if (react_spring_shared_esm_is.arr(to)) { - animating = (async queue => { - for (const props of queue) { - await animate(props); + if (is.arr(to2)) { + animating = (async (queue) => { + for (const props2 of queue) { + await animate(props2); } - })(to); + })(to2); } else { - animating = Promise.resolve(to(animate, target.stop.bind(target))); + animating = Promise.resolve(to2(animate, target.stop.bind(target))); } - await Promise.all([animating.then(preventBail), bailPromise]); result = getFinishedResult(target.get(), true, false); } catch (err) { if (err instanceof BailSignal) { result = err.result; - } else if (err instanceof SkipAniamtionSignal) { + } else if (err instanceof SkipAnimationSignal) { result = err.result; } else { throw err; @@ -17309,478 +31491,438 @@ function runAsync(to, props, state, target) { } finally { if (callId == state.asyncId) { state.asyncId = parentId; - state.asyncTo = parentId ? prevTo : undefined; - state.promise = parentId ? prevPromise : undefined; + state.asyncTo = parentId ? prevTo : void 0; + state.promise = parentId ? prevPromise : void 0; } } - - if (react_spring_shared_esm_is.fun(onRest)) { + if (is.fun(onRest)) { raf.batchedUpdates(() => { onRest(result, target, target.item); }); } - return result; })(); } function stopAsync(state, cancelId) { - flush(state.timeouts, t => t.cancel()); + flush(state.timeouts, (t) => t.cancel()); state.pauseQueue.clear(); state.resumeQueue.clear(); - state.asyncId = state.asyncTo = state.promise = undefined; - if (cancelId) state.cancelId = cancelId; + state.asyncId = state.asyncTo = state.promise = void 0; + if (cancelId) + state.cancelId = cancelId; } -class BailSignal extends Error { +var BailSignal = class extends Error { constructor() { - super('An async animation has been interrupted. You see this error because you ' + 'forgot to use `await` or `.catch(...)` on its returned promise.'); - this.result = void 0; + super( + "An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise." + ); } - -} -class SkipAniamtionSignal extends Error { +}; +var SkipAnimationSignal = class extends Error { constructor() { - super('SkipAnimationSignal'); - this.result = void 0; + super("SkipAnimationSignal"); } +}; -} +// src/FrameValue.ts -const isFrameValue = value => value instanceof FrameValue; -let nextId$1 = 1; -class FrameValue extends FluidValue { - constructor(...args) { - super(...args); - this.id = nextId$1++; - this.key = void 0; + +var isFrameValue = (value) => value instanceof FrameValue; +var nextId = 1; +var FrameValue = class extends FluidValue { + constructor() { + super(...arguments); + this.id = nextId++; this._priority = 0; } - get priority() { return this._priority; } - set priority(priority) { if (this._priority != priority) { this._priority = priority; - this._onPriorityChange(priority); } } - + /** Get the current value */ get() { const node = getAnimated(this); return node && node.getValue(); } - + /** Create a spring that maps our value to another value */ to(...args) { - return globals.to(this, args); + return globals_exports.to(this, args); } - + /** @deprecated Use the `to` method instead. */ interpolate(...args) { - react_spring_shared_esm_deprecateInterpolate(); - return globals.to(this, args); + deprecateInterpolate(); + return globals_exports.to(this, args); } - toJSON() { return this.get(); } - observerAdded(count) { - if (count == 1) this._attach(); + if (count == 1) + this._attach(); } - observerRemoved(count) { - if (count == 0) this._detach(); + if (count == 0) + this._detach(); } - - _attach() {} - - _detach() {} - + /** Called when the first child is added. */ + _attach() { + } + /** Called when the last child is removed. */ + _detach() { + } + /** Tell our children about our new value */ _onChange(value, idle = false) { callFluidObservers(this, { - type: 'change', + type: "change", parent: this, value, idle }); } - + /** Tell our children about our new priority */ _onPriorityChange(priority) { if (!this.idle) { frameLoop.sort(this); } - callFluidObservers(this, { - type: 'priority', + type: "priority", parent: this, priority }); } +}; -} +// src/SpringPhase.ts +var $P = Symbol.for("SpringPhase"); +var HAS_ANIMATED = 1; +var IS_ANIMATING = 2; +var IS_PAUSED = 4; +var hasAnimated = (target) => (target[$P] & HAS_ANIMATED) > 0; +var isAnimating = (target) => (target[$P] & IS_ANIMATING) > 0; +var isPaused = (target) => (target[$P] & IS_PAUSED) > 0; +var setActiveBit = (target, active) => active ? target[$P] |= IS_ANIMATING | HAS_ANIMATED : target[$P] &= ~IS_ANIMATING; +var setPausedBit = (target, paused) => paused ? target[$P] |= IS_PAUSED : target[$P] &= ~IS_PAUSED; -const $P = Symbol.for('SpringPhase'); -const HAS_ANIMATED = 1; -const IS_ANIMATING = 2; -const IS_PAUSED = 4; -const hasAnimated = target => (target[$P] & HAS_ANIMATED) > 0; -const isAnimating = target => (target[$P] & IS_ANIMATING) > 0; -const isPaused = target => (target[$P] & IS_PAUSED) > 0; -const setActiveBit = (target, active) => active ? target[$P] |= IS_ANIMATING | HAS_ANIMATED : target[$P] &= ~IS_ANIMATING; -const setPausedBit = (target, paused) => paused ? target[$P] |= IS_PAUSED : target[$P] &= ~IS_PAUSED; - -class SpringValue extends FrameValue { +// src/SpringValue.ts +var SpringValue = class extends FrameValue { constructor(arg1, arg2) { super(); - this.key = void 0; + /** The animation state */ this.animation = new Animation(); - this.queue = void 0; + /** Some props have customizable default values */ this.defaultProps = {}; + /** The state for `runAsync` calls */ this._state = { paused: false, delayed: false, - pauseQueue: new Set(), - resumeQueue: new Set(), - timeouts: new Set() + pauseQueue: /* @__PURE__ */ new Set(), + resumeQueue: /* @__PURE__ */ new Set(), + timeouts: /* @__PURE__ */ new Set() }; - this._pendingCalls = new Set(); + /** The promise resolvers of pending `start` calls */ + this._pendingCalls = /* @__PURE__ */ new Set(); + /** The counter for tracking `scheduleProps` calls */ this._lastCallId = 0; + /** The last `scheduleProps` call that changed the `to` prop */ this._lastToId = 0; this._memoizedDuration = 0; - - if (!react_spring_shared_esm_is.und(arg1) || !react_spring_shared_esm_is.und(arg2)) { - const props = react_spring_shared_esm_is.obj(arg1) ? react_spring_core_esm_extends({}, arg1) : react_spring_core_esm_extends({}, arg2, { - from: arg1 - }); - - if (react_spring_shared_esm_is.und(props.default)) { + if (!is.und(arg1) || !is.und(arg2)) { + const props = is.obj(arg1) ? { ...arg1 } : { ...arg2, from: arg1 }; + if (is.und(props.default)) { props.default = true; } - this.start(props); } } - + /** Equals true when not advancing on each frame. */ get idle() { return !(isAnimating(this) || this._state.asyncTo) || isPaused(this); } - get goal() { return getFluidValue(this.animation.to); } - get velocity() { const node = getAnimated(this); - return node instanceof AnimatedValue ? node.lastVelocity || 0 : node.getPayload().map(node => node.lastVelocity || 0); + return node instanceof AnimatedValue ? node.lastVelocity || 0 : node.getPayload().map((node2) => node2.lastVelocity || 0); } - + /** + * When true, this value has been animated at least once. + */ get hasAnimated() { return hasAnimated(this); } - + /** + * When true, this value has an unfinished animation, + * which is either active or paused. + */ get isAnimating() { return isAnimating(this); } - + /** + * When true, all current and future animations are paused. + */ get isPaused() { return isPaused(this); } - + /** + * + * + */ get isDelayed() { return this._state.delayed; } - + /** Advance the current animation by a number of milliseconds */ advance(dt) { let idle = true; let changed = false; const anim = this.animation; - let { - config, - toValues - } = anim; + let { toValues } = anim; + const { config: config2 } = anim; const payload = getPayload(anim.to); - if (!payload && hasFluidValue(anim.to)) { - toValues = react_spring_shared_esm_toArray(getFluidValue(anim.to)); + toValues = toArray(getFluidValue(anim.to)); } - - anim.values.forEach((node, i) => { - if (node.done) return; - const to = node.constructor == AnimatedString ? 1 : payload ? payload[i].lastPosition : toValues[i]; + anim.values.forEach((node2, i) => { + if (node2.done) + return; + const to2 = ( + // Animated strings always go from 0 to 1. + node2.constructor == AnimatedString ? 1 : payload ? payload[i].lastPosition : toValues[i] + ); let finished = anim.immediate; - let position = to; - + let position = to2; if (!finished) { - position = node.lastPosition; - - if (config.tension <= 0) { - node.done = true; + position = node2.lastPosition; + if (config2.tension <= 0) { + node2.done = true; return; } - - let elapsed = node.elapsedTime += dt; + let elapsed = node2.elapsedTime += dt; const from = anim.fromValues[i]; - const v0 = node.v0 != null ? node.v0 : node.v0 = react_spring_shared_esm_is.arr(config.velocity) ? config.velocity[i] : config.velocity; + const v0 = node2.v0 != null ? node2.v0 : node2.v0 = is.arr(config2.velocity) ? config2.velocity[i] : config2.velocity; let velocity; - const precision = config.precision || (from == to ? 0.005 : Math.min(1, Math.abs(to - from) * 0.001)); - - if (!react_spring_shared_esm_is.und(config.duration)) { + const precision = config2.precision || (from == to2 ? 5e-3 : Math.min(1, Math.abs(to2 - from) * 1e-3)); + if (!is.und(config2.duration)) { let p = 1; - - if (config.duration > 0) { - if (this._memoizedDuration !== config.duration) { - this._memoizedDuration = config.duration; - - if (node.durationProgress > 0) { - node.elapsedTime = config.duration * node.durationProgress; - elapsed = node.elapsedTime += dt; + if (config2.duration > 0) { + if (this._memoizedDuration !== config2.duration) { + this._memoizedDuration = config2.duration; + if (node2.durationProgress > 0) { + node2.elapsedTime = config2.duration * node2.durationProgress; + elapsed = node2.elapsedTime += dt; } } - - p = (config.progress || 0) + elapsed / this._memoizedDuration; + p = (config2.progress || 0) + elapsed / this._memoizedDuration; p = p > 1 ? 1 : p < 0 ? 0 : p; - node.durationProgress = p; + node2.durationProgress = p; } - - position = from + config.easing(p) * (to - from); - velocity = (position - node.lastPosition) / dt; + position = from + config2.easing(p) * (to2 - from); + velocity = (position - node2.lastPosition) / dt; finished = p == 1; - } else if (config.decay) { - const decay = config.decay === true ? 0.998 : config.decay; + } else if (config2.decay) { + const decay = config2.decay === true ? 0.998 : config2.decay; const e = Math.exp(-(1 - decay) * elapsed); position = from + v0 / (1 - decay) * (1 - e); - finished = Math.abs(node.lastPosition - position) <= precision; + finished = Math.abs(node2.lastPosition - position) <= precision; velocity = v0 * e; } else { - velocity = node.lastVelocity == null ? v0 : node.lastVelocity; - const restVelocity = config.restVelocity || precision / 10; - const bounceFactor = config.clamp ? 0 : config.bounce; - const canBounce = !react_spring_shared_esm_is.und(bounceFactor); - const isGrowing = from == to ? node.v0 > 0 : from < to; + velocity = node2.lastVelocity == null ? v0 : node2.lastVelocity; + const restVelocity = config2.restVelocity || precision / 10; + const bounceFactor = config2.clamp ? 0 : config2.bounce; + const canBounce = !is.und(bounceFactor); + const isGrowing = from == to2 ? node2.v0 > 0 : from < to2; let isMoving; let isBouncing = false; const step = 1; const numSteps = Math.ceil(dt / step); - for (let n = 0; n < numSteps; ++n) { isMoving = Math.abs(velocity) > restVelocity; - if (!isMoving) { - finished = Math.abs(to - position) <= precision; - + finished = Math.abs(to2 - position) <= precision; if (finished) { break; } } - if (canBounce) { - isBouncing = position == to || position > to == isGrowing; - + isBouncing = position == to2 || position > to2 == isGrowing; if (isBouncing) { velocity = -velocity * bounceFactor; - position = to; + position = to2; } } - - const springForce = -config.tension * 0.000001 * (position - to); - const dampingForce = -config.friction * 0.001 * velocity; - const acceleration = (springForce + dampingForce) / config.mass; + const springForce = -config2.tension * 1e-6 * (position - to2); + const dampingForce = -config2.friction * 1e-3 * velocity; + const acceleration = (springForce + dampingForce) / config2.mass; velocity = velocity + acceleration * step; position = position + velocity * step; } } - - node.lastVelocity = velocity; - + node2.lastVelocity = velocity; if (Number.isNaN(position)) { console.warn(`Got NaN while animating:`, this); finished = true; } } - if (payload && !payload[i].done) { finished = false; } - if (finished) { - node.done = true; + node2.done = true; } else { idle = false; } - - if (node.setValue(position, config.round)) { + if (node2.setValue(position, config2.round)) { changed = true; } }); const node = getAnimated(this); const currVal = node.getValue(); - if (idle) { const finalVal = getFluidValue(anim.to); - - if ((currVal !== finalVal || changed) && !config.decay) { + if ((currVal !== finalVal || changed) && !config2.decay) { node.setValue(finalVal); - this._onChange(finalVal); - } else if (changed && config.decay) { + } else if (changed && config2.decay) { this._onChange(currVal); } - this._stop(); } else if (changed) { this._onChange(currVal); } } - + /** Set the current value, while stopping the current animation */ set(value) { raf.batchedUpdates(() => { this._stop(); - this._focus(value); - this._set(value); }); return this; } - + /** + * Freeze the active animation in time, as well as any updates merged + * before `resume` is called. + */ pause() { - this._update({ - pause: true - }); + this._update({ pause: true }); } - + /** Resume the animation if paused. */ resume() { - this._update({ - pause: false - }); + this._update({ pause: false }); } - + /** Skip to the end of the current animation. */ finish() { if (isAnimating(this)) { - const { - to, - config - } = this.animation; + const { to: to2, config: config2 } = this.animation; raf.batchedUpdates(() => { this._onStart(); - - if (!config.decay) { - this._set(to, false); + if (!config2.decay) { + this._set(to2, false); } - this._stop(); }); } - return this; } - + /** Push props into the pending queue. */ update(props) { const queue = this.queue || (this.queue = []); queue.push(props); return this; } - - start(to, arg2) { + start(to2, arg2) { let queue; - - if (!react_spring_shared_esm_is.und(to)) { - queue = [react_spring_shared_esm_is.obj(to) ? to : react_spring_core_esm_extends({}, arg2, { - to - })]; + if (!is.und(to2)) { + queue = [is.obj(to2) ? to2 : { ...arg2, to: to2 }]; } else { queue = this.queue || []; this.queue = []; } - - return Promise.all(queue.map(props => { - const up = this._update(props); - - return up; - })).then(results => getCombinedResult(this, results)); + return Promise.all( + queue.map((props) => { + const up = this._update(props); + return up; + }) + ).then((results) => getCombinedResult(this, results)); } - + /** + * Stop the current animation, and cancel any delayed updates. + * + * Pass `true` to call `onRest` with `cancelled: true`. + */ stop(cancel) { - const { - to - } = this.animation; - + const { to: to2 } = this.animation; this._focus(this.get()); - stopAsync(this._state, cancel && this._lastCallId); - raf.batchedUpdates(() => this._stop(to, cancel)); + raf.batchedUpdates(() => this._stop(to2, cancel)); return this; } - + /** Restart the animation. */ reset() { - this._update({ - reset: true - }); + this._update({ reset: true }); } - + /** @internal */ eventObserved(event) { - if (event.type == 'change') { + if (event.type == "change") { this._start(); - } else if (event.type == 'priority') { + } else if (event.type == "priority") { this.priority = event.priority + 1; } } - + /** + * Parse the `to` and `from` range from the given `props` object. + * + * This also ensures the initial value is available to animated components + * during the render phase. + */ _prepareNode(props) { - const key = this.key || ''; - let { - to, - from - } = props; - to = react_spring_shared_esm_is.obj(to) ? to[key] : to; - - if (to == null || isAsyncTo(to)) { - to = undefined; + const key = this.key || ""; + let { to: to2, from } = props; + to2 = is.obj(to2) ? to2[key] : to2; + if (to2 == null || isAsyncTo(to2)) { + to2 = void 0; } - - from = react_spring_shared_esm_is.obj(from) ? from[key] : from; - + from = is.obj(from) ? from[key] : from; if (from == null) { - from = undefined; + from = void 0; } - - const range = { - to, - from - }; - + const range = { to: to2, from }; if (!hasAnimated(this)) { - if (props.reverse) [to, from] = [from, to]; + if (props.reverse) + [to2, from] = [from, to2]; from = getFluidValue(from); - - if (!react_spring_shared_esm_is.und(from)) { + if (!is.und(from)) { this._set(from); } else if (!getAnimated(this)) { - this._set(to); + this._set(to2); } } - return range; } - - _update(_ref, isLoop) { - let props = react_spring_core_esm_extends({}, _ref); - - const { - key, - defaultProps - } = this; - if (props.default) Object.assign(defaultProps, getDefaultProps(props, (value, prop) => /^on/.test(prop) ? resolveProp(value, key) : value)); - mergeActiveFn(this, props, 'onProps'); - sendEvent(this, 'onProps', props, this); - + /** Every update is processed by this method before merging. */ + _update({ ...props }, isLoop) { + const { key, defaultProps } = this; + if (props.default) + Object.assign( + defaultProps, + getDefaultProps( + props, + (value, prop) => /^on/.test(prop) ? resolveProp(value, key) : value + ) + ); + mergeActiveFn(this, props, "onProps"); + sendEvent(this, "onProps", props, this); const range = this._prepareNode(props); - if (Object.isFrozen(this)) { - throw Error('Cannot animate a `SpringValue` object that is frozen. ' + 'Did you forget to pass your component to `animated(...)` before animating its props?'); + throw Error( + "Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?" + ); } - const state = this._state; return scheduleProps(++this._lastCallId, { key, @@ -17792,45 +31934,49 @@ class SpringValue extends FrameValue { if (!isPaused(this)) { setPausedBit(this, true); flushCalls(state.pauseQueue); - sendEvent(this, 'onPause', getFinishedResult(this, checkFinished(this, this.animation.to)), this); + sendEvent( + this, + "onPause", + getFinishedResult(this, checkFinished(this, this.animation.to)), + this + ); } }, resume: () => { if (isPaused(this)) { setPausedBit(this, false); - if (isAnimating(this)) { this._resume(); } - flushCalls(state.resumeQueue); - sendEvent(this, 'onResume', getFinishedResult(this, checkFinished(this, this.animation.to)), this); + sendEvent( + this, + "onResume", + getFinishedResult(this, checkFinished(this, this.animation.to)), + this + ); } }, start: this._merge.bind(this, range) } - }).then(result => { + }).then((result) => { if (props.loop && result.finished && !(isLoop && result.noop)) { const nextProps = createLoopUpdate(props); - if (nextProps) { return this._update(nextProps, true); } } - return result; }); } - + /** Merge props into the current animation */ _merge(range, props, resolve) { if (props.cancel) { this.stop(true); return resolve(getCancelledResult(this)); } - - const hasToProp = !react_spring_shared_esm_is.und(range.to); - const hasFromProp = !react_spring_shared_esm_is.und(range.from); - + const hasToProp = !is.und(range.to); + const hasFromProp = !is.und(range.from); if (hasToProp || hasFromProp) { if (props.callId > this._lastToId) { this._lastToId = props.callId; @@ -17838,95 +31984,75 @@ class SpringValue extends FrameValue { return resolve(getCancelledResult(this)); } } - - const { - key, - defaultProps, - animation: anim - } = this; - const { - to: prevTo, - from: prevFrom - } = anim; - let { - to = prevTo, - from = prevFrom - } = range; - - if (hasFromProp && !hasToProp && (!props.default || react_spring_shared_esm_is.und(to))) { - to = from; + const { key, defaultProps, animation: anim } = this; + const { to: prevTo, from: prevFrom } = anim; + let { to: to2 = prevTo, from = prevFrom } = range; + if (hasFromProp && !hasToProp && (!props.default || is.und(to2))) { + to2 = from; } - - if (props.reverse) [to, from] = [from, to]; + if (props.reverse) + [to2, from] = [from, to2]; const hasFromChanged = !isEqual(from, prevFrom); - if (hasFromChanged) { anim.from = from; } - from = getFluidValue(from); - const hasToChanged = !isEqual(to, prevTo); - + const hasToChanged = !isEqual(to2, prevTo); if (hasToChanged) { - this._focus(to); + this._focus(to2); } - const hasAsyncTo = isAsyncTo(props.to); - const { - config - } = anim; - const { - decay, - velocity - } = config; - + const { config: config2 } = anim; + const { decay, velocity } = config2; if (hasToProp || hasFromProp) { - config.velocity = 0; + config2.velocity = 0; } - if (props.config && !hasAsyncTo) { - mergeConfig(config, callProp(props.config, key), props.config !== defaultProps.config ? callProp(defaultProps.config, key) : void 0); + mergeConfig( + config2, + callProp(props.config, key), + // Avoid calling the same "config" prop twice. + props.config !== defaultProps.config ? callProp(defaultProps.config, key) : void 0 + ); } - let node = getAnimated(this); - - if (!node || react_spring_shared_esm_is.und(to)) { + if (!node || is.und(to2)) { return resolve(getFinishedResult(this, true)); } - - const reset = react_spring_shared_esm_is.und(props.reset) ? hasFromProp && !props.default : !react_spring_shared_esm_is.und(from) && matchProp(props.reset, key); + const reset = ( + // When `reset` is undefined, the `from` prop implies `reset: true`, + // except for declarative updates. When `reset` is defined, there + // must exist a value to animate from. + is.und(props.reset) ? hasFromProp && !props.default : !is.und(from) && matchProp(props.reset, key) + ); const value = reset ? from : this.get(); - const goal = computeGoal(to); - const isAnimatable = react_spring_shared_esm_is.num(goal) || react_spring_shared_esm_is.arr(goal) || isAnimatedString(goal); + const goal = computeGoal(to2); + const isAnimatable = is.num(goal) || is.arr(goal) || isAnimatedString(goal); const immediate = !hasAsyncTo && (!isAnimatable || matchProp(defaultProps.immediate || props.immediate, key)); - if (hasToChanged) { - const nodeType = getAnimatedType(to); - + const nodeType = getAnimatedType(to2); if (nodeType !== node.constructor) { if (immediate) { node = this._set(goal); - } else throw Error(`Cannot animate between ${node.constructor.name} and ${nodeType.name}, as the "to" prop suggests`); + } else + throw Error( + `Cannot animate between ${node.constructor.name} and ${nodeType.name}, as the "to" prop suggests` + ); } } - const goalType = node.constructor; - let started = hasFluidValue(to); + let started = hasFluidValue(to2); let finished = false; - if (!started) { const hasValueChanged = reset || !hasAnimated(this) && hasFromChanged; - if (hasToChanged || hasValueChanged) { finished = isEqual(computeGoal(value), goal); started = !finished; } - - if (!isEqual(anim.immediate, immediate) && !immediate || !isEqual(config.decay, decay) || !isEqual(config.velocity, velocity)) { + if (!isEqual(anim.immediate, immediate) && !immediate || !isEqual(config2.decay, decay) || !isEqual(config2.velocity, velocity)) { started = true; } } - if (finished && isAnimating(this)) { if (anim.changed && !reset) { started = true; @@ -17934,48 +32060,38 @@ class SpringValue extends FrameValue { this._stop(prevTo); } } - if (!hasAsyncTo) { if (started || hasFluidValue(prevTo)) { anim.values = node.getPayload(); - anim.toValues = hasFluidValue(to) ? null : goalType == AnimatedString ? [1] : react_spring_shared_esm_toArray(goal); + anim.toValues = hasFluidValue(to2) ? null : goalType == AnimatedString ? [1] : toArray(goal); } - if (anim.immediate != immediate) { anim.immediate = immediate; - if (!immediate && !reset) { this._set(prevTo); } } - if (started) { - const { - onRest - } = anim; - react_spring_shared_esm_each(ACTIVE_EVENTS, type => mergeActiveFn(this, props, type)); + const { onRest } = anim; + react_spring_shared_modern_each(ACTIVE_EVENTS, (type) => mergeActiveFn(this, props, type)); const result = getFinishedResult(this, checkFinished(this, prevTo)); flushCalls(this._pendingCalls, result); - this._pendingCalls.add(resolve); - - if (anim.changed) raf.batchedUpdates(() => { - anim.changed = !reset; - onRest == null ? void 0 : onRest(result, this); - - if (reset) { - callProp(defaultProps.onRest, result); - } else { - anim.onStart == null ? void 0 : anim.onStart(result, this); - } - }); + if (anim.changed) + raf.batchedUpdates(() => { + anim.changed = !reset; + onRest?.(result, this); + if (reset) { + callProp(defaultProps.onRest, result); + } else { + anim.onStart?.(result, this); + } + }); } } - if (reset) { this._set(value); } - if (hasAsyncTo) { resolve(runAsync(props.to, props, this._state, this)); } else if (started) { @@ -17986,65 +32102,51 @@ class SpringValue extends FrameValue { resolve(getNoopResult(value)); } } - + /** Update the `animation.to` value, which might be a `FluidValue` */ _focus(value) { const anim = this.animation; - if (value !== anim.to) { if (getFluidObservers(this)) { this._detach(); } - anim.to = value; - if (getFluidObservers(this)) { this._attach(); } } } - _attach() { let priority = 0; - const { - to - } = this.animation; - - if (hasFluidValue(to)) { - addFluidObserver(to, this); - - if (isFrameValue(to)) { - priority = to.priority + 1; + const { to: to2 } = this.animation; + if (hasFluidValue(to2)) { + addFluidObserver(to2, this); + if (isFrameValue(to2)) { + priority = to2.priority + 1; } } - this.priority = priority; } - _detach() { - const { - to - } = this.animation; - - if (hasFluidValue(to)) { - removeFluidObserver(to, this); + const { to: to2 } = this.animation; + if (hasFluidValue(to2)) { + removeFluidObserver(to2, this); } } - + /** + * Update the current value from outside the frameloop, + * and return the `Animated` node. + */ _set(arg, idle = true) { const value = getFluidValue(arg); - - if (!react_spring_shared_esm_is.und(value)) { + if (!is.und(value)) { const oldNode = getAnimated(this); - if (!oldNode || !isEqual(value, oldNode.getValue())) { const nodeType = getAnimatedType(value); - if (!oldNode || oldNode.constructor != nodeType) { setAnimated(this, nodeType.create(value)); } else { oldNode.setValue(value); } - if (oldNode) { raf.batchedUpdates(() => { this._onChange(value, idle); @@ -18052,383 +32154,356 @@ class SpringValue extends FrameValue { } } } - return getAnimated(this); } - _onStart() { const anim = this.animation; - if (!anim.changed) { anim.changed = true; - sendEvent(this, 'onStart', getFinishedResult(this, checkFinished(this, anim.to)), this); + sendEvent( + this, + "onStart", + getFinishedResult(this, checkFinished(this, anim.to)), + this + ); } } - _onChange(value, idle) { if (!idle) { this._onStart(); - callProp(this.animation.onChange, value, this); } - callProp(this.defaultProps.onChange, value, this); - super._onChange(value, idle); } - + // This method resets the animation state (even if already animating) to + // ensure the latest from/to range is used, and it also ensures this spring + // is added to the frameloop. _start() { const anim = this.animation; getAnimated(this).reset(getFluidValue(anim.to)); - if (!anim.immediate) { - anim.fromValues = anim.values.map(node => node.lastPosition); + anim.fromValues = anim.values.map((node) => node.lastPosition); } - if (!isAnimating(this)) { setActiveBit(this, true); - if (!isPaused(this)) { this._resume(); } } } - _resume() { - if (globals.skipAnimation) { + if (globals_exports.skipAnimation) { this.finish(); } else { frameLoop.start(this); } } - + /** + * Exit the frameloop and notify `onRest` listeners. + * + * Always wrap `_stop` calls with `batchedUpdates`. + */ _stop(goal, cancel) { if (isAnimating(this)) { setActiveBit(this, false); const anim = this.animation; - react_spring_shared_esm_each(anim.values, node => { + react_spring_shared_modern_each(anim.values, (node) => { node.done = true; }); - if (anim.toValues) { - anim.onChange = anim.onPause = anim.onResume = undefined; + anim.onChange = anim.onPause = anim.onResume = void 0; } - callFluidObservers(this, { - type: 'idle', + type: "idle", parent: this }); - const result = cancel ? getCancelledResult(this.get()) : getFinishedResult(this.get(), checkFinished(this, goal != null ? goal : anim.to)); + const result = cancel ? getCancelledResult(this.get()) : getFinishedResult(this.get(), checkFinished(this, goal ?? anim.to)); flushCalls(this._pendingCalls, result); - if (anim.changed) { anim.changed = false; - sendEvent(this, 'onRest', result, this); + sendEvent(this, "onRest", result, this); } } } - -} - -function checkFinished(target, to) { - const goal = computeGoal(to); +}; +function checkFinished(target, to2) { + const goal = computeGoal(to2); const value = computeGoal(target.get()); return isEqual(value, goal); } - -function createLoopUpdate(props, loop = props.loop, to = props.to) { - let loopRet = callProp(loop); - +function createLoopUpdate(props, loop = props.loop, to2 = props.to) { + const loopRet = callProp(loop); if (loopRet) { const overrides = loopRet !== true && inferTo(loopRet); const reverse = (overrides || props).reverse; const reset = !overrides || overrides.reset; - return createUpdate(react_spring_core_esm_extends({}, props, { + return createUpdate({ + ...props, loop, + // Avoid updating default props when looping. default: false, - pause: undefined, - to: !reverse || isAsyncTo(to) ? to : undefined, - from: reset ? props.from : undefined, - reset - }, overrides)); + // Never loop the `pause` prop. + pause: void 0, + // For the "reverse" prop to loop as expected, the "to" prop + // must be undefined. The "reverse" prop is ignored when the + // "to" prop is an array or function. + to: !reverse || isAsyncTo(to2) ? to2 : void 0, + // Ignore the "from" prop except on reset. + from: reset ? props.from : void 0, + reset, + // The "loop" prop can return a "useSpring" props object to + // override any of the original props. + ...overrides + }); } } function createUpdate(props) { - const { - to, - from - } = props = inferTo(props); - const keys = new Set(); - if (react_spring_shared_esm_is.obj(to)) findDefined(to, keys); - if (react_spring_shared_esm_is.obj(from)) findDefined(from, keys); + const { to: to2, from } = props = inferTo(props); + const keys = /* @__PURE__ */ new Set(); + if (is.obj(to2)) + findDefined(to2, keys); + if (is.obj(from)) + findDefined(from, keys); props.keys = keys.size ? Array.from(keys) : null; return props; } function declareUpdate(props) { - const update = createUpdate(props); - - if (react_spring_shared_esm_is.und(update.default)) { - update.default = getDefaultProps(update); + const update2 = createUpdate(props); + if (is.und(update2.default)) { + update2.default = getDefaultProps(update2); } - - return update; + return update2; } - function findDefined(values, keys) { eachProp(values, (value, key) => value != null && keys.add(key)); } - -const ACTIVE_EVENTS = ['onStart', 'onRest', 'onChange', 'onPause', 'onResume']; - +var ACTIVE_EVENTS = [ + "onStart", + "onRest", + "onChange", + "onPause", + "onResume" +]; function mergeActiveFn(target, props, type) { - target.animation[type] = props[type] !== getDefaultProp(props, type) ? resolveProp(props[type], target.key) : undefined; + target.animation[type] = props[type] !== getDefaultProp(props, type) ? resolveProp(props[type], target.key) : void 0; } - function sendEvent(target, type, ...args) { - var _target$animation$typ, _target$animation, _target$defaultProps$, _target$defaultProps; - - (_target$animation$typ = (_target$animation = target.animation)[type]) == null ? void 0 : _target$animation$typ.call(_target$animation, ...args); - (_target$defaultProps$ = (_target$defaultProps = target.defaultProps)[type]) == null ? void 0 : _target$defaultProps$.call(_target$defaultProps, ...args); + target.animation[type]?.(...args); + target.defaultProps[type]?.(...args); } -const BATCHED_EVENTS = ['onStart', 'onChange', 'onRest']; -let nextId = 1; -class Controller { - constructor(props, flush) { - this.id = nextId++; +// src/Controller.ts + +var BATCHED_EVENTS = ["onStart", "onChange", "onRest"]; +var nextId2 = 1; +var Controller = class { + constructor(props, flush3) { + this.id = nextId2++; + /** The animated values */ this.springs = {}; + /** The queue of props passed to the `update` method. */ this.queue = []; - this.ref = void 0; - this._flush = void 0; - this._initialProps = void 0; + /** The counter for tracking `scheduleProps` calls */ this._lastAsyncId = 0; - this._active = new Set(); - this._changed = new Set(); + /** The values currently being animated */ + this._active = /* @__PURE__ */ new Set(); + /** The values that changed recently */ + this._changed = /* @__PURE__ */ new Set(); + /** Equals false when `onStart` listeners can be called */ this._started = false; - this._item = void 0; + /** State used by the `runAsync` function */ this._state = { paused: false, - pauseQueue: new Set(), - resumeQueue: new Set(), - timeouts: new Set() + pauseQueue: /* @__PURE__ */ new Set(), + resumeQueue: /* @__PURE__ */ new Set(), + timeouts: /* @__PURE__ */ new Set() }; + /** The event queues that are flushed once per frame maximum */ this._events = { - onStart: new Map(), - onChange: new Map(), - onRest: new Map() + onStart: /* @__PURE__ */ new Map(), + onChange: /* @__PURE__ */ new Map(), + onRest: /* @__PURE__ */ new Map() }; this._onFrame = this._onFrame.bind(this); - - if (flush) { - this._flush = flush; + if (flush3) { + this._flush = flush3; } - if (props) { - this.start(react_spring_core_esm_extends({ - default: true - }, props)); + this.start({ default: true, ...props }); } } - + /** + * Equals `true` when no spring values are in the frameloop, and + * no async animation is currently active. + */ get idle() { - return !this._state.asyncTo && Object.values(this.springs).every(spring => { + return !this._state.asyncTo && Object.values(this.springs).every((spring) => { return spring.idle && !spring.isDelayed && !spring.isPaused; }); } - get item() { return this._item; } - set item(item) { this._item = item; } - + /** Get the current values of our springs */ get() { const values = {}; this.each((spring, key) => values[key] = spring.get()); return values; } - + /** Set the current values without animating. */ set(values) { for (const key in values) { const value = values[key]; - - if (!react_spring_shared_esm_is.und(value)) { + if (!is.und(value)) { this.springs[key].set(value); } } } - + /** Push an update onto the queue of each value. */ update(props) { if (props) { this.queue.push(createUpdate(props)); } - return this; } - + /** + * Start the queued animations for every spring, and resolve the returned + * promise once all queued animations have finished or been cancelled. + * + * When you pass a queue (instead of nothing), that queue is used instead of + * the queued animations added with the `update` method, which are left alone. + */ start(props) { - let { - queue - } = this; - + let { queue } = this; if (props) { - queue = react_spring_shared_esm_toArray(props).map(createUpdate); + queue = toArray(props).map(createUpdate); } else { this.queue = []; } - if (this._flush) { return this._flush(this, queue); } - prepareKeys(this, queue); return flushUpdateQueue(this, queue); } - + /** @internal */ stop(arg, keys) { if (arg !== !!arg) { keys = arg; } - if (keys) { const springs = this.springs; - react_spring_shared_esm_each(react_spring_shared_esm_toArray(keys), key => springs[key].stop(!!arg)); + react_spring_shared_modern_each(toArray(keys), (key) => springs[key].stop(!!arg)); } else { stopAsync(this._state, this._lastAsyncId); - this.each(spring => spring.stop(!!arg)); + this.each((spring) => spring.stop(!!arg)); } - return this; } - + /** Freeze the active animation in time */ pause(keys) { - if (react_spring_shared_esm_is.und(keys)) { - this.start({ - pause: true - }); + if (is.und(keys)) { + this.start({ pause: true }); } else { const springs = this.springs; - react_spring_shared_esm_each(react_spring_shared_esm_toArray(keys), key => springs[key].pause()); + react_spring_shared_modern_each(toArray(keys), (key) => springs[key].pause()); } - return this; } - + /** Resume the animation if paused. */ resume(keys) { - if (react_spring_shared_esm_is.und(keys)) { - this.start({ - pause: false - }); + if (is.und(keys)) { + this.start({ pause: false }); } else { const springs = this.springs; - react_spring_shared_esm_each(react_spring_shared_esm_toArray(keys), key => springs[key].resume()); + react_spring_shared_modern_each(toArray(keys), (key) => springs[key].resume()); } - return this; } - + /** Call a function once per spring value */ each(iterator) { eachProp(this.springs, iterator); } - + /** @internal Called at the end of every animation frame */ _onFrame() { - const { - onStart, - onChange, - onRest - } = this._events; + const { onStart, onChange, onRest } = this._events; const active = this._active.size > 0; const changed = this._changed.size > 0; - if (active && !this._started || changed && !this._started) { this._started = true; - flush(onStart, ([onStart, result]) => { + flush(onStart, ([onStart2, result]) => { result.value = this.get(); - onStart(result, this, this._item); + onStart2(result, this, this._item); }); } - const idle = !active && this._started; const values = changed || idle && onRest.size ? this.get() : null; - if (changed && onChange.size) { - flush(onChange, ([onChange, result]) => { + flush(onChange, ([onChange2, result]) => { result.value = values; - onChange(result, this, this._item); + onChange2(result, this, this._item); }); } - if (idle) { this._started = false; - flush(onRest, ([onRest, result]) => { + flush(onRest, ([onRest2, result]) => { result.value = values; - onRest(result, this, this._item); + onRest2(result, this, this._item); }); } } - + /** @internal */ eventObserved(event) { - if (event.type == 'change') { + if (event.type == "change") { this._changed.add(event.parent); - if (!event.idle) { this._active.add(event.parent); } - } else if (event.type == 'idle') { + } else if (event.type == "idle") { this._active.delete(event.parent); - } else return; - + } else + return; raf.onFrame(this._onFrame); } - -} +}; function flushUpdateQueue(ctrl, queue) { - return Promise.all(queue.map(props => flushUpdate(ctrl, props))).then(results => getCombinedResult(ctrl, results)); + return Promise.all(queue.map((props) => flushUpdate(ctrl, props))).then( + (results) => getCombinedResult(ctrl, results) + ); } async function flushUpdate(ctrl, props, isLoop) { - const { - keys, - to, - from, - loop, - onRest, - onResolve - } = props; - const defaults = react_spring_shared_esm_is.obj(props.default) && props.default; - + const { keys, to: to2, from, loop, onRest, onResolve } = props; + const defaults2 = is.obj(props.default) && props.default; if (loop) { props.loop = false; } - - if (to === false) props.to = null; - if (from === false) props.from = null; - const asyncTo = react_spring_shared_esm_is.arr(to) || react_spring_shared_esm_is.fun(to) ? to : undefined; - + if (to2 === false) + props.to = null; + if (from === false) + props.from = null; + const asyncTo = is.arr(to2) || is.fun(to2) ? to2 : void 0; if (asyncTo) { - props.to = undefined; - props.onRest = undefined; - - if (defaults) { - defaults.onRest = undefined; + props.to = void 0; + props.onRest = void 0; + if (defaults2) { + defaults2.onRest = void 0; } } else { - react_spring_shared_esm_each(BATCHED_EVENTS, key => { + react_spring_shared_modern_each(BATCHED_EVENTS, (key) => { const handler = props[key]; - - if (react_spring_shared_esm_is.fun(handler)) { - const queue = ctrl['_events'][key]; - - props[key] = ({ - finished, - cancelled - }) => { - const result = queue.get(handler); - - if (result) { - if (!finished) result.finished = false; - if (cancelled) result.cancelled = true; + if (is.fun(handler)) { + const queue = ctrl["_events"][key]; + props[key] = ({ finished, cancelled }) => { + const result2 = queue.get(handler); + if (result2) { + if (!finished) + result2.finished = false; + if (cancelled) + result2.cancelled = true; } else { queue.set(handler, { value: null, @@ -18437,92 +32512,84 @@ async function flushUpdate(ctrl, props, isLoop) { }); } }; - - if (defaults) { - defaults[key] = props[key]; + if (defaults2) { + defaults2[key] = props[key]; } } }); } - - const state = ctrl['_state']; - + const state = ctrl["_state"]; if (props.pause === !state.paused) { state.paused = props.pause; flushCalls(props.pause ? state.pauseQueue : state.resumeQueue); } else if (state.paused) { props.pause = true; } - - const promises = (keys || Object.keys(ctrl.springs)).map(key => ctrl.springs[key].start(props)); - const cancel = props.cancel === true || getDefaultProp(props, 'cancel') === true; - + const promises = (keys || Object.keys(ctrl.springs)).map( + (key) => ctrl.springs[key].start(props) + ); + const cancel = props.cancel === true || getDefaultProp(props, "cancel") === true; if (asyncTo || cancel && state.asyncId) { - promises.push(scheduleProps(++ctrl['_lastAsyncId'], { - props, - state, - actions: { - pause: noop, - resume: noop, - - start(props, resolve) { - if (cancel) { - stopAsync(state, ctrl['_lastAsyncId']); - resolve(getCancelledResult(ctrl)); - } else { - props.onRest = onRest; - resolve(runAsync(asyncTo, props, state, ctrl)); + promises.push( + scheduleProps(++ctrl["_lastAsyncId"], { + props, + state, + actions: { + pause: noop, + resume: noop, + start(props2, resolve) { + if (cancel) { + stopAsync(state, ctrl["_lastAsyncId"]); + resolve(getCancelledResult(ctrl)); + } else { + props2.onRest = onRest; + resolve( + runAsync( + asyncTo, + props2, + state, + ctrl + ) + ); + } } } - - } - })); + }) + ); } - if (state.paused) { - await new Promise(resume => { + await new Promise((resume) => { state.resumeQueue.add(resume); }); } - const result = getCombinedResult(ctrl, await Promise.all(promises)); - if (loop && result.finished && !(isLoop && result.noop)) { - const nextProps = createLoopUpdate(props, loop, to); - + const nextProps = createLoopUpdate(props, loop, to2); if (nextProps) { prepareKeys(ctrl, [nextProps]); return flushUpdate(ctrl, nextProps, true); } } - if (onResolve) { raf.batchedUpdates(() => onResolve(result, ctrl, ctrl.item)); } - return result; } function getSprings(ctrl, props) { - const springs = react_spring_core_esm_extends({}, ctrl.springs); - + const springs = { ...ctrl.springs }; if (props) { - react_spring_shared_esm_each(react_spring_shared_esm_toArray(props), props => { - if (react_spring_shared_esm_is.und(props.keys)) { - props = createUpdate(props); + react_spring_shared_modern_each(toArray(props), (props2) => { + if (is.und(props2.keys)) { + props2 = createUpdate(props2); } - - if (!react_spring_shared_esm_is.obj(props.to)) { - props = react_spring_core_esm_extends({}, props, { - to: undefined - }); + if (!is.obj(props2.to)) { + props2 = { ...props2, to: void 0 }; } - - prepareSprings(springs, props, key => { + prepareSprings(springs, props2, (key) => { return createSpring(key); }); }); } - setSprings(ctrl, springs); return springs; } @@ -18534,75 +32601,47 @@ function setSprings(ctrl, springs) { } }); } - function createSpring(key, observer) { const spring = new SpringValue(); spring.key = key; - if (observer) { addFluidObserver(spring, observer); } - return spring; } - function prepareSprings(springs, props, create) { if (props.keys) { - react_spring_shared_esm_each(props.keys, key => { + react_spring_shared_modern_each(props.keys, (key) => { const spring = springs[key] || (springs[key] = create(key)); - spring['_prepareNode'](props); + spring["_prepareNode"](props); }); } } - function prepareKeys(ctrl, queue) { - react_spring_shared_esm_each(queue, props => { - prepareSprings(ctrl.springs, props, key => { + react_spring_shared_modern_each(queue, (props) => { + prepareSprings(ctrl.springs, props, (key) => { return createSpring(key, ctrl); }); }); } -function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; +// src/SpringContext.tsx - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - return target; -} - -const _excluded$3 = ["children"]; -const SpringContext = _ref => { - let { - children - } = _ref, - props = _objectWithoutPropertiesLoose(_ref, _excluded$3); +var SpringContext = ({ + children, + ...props +}) => { const inherited = (0,external_React_.useContext)(ctx); - const pause = props.pause || !!inherited.pause, - immediate = props.immediate || !!inherited.immediate; - props = useMemoOne(() => ({ - pause, - immediate - }), [pause, immediate]); - const { - Provider - } = ctx; - return external_React_.createElement(Provider, { - value: props - }, children); + const pause = props.pause || !!inherited.pause, immediate = props.immediate || !!inherited.immediate; + props = useMemoOne(() => ({ pause, immediate }), [pause, immediate]); + const { Provider } = ctx; + return /* @__PURE__ */ external_React_.createElement(Provider, { value: props }, children); }; -const ctx = makeContext(SpringContext, {}); +var ctx = makeContext(SpringContext, {}); SpringContext.Provider = ctx.Provider; SpringContext.Consumer = ctx.Consumer; - function makeContext(target, init) { Object.assign(target, external_React_.createContext(init)); target.Provider._context = target; @@ -18610,115 +32649,115 @@ function makeContext(target, init) { return target; } -const SpringRef = () => { - const current = []; +// src/SpringRef.ts - const SpringRef = function SpringRef(props) { +var SpringRef = () => { + const current = []; + const SpringRef2 = function(props) { deprecateDirectCall(); const results = []; - react_spring_shared_esm_each(current, (ctrl, i) => { - if (react_spring_shared_esm_is.und(props)) { + react_spring_shared_modern_each(current, (ctrl, i) => { + if (is.und(props)) { results.push(ctrl.start()); } else { - const update = _getProps(props, ctrl, i); - - if (update) { - results.push(ctrl.start(update)); + const update2 = _getProps(props, ctrl, i); + if (update2) { + results.push(ctrl.start(update2)); } } }); return results; }; - - SpringRef.current = current; - - SpringRef.add = function (ctrl) { + SpringRef2.current = current; + SpringRef2.add = function(ctrl) { if (!current.includes(ctrl)) { current.push(ctrl); } }; - - SpringRef.delete = function (ctrl) { + SpringRef2.delete = function(ctrl) { const i = current.indexOf(ctrl); - if (~i) current.splice(i, 1); + if (~i) + current.splice(i, 1); }; - - SpringRef.pause = function () { - react_spring_shared_esm_each(current, ctrl => ctrl.pause(...arguments)); + SpringRef2.pause = function() { + react_spring_shared_modern_each(current, (ctrl) => ctrl.pause(...arguments)); return this; }; - - SpringRef.resume = function () { - react_spring_shared_esm_each(current, ctrl => ctrl.resume(...arguments)); + SpringRef2.resume = function() { + react_spring_shared_modern_each(current, (ctrl) => ctrl.resume(...arguments)); return this; }; - - SpringRef.set = function (values) { - react_spring_shared_esm_each(current, ctrl => ctrl.set(values)); + SpringRef2.set = function(values) { + react_spring_shared_modern_each(current, (ctrl, i) => { + const update2 = is.fun(values) ? values(i, ctrl) : values; + if (update2) { + ctrl.set(update2); + } + }); }; - - SpringRef.start = function (props) { + SpringRef2.start = function(props) { const results = []; - react_spring_shared_esm_each(current, (ctrl, i) => { - if (react_spring_shared_esm_is.und(props)) { + react_spring_shared_modern_each(current, (ctrl, i) => { + if (is.und(props)) { results.push(ctrl.start()); } else { - const update = this._getProps(props, ctrl, i); - - if (update) { - results.push(ctrl.start(update)); + const update2 = this._getProps(props, ctrl, i); + if (update2) { + results.push(ctrl.start(update2)); } } }); return results; }; - - SpringRef.stop = function () { - react_spring_shared_esm_each(current, ctrl => ctrl.stop(...arguments)); + SpringRef2.stop = function() { + react_spring_shared_modern_each(current, (ctrl) => ctrl.stop(...arguments)); return this; }; - - SpringRef.update = function (props) { - react_spring_shared_esm_each(current, (ctrl, i) => ctrl.update(this._getProps(props, ctrl, i))); + SpringRef2.update = function(props) { + react_spring_shared_modern_each(current, (ctrl, i) => ctrl.update(this._getProps(props, ctrl, i))); return this; }; - - const _getProps = function _getProps(arg, ctrl, index) { - return react_spring_shared_esm_is.fun(arg) ? arg(index, ctrl) : arg; + const _getProps = function(arg, ctrl, index) { + return is.fun(arg) ? arg(index, ctrl) : arg; }; - - SpringRef._getProps = _getProps; - return SpringRef; + SpringRef2._getProps = _getProps; + return SpringRef2; }; +// src/hooks/useSprings.ts function useSprings(length, props, deps) { - const propsFn = react_spring_shared_esm_is.fun(props) && props; - if (propsFn && !deps) deps = []; - const ref = (0,external_React_.useMemo)(() => propsFn || arguments.length == 3 ? SpringRef() : void 0, []); + const propsFn = is.fun(props) && props; + if (propsFn && !deps) + deps = []; + const ref = (0,external_React_.useMemo)( + () => propsFn || arguments.length == 3 ? SpringRef() : void 0, + [] + ); const layoutId = (0,external_React_.useRef)(0); - const forceUpdate = react_spring_shared_esm_useForceUpdate(); - const state = (0,external_React_.useMemo)(() => ({ - ctrls: [], - queue: [], - - flush(ctrl, updates) { - const springs = getSprings(ctrl, updates); - const canFlushSync = layoutId.current > 0 && !state.queue.length && !Object.keys(springs).some(key => !ctrl.springs[key]); - return canFlushSync ? flushUpdateQueue(ctrl, updates) : new Promise(resolve => { - setSprings(ctrl, springs); - state.queue.push(() => { - resolve(flushUpdateQueue(ctrl, updates)); + const forceUpdate = useForceUpdate(); + const state = (0,external_React_.useMemo)( + () => ({ + ctrls: [], + queue: [], + flush(ctrl, updates2) { + const springs2 = getSprings(ctrl, updates2); + const canFlushSync = layoutId.current > 0 && !state.queue.length && !Object.keys(springs2).some((key) => !ctrl.springs[key]); + return canFlushSync ? flushUpdateQueue(ctrl, updates2) : new Promise((resolve) => { + setSprings(ctrl, springs2); + state.queue.push(() => { + resolve(flushUpdateQueue(ctrl, updates2)); + }); + forceUpdate(); }); - forceUpdate(); - }); - } - - }), []); + } + }), + [] + ); const ctrls = (0,external_React_.useRef)([...state.ctrls]); const updates = []; - const prevLength = react_spring_shared_esm_usePrev(length) || 0; + const prevLength = usePrev(length) || 0; (0,external_React_.useMemo)(() => { - react_spring_shared_esm_each(ctrls.current.slice(length, prevLength), ctrl => { + react_spring_shared_modern_each(ctrls.current.slice(length, prevLength), (ctrl) => { detachRefs(ctrl, ref); ctrl.stop(true); }); @@ -18728,146 +32767,135 @@ function useSprings(length, props, deps) { (0,external_React_.useMemo)(() => { declareUpdates(0, Math.min(prevLength, length)); }, deps); - function declareUpdates(startIndex, endIndex) { for (let i = startIndex; i < endIndex; i++) { const ctrl = ctrls.current[i] || (ctrls.current[i] = new Controller(null, state.flush)); - const update = propsFn ? propsFn(i, ctrl) : props[i]; - - if (update) { - updates[i] = declareUpdate(update); + const update2 = propsFn ? propsFn(i, ctrl) : props[i]; + if (update2) { + updates[i] = declareUpdate(update2); } } } - const springs = ctrls.current.map((ctrl, i) => getSprings(ctrl, updates[i])); const context = (0,external_React_.useContext)(SpringContext); - const prevContext = react_spring_shared_esm_usePrev(context); + const prevContext = usePrev(context); const hasContext = context !== prevContext && hasProps(context); - react_spring_shared_esm_useIsomorphicLayoutEffect(() => { + react_spring_shared_modern_useIsomorphicLayoutEffect(() => { layoutId.current++; state.ctrls = ctrls.current; - const { - queue - } = state; - + const { queue } = state; if (queue.length) { state.queue = []; - react_spring_shared_esm_each(queue, cb => cb()); + react_spring_shared_modern_each(queue, (cb) => cb()); } - - react_spring_shared_esm_each(ctrls.current, (ctrl, i) => { - ref == null ? void 0 : ref.add(ctrl); - + react_spring_shared_modern_each(ctrls.current, (ctrl, i) => { + ref?.add(ctrl); if (hasContext) { - ctrl.start({ - default: context - }); + ctrl.start({ default: context }); } - - const update = updates[i]; - - if (update) { - replaceRef(ctrl, update.ref); - + const update2 = updates[i]; + if (update2) { + replaceRef(ctrl, update2.ref); if (ctrl.ref) { - ctrl.queue.push(update); + ctrl.queue.push(update2); } else { - ctrl.start(update); + ctrl.start(update2); } } }); }); - react_spring_shared_esm_useOnce(() => () => { - react_spring_shared_esm_each(state.ctrls, ctrl => ctrl.stop(true)); + useOnce(() => () => { + react_spring_shared_modern_each(state.ctrls, (ctrl) => ctrl.stop(true)); }); - const values = springs.map(x => react_spring_core_esm_extends({}, x)); + const values = springs.map((x) => ({ ...x })); return ref ? [values, ref] : values; } +// src/hooks/useSpring.ts function useSpring(props, deps) { - const isFn = react_spring_shared_esm_is.fun(props); - const [[values], ref] = useSprings(1, isFn ? props : [props], isFn ? deps || [] : deps); + const isFn = is.fun(props); + const [[values], ref] = useSprings( + 1, + isFn ? props : [props], + isFn ? deps || [] : deps + ); return isFn || arguments.length == 2 ? [values, ref] : values; } -const initSpringRef = () => SpringRef(); +// src/hooks/useSpringRef.ts -const useSpringRef = () => useState(initSpringRef)[0]; +var initSpringRef = () => SpringRef(); +var useSpringRef = () => useState(initSpringRef)[0]; + +// src/hooks/useSpringValue.ts + +var useSpringValue = (initial, props) => { + const springValue = useConstant(() => new SpringValue(initial, props)); + useOnce2(() => () => { + springValue.stop(); + }); + return springValue; +}; + +// src/hooks/useTrail.ts function useTrail(length, propsArg, deps) { - var _passedRef; - - const propsFn = is.fun(propsArg) && propsArg; - if (propsFn && !deps) deps = []; + const propsFn = is10.fun(propsArg) && propsArg; + if (propsFn && !deps) + deps = []; let reverse = true; - let passedRef = undefined; - const result = useSprings(length, (i, ctrl) => { - const props = propsFn ? propsFn(i, ctrl) : propsArg; - passedRef = props.ref; - reverse = reverse && props.reverse; - return props; - }, deps || [{}]); - const ref = (_passedRef = passedRef) != null ? _passedRef : result[1]; - useIsomorphicLayoutEffect(() => { - each(ref.current, (ctrl, i) => { - const parent = ref.current[i + (reverse ? 1 : -1)]; - + let passedRef = void 0; + const result = useSprings( + length, + (i, ctrl) => { + const props = propsFn ? propsFn(i, ctrl) : propsArg; + passedRef = props.ref; + reverse = reverse && props.reverse; + return props; + }, + // Ensure the props function is called when no deps exist. + // This works around the 3 argument rule. + deps || [{}] + ); + useIsomorphicLayoutEffect3(() => { + each6(result[1].current, (ctrl, i) => { + const parent = result[1].current[i + (reverse ? 1 : -1)]; + replaceRef(ctrl, passedRef); + if (ctrl.ref) { + if (parent) { + ctrl.update({ to: parent.springs }); + } + return; + } if (parent) { - ctrl.start({ - to: parent.springs - }); + ctrl.start({ to: parent.springs }); } else { ctrl.start(); } }); }, deps); - if (propsFn || arguments.length == 3) { - ref['_getProps'] = (propsArg, ctrl, i) => { - const props = is.fun(propsArg) ? propsArg(i, ctrl) : propsArg; - + const ref = passedRef ?? result[1]; + ref["_getProps"] = (propsArg2, ctrl, i) => { + const props = is10.fun(propsArg2) ? propsArg2(i, ctrl) : propsArg2; if (props) { const parent = ref.current[i + (props.reverse ? 1 : -1)]; - if (parent) props.to = parent.springs; + if (parent) + props.to = parent.springs; return props; } }; - return result; } - - ref['start'] = propsArg => { - const results = []; - each(ref.current, (ctrl, i) => { - const props = is.fun(propsArg) ? propsArg(i, ctrl) : propsArg; - const parent = ref.current[i + (reverse ? 1 : -1)]; - - if (parent) { - results.push(ctrl.start(react_spring_core_esm_extends({}, props, { - to: parent.springs - }))); - } else { - results.push(ctrl.start(react_spring_core_esm_extends({}, props))); - } - }); - return results; - }; - return result[0]; } -let TransitionPhase; +// src/hooks/useTransition.tsx + -(function (TransitionPhase) { - TransitionPhase["MOUNT"] = "mount"; - TransitionPhase["ENTER"] = "enter"; - TransitionPhase["UPDATE"] = "update"; - TransitionPhase["LEAVE"] = "leave"; -})(TransitionPhase || (TransitionPhase = {})); function useTransition(data, props, deps) { - const propsFn = is.fun(props) && props; + const propsFn = is11.fun(props) && props; const { reset, sort, @@ -18878,25 +32906,27 @@ function useTransition(data, props, deps) { ref: propsRef, config: propsConfig } = propsFn ? propsFn() : props; - const ref = useMemo(() => propsFn || arguments.length == 3 ? SpringRef() : void 0, []); - const items = toArray(data); + const ref = useMemo2( + () => propsFn || arguments.length == 3 ? SpringRef() : void 0, + [] + ); + const items = toArray4(data); const transitions = []; - const usedTransitions = useRef(null); + const usedTransitions = useRef2(null); const prevTransitions = reset ? null : usedTransitions.current; - useIsomorphicLayoutEffect(() => { + useIsomorphicLayoutEffect4(() => { usedTransitions.current = transitions; }); - useOnce(() => { - each(transitions, t => { - ref == null ? void 0 : ref.add(t.ctrl); + useOnce3(() => { + each7(transitions, (t) => { + ref?.add(t.ctrl); t.ctrl.ref = ref; }); return () => { - each(usedTransitions.current, t => { + each7(usedTransitions.current, (t) => { if (t.expired) { clearTimeout(t.expirationId); } - detachRefs(t.ctrl, ref); t.ctrl.stop(true); }); @@ -18904,345 +32934,431 @@ function useTransition(data, props, deps) { }); const keys = getKeys(items, propsFn ? propsFn() : props, prevTransitions); const expired = reset && usedTransitions.current || []; - useIsomorphicLayoutEffect(() => each(expired, ({ - ctrl, - item, - key - }) => { - detachRefs(ctrl, ref); - callProp(onDestroyed, item, key); - })); + useIsomorphicLayoutEffect4( + () => each7(expired, ({ ctrl, item, key }) => { + detachRefs(ctrl, ref); + callProp(onDestroyed, item, key); + }) + ); const reused = []; - if (prevTransitions) each(prevTransitions, (t, i) => { - if (t.expired) { - clearTimeout(t.expirationId); - expired.push(t); - } else { - i = reused[i] = keys.indexOf(t.key); - if (~i) transitions[i] = t; - } - }); - each(items, (item, i) => { + if (prevTransitions) + each7(prevTransitions, (t, i) => { + if (t.expired) { + clearTimeout(t.expirationId); + expired.push(t); + } else { + i = reused[i] = keys.indexOf(t.key); + if (~i) + transitions[i] = t; + } + }); + each7(items, (item, i) => { if (!transitions[i]) { transitions[i] = { key: keys[i], item, - phase: TransitionPhase.MOUNT, + phase: "mount" /* MOUNT */, ctrl: new Controller() }; transitions[i].ctrl.item = item; } }); - if (reused.length) { let i = -1; - const { - leave - } = propsFn ? propsFn() : props; - each(reused, (keyIndex, prevIndex) => { + const { leave } = propsFn ? propsFn() : props; + each7(reused, (keyIndex, prevIndex) => { const t = prevTransitions[prevIndex]; - if (~keyIndex) { i = transitions.indexOf(t); - transitions[i] = react_spring_core_esm_extends({}, t, { - item: items[keyIndex] - }); + transitions[i] = { ...t, item: items[keyIndex] }; } else if (leave) { transitions.splice(++i, 0, t); } }); } - - if (is.fun(sort)) { + if (is11.fun(sort)) { transitions.sort((a, b) => sort(a.item, b.item)); } - let delay = -trail; - const forceUpdate = useForceUpdate(); + const forceUpdate = useForceUpdate2(); const defaultProps = getDefaultProps(props); - const changes = new Map(); - const exitingTransitions = useRef(new Map()); - const forceChange = useRef(false); - each(transitions, (t, i) => { + const changes = /* @__PURE__ */ new Map(); + const exitingTransitions = useRef2(/* @__PURE__ */ new Map()); + const forceChange = useRef2(false); + each7(transitions, (t, i) => { const key = t.key; const prevPhase = t.phase; const p = propsFn ? propsFn() : props; - let to; + let to2; let phase; - let propsDelay = callProp(p.delay || 0, key); - - if (prevPhase == TransitionPhase.MOUNT) { - to = p.enter; - phase = TransitionPhase.ENTER; + const propsDelay = callProp(p.delay || 0, key); + if (prevPhase == "mount" /* MOUNT */) { + to2 = p.enter; + phase = "enter" /* ENTER */; } else { const isLeave = keys.indexOf(key) < 0; - - if (prevPhase != TransitionPhase.LEAVE) { + if (prevPhase != "leave" /* LEAVE */) { if (isLeave) { - to = p.leave; - phase = TransitionPhase.LEAVE; - } else if (to = p.update) { - phase = TransitionPhase.UPDATE; - } else return; + to2 = p.leave; + phase = "leave" /* LEAVE */; + } else if (to2 = p.update) { + phase = "update" /* UPDATE */; + } else + return; } else if (!isLeave) { - to = p.enter; - phase = TransitionPhase.ENTER; - } else return; + to2 = p.enter; + phase = "enter" /* ENTER */; + } else + return; } - - to = callProp(to, t.item, i); - to = is.obj(to) ? inferTo(to) : { - to - }; - - if (!to.config) { - const config = propsConfig || defaultProps.config; - to.config = callProp(config, t.item, i, phase); + to2 = callProp(to2, t.item, i); + to2 = is11.obj(to2) ? inferTo(to2) : { to: to2 }; + if (!to2.config) { + const config2 = propsConfig || defaultProps.config; + to2.config = callProp(config2, t.item, i, phase); } - delay += trail; - - const payload = react_spring_core_esm_extends({}, defaultProps, { + const payload = { + ...defaultProps, + // we need to add our props.delay value you here. delay: propsDelay + delay, ref: propsRef, immediate: p.immediate, - reset: false - }, to); - - if (phase == TransitionPhase.ENTER && is.und(payload.from)) { - const _p = propsFn ? propsFn() : props; - - const from = is.und(_p.initial) || prevTransitions ? _p.from : _p.initial; + // This prevents implied resets. + reset: false, + // Merge any phase-specific props. + ...to2 + }; + if (phase == "enter" /* ENTER */ && is11.und(payload.from)) { + const p2 = propsFn ? propsFn() : props; + const from = is11.und(p2.initial) || prevTransitions ? p2.from : p2.initial; payload.from = callProp(from, t.item, i); } - - const { - onResolve - } = payload; - - payload.onResolve = result => { + const { onResolve } = payload; + payload.onResolve = (result) => { callProp(onResolve, result); - const transitions = usedTransitions.current; - const t = transitions.find(t => t.key === key); - if (!t) return; - - if (result.cancelled && t.phase != TransitionPhase.UPDATE) { + const transitions2 = usedTransitions.current; + const t2 = transitions2.find((t3) => t3.key === key); + if (!t2) + return; + if (result.cancelled && t2.phase != "update" /* UPDATE */) { return; } - - if (t.ctrl.idle) { - const idle = transitions.every(t => t.ctrl.idle); - - if (t.phase == TransitionPhase.LEAVE) { - const expiry = callProp(expires, t.item); - + if (t2.ctrl.idle) { + const idle = transitions2.every((t3) => t3.ctrl.idle); + if (t2.phase == "leave" /* LEAVE */) { + const expiry = callProp(expires, t2.item); if (expiry !== false) { const expiryMs = expiry === true ? 0 : expiry; - t.expired = true; - + t2.expired = true; if (!idle && expiryMs > 0) { - if (expiryMs <= 0x7fffffff) t.expirationId = setTimeout(forceUpdate, expiryMs); + if (expiryMs <= 2147483647) + t2.expirationId = setTimeout(forceUpdate, expiryMs); return; } } } - - if (idle && transitions.some(t => t.expired)) { - exitingTransitions.current.delete(t); - + if (idle && transitions2.some((t3) => t3.expired)) { + exitingTransitions.current.delete(t2); if (exitBeforeEnter) { forceChange.current = true; } - forceUpdate(); } } }; - const springs = getSprings(t.ctrl, payload); - - if (phase === TransitionPhase.LEAVE && exitBeforeEnter) { - exitingTransitions.current.set(t, { - phase, - springs, - payload - }); + if (phase === "leave" /* LEAVE */ && exitBeforeEnter) { + exitingTransitions.current.set(t, { phase, springs, payload }); } else { - changes.set(t, { - phase, - springs, - payload - }); + changes.set(t, { phase, springs, payload }); } }); - const context = useContext(SpringContext); - const prevContext = usePrev(context); + const context = useContext3(SpringContext); + const prevContext = usePrev2(context); const hasContext = context !== prevContext && hasProps(context); - useIsomorphicLayoutEffect(() => { + useIsomorphicLayoutEffect4(() => { if (hasContext) { - each(transitions, t => { - t.ctrl.start({ - default: context - }); + each7(transitions, (t) => { + t.ctrl.start({ default: context }); }); } }, [context]); - each(changes, (_, t) => { + each7(changes, (_, t) => { if (exitingTransitions.current.size) { - const ind = transitions.findIndex(state => state.key === t.key); + const ind = transitions.findIndex((state) => state.key === t.key); transitions.splice(ind, 1); } }); - useIsomorphicLayoutEffect(() => { - each(exitingTransitions.current.size ? exitingTransitions.current : changes, ({ - phase, - payload - }, t) => { - const { - ctrl - } = t; - t.phase = phase; - ref == null ? void 0 : ref.add(ctrl); - - if (hasContext && phase == TransitionPhase.ENTER) { - ctrl.start({ - default: context - }); - } - - if (payload) { - replaceRef(ctrl, payload.ref); - - if ((ctrl.ref || ref) && !forceChange.current) { - ctrl.update(payload); - } else { - ctrl.start(payload); - - if (forceChange.current) { - forceChange.current = false; + useIsomorphicLayoutEffect4( + () => { + each7( + exitingTransitions.current.size ? exitingTransitions.current : changes, + ({ phase, payload }, t) => { + const { ctrl } = t; + t.phase = phase; + ref?.add(ctrl); + if (hasContext && phase == "enter" /* ENTER */) { + ctrl.start({ default: context }); + } + if (payload) { + replaceRef(ctrl, payload.ref); + if ((ctrl.ref || ref) && !forceChange.current) { + ctrl.update(payload); + } else { + ctrl.start(payload); + if (forceChange.current) { + forceChange.current = false; + } + } } } + ); + }, + reset ? void 0 : deps + ); + const renderTransitions = (render) => /* @__PURE__ */ React2.createElement(React2.Fragment, null, transitions.map((t, i) => { + const { springs } = changes.get(t) || t.ctrl; + const elem = render({ ...springs }, t.item, t, i); + return elem && elem.type ? /* @__PURE__ */ React2.createElement( + elem.type, + { + ...elem.props, + key: is11.str(t.key) || is11.num(t.key) ? t.key : t.ctrl.id, + ref: elem.ref } - }); - }, reset ? void 0 : deps); - - const renderTransitions = render => React.createElement(React.Fragment, null, transitions.map((t, i) => { - const { - springs - } = changes.get(t) || t.ctrl; - const elem = render(react_spring_core_esm_extends({}, springs), t.item, t, i); - return elem && elem.type ? React.createElement(elem.type, react_spring_core_esm_extends({}, elem.props, { - key: is.str(t.key) || is.num(t.key) ? t.key : t.ctrl.id, - ref: elem.ref - })) : elem; + ) : elem; })); - return ref ? [renderTransitions, ref] : renderTransitions; } -let nextKey = 1; - -function getKeys(items, { - key, - keys = key -}, prevTransitions) { +var nextKey = 1; +function getKeys(items, { key, keys = key }, prevTransitions) { if (keys === null) { - const reused = new Set(); - return items.map(item => { - const t = prevTransitions && prevTransitions.find(t => t.item === item && t.phase !== TransitionPhase.LEAVE && !reused.has(t)); - + const reused = /* @__PURE__ */ new Set(); + return items.map((item) => { + const t = prevTransitions && prevTransitions.find( + (t2) => t2.item === item && t2.phase !== "leave" /* LEAVE */ && !reused.has(t2) + ); if (t) { reused.add(t); return t.key; } - return nextKey++; }); } - - return is.und(keys) ? items : is.fun(keys) ? items.map(keys) : toArray(keys); + return is11.und(keys) ? items : is11.fun(keys) ? items.map(keys) : toArray4(keys); } -const _excluded$2 = (/* unused pure expression or super */ null && (["children"])); -function Spring(_ref) { - let { - children - } = _ref, - props = _objectWithoutPropertiesLoose(_ref, _excluded$2); +// src/hooks/useScroll.ts +var useScroll = ({ + container, + ...springOptions +} = {}) => { + const [scrollValues, api] = useSpring( + () => ({ + scrollX: 0, + scrollY: 0, + scrollXProgress: 0, + scrollYProgress: 0, + ...springOptions + }), + [] + ); + useIsomorphicLayoutEffect5(() => { + const cleanupScroll = onScroll( + ({ x, y }) => { + api.start({ + scrollX: x.current, + scrollXProgress: x.progress, + scrollY: y.current, + scrollYProgress: y.progress + }); + }, + { container: container?.current || void 0 } + ); + return () => { + each8(Object.values(scrollValues), (value) => value.stop()); + cleanupScroll(); + }; + }, []); + return scrollValues; +}; + +// src/hooks/useResize.ts + +var useResize = ({ + container, + ...springOptions +}) => { + const [sizeValues, api] = useSpring( + () => ({ + width: 0, + height: 0, + ...springOptions + }), + [] + ); + useIsomorphicLayoutEffect6(() => { + const cleanupScroll = onResize( + ({ width, height }) => { + api.start({ + width, + height, + immediate: sizeValues.width.get() === 0 || sizeValues.height.get() === 0 + }); + }, + { container: container?.current || void 0 } + ); + return () => { + each9(Object.values(sizeValues), (value) => value.stop()); + cleanupScroll(); + }; + }, []); + return sizeValues; +}; + +// src/hooks/useInView.ts + + +var defaultThresholdOptions = { + any: 0, + all: 1 +}; +function useInView(props, args) { + const [isInView, setIsInView] = useState2(false); + const ref = useRef3(); + const propsFn = is12.fun(props) && props; + const springsProps = propsFn ? propsFn() : {}; + const { to: to2 = {}, from = {}, ...restSpringProps } = springsProps; + const intersectionArguments = propsFn ? args : props; + const [springs, api] = useSpring(() => ({ from, ...restSpringProps }), []); + useIsomorphicLayoutEffect7(() => { + const element = ref.current; + const { + root, + once, + amount = "any", + ...restArgs + } = intersectionArguments ?? {}; + if (!element || once && isInView || typeof IntersectionObserver === "undefined") + return; + const activeIntersections = /* @__PURE__ */ new WeakMap(); + const onEnter = () => { + if (to2) { + api.start(to2); + } + setIsInView(true); + const cleanup = () => { + if (from) { + api.start(from); + } + setIsInView(false); + }; + return once ? void 0 : cleanup; + }; + const handleIntersection = (entries) => { + entries.forEach((entry) => { + const onLeave = activeIntersections.get(entry.target); + if (entry.isIntersecting === Boolean(onLeave)) { + return; + } + if (entry.isIntersecting) { + const newOnLeave = onEnter(); + if (is12.fun(newOnLeave)) { + activeIntersections.set(entry.target, newOnLeave); + } else { + observer.unobserve(entry.target); + } + } else if (onLeave) { + onLeave(); + activeIntersections.delete(entry.target); + } + }); + }; + const observer = new IntersectionObserver(handleIntersection, { + root: root && root.current || void 0, + threshold: typeof amount === "number" || Array.isArray(amount) ? amount : defaultThresholdOptions[amount], + ...restArgs + }); + observer.observe(element); + return () => observer.unobserve(element); + }, [intersectionArguments]); + if (propsFn) { + return [ref, springs]; + } + return [ref, isInView]; +} + +// src/components/Spring.tsx +function Spring({ children, ...props }) { return children(useSpring(props)); } -const _excluded$1 = (/* unused pure expression or super */ null && (["items", "children"])); -function Trail(_ref) { - let { - items, - children - } = _ref, - props = _objectWithoutPropertiesLoose(_ref, _excluded$1); +// src/components/Trail.tsx +function Trail({ + items, + children, + ...props +}) { const trails = useTrail(items.length, props); return items.map((item, index) => { const result = children(item, index); - return is.fun(result) ? result(trails[index]) : result; + return is13.fun(result) ? result(trails[index]) : result; }); } -const _excluded = (/* unused pure expression or super */ null && (["items", "children"])); -function Transition(_ref) { - let { - items, - children - } = _ref, - props = _objectWithoutPropertiesLoose(_ref, _excluded); - +// src/components/Transition.tsx +function Transition({ + items, + children, + ...props +}) { return useTransition(items, props)(children); } -class Interpolation extends FrameValue { +// src/interpolate.ts + + +// src/Interpolation.ts + + +var Interpolation = class extends FrameValue { constructor(source, args) { super(); - this.key = void 0; - this.idle = true; - this.calc = void 0; - this._active = new Set(); this.source = source; + /** Equals false when in the frameloop */ + this.idle = true; + /** The inputs which are currently animating */ + this._active = /* @__PURE__ */ new Set(); this.calc = createInterpolator(...args); - const value = this._get(); - const nodeType = getAnimatedType(value); setAnimated(this, nodeType.create(value)); } - advance(_dt) { const value = this._get(); - const oldValue = this.get(); - if (!isEqual(value, oldValue)) { getAnimated(this).setValue(value); - this._onChange(value, this.idle); } - if (!this.idle && checkIdle(this._active)) { becomeIdle(this); } } - _get() { - const inputs = react_spring_shared_esm_is.arr(this.source) ? this.source.map(getFluidValue) : react_spring_shared_esm_toArray(getFluidValue(this.source)); + const inputs = is.arr(this.source) ? this.source.map(getFluidValue) : toArray(getFluidValue(this.source)); return this.calc(...inputs); } - _start() { if (this.idle && !checkIdle(this._active)) { this.idle = false; - react_spring_shared_esm_each(getPayload(this), node => { + react_spring_shared_modern_each(getPayload(this), (node) => { node.done = false; }); - - if (globals.skipAnimation) { + if (globals_exports.skipAnimation) { raf.batchedUpdates(() => this.advance()); becomeIdle(this); } else { @@ -19250,150 +33366,127 @@ class Interpolation extends FrameValue { } } } - + // Observe our sources only when we're observed. _attach() { let priority = 1; - react_spring_shared_esm_each(react_spring_shared_esm_toArray(this.source), source => { + react_spring_shared_modern_each(toArray(this.source), (source) => { if (hasFluidValue(source)) { addFluidObserver(source, this); } - if (isFrameValue(source)) { if (!source.idle) { this._active.add(source); } - priority = Math.max(priority, source.priority + 1); } }); this.priority = priority; - this._start(); } - + // Stop observing our sources once we have no observers. _detach() { - react_spring_shared_esm_each(react_spring_shared_esm_toArray(this.source), source => { + react_spring_shared_modern_each(toArray(this.source), (source) => { if (hasFluidValue(source)) { removeFluidObserver(source, this); } }); - this._active.clear(); - becomeIdle(this); } - + /** @internal */ eventObserved(event) { - if (event.type == 'change') { + if (event.type == "change") { if (event.idle) { this.advance(); } else { this._active.add(event.parent); - this._start(); } - } else if (event.type == 'idle') { + } else if (event.type == "idle") { this._active.delete(event.parent); - } else if (event.type == 'priority') { - this.priority = react_spring_shared_esm_toArray(this.source).reduce((highest, parent) => Math.max(highest, (isFrameValue(parent) ? parent.priority : 0) + 1), 0); + } else if (event.type == "priority") { + this.priority = toArray(this.source).reduce( + (highest, parent) => Math.max(highest, (isFrameValue(parent) ? parent.priority : 0) + 1), + 0 + ); } } - -} - +}; function isIdle(source) { return source.idle !== false; } - function checkIdle(active) { return !active.size || Array.from(active).every(isIdle); } - function becomeIdle(self) { if (!self.idle) { self.idle = true; - react_spring_shared_esm_each(getPayload(self), node => { + react_spring_shared_modern_each(getPayload(self), (node) => { node.done = true; }); callFluidObservers(self, { - type: 'idle', + type: "idle", parent: self }); } } -const react_spring_core_esm_to = (source, ...args) => new Interpolation(source, args); -const react_spring_core_esm_interpolate = (source, ...args) => (deprecateInterpolate(), new Interpolation(source, args)); +// src/interpolate.ts +var react_spring_core_modern_to = (source, ...args) => new Interpolation(source, args); +var react_spring_core_modern_interpolate = (source, ...args) => (deprecateInterpolate2(), new Interpolation(source, args)); -globals.assign({ - createStringInterpolator: createStringInterpolator, +// src/globals.ts + +globals_exports.assign({ + createStringInterpolator: createStringInterpolator2, to: (source, args) => new Interpolation(source, args) }); -const react_spring_core_esm_update = frameLoop.advance; +var react_spring_core_modern_update = frameLoop.advance; + +// src/index.ts +//# sourceMappingURL=react-spring_core.modern.mjs.map ;// CONCATENATED MODULE: external "ReactDOM" var external_ReactDOM_namespaceObject = window["ReactDOM"]; -;// CONCATENATED MODULE: ./node_modules/@react-spring/web/dist/react-spring-web.esm.js +;// CONCATENATED MODULE: ./node_modules/@react-spring/web/dist/react-spring_web.modern.mjs +// src/index.ts - -function react_spring_web_esm_objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; - - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - - return target; -} - -const react_spring_web_esm_excluded$2 = ["style", "children", "scrollTop", "scrollLeft"]; -const isCustomPropRE = /^--/; - +// src/applyAnimatedValues.ts +var isCustomPropRE = /^--/; function dangerousStyleValue(name, value) { - if (value == null || typeof value === 'boolean' || value === '') return ''; - if (typeof value === 'number' && value !== 0 && !isCustomPropRE.test(name) && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) return value + 'px'; - return ('' + value).trim(); + if (value == null || typeof value === "boolean" || value === "") + return ""; + if (typeof value === "number" && value !== 0 && !isCustomPropRE.test(name) && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) + return value + "px"; + return ("" + value).trim(); } - -const attributeCache = {}; +var attributeCache = {}; function applyAnimatedValues(instance, props) { if (!instance.nodeType || !instance.setAttribute) { return false; } - - const isFilterElement = instance.nodeName === 'filter' || instance.parentNode && instance.parentNode.nodeName === 'filter'; - - const _ref = props, - { - style, - children, - scrollTop, - scrollLeft - } = _ref, - attributes = react_spring_web_esm_objectWithoutPropertiesLoose(_ref, react_spring_web_esm_excluded$2); - + const isFilterElement = instance.nodeName === "filter" || instance.parentNode && instance.parentNode.nodeName === "filter"; + const { style, children, scrollTop, scrollLeft, viewBox, ...attributes } = props; const values = Object.values(attributes); - const names = Object.keys(attributes).map(name => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, n => '-' + n.toLowerCase()))); - + const names = Object.keys(attributes).map( + (name) => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace( + /([A-Z])/g, + // Attributes are written in dash case + (n) => "-" + n.toLowerCase() + )) + ); if (children !== void 0) { instance.textContent = children; } - - for (let name in style) { + for (const name in style) { if (style.hasOwnProperty(name)) { const value = dangerousStyleValue(name, style[name]); - if (isCustomPropRE.test(name)) { instance.style.setProperty(name, value); } else { @@ -19401,20 +33494,20 @@ function applyAnimatedValues(instance, props) { } } } - names.forEach((name, i) => { instance.setAttribute(name, values[i]); }); - if (scrollTop !== void 0) { instance.scrollTop = scrollTop; } - if (scrollLeft !== void 0) { instance.scrollLeft = scrollLeft; } + if (viewBox !== void 0) { + instance.setAttribute("viewBox", viewBox); + } } -let isUnitlessNumber = { +var isUnitlessNumber = { animationIterationCount: true, borderImageOutset: true, borderImageSlice: true, @@ -19448,6 +33541,7 @@ let isUnitlessNumber = { widows: true, zIndex: true, zoom: true, + // SVG-related properties fillOpacity: true, floodOpacity: true, stopOpacity: true, @@ -19457,126 +33551,267 @@ let isUnitlessNumber = { strokeOpacity: true, strokeWidth: true }; - -const prefixKey = (prefix, key) => prefix + key.charAt(0).toUpperCase() + key.substring(1); - -const prefixes = ['Webkit', 'Ms', 'Moz', 'O']; +var prefixKey = (prefix, key) => prefix + key.charAt(0).toUpperCase() + key.substring(1); +var prefixes = ["Webkit", "Ms", "Moz", "O"]; isUnitlessNumber = Object.keys(isUnitlessNumber).reduce((acc, prop) => { - prefixes.forEach(prefix => acc[prefixKey(prefix, prop)] = acc[prop]); + prefixes.forEach((prefix) => acc[prefixKey(prefix, prop)] = acc[prop]); return acc; }, isUnitlessNumber); -const react_spring_web_esm_excluded$1 = ["x", "y", "z"]; -const domTransforms = /^(matrix|translate|scale|rotate|skew)/; -const pxTransforms = /^(translate)/; -const degTransforms = /^(rotate|skew)/; +// src/AnimatedStyle.ts -const addUnit = (value, unit) => react_spring_shared_esm_is.num(value) && value !== 0 ? value + unit : value; - -const isValueIdentity = (value, id) => react_spring_shared_esm_is.arr(value) ? value.every(v => isValueIdentity(v, id)) : react_spring_shared_esm_is.num(value) ? value === id : parseFloat(value) === id; - -class AnimatedStyle extends AnimatedObject { - constructor(_ref) { - let { - x, - y, - z - } = _ref, - style = react_spring_web_esm_objectWithoutPropertiesLoose(_ref, react_spring_web_esm_excluded$1); +var domTransforms = /^(matrix|translate|scale|rotate|skew)/; +var pxTransforms = /^(translate)/; +var degTransforms = /^(rotate|skew)/; +var addUnit = (value, unit) => is.num(value) && value !== 0 ? value + unit : value; +var isValueIdentity = (value, id) => is.arr(value) ? value.every((v) => isValueIdentity(v, id)) : is.num(value) ? value === id : parseFloat(value) === id; +var AnimatedStyle = class extends AnimatedObject { + constructor({ x, y, z, ...style }) { const inputs = []; const transforms = []; - if (x || y || z) { inputs.push([x || 0, y || 0, z || 0]); - transforms.push(xyz => [`translate3d(${xyz.map(v => addUnit(v, 'px')).join(',')})`, isValueIdentity(xyz, 0)]); + transforms.push((xyz) => [ + `translate3d(${xyz.map((v) => addUnit(v, "px")).join(",")})`, + // prettier-ignore + isValueIdentity(xyz, 0) + ]); } - eachProp(style, (value, key) => { - if (key === 'transform') { - inputs.push([value || '']); - transforms.push(transform => [transform, transform === '']); + if (key === "transform") { + inputs.push([value || ""]); + transforms.push((transform) => [transform, transform === ""]); } else if (domTransforms.test(key)) { delete style[key]; - if (react_spring_shared_esm_is.und(value)) return; - const unit = pxTransforms.test(key) ? 'px' : degTransforms.test(key) ? 'deg' : ''; - inputs.push(react_spring_shared_esm_toArray(value)); - transforms.push(key === 'rotate3d' ? ([x, y, z, deg]) => [`rotate3d(${x},${y},${z},${addUnit(deg, unit)})`, isValueIdentity(deg, 0)] : input => [`${key}(${input.map(v => addUnit(v, unit)).join(',')})`, isValueIdentity(input, key.startsWith('scale') ? 1 : 0)]); + if (is.und(value)) + return; + const unit = pxTransforms.test(key) ? "px" : degTransforms.test(key) ? "deg" : ""; + inputs.push(toArray(value)); + transforms.push( + key === "rotate3d" ? ([x2, y2, z2, deg]) => [ + `rotate3d(${x2},${y2},${z2},${addUnit(deg, unit)})`, + isValueIdentity(deg, 0) + ] : (input) => [ + `${key}(${input.map((v) => addUnit(v, unit)).join(",")})`, + isValueIdentity(input, key.startsWith("scale") ? 1 : 0) + ] + ); } }); - if (inputs.length) { style.transform = new FluidTransform(inputs, transforms); } - super(style); } - -} - -class FluidTransform extends FluidValue { +}; +var FluidTransform = class extends FluidValue { constructor(inputs, transforms) { super(); - this._value = null; this.inputs = inputs; this.transforms = transforms; + this._value = null; } - get() { return this._value || (this._value = this._get()); } - _get() { - let transform = ''; + let transform = ""; let identity = true; - react_spring_shared_esm_each(this.inputs, (input, i) => { + react_spring_shared_modern_each(this.inputs, (input, i) => { const arg1 = getFluidValue(input[0]); - const [t, id] = this.transforms[i](react_spring_shared_esm_is.arr(arg1) ? arg1 : input.map(getFluidValue)); - transform += ' ' + t; + const [t, id] = this.transforms[i]( + is.arr(arg1) ? arg1 : input.map(getFluidValue) + ); + transform += " " + t; identity = identity && id; }); - return identity ? 'none' : transform; + return identity ? "none" : transform; } - + // Start observing our inputs once we have an observer. observerAdded(count) { - if (count == 1) react_spring_shared_esm_each(this.inputs, input => react_spring_shared_esm_each(input, value => hasFluidValue(value) && addFluidObserver(value, this))); + if (count == 1) + react_spring_shared_modern_each( + this.inputs, + (input) => react_spring_shared_modern_each( + input, + (value) => hasFluidValue(value) && addFluidObserver(value, this) + ) + ); } - + // Stop observing our inputs once we have no observers. observerRemoved(count) { - if (count == 0) react_spring_shared_esm_each(this.inputs, input => react_spring_shared_esm_each(input, value => hasFluidValue(value) && removeFluidObserver(value, this))); + if (count == 0) + react_spring_shared_modern_each( + this.inputs, + (input) => react_spring_shared_modern_each( + input, + (value) => hasFluidValue(value) && removeFluidObserver(value, this) + ) + ); } - eventObserved(event) { - if (event.type == 'change') { + if (event.type == "change") { this._value = null; } - callFluidObservers(this, event); } +}; -} +// src/primitives.ts +var primitives = [ + "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", + // SVG + "circle", + "clipPath", + "defs", + "ellipse", + "foreignObject", + "g", + "image", + "line", + "linearGradient", + "mask", + "path", + "pattern", + "polygon", + "polyline", + "radialGradient", + "rect", + "stop", + "svg", + "text", + "tspan" +]; -const primitives = ['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']; +// src/index.ts -const react_spring_web_esm_excluded = ["scrollTop", "scrollLeft"]; -globals.assign({ +globals_exports.assign({ batchedUpdates: external_ReactDOM_namespaceObject.unstable_batchedUpdates, - createStringInterpolator: createStringInterpolator, - colors: colors + createStringInterpolator: createStringInterpolator2, + colors: colors2 }); -const host = createHost(primitives, { +var host = createHost(primitives, { applyAnimatedValues, - createAnimatedStyle: style => new AnimatedStyle(style), - getComponentProps: _ref => { - let props = react_spring_web_esm_objectWithoutPropertiesLoose(_ref, react_spring_web_esm_excluded); - - return props; - } + createAnimatedStyle: (style) => new AnimatedStyle(style), + // eslint-disable-next-line @typescript-eslint/no-unused-vars + getComponentProps: ({ scrollTop, scrollLeft, ...props }) => props }); -const animated = host.animated; - - +var animated = host.animated; +//# sourceMappingURL=react-spring_web.modern.mjs.map ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-moving-animation/index.js /** * External dependencies @@ -20364,7 +34599,7 @@ function useNavModeExit(clientId) { function useIntersectionObserver() { - const observer = (0,external_wp_element_namespaceObject.useContext)(IntersectionObserver); + const observer = (0,external_wp_element_namespaceObject.useContext)(block_list_IntersectionObserver); return (0,external_wp_compose_namespaceObject.useRefEffect)(node => { if (observer) { observer.observe(node); @@ -34264,7 +48499,7 @@ ForwardedInnerBlocks.Content = () => useInnerBlocksProps.save().children; const elementContext = (0,external_wp_element_namespaceObject.createContext)(); -const IntersectionObserver = (0,external_wp_element_namespaceObject.createContext)(); +const block_list_IntersectionObserver = (0,external_wp_element_namespaceObject.createContext)(); function Root(_ref) { let { @@ -34325,7 +48560,7 @@ function Root(_ref) { }, settings); return (0,external_wp_element_namespaceObject.createElement)(elementContext.Provider, { value: element - }, (0,external_wp_element_namespaceObject.createElement)(IntersectionObserver.Provider, { + }, (0,external_wp_element_namespaceObject.createElement)(block_list_IntersectionObserver.Provider, { value: intersectionObserver }, (0,external_wp_element_namespaceObject.createElement)("div", innerBlocksProps))); } @@ -44457,26 +58692,21 @@ var normalize_wheel_default = /*#__PURE__*/__webpack_require__.n(normalize_wheel * Compute the dimension of the crop area based on media size, * aspect ratio and optionally rotation */ - function getCropSize(mediaWidth, mediaHeight, containerWidth, containerHeight, aspect, rotation) { if (rotation === void 0) { rotation = 0; } - var _a = rotateSize(mediaWidth, mediaHeight, rotation), - width = _a.width, - height = _a.height; - + width = _a.width, + height = _a.height; var fittingWidth = Math.min(width, containerWidth); var fittingHeight = Math.min(height, containerHeight); - if (fittingWidth > fittingHeight * aspect) { return { width: fittingHeight * aspect, height: fittingHeight }; } - return { width: fittingWidth, height: fittingWidth / aspect @@ -44486,7 +58716,6 @@ function getCropSize(mediaWidth, mediaHeight, containerWidth, containerHeight, a * Compute media zoom. * We fit the media into the container with "max-width: 100%; max-height: 100%;" */ - function getMediaZoom(mediaSize) { // Take the axis with more pixels to improve accuracy return mediaSize.width > mediaSize.height ? mediaSize.width / mediaSize.naturalWidth : mediaSize.height / mediaSize.naturalHeight; @@ -44494,27 +58723,22 @@ function getMediaZoom(mediaSize) { /** * Ensure a new media position stays in the crop area. */ - function restrictPosition(position, mediaSize, cropSize, zoom, rotation) { if (rotation === void 0) { rotation = 0; } - var _a = rotateSize(mediaSize.width, mediaSize.height, rotation), - width = _a.width, - height = _a.height; - + width = _a.width, + height = _a.height; return { x: restrictPositionCoord(position.x, width, cropSize.width, zoom), y: restrictPositionCoord(position.y, height, cropSize.height, zoom) }; } - function restrictPositionCoord(position, mediaSize, cropSize, zoom) { var maxPosition = mediaSize * zoom / 2 - cropSize / 2; - return clamp(position, -maxPosition, maxPosition); + return index_module_clamp(position, -maxPosition, maxPosition); } - function getDistanceBetweenPoints(pointA, pointB) { return Math.sqrt(Math.pow(pointA.y - pointB.y, 2) + Math.pow(pointA.x - pointB.x, 2)); } @@ -44525,37 +58749,34 @@ function getRotationBetweenPoints(pointA, pointB) { * Compute the output cropped area of the media in percentages and pixels. * x/y are the top-left coordinates on the src media */ - function computeCroppedArea(crop, mediaSize, cropSize, aspect, zoom, rotation, restrictPosition) { if (rotation === void 0) { rotation = 0; } - if (restrictPosition === void 0) { restrictPosition = true; - } // if the media is rotated by the user, we cannot limit the position anymore + } + // if the media is rotated by the user, we cannot limit the position anymore // as it might need to be negative. - - var limitAreaFn = restrictPosition ? limitArea : noOp; var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation); - var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation); // calculate the crop area in percentages + var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation); + // calculate the crop area in percentages // in the rotated space - var croppedAreaPercentages = { x: limitAreaFn(100, ((mediaBBoxSize.width - cropSize.width / zoom) / 2 - crop.x / zoom) / mediaBBoxSize.width * 100), y: limitAreaFn(100, ((mediaBBoxSize.height - cropSize.height / zoom) / 2 - crop.y / zoom) / mediaBBoxSize.height * 100), width: limitAreaFn(100, cropSize.width / mediaBBoxSize.width * 100 / zoom), height: limitAreaFn(100, cropSize.height / mediaBBoxSize.height * 100 / zoom) - }; // we compute the pixels size naively - + }; + // we compute the pixels size naively var widthInPixels = Math.round(limitAreaFn(mediaNaturalBBoxSize.width, croppedAreaPercentages.width * mediaNaturalBBoxSize.width / 100)); var heightInPixels = Math.round(limitAreaFn(mediaNaturalBBoxSize.height, croppedAreaPercentages.height * mediaNaturalBBoxSize.height / 100)); - var isImgWiderThanHigh = mediaNaturalBBoxSize.width >= mediaNaturalBBoxSize.height * aspect; // then we ensure the width and height exactly match the aspect (to avoid rounding approximations) + var isImgWiderThanHigh = mediaNaturalBBoxSize.width >= mediaNaturalBBoxSize.height * aspect; + // then we ensure the width and height exactly match the aspect (to avoid rounding approximations) // if the media is wider than high, when zoom is 0, the crop height will be equals to image height // thus we want to compute the width from the height and aspect for accuracy. // Otherwise, we compute the height from width and aspect. - var sizePixels = isImgWiderThanHigh ? { width: Math.round(heightInPixels * aspect), height: heightInPixels @@ -44563,12 +58784,10 @@ function computeCroppedArea(crop, mediaSize, cropSize, aspect, zoom, rotation, r width: widthInPixels, height: Math.round(widthInPixels / aspect) }; - var croppedAreaPixels = __assign(__assign({}, sizePixels), { x: Math.round(limitAreaFn(mediaNaturalBBoxSize.width - sizePixels.width, croppedAreaPercentages.x * mediaNaturalBBoxSize.width / 100)), y: Math.round(limitAreaFn(mediaNaturalBBoxSize.height - sizePixels.height, croppedAreaPercentages.y * mediaNaturalBBoxSize.height / 100)) }); - return { croppedAreaPercentages: croppedAreaPercentages, croppedAreaPixels: croppedAreaPixels @@ -44577,23 +58796,19 @@ function computeCroppedArea(crop, mediaSize, cropSize, aspect, zoom, rotation, r /** * Ensure the returned value is between 0 and max */ - function limitArea(max, value) { return Math.min(max, Math.max(0, value)); } - function noOp(_max, value) { return value; } /** * Compute crop and zoom from the croppedAreaPercentages. */ - - function getInitialCropFromCroppedAreaPercentages(croppedAreaPercentages, mediaSize, rotation, cropSize, minZoom, maxZoom) { - var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation); // This is the inverse process of computeCroppedArea - - var zoom = clamp(cropSize.width / mediaBBoxSize.width * (100 / croppedAreaPercentages.width), minZoom, maxZoom); + var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation); + // This is the inverse process of computeCroppedArea + var zoom = index_module_clamp(cropSize.width / mediaBBoxSize.width * (100 / croppedAreaPercentages.width), minZoom, maxZoom); var crop = { x: zoom * mediaBBoxSize.width / 2 - cropSize.width / 2 - mediaBBoxSize.width * zoom * (croppedAreaPercentages.x / 100), y: zoom * mediaBBoxSize.height / 2 - cropSize.height / 2 - mediaBBoxSize.height * zoom * (croppedAreaPercentages.y / 100) @@ -44606,7 +58821,6 @@ function getInitialCropFromCroppedAreaPercentages(croppedAreaPercentages, mediaS /** * Compute zoom from the croppedAreaPixels */ - function getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) { var mediaZoom = getMediaZoom(mediaSize); return cropSize.height > cropSize.width ? cropSize.height / (croppedAreaPixels.height * mediaZoom) : cropSize.width / (croppedAreaPixels.width * mediaZoom); @@ -44614,15 +58828,12 @@ function getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) { /** * Compute crop and zoom from the croppedAreaPixels */ - - function getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, rotation, cropSize, minZoom, maxZoom) { if (rotation === void 0) { rotation = 0; } - var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation); - var zoom = clamp(getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize), minZoom, maxZoom); + var zoom = index_module_clamp(getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize), minZoom, maxZoom); var cropZoom = cropSize.height > cropSize.width ? cropSize.height / croppedAreaPixels.height : cropSize.width / croppedAreaPixels.width; var crop = { x: ((mediaNaturalBBoxSize.width - croppedAreaPixels.width) / 2 - croppedAreaPixels.x) * cropZoom, @@ -44636,7 +58847,6 @@ function getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, rotat /** * Return the point that is the center of point a and b */ - function getCenter(a, b) { return { x: (b.x + a.x) / 2, @@ -44649,7 +58859,6 @@ function getRadianAngle(degreeValue) { /** * Returns the new bounding area of a rotated rectangle. */ - function rotateSize(width, height, rotation) { var rotRad = getRadianAngle(rotation); return { @@ -44660,26 +58869,21 @@ function rotateSize(width, height, rotation) { /** * Clamp value between min and max */ - -function clamp(value, min, max) { +function index_module_clamp(value, min, max) { return Math.min(Math.max(value, min), max); } /** * Combine multiple class names into a single string. */ - function classNames() { var args = []; - for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } - return args.filter(function (value) { if (typeof value === 'string' && value.length > 0) { return true; } - return false; }).join(' ').trim(); } @@ -44688,17 +58892,12 @@ var css_248z = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n var MIN_ZOOM = 1; var MAX_ZOOM = 3; - -var Cropper = -/** @class */ -function (_super) { +var Cropper = /** @class */function (_super) { __extends(Cropper, _super); - function Cropper() { var _this = _super !== null && _super.apply(this, arguments) || this; - - _this.imageRef = /*#__PURE__*/external_React_default().createRef(); - _this.videoRef = /*#__PURE__*/external_React_default().createRef(); + _this.imageRef = external_React_default().createRef(); + _this.videoRef = external_React_default().createRef(); _this.containerRef = null; _this.styleRef = null; _this.containerRect = null; @@ -44724,93 +58923,88 @@ function (_super) { _this.rafDragTimeout = null; _this.rafPinchTimeout = null; _this.wheelTimer = null; - _this.currentDoc = document; - _this.currentWindow = window; + _this.currentDoc = typeof document !== 'undefined' ? document : null; + _this.currentWindow = typeof window !== 'undefined' ? window : null; + _this.resizeObserver = null; _this.state = { cropSize: null, hasWheelJustStarted: false - }; // this is to prevent Safari on iOS >= 10 to zoom the page - + }; + _this.initResizeObserver = function () { + if (typeof window.ResizeObserver === 'undefined' || !_this.containerRef) { + return; + } + var isFirstResize = true; + _this.resizeObserver = new window.ResizeObserver(function (entries) { + if (isFirstResize) { + isFirstResize = false; // observe() is called on mount, we don't want to trigger a recompute on mount + return; + } + _this.computeSizes(); + }); + _this.resizeObserver.observe(_this.containerRef); + }; + // this is to prevent Safari on iOS >= 10 to zoom the page _this.preventZoomSafari = function (e) { return e.preventDefault(); }; - _this.cleanEvents = function () { + if (!_this.currentDoc) return; _this.currentDoc.removeEventListener('mousemove', _this.onMouseMove); - _this.currentDoc.removeEventListener('mouseup', _this.onDragStopped); - _this.currentDoc.removeEventListener('touchmove', _this.onTouchMove); - _this.currentDoc.removeEventListener('touchend', _this.onDragStopped); - _this.currentDoc.removeEventListener('gesturemove', _this.onGestureMove); - _this.currentDoc.removeEventListener('gestureend', _this.onGestureEnd); }; - _this.clearScrollEvent = function () { if (_this.containerRef) _this.containerRef.removeEventListener('wheel', _this.onWheel); - if (_this.wheelTimer) { clearTimeout(_this.wheelTimer); } }; - _this.onMediaLoad = function () { var cropSize = _this.computeSizes(); - if (cropSize) { _this.emitCropData(); - _this.setInitialCrop(cropSize); } - if (_this.props.onMediaLoaded) { _this.props.onMediaLoaded(_this.mediaSize); } }; - _this.setInitialCrop = function (cropSize) { if (_this.props.initialCroppedAreaPercentages) { var _a = getInitialCropFromCroppedAreaPercentages(_this.props.initialCroppedAreaPercentages, _this.mediaSize, _this.props.rotation, cropSize, _this.props.minZoom, _this.props.maxZoom), - crop = _a.crop, - zoom = _a.zoom; - + crop = _a.crop, + zoom = _a.zoom; _this.props.onCropChange(crop); - _this.props.onZoomChange && _this.props.onZoomChange(zoom); } else if (_this.props.initialCroppedAreaPixels) { var _b = getInitialCropFromCroppedAreaPixels(_this.props.initialCroppedAreaPixels, _this.mediaSize, _this.props.rotation, cropSize, _this.props.minZoom, _this.props.maxZoom), - crop = _b.crop, - zoom = _b.zoom; - + crop = _b.crop, + zoom = _b.zoom; _this.props.onCropChange(crop); - _this.props.onZoomChange && _this.props.onZoomChange(zoom); } }; - _this.computeSizes = function () { var _a, _b, _c, _d, _e, _f; - var mediaRef = _this.imageRef.current || _this.videoRef.current; - if (mediaRef && _this.containerRef) { _this.containerRect = _this.containerRef.getBoundingClientRect(); var containerAspect = _this.containerRect.width / _this.containerRect.height; var naturalWidth = ((_a = _this.imageRef.current) === null || _a === void 0 ? void 0 : _a.naturalWidth) || ((_b = _this.videoRef.current) === null || _b === void 0 ? void 0 : _b.videoWidth) || 0; var naturalHeight = ((_c = _this.imageRef.current) === null || _c === void 0 ? void 0 : _c.naturalHeight) || ((_d = _this.videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) || 0; var isMediaScaledDown = mediaRef.offsetWidth < naturalWidth || mediaRef.offsetHeight < naturalHeight; - var mediaAspect = naturalWidth / naturalHeight; // We do not rely on the offsetWidth/offsetHeight if the media is scaled down + var mediaAspect = naturalWidth / naturalHeight; + // We do not rely on the offsetWidth/offsetHeight if the media is scaled down // as the values they report are rounded. That will result in precision losses // when calculating zoom. We use the fact that the media is positionned relative // to the container. That allows us to use the container's dimensions // and natural aspect ratio of the media to calculate accurate media size. // However, for this to work, the container should not be rotated - var renderedMediaSize = void 0; - if (isMediaScaledDown) { switch (_this.props.objectFit) { default: @@ -44823,21 +59017,18 @@ function (_super) { height: _this.containerRect.width / mediaAspect }; break; - case 'horizontal-cover': renderedMediaSize = { width: _this.containerRect.width, height: _this.containerRect.width / mediaAspect }; break; - case 'vertical-cover': renderedMediaSize = { width: _this.containerRect.height * mediaAspect, height: _this.containerRect.height }; break; - case 'auto-cover': renderedMediaSize = naturalWidth > naturalHeight ? { width: _this.containerRect.width, @@ -44854,123 +59045,94 @@ function (_super) { height: mediaRef.offsetHeight }; } - _this.mediaSize = __assign(__assign({}, renderedMediaSize), { naturalWidth: naturalWidth, naturalHeight: naturalHeight - }); // set media size in the parent - + }); + // set media size in the parent if (_this.props.setMediaSize) { _this.props.setMediaSize(_this.mediaSize); } - var cropSize = _this.props.cropSize ? _this.props.cropSize : getCropSize(_this.mediaSize.width, _this.mediaSize.height, _this.containerRect.width, _this.containerRect.height, _this.props.aspect, _this.props.rotation); - if (((_e = _this.state.cropSize) === null || _e === void 0 ? void 0 : _e.height) !== cropSize.height || ((_f = _this.state.cropSize) === null || _f === void 0 ? void 0 : _f.width) !== cropSize.width) { _this.props.onCropSizeChange && _this.props.onCropSizeChange(cropSize); } - _this.setState({ cropSize: cropSize - }, _this.recomputeCropPosition); // pass crop size to parent - - + }, _this.recomputeCropPosition); + // pass crop size to parent if (_this.props.setCropSize) { _this.props.setCropSize(cropSize); } - return cropSize; } }; - _this.onMouseDown = function (e) { + if (!_this.currentDoc) return; e.preventDefault(); - _this.currentDoc.addEventListener('mousemove', _this.onMouseMove); - _this.currentDoc.addEventListener('mouseup', _this.onDragStopped); - _this.onDragStart(Cropper.getMousePoint(e)); }; - _this.onMouseMove = function (e) { return _this.onDrag(Cropper.getMousePoint(e)); }; - _this.onTouchStart = function (e) { + if (!_this.currentDoc) return; _this.isTouching = true; - if (_this.props.onTouchRequest && !_this.props.onTouchRequest(e)) { return; } - _this.currentDoc.addEventListener('touchmove', _this.onTouchMove, { passive: false }); // iOS 11 now defaults to passive: true - - _this.currentDoc.addEventListener('touchend', _this.onDragStopped); - if (e.touches.length === 2) { _this.onPinchStart(e); } else if (e.touches.length === 1) { _this.onDragStart(Cropper.getTouchPoint(e.touches[0])); } }; - _this.onTouchMove = function (e) { // Prevent whole page from scrolling on iOS. e.preventDefault(); - if (e.touches.length === 2) { _this.onPinchMove(e); } else if (e.touches.length === 1) { _this.onDrag(Cropper.getTouchPoint(e.touches[0])); } }; - _this.onGestureStart = function (e) { + if (!_this.currentDoc) return; e.preventDefault(); - _this.currentDoc.addEventListener('gesturechange', _this.onGestureMove); - _this.currentDoc.addEventListener('gestureend', _this.onGestureEnd); - _this.gestureZoomStart = _this.props.zoom; _this.gestureRotationStart = _this.props.rotation; }; - _this.onGestureMove = function (e) { e.preventDefault(); - if (_this.isTouching) { // this is to avoid conflict between gesture and touch events return; } - var point = Cropper.getMousePoint(e); var newZoom = _this.gestureZoomStart - 1 + e.scale; - _this.setNewZoom(newZoom, point, { shouldUpdatePosition: true }); - if (_this.props.onRotationChange) { var newRotation = _this.gestureRotationStart + e.rotation; - _this.props.onRotationChange(newRotation); } }; - _this.onGestureEnd = function (e) { _this.cleanEvents(); }; - _this.onDragStart = function (_a) { var _b, _c; - var x = _a.x, - y = _a.y; + y = _a.y; _this.dragStartPosition = { x: x, y: y @@ -44978,10 +59140,10 @@ function (_super) { _this.dragStartCrop = __assign({}, _this.props.crop); (_c = (_b = _this.props).onInteractionStart) === null || _c === void 0 ? void 0 : _c.call(_b); }; - _this.onDrag = function (_a) { var x = _a.x, - y = _a.y; + y = _a.y; + if (!_this.currentWindow) return; if (_this.rafDragTimeout) _this.currentWindow.cancelAnimationFrame(_this.rafDragTimeout); _this.rafDragTimeout = _this.currentWindow.requestAnimationFrame(function () { if (!_this.state.cropSize) return; @@ -44993,225 +59155,183 @@ function (_super) { y: _this.dragStartCrop.y + offsetY }; var newPosition = _this.props.restrictPosition ? restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : requestedPosition; - _this.props.onCropChange(newPosition); }); }; - _this.onDragStopped = function () { var _a, _b; - _this.isTouching = false; - _this.cleanEvents(); - _this.emitCropData(); - (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a); }; - _this.onWheel = function (e) { + if (!_this.currentWindow) return; if (_this.props.onWheelRequest && !_this.props.onWheelRequest(e)) { return; } - e.preventDefault(); var point = Cropper.getMousePoint(e); var pixelY = normalize_wheel_default()(e).pixelY; var newZoom = _this.props.zoom - pixelY * _this.props.zoomSpeed / 200; - _this.setNewZoom(newZoom, point, { shouldUpdatePosition: true }); - if (!_this.state.hasWheelJustStarted) { _this.setState({ hasWheelJustStarted: true }, function () { var _a, _b; - return (_b = (_a = _this.props).onInteractionStart) === null || _b === void 0 ? void 0 : _b.call(_a); }); } - if (_this.wheelTimer) { clearTimeout(_this.wheelTimer); } - _this.wheelTimer = _this.currentWindow.setTimeout(function () { return _this.setState({ hasWheelJustStarted: false }, function () { var _a, _b; - return (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a); }); }, 250); }; - _this.getPointOnContainer = function (_a) { var x = _a.x, - y = _a.y; - + y = _a.y; if (!_this.containerRect) { throw new Error('The Cropper is not mounted'); } - return { x: _this.containerRect.width / 2 - (x - _this.containerRect.left), y: _this.containerRect.height / 2 - (y - _this.containerRect.top) }; }; - _this.getPointOnMedia = function (_a) { var x = _a.x, - y = _a.y; + y = _a.y; var _b = _this.props, - crop = _b.crop, - zoom = _b.zoom; + crop = _b.crop, + zoom = _b.zoom; return { x: (x + crop.x) / zoom, y: (y + crop.y) / zoom }; }; - _this.setNewZoom = function (zoom, point, _a) { - var _b = (_a === void 0 ? {} : _a).shouldUpdatePosition, - shouldUpdatePosition = _b === void 0 ? true : _b; + var _b = _a === void 0 ? {} : _a, + _c = _b.shouldUpdatePosition, + shouldUpdatePosition = _c === void 0 ? true : _c; if (!_this.state.cropSize || !_this.props.onZoomChange) return; - var newZoom = clamp(zoom, _this.props.minZoom, _this.props.maxZoom); - + var newZoom = index_module_clamp(zoom, _this.props.minZoom, _this.props.maxZoom); if (shouldUpdatePosition) { var zoomPoint = _this.getPointOnContainer(point); - var zoomTarget = _this.getPointOnMedia(zoomPoint); - var requestedPosition = { x: zoomTarget.x * newZoom - zoomPoint.x, y: zoomTarget.y * newZoom - zoomPoint.y }; var newPosition = _this.props.restrictPosition ? restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, newZoom, _this.props.rotation) : requestedPosition; - _this.props.onCropChange(newPosition); } - _this.props.onZoomChange(newZoom); }; - _this.getCropData = function () { if (!_this.state.cropSize) { return null; - } // this is to ensure the crop is correctly restricted after a zoom back (https://github.com/ValentinH/react-easy-crop/issues/6) - - + } + // this is to ensure the crop is correctly restricted after a zoom back (https://github.com/ValentinH/react-easy-crop/issues/6) var restrictedPosition = _this.props.restrictPosition ? restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop; return computeCroppedArea(restrictedPosition, _this.mediaSize, _this.state.cropSize, _this.getAspect(), _this.props.zoom, _this.props.rotation, _this.props.restrictPosition); }; - _this.emitCropData = function () { var cropData = _this.getCropData(); - if (!cropData) return; var croppedAreaPercentages = cropData.croppedAreaPercentages, - croppedAreaPixels = cropData.croppedAreaPixels; - + croppedAreaPixels = cropData.croppedAreaPixels; if (_this.props.onCropComplete) { _this.props.onCropComplete(croppedAreaPercentages, croppedAreaPixels); } - if (_this.props.onCropAreaChange) { _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels); } }; - _this.emitCropAreaChange = function () { var cropData = _this.getCropData(); - if (!cropData) return; var croppedAreaPercentages = cropData.croppedAreaPercentages, - croppedAreaPixels = cropData.croppedAreaPixels; - + croppedAreaPixels = cropData.croppedAreaPixels; if (_this.props.onCropAreaChange) { _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels); } }; - _this.recomputeCropPosition = function () { if (!_this.state.cropSize) return; var newPosition = _this.props.restrictPosition ? restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop; - _this.props.onCropChange(newPosition); - _this.emitCropData(); }; - return _this; } - Cropper.prototype.componentDidMount = function () { + if (!this.currentDoc || !this.currentWindow) return; if (this.containerRef) { if (this.containerRef.ownerDocument) { this.currentDoc = this.containerRef.ownerDocument; } - if (this.currentDoc.defaultView) { this.currentWindow = this.currentDoc.defaultView; } - - this.currentWindow.addEventListener('resize', this.computeSizes); + this.initResizeObserver(); + // only add window resize listener if ResizeObserver is not supported. Otherwise, it would be redundant + if (typeof window.ResizeObserver === 'undefined') { + this.currentWindow.addEventListener('resize', this.computeSizes); + } this.props.zoomWithScroll && this.containerRef.addEventListener('wheel', this.onWheel, { passive: false }); this.containerRef.addEventListener('gesturestart', this.onGestureStart); } - if (!this.props.disableAutomaticStylesInjection) { this.styleRef = this.currentDoc.createElement('style'); this.styleRef.setAttribute('type', 'text/css'); - if (this.props.nonce) { this.styleRef.setAttribute('nonce', this.props.nonce); } - this.styleRef.innerHTML = css_248z; this.currentDoc.head.appendChild(this.styleRef); - } // when rendered via SSR, the image can already be loaded and its onLoad callback will never be called - - + } + // when rendered via SSR, the image can already be loaded and its onLoad callback will never be called if (this.imageRef.current && this.imageRef.current.complete) { this.onMediaLoad(); - } // set image and video refs in the parent if the callbacks exist - - + } + // set image and video refs in the parent if the callbacks exist if (this.props.setImageRef) { this.props.setImageRef(this.imageRef); } - if (this.props.setVideoRef) { this.props.setVideoRef(this.videoRef); } }; - Cropper.prototype.componentWillUnmount = function () { - var _a; - - this.currentWindow.removeEventListener('resize', this.computeSizes); - + var _a, _b; + if (!this.currentDoc || !this.currentWindow) return; + if (typeof window.ResizeObserver === 'undefined') { + this.currentWindow.removeEventListener('resize', this.computeSizes); + } + (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect(); if (this.containerRef) { this.containerRef.removeEventListener('gesturestart', this.preventZoomSafari); } - if (this.styleRef) { - (_a = this.styleRef.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.styleRef); + (_b = this.styleRef.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.styleRef); } - this.cleanEvents(); this.props.zoomWithScroll && this.clearScrollEvent(); }; - Cropper.prototype.componentDidUpdate = function (prevProps) { var _a, _b, _c, _d, _e, _f, _g, _h, _j; - if (prevProps.rotation !== this.props.rotation) { this.computeSizes(); this.recomputeCropPosition(); @@ -45224,30 +59344,24 @@ function (_super) { } else if (((_e = prevProps.crop) === null || _e === void 0 ? void 0 : _e.x) !== ((_f = this.props.crop) === null || _f === void 0 ? void 0 : _f.x) || ((_g = prevProps.crop) === null || _g === void 0 ? void 0 : _g.y) !== ((_h = this.props.crop) === null || _h === void 0 ? void 0 : _h.y)) { this.emitCropAreaChange(); } - if (prevProps.zoomWithScroll !== this.props.zoomWithScroll && this.containerRef) { this.props.zoomWithScroll ? this.containerRef.addEventListener('wheel', this.onWheel, { passive: false }) : this.clearScrollEvent(); } - if (prevProps.video !== this.props.video) { (_j = this.videoRef.current) === null || _j === void 0 ? void 0 : _j.load(); } }; - Cropper.prototype.getAspect = function () { var _a = this.props, - cropSize = _a.cropSize, - aspect = _a.aspect; - + cropSize = _a.cropSize, + aspect = _a.aspect; if (cropSize) { return cropSize.width / cropSize.height; } - return aspect; }; - Cropper.prototype.onPinchStart = function (e) { var pointA = Cropper.getTouchPoint(e.touches[0]); var pointB = Cropper.getTouchPoint(e.touches[1]); @@ -45255,10 +59369,9 @@ function (_super) { this.lastPinchRotation = getRotationBetweenPoints(pointA, pointB); this.onDragStart(getCenter(pointA, pointB)); }; - Cropper.prototype.onPinchMove = function (e) { var _this = this; - + if (!this.currentDoc || !this.currentWindow) return; var pointA = Cropper.getTouchPoint(e.touches[0]); var pointB = Cropper.getTouchPoint(e.touches[1]); var center = getCenter(pointA, pointB); @@ -45267,11 +59380,9 @@ function (_super) { this.rafPinchTimeout = this.currentWindow.requestAnimationFrame(function () { var distance = getDistanceBetweenPoints(pointA, pointB); var newZoom = _this.props.zoom * (distance / _this.lastPinchDistance); - _this.setNewZoom(newZoom, center, { shouldUpdatePosition: false }); - _this.lastPinchDistance = distance; var rotation = getRotationBetweenPoints(pointA, pointB); var newRotation = _this.props.rotation + (rotation - _this.lastPinchRotation); @@ -45279,32 +59390,30 @@ function (_super) { _this.lastPinchRotation = rotation; }); }; - Cropper.prototype.render = function () { var _this = this; - var _a = this.props, - image = _a.image, - video = _a.video, - mediaProps = _a.mediaProps, - transform = _a.transform, - _b = _a.crop, - x = _b.x, - y = _b.y, - rotation = _a.rotation, - zoom = _a.zoom, - cropShape = _a.cropShape, - showGrid = _a.showGrid, - _c = _a.style, - containerStyle = _c.containerStyle, - cropAreaStyle = _c.cropAreaStyle, - mediaStyle = _c.mediaStyle, - _d = _a.classes, - containerClassName = _d.containerClassName, - cropAreaClassName = _d.cropAreaClassName, - mediaClassName = _d.mediaClassName, - objectFit = _a.objectFit; - return /*#__PURE__*/external_React_default().createElement("div", { + image = _a.image, + video = _a.video, + mediaProps = _a.mediaProps, + transform = _a.transform, + _b = _a.crop, + x = _b.x, + y = _b.y, + rotation = _a.rotation, + zoom = _a.zoom, + cropShape = _a.cropShape, + showGrid = _a.showGrid, + _c = _a.style, + containerStyle = _c.containerStyle, + cropAreaStyle = _c.cropAreaStyle, + mediaStyle = _c.mediaStyle, + _d = _a.classes, + containerClassName = _d.containerClassName, + cropAreaClassName = _d.cropAreaClassName, + mediaClassName = _d.mediaClassName, + objectFit = _a.objectFit; + return external_React_default().createElement("div", { onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart, ref: function ref(el) { @@ -45313,17 +59422,17 @@ function (_super) { "data-testid": "container", style: containerStyle, className: classNames('reactEasyCrop_Container', containerClassName) - }, image ? /*#__PURE__*/external_React_default().createElement("img", __assign({ + }, image ? external_React_default().createElement("img", __assign({ alt: "", className: classNames('reactEasyCrop_Image', objectFit === 'contain' && 'reactEasyCrop_Contain', objectFit === 'horizontal-cover' && 'reactEasyCrop_Cover_Horizontal', objectFit === 'vertical-cover' && 'reactEasyCrop_Cover_Vertical', objectFit === 'auto-cover' && (this.mediaSize.naturalWidth > this.mediaSize.naturalHeight ? 'reactEasyCrop_Cover_Horizontal' : 'reactEasyCrop_Cover_Vertical'), mediaClassName) }, mediaProps, { src: image, ref: this.imageRef, style: __assign(__assign({}, mediaStyle), { - transform: transform || "translate(" + x + "px, " + y + "px) rotate(" + rotation + "deg) scale(" + zoom + ")" + transform: transform || "translate(".concat(x, "px, ").concat(y, "px) rotate(").concat(rotation, "deg) scale(").concat(zoom, ")") }), onLoad: this.onMediaLoad - })) : video && /*#__PURE__*/external_React_default().createElement("video", __assign({ + })) : video && external_React_default().createElement("video", __assign({ autoPlay: true, loop: true, muted: true, @@ -45332,16 +59441,16 @@ function (_super) { ref: this.videoRef, onLoadedMetadata: this.onMediaLoad, style: __assign(__assign({}, mediaStyle), { - transform: transform || "translate(" + x + "px, " + y + "px) rotate(" + rotation + "deg) scale(" + zoom + ")" + transform: transform || "translate(".concat(x, "px, ").concat(y, "px) rotate(").concat(rotation, "deg) scale(").concat(zoom, ")") }), controls: false }), (Array.isArray(video) ? video : [{ src: video }]).map(function (item) { - return /*#__PURE__*/external_React_default().createElement("source", __assign({ + return external_React_default().createElement("source", __assign({ key: item.src }, item)); - })), this.state.cropSize && /*#__PURE__*/external_React_default().createElement("div", { + })), this.state.cropSize && external_React_default().createElement("div", { style: __assign(__assign({}, cropAreaStyle), { width: this.state.cropSize.width, height: this.state.cropSize.height @@ -45350,7 +59459,6 @@ function (_super) { className: classNames('reactEasyCrop_CropArea', cropShape === 'round' && 'reactEasyCrop_CropAreaRound', showGrid && 'reactEasyCrop_CropAreaGrid', cropAreaClassName) })); }; - Cropper.defaultProps = { zoom: 1, rotation: 0, @@ -45367,25 +59475,21 @@ function (_super) { restrictPosition: true, zoomWithScroll: true }; - Cropper.getMousePoint = function (e) { return { x: Number(e.clientX), y: Number(e.clientY) }; }; - Cropper.getTouchPoint = function (touch) { return { x: Number(touch.clientX), y: Number(touch.clientY) }; }; - return Cropper; }((external_React_default()).Component); -/* harmony default export */ var index_module = (Cropper); ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/image-editor/constants.js @@ -45698,7 +59802,7 @@ function ImageCropper(_ref) { width: width || clientWidth, height: editedHeight } - }, (0,external_wp_element_namespaceObject.createElement)(index_module, { + }, (0,external_wp_element_namespaceObject.createElement)(Cropper, { image: editedUrl || url, disabled: isInProgress, minZoom: constants_MIN_ZOOM / 100, diff --git a/wp-includes/js/dist/block-editor.min.js b/wp-includes/js/dist/block-editor.min.js index e4cbefdf54..8121f8d84e 100644 --- a/wp-includes/js/dist/block-editor.min.js +++ b/wp-includes/js/dist/block-editor.min.js @@ -1,15 +1,10 @@ /*! This file is auto-generated */ -!function(){var e={6411:function(e,t){var n,o,r; +!function(){var e={480:function(e,t,n){"use strict";var r=n(5304)("ArrayBuffer.prototype.byteLength",!0),o=n(4602);e.exports=function(e){return o(e)?r?r(e):e.byteLength:NaN}},5304:function(e,t,n){"use strict";var r=n(3803),o=n(6427),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},6427:function(e,t,n){"use strict";var r=n(7870),o=n(3803),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},3303:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},8040:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(9063);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},9063:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6411:function(e,t){var n,r,o; /*! autosize 4.0.4 license: MIT http://www.jacklmoore.com/autosize -*/o=[e,t],n=function(e,t){"use strict";var n,o,r="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),l=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){l=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,o=null,i=function(){e.clientWidth!==n&&p()},a=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",p,!1),e.removeEventListener("keyup",p,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",p,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",p,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:a,update:p}),s()}function s(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),p()}function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(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}function d(){if(0!==e.scrollHeight){var o=u(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function p(){d();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(re.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(a,a+c.count));a+=c.count,c.added||(s+=c.count)}}var p=t[i-1];return i>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[i-2].value+=p.value,t.pop()),t}function r(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=n.callback;"function"==typeof n&&(l=n,n={}),this.options=n;var i=this;function a(e){return l?(setTimeout((function(){l(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var s=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,u=1,d=s+c,p=[{newPos:-1,components:[]}],m=this.extractCommon(p[0],t,e,0);if(p[0].newPos+1>=s&&m+1>=c)return a([{value:this.join(t),count:t.length}]);function f(){for(var n=-1*u;n<=u;n+=2){var l=void 0,d=p[n-1],m=p[n+1],f=(m?m.newPos:0)-n;d&&(p[n-1]=void 0);var g=d&&d.newPos+1=s&&f+1>=c)return a(o(i,l.components,t,e,i.useLongestToken));p[n]=l}else p[n]=void 0}u++}if(l)!function e(){setTimeout((function(){if(u>d)return l();f()||e()}),0)}();else for(;u<=d;){var g=f();if(g)return g}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,l=n.length,i=e.newPos,a=i-o,s=0;i+10?!0===i?o.scrollTop(t,_.top+k.top):!1===i?o.scrollTop(t,_.top+y.top):k.top<0?o.scrollTop(t,_.top+k.top):o.scrollTop(t,_.top+y.top):l||((i=void 0===i||!!i)?o.scrollTop(t,_.top+k.top):o.scrollTop(t,_.top+y.top)),r&&(k.left<0||y.left>0?!0===a?o.scrollLeft(t,_.left+k.left):!1===a?o.scrollLeft(t,_.left+y.left):k.left<0?o.scrollLeft(t,_.left+k.left):o.scrollLeft(t,_.left+y.left):l||((a=void 0===a||!!a)?o.scrollLeft(t,_.left+k.left):o.scrollLeft(t,_.left+y.left)))}},5425:function(e,t,n){"use strict";e.exports=n(1345)},5022:function(e){"use strict";var t=Object.assign||function(e){for(var t=1;tt},ie64:function(){return b.ie()&&d},firefox:function(){return v()||n},opera:function(){return v()||o},webkit:function(){return v()||r},safari:function(){return b.webkit()},chrome:function(){return v()||l},windows:function(){return v()||s},osx:function(){return v()||a},linux:function(){return v()||c},iphone:function(){return v()||p},mobile:function(){return v()||p||m||u||g},nativeApp:function(){return v()||f},android:function(){return v()||u},ipad:function(){return v()||m}};e.exports=b},7939:function(e,t,n){"use strict";var o,r=n(3110);r.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")) +*/r=[e,t],n=function(e,t){"use strict";var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function l(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t=null,n=null,r=null,l=function(){e.clientWidth!==n&&d()},a=function(t){window.removeEventListener("resize",l,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",l,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:a,update:d}),s()}function s(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),d()}function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(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}function p(){if(0!==e.scrollHeight){var r=u(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,r.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){p();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),o="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(o3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],p=!!l&&l(e,t);if(r)r(e,t,{configurable:null===c&&p?p.configurable:!c,enumerable:null===a&&p?p.enumerable:!a,value:n,writable:null===s&&p?p.writable:!s});else{if(!u&&(a||s||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},1198:function(e,t){"use strict";function n(){}function r(e,t,n,r,o){for(var i=0,l=t.length,a=0,s=0;ie.length?n:e})),c.value=e.join(p)}else c.value=e.join(n.slice(a,a+c.count));a+=c.count,c.added||(s+=c.count)}}var d=t[l-1];return l>1&&"string"==typeof d.value&&(d.added||d.removed)&&e.equals("",d.value)&&(t[l-2].value+=d.value,t.pop()),t}function o(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.callback;"function"==typeof n&&(i=n,n={}),this.options=n;var l=this;function a(e){return i?(setTimeout((function(){i(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var s=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,u=1,p=s+c,d=[{newPos:-1,components:[]}],f=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=s&&f+1>=c)return a([{value:this.join(t),count:t.length}]);function y(){for(var n=-1*u;n<=u;n+=2){var i=void 0,p=d[n-1],f=d[n+1],y=(f?f.newPos:0)-n;p&&(d[n-1]=void 0);var m=p&&p.newPos+1=s&&y+1>=c)return a(r(l,i.components,t,e,l.useLongestToken));d[n]=i}else d[n]=void 0}u++}if(i)!function e(){setTimeout((function(){if(u>p)return i();y()||e()}),0)}();else for(;u<=p;){var m=y();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,i=n.length,l=e.newPos,a=l-r,s=0;l+10?!0===l?r.scrollTop(t,v.top+_.top):!1===l?r.scrollTop(t,v.top+k.top):_.top<0?r.scrollTop(t,v.top+_.top):r.scrollTop(t,v.top+k.top):i||((l=void 0===l||!!l)?r.scrollTop(t,v.top+_.top):r.scrollTop(t,v.top+k.top)),o&&(_.left<0||k.left>0?!0===a?r.scrollLeft(t,v.left+_.left):!1===a?r.scrollLeft(t,v.left+k.left):_.left<0?r.scrollLeft(t,v.left+_.left):r.scrollLeft(t,v.left+k.left):i||((a=void 0===a||!!a)?r.scrollLeft(t,v.left+_.left):r.scrollLeft(t,v.left+k.left)))}},5425:function(e,t,n){"use strict";e.exports=n(1345)},5022:function(e){"use strict";var t=Object.assign||function(e){for(var t=1;t1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},4482:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(7457);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},7457:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6788:function(e){"use strict";e.exports=EvalError},6716:function(e){"use strict";e.exports=Error},9204:function(e){"use strict";e.exports=RangeError},9908:function(e){"use strict";e.exports=ReferenceError},6724:function(e){"use strict";e.exports=SyntaxError},1642:function(e){"use strict";e.exports=TypeError},1451:function(e){"use strict";e.exports=URIError},7998:function(e,t,n){"use strict";var r=n(1642);e.exports=function(e){if(null==e)throw new r(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}},5249:function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=n(3777),i=n(5443),l=n(8659),a=n(3082),s=function(e,t){if(null==e)throw new TypeError("Cannot call method on "+e);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var n,r,l,a="string"===t?["toString","valueOf"]:["valueOf","toString"];for(l=0;l1&&(arguments[1]===String?n="string":arguments[1]===Number&&(n="number")),r&&(Symbol.toPrimitive?t=c(e,Symbol.toPrimitive):a(e)&&(t=Symbol.prototype.valueOf)),void 0!==t){var i=t.call(e,n);if(o(i))return i;throw new TypeError("unable to convert exotic object to primitive")}return"default"===n&&(l(e)||a(e))&&(n="string"),s(e,"default"===n?"number":n)}},3777:function(e){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},4843:function(e,t,n){"use strict";var r=n(5443),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty,l=function(e,t,n){for(var r=0,o=e.length;r=3&&(i=n),"[object Array]"===o.call(e)?l(e,t,i):"string"==typeof e?a(e,t,i):s(e,t,i)}},3828:function(e,t,n){"use strict";var r=n(2473)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},8819:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},5810:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1759);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1759:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},8198:function(e,t,n){"use strict";var r=n(8918),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},1856:function(e){"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof n)}},9905:function(e,t,n){"use strict";var r=n.g.Symbol,o=n(5682);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5682:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},81:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4111:function(e,t,n){"use strict";var r=n(81);e.exports=function(){return r()&&!!Symbol.toStringTag}},9429:function(e,t,n){"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=n(766);e.exports=i.call(r,o)},2075:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r-1?o(n):n}},4374:function(e,t,n){"use strict";var r=n(7410),o=n(3767),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},1818:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},6945:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6992);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6992:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},5443:function(e){"use strict";var t,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,t)}catch(e){e!==n&&(o=null)}else o=null;var i=/^\s*class\b/,l=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},a=Object.prototype.toString,s="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=o?function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;try{o(e,null,t)}catch(e){if(e!==n)return!1}return!l(e)}:function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(s)return function(e){try{return!l(e)&&(r.call(e),!0)}catch(e){return!1}}(e);if(l(e))return!1;var t=a.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t}},8659:function(e){"use strict";var t=Date.prototype.getDay,n=Object.prototype.toString,r="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){return"object"==typeof e&&null!==e&&(r?function(e){try{return t.call(e),!0}catch(e){return!1}}(e):"[object Date]"===n.call(e))}},5604:function(e,t,n){"use strict";var r=n(6131)("SharedArrayBuffer.prototype.byteLength",!0);e.exports=r?function(e){if(!e||"object"!=typeof e)return!1;try{return r(e),!0}catch(e){return!1}}:function(e){return!1}},6131:function(e,t,n){"use strict";var r=n(6254),o=n(7679),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},7679:function(e,t,n){"use strict";var r=n(578),o=n(6254),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},901:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},2665:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(2408);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},2408:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3082:function(e,t,n){"use strict";var r=Object.prototype.toString;if(n(9905)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;e.exports=function(e){if("symbol"==typeof e)return!0;if("[object Symbol]"!==r.call(e))return!1;try{return function(e){return"symbol"==typeof e.valueOf()&&i.test(o.call(e))}(e)}catch(e){return!1}}}else e.exports=function(e){return!1}},2527:function(e,t,n){"use strict";var r=n(4010);e.exports=function(e){return!!r(e)}},9894:function(e,t,n){var r=n(4827);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var i=e.nodeName,l=document.createElement(i);l.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&l.setAttribute("rows","1");var a=r(e,"font-size");l.style.fontSize=a,l.style.padding="0px",l.style.border="0px";var s=document.body;s.appendChild(l),n=l.offsetHeight,s.removeChild(l)}return n}},7970:function(e,t,n){e.exports=n(195)},3110:function(e){"use strict";var t=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},3812:function(e){var t,n,r,o,i,l,a,s,c,u,p,d,f,y,m,g=!1;function h(){if(!g){g=!0;var e=navigator.userAgent,h=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),b=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(d=/\b(iPhone|iP[ao]d)/.exec(e),f=/\b(iP[ao]d)/.exec(e),u=/Android/i.exec(e),y=/FBAN\/\w+;/i.exec(e),m=/Mobile/i.exec(e),p=!!/Win64/.exec(e),h){(t=h[1]?parseFloat(h[1]):h[5]?parseFloat(h[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var v=/(?:Trident\/(\d+.\d+))/.exec(e);l=v?parseFloat(v[1])+4:t,n=h[2]?parseFloat(h[2]):NaN,r=h[3]?parseFloat(h[3]):NaN,(o=h[4]?parseFloat(h[4]):NaN)?(h=/(?:Chrome\/(\d+\.\d+))/.exec(e),i=h&&h[1]?parseFloat(h[1]):NaN):i=NaN}else t=n=r=i=o=NaN;if(b){if(b[1]){var _=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);a=!_||parseFloat(_[1].replace("_","."))}else a=!1;s=!!b[2],c=!!b[3]}else a=s=c=!1}}var b={ie:function(){return h()||t},ieCompatibilityMode:function(){return h()||l>t},ie64:function(){return b.ie()&&p},firefox:function(){return h()||n},opera:function(){return h()||r},webkit:function(){return h()||o},safari:function(){return b.webkit()},chrome:function(){return h()||i},windows:function(){return h()||s},osx:function(){return h()||a},linux:function(){return h()||c},iphone:function(){return h()||d},mobile:function(){return h()||d||f||u||m},nativeApp:function(){return h()||y},android:function(){return h()||u},ipad:function(){return h()||f}};e.exports=b},7939:function(e,t,n){"use strict";var r,o=n(3110);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")) /** * Checks if an event is supported in the current execution environment. * @@ -23,4 +18,9 @@ * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT - */,e.exports=function(e,t){if(!r.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,l=n in document;if(!l){var i=document.createElement("div");i.setAttribute(n,"return;"),l="function"==typeof i[n]}return!l&&o&&"wheel"===e&&(l=document.implementation.hasFeature("Events.wheel","3.0")),l}},195:function(e,t,n){"use strict";var o=n(3812),r=n(7939);function l(e){var t=0,n=0,o=0,r=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),o=10*t,r=10*n,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||r)&&e.deltaMode&&(1==e.deltaMode?(o*=40,r*=40):(o*=800,r*=800)),o&&!t&&(t=o<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:r}}l.getEventType=function(){return o.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=l},5372:function(e,t,n){"use strict";var o=n(9567);function r(){}function l(){}l.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,l,i){if(i!==o){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,bigint: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:l,resetWarningCache:r};return n.PropTypes=n,n}},2652:function(e,t,n){e.exports=n(5372)()},9567:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=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}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n3&&void 0!==arguments[3]?arguments[3]:1;const r=[...e];return r.splice(t,o),b(r,e.slice(t,t+o),n)}const k=e=>e;function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n={[t]:[]};return e.forEach((e=>{const{clientId:o,innerBlocks:r}=e;n[t].push(o),Object.assign(n,y(r,o))})),n}function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce(((e,n)=>Object.assign(e,{[n.clientId]:t},E(n.innerBlocks,n.clientId))),{})}function C(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k;const n={},o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n[r.clientId]=t(r)}return n}function S(e){return C(e,(e=>(0,u.omit)(e,"attributes")))}function w(e){return C(e,(e=>e.attributes))}function B(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&(0,u.isEqual)(e.clientIds,t.clientIds)&&function(e,t){return(0,u.isEqual)(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function I(e,t){const n={},o=[...t],r=[...t];for(;o.length;){const e=o.shift();o.push(...e.innerBlocks),r.push(...e.innerBlocks)}for(const e of r)n[e.clientId]={};for(const t of r)n[t.clientId]=Object.assign(n[t.clientId],{...e.byClientId[t.clientId],attributes:e.attributes[t.clientId],innerBlocks:t.innerBlocks.map((e=>n[e.clientId]))});return n}function x(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=new Set([]),l=new Set;for(const t of n){let n=o?t:e.parents[t];do{if(e.controlledInnerBlocks[n]){l.add(n);break}r.add(n),n=e.parents[n]}while(void 0!==n)}for(const e of r)t[e]={...t[e]};for(const n of r)t[n].innerBlocks=(e.order[n]||[]).map((e=>t[e]));for(const n of l)t["controlled||"+n]={innerBlocks:(e.order[n]||[]).map((e=>t[e]))};return t}const T=(0,u.flow)(p.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=(0,u.mapValues)(t.attributes,((n,r)=>{const{name:l}=t.byClientId[r];return"core/block"===l&&n.ref===e?{...n,ref:o}:n}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:{},n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=I(o,n.blocks);o.tree=x(o,{...o.tree,...e},n.rootClientId?[n.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":o.tree=x(o,{...o.tree,[n.clientId]:{...o.tree[n.clientId],...o.byClientId[n.clientId],attributes:o.attributes[n.clientId]}},[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":{const e=n.clientIds.reduce(((e,t)=>(e[t]={...o.tree[t],attributes:o.attributes[t]},e)),{});o.tree=x(o,{...o.tree,...e},n.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=I(o,n.blocks);o.tree=x(o,{...(0,u.omit)(o.tree,n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e)))),...e},n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds)void 0===t.parents[e]||""!==t.parents[e]&&!o.byClientId[t.parents[e]]||r.push(t.parents[e]);o.tree=x(o,o.tree,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds)void 0===t.parents[r]||""!==t.parents[r]&&!o.byClientId[t.parents[r]]||e.push(t.parents[r]);o.tree=x(o,(0,u.omit)(o.tree,n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e)))),e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId?e.push(n.fromRootClientId):e.push(""),n.toRootClientId&&e.push(n.toRootClientId),o.tree=x(o,o.tree,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=x(o,o.tree,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=Object.keys((0,u.omitBy)(o.attributes,((e,t)=>"core/block"!==o.byClientId[t].name||e.ref!==n.updatedId)));o.tree=x(o,{...o.tree,...e.reduce(((e,t)=>(e[t]={...o.byClientId[t],attributes:o.attributes[t],innerBlocks:o.tree[t].innerBlocks},e)),{})},e,!1)}}return o}),(e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const o={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...r}=e.shift();e.push(...n),t.controlledInnerBlocks[r.clientId]&&(o[r.clientId]=!0)}}let r=t;t.order[n.rootClientId]&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order[n.rootClientId]}));let l=r;return n.blocks.length&&(l=e(l,{...n,type:"INSERT_BLOCKS",index:0}),l.order={...l.order,...(0,u.reduce)(o,((e,n,o)=>(t.order[o]&&(e[o]=t.order[o]),e)),{})},l.tree={...l.tree,...(0,u.reduce)(o,((e,n,o)=>{const r=`controlled||${o}`;return t.tree[r]&&(e[r]=t.tree[r]),e}),{})}),l}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:S(n.blocks),attributes:w(n.blocks),order:y(n.blocks),parents:E(n.blocks),controlledInnerBlocks:{},visibility:{}},o=I(e,n.blocks);return e.tree={...o,"":{innerBlocks:n.blocks.map((e=>o[e.clientId]))}},e}return e(t,n)}),(function(e){let t,n=!1;return(o,r)=>{let l=e(o,r);const i="MARK_LAST_CHANGE_AS_PERSISTENT"===r.type||n;if(o===l&&!i){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type;const e=null===(a=null==o?void 0:o.isPersistentChange)||void 0===a||a;return o.isPersistentChange===e?o:{...l,isPersistentChange:e}}return l={...l,isPersistentChange:i?!n:!B(r,t)},t=r,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type,l}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const o=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(o,n)}return e(t,n)}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...S(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=(0,u.omit)(t.updates,"attributes");return(0,u.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...S(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...w(t.blocks)};case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?{...e,[t.clientId]:{...e[t.clientId],...t.updates.attributes}}:e;case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e[t])))return e;const n=t.clientIds.reduce(((n,o)=>({...n,[o]:(0,u.reduce)(t.uniqueByBlock?t.attributes[o]:t.attributes,((t,n,r)=>{var l,i;return n!==t[r]&&((t=(l=e[o])===(i=t)?{...l}:i)[r]=n),t}),e[o])})),{});return t.clientIds.every((t=>n[t]===e[t]))?e:{...e,...n}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...w(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=y(t.blocks);return{...e,...(0,u.omit)(n,""),"":((null==e?void 0:e[""])||[]).concat(n[""])}}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e[n]||[],r=y(t.blocks,n),{index:l=o.length}=t;return{...e,...r,[n]:b(o,r[n],l)}}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:o="",clientIds:r}=t,{index:l=e[o].length}=t;if(n===o){const t=e[o].indexOf(r[0]);return{...e,[o]:_(e[o],t,l,r.length)}}return{...e,[n]:(0,u.without)(e[n],...r),[o]:b(e[o],r,l)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],l=e[o];if(!l.length||r===l[0])return e;const i=l.indexOf(r);return{...e,[o]:_(l,i,i-1,n.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],l=n[n.length-1],i=e[o];if(!i.length||l===i[i.length-1])return e;const a=i.indexOf(r);return{...e,[o]:_(i,a,a+1,n.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=y(t.blocks);return(0,u.flow)([e=>(0,u.omit)(e,t.replacedClientIds),e=>({...e,...(0,u.omit)(o,"")}),e=>(0,u.mapValues)(e,(e=>(0,u.reduce)(e,((e,t)=>t===n[0]?[...e,...o[""]]:(-1===n.indexOf(t)&&e.push(t),e)),[])))])(e)}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.flow)([e=>(0,u.omit)(e,t.removedClientIds),e=>(0,u.mapValues)(e,(e=>(0,u.without)(e,...t.removedClientIds)))])(e)}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":return{...e,...E(t.blocks)};case"INSERT_BLOCKS":return{...e,...E(t.blocks,t.rootClientId||"")};case"MOVE_BLOCKS_TO_POSITION":return{...e,...t.clientIds.reduce(((e,n)=>(e[n]=t.toRootClientId||"",e)),{})};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return{...(0,u.omit)(e,t.replacedClientIds),...E(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:o}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e},visibility(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e}});function N(){let 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;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}var P=(0,p.combineReducers)({blocks:T,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(){var e,t,n,o;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=arguments.length>1?arguments[1]:void 0;switch(l.type){case"SELECTION_CHANGE":return l.clientId?{selectionStart:{clientId:l.clientId,attributeKey:l.attributeKey,offset:l.startOffset},selectionEnd:{clientId:l.clientId,attributeKey:l.attributeKey,offset:l.endOffset}}:{selectionStart:l.start||r.selectionStart,selectionEnd:l.end||r.selectionEnd};case"RESET_SELECTION":const{selectionStart:i,selectionEnd:a}=l;return{selectionStart:i,selectionEnd:a};case"MULTI_SELECT":const{start:s,end:c}=l;return s===(null===(e=r.selectionStart)||void 0===e?void 0:e.clientId)&&c===(null===(t=r.selectionEnd)||void 0===t?void 0:t.clientId)?r:{selectionStart:{clientId:s},selectionEnd:{clientId:c}};case"RESET_BLOCKS":const u=null==r||null===(n=r.selectionStart)||void 0===n?void 0:n.clientId,d=null==r||null===(o=r.selectionEnd)||void 0===o?void 0:o.clientId;if(!u&&!d)return r;if(!l.blocks.some((e=>e.clientId===u)))return{selectionStart:{},selectionEnd:{}};if(!l.blocks.some((e=>e.clientId===d)))return{...r,selectionEnd:r.selectionStart}}return{selectionStart:N(r.selectionStart,l),selectionEnd:N(r.selectionEnd,l)}},isMultiSelecting:function(){let 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(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let 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(0,u.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?(0,u.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?(0,u.omit)(e,n):e}}return e},insertionPoint:function(){let 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":const{rootClientId:e,index:n,__unstableWithInserter:o}=t;return{rootClientId:e,index:n,__unstableWithInserter:o};case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:o,name:l}=n,i=(0,p.select)(r.store).getActiveBlockVariation(l,o);let a=null!=i&&i.name?`${l}/${i.name}`:l;const s={name:a};return"core/block"===l&&(s.ref=o.ref,a+="/"+o.ref),{...e,insertUsage:{...e.insertUsage,[a]:{time:t.time,count:e.insertUsage[a]?e.insertUsage[a].count+1:1,insert:s}}}}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return null},editorMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"edit",t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"===t.type&&"navigation"===e?"edit":"SET_EDITOR_MODE"===t.type?t.mode:e},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_EDITOR_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"SET_BLOCK_VISIBILITY":case"START_TYPING":case"STOP_TYPING":case"UPDATE_BLOCK_LIST_SETTINGS":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":if(!n.blocks.length)return t;return{clientId:n.blocks[0].clientId,source:null===(e=n.meta)||void 0===e?void 0:e.source};case"RESET_BLOCKS":return{}}return t},temporarilyEditingAsBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e}}),M={};function L(e){return[e]}function R(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o{const n=e.blocks.byClientId[t];return n?{...n,attributes:$(e,t)}:null}),((e,t)=>[e.blocks.byClientId[t],e.blocks.attributes[t]]));function q(e,t){var n;const o=t&&Ft(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree[o])||void 0===n?void 0:n.innerBlocks)||G}const Y=A(((e,t)=>({clientId:t,innerBlocks:Q(e,t)})),(e=>[e.blocks.order])),Q=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(Ae(e,t),(t=>Y(e,t)))}),(e=>[e.blocks.order])),Z=A(((e,t)=>{const n=[];for(const o of t)for(const t of Ae(e,o))n.push(t,...Z(e,[t]));return n}),(e=>[e.blocks.order])),X=A((e=>{const t=[];for(const n of Ae(e))t.push(n,...Z(e,[n]));return t}),(e=>[e.blocks.order])),J=A(((e,t)=>{const n=X(e);return t?(0,u.reduce)(n,((n,o)=>e.blocks.byClientId[o].name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),ee=A(((e,t)=>{if(!t)return G;const n=X(e).filter((n=>e.blocks.byClientId[n].name===t));return n.length>0?n:G}),(e=>[e.blocks.order,e.blocks.byClientId])),te=A(((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>j(e,t)))),((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>e.blocks.tree[t]))));function ne(e,t){return Ae(e,t).length}function oe(e){return e.selection.selectionStart}function re(e){return e.selection.selectionEnd}function le(e){return e.selection.selectionStart.clientId}function ie(e){return e.selection.selectionEnd.clientId}function ae(e){const t=ye(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function se(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function ce(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function ue(e){const t=ce(e);return t?j(e,t):null}function de(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const pe=A((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[];let r=t;for(;e.blocks.parents[r];)r=e.blocks.parents[r],o.push(r);return n?o:o.reverse()}),(e=>[e.blocks.parents])),me=A((function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=pe(e,t,o);return(0,u.map)((0,u.filter)((0,u.map)(r,(t=>({id:t,name:U(e,t)}))),(e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})),(e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function fe(e,t){let n,o=t;do{n=o,o=e.blocks.parents[o]}while(o);return n}function ge(e,t){const n=ce(e),o=[...pe(e,t),t],r=[...pe(e,n),n];let l;const i=Math.min(o.length,r.length);for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=ce(e)),void 0===t&&(t=n<0?Ce(e):Se(e)),!t)return null;const o=de(e,t);if(null===o)return null;const{order:r}=e.blocks,l=r[o],i=l.indexOf(t),a=i+1*n;return a<0||a===l.length?null:l[a]}function ve(e,t){return he(e,t,-1)}function be(e,t){return he(e,t,1)}function _e(e){return e.initialPosition}const ke=A((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return G;if(t.clientId===n.clientId)return[t.clientId];const o=de(e,t.clientId);if(null===o)return G;const r=Ae(e,o),l=r.indexOf(t.clientId),i=r.indexOf(n.clientId);return l>i?r.slice(i,l+1):r.slice(l,i+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function ye(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?G:ke(e)}const Ee=A((e=>{const t=ye(e);return t.length?t.map((t=>j(e,t))):G}),(e=>[...ke.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Ce(e){return ye(e)[0]||null}function Se(e){const t=ye(e);return t[t.length-1]||null}function we(e,t){return Ce(e)===t}function Be(e,t){return-1!==ye(e).indexOf(t)}const Ie=A(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=de(e,n),o=Be(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function xe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Te(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Ne(e){const t=oe(e),n=re(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function Pe(e){const t=oe(e),n=re(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function Me(e){return ke(e).some((t=>{const n=U(e,t);return!(0,r.getBlockType)(n).merge}))}function Le(e,t){const n=oe(e),o=re(e);if(n.clientId===o.clientId)return!1;if(!n.attributeKey||!o.attributeKey||void 0===n.offset||void 0===o.offset)return!1;const l=de(e,n.clientId);if(l!==de(e,o.clientId))return!1;const i=Ae(e,l);let a,s;i.indexOf(n.clientId)>i.indexOf(o.clientId)?(a=o,s=n):(a=n,s=o);const c=t?s.clientId:a.clientId,u=t?a.clientId:s.clientId,d=U(e,c);if(!(0,r.getBlockType)(d).merge)return!1;const p=j(e,u);if(p.name===d)return!0;const m=(0,r.switchToBlockType)(p,d);return m&&m.length}const Re=e=>{const t=oe(e),n=re(e);if(t.clientId===n.clientId)return G;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return G;const o=de(e,t.clientId);if(o!==de(e,n.clientId))return G;const l=Ae(e,o),i=l.indexOf(t.clientId),a=l.indexOf(n.clientId),[s,c]=i>a?[n,t]:[t,n],u=j(e,s.clientId),d=(0,r.getBlockType)(u.name),p=j(e,c.clientId),m=(0,r.getBlockType)(p.name),f=u.attributes[s.attributeKey],g=p.attributes[c.attributeKey],h=d.attributes[s.attributeKey],v=m.attributes[c.attributeKey];let b=(0,z.create)({html:f,...H(h)}),_=(0,z.create)({html:g,...H(v)});return b=(0,z.remove)(b,0,s.offset),_=(0,z.remove)(_,c.offset,_.text.length),[{...u,attributes:{...u.attributes,[s.attributeKey]:(0,z.toHTMLString)({value:b,...H(h)})}},{...p,attributes:{...p.attributes,[c.attributeKey]:(0,z.toHTMLString)({value:_,...H(v)})}}]};function Ae(e,t){return e.blocks.order[t||""]||G}function De(e,t){return Ae(e,de(e,t)).indexOf(t)}function Oe(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function ze(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,u.some)(Ae(e,t),(t=>Oe(e,t)||Be(e,t)||n&&ze(e,t,n)))}function Fe(e,t){if(!t)return!1;const n=ye(e),o=n.indexOf(t);return o>-1&&oKe(e,t)))}function Ye(){return V()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}function Qe(e){let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:l}=r;return l?(t=de(e,l)||void 0,n=De(e,r.clientId)+1):n=Ae(e).length,{rootClientId:t,index:n}}function Ze(e){return null!==e.insertionPoint}function Xe(e){return e.template.isValid}function Je(e){return e.settings.template}function et(e,t){if(!t)return e.settings.templateLock;const n=Bt(e,t);return n?n.templateLock:void 0}const tt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},nt=function(e,t){let n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=(0,r.getBlockType)(t),!n)return!1;const{allowedBlockTypes:i}=It(e),a=tt(i,t,!0);if(!a)return!1;const s=!!et(e,o);if(s)return!1;const c=Bt(e,o);if(o&&void 0===c)return!1;const d=null==c?void 0:c.allowedBlocks,p=tt(d,t),m=n.parent,f=U(e,o),g=tt(m,f);let h=!0;const v=n.ancestor;if(v){const t=[o,...pe(e,o)];h=(0,u.some)(t,(t=>tt(v,U(e,t))))}const b=h&&(null===p&&null===g||!0===p||!0===g);return b?(0,l.applyFilters)("blockEditor.__unstableCanInsertBlockType",b,n,o,{getBlock:j.bind(null,e),getBlockParentsByBlockName:me.bind(null,e)}):b},ot=A(nt,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]));function rt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>ot(e,U(e,t),n)))}function lt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=$(e,t);if(null===o)return!0;const{lock:r}=o,l=!!et(e,n);return void 0===r||void 0===(null==r?void 0:r.remove)?!l:!(null!=r&&r.remove)}function it(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>lt(e,t,n)))}function at(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=$(e,t);if(null===o)return;const{lock:r}=o,l="all"===et(e,n);return void 0===r||void 0===(null==r?void 0:r.move)?!l:!(null!=r&&r.move)}function st(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>at(e,t,n)))}function ct(e,t){const n=$(e,t);if(null===n)return!0;const{lock:o}=n;return!(null!=o&&o.edit)}function ut(e,t){var n;return!!(0,r.hasBlockSupport)(t,"lock",!0)&&!(null===(n=e.settings)||void 0===n||!n.canLockBlocks)}function dt(e,t){var n,o;return null!==(n=null===(o=e.preferences.insertUsage)||void 0===o?void 0:o[t])&&void 0!==n?n:null}const pt=(e,t,n)=>!!(0,r.hasBlockSupport)(t,"inserter",!0)&&nt(e,t.name,n),mt=(e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:l=0}=dt(e,o)||{};return{...t,id:o,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:ft(r,l)}},ft=(e,t)=>{if(!e)return t;const 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}},gt=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const o=t.name;let l=!1;(0,r.hasBlockSupport)(t.name,"multiple",!0)||(l=(0,u.some)(te(e,X(e)),{name:t.name}));const{time:i,count:a=0}=dt(e,o)||{},s={id:o,name:t.name,title:t.title,icon:t.icon,isDisabled:l,frecency:ft(i,a)};if("transform"===n)return s;const c=(0,r.getBlockVariations)(t.name,"inserter");return{...s,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:c,example:t.example,utility:1}}},ht=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=gt(e,{buildScope:"inserter"}),o=/^\s*)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,l=t=>{let n=O;if("web"===a.Platform.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(o);if(e){const[,,t="core/",o]=e,l=(0,r.getBlockType)(t+o);l&&(n=l.icon)}}const l=`core/block/${t.id}`,{time:i,count:s=0}=dt(e,l)||{},c=ft(i,s);return{id:l,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:c}},i=(0,r.getBlockTypes)().filter((n=>pt(e,n,t))).map(n),s=nt(e,"core/block",t)?Lt(e).map(l):[],c=i.reduce(((t,n)=>{const{variations:o=[]}=n;if(o.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),o.length){const r=mt(e,n);t.push(...o.map(r))}return t}),[]),u=(e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e},{core:d,noncore:p}=c.reduce(u,{core:[],noncore:[]}),m=[...d,...p];return[...m,...s]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Lt(e),(0,r.getBlockTypes)()])),vt=A((function(e,t){var n;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const l=(0,u.castArray)(t),[i]=l,a=gt(e,{buildScope:"transform"}),s=(0,r.getBlockTypes)().filter((t=>pt(e,t,o))).map(a),c=Object.fromEntries(Object.entries(s).map((e=>{let[,t]=e;return[t.name,t]})));c["*"]={frecency:1/0,id:"*",isDisabled:!1,name:"*",title:(0,g.__)("Unwrap"),icon:null===(n=c[null==i?void 0:i.name])||void 0===n?void 0:n.icon};const d=(0,r.getPossibleBlockTransformations)(l).reduce(((e,t)=>("*"===t?e.push(c["*"]):c[null==t?void 0:t.name]&&e.push(c[t.name]),e)),[]);return(0,u.orderBy)(d,(e=>c[e.name].frecency),"desc")}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,r.getBlockTypes)()])),bt=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,u.some)((0,r.getBlockTypes)(),(n=>pt(e,n,t)));if(n)return!0;const o=nt(e,"core/block",t)&&Lt(e).length>0;return o}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Lt(e),(0,r.getBlockTypes)()])),_t=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,u.filter)((0,r.getBlockTypes)(),(n=>pt(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,r.getBlockTypes)()])),kt=A((function(e){var t,n;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!o)return;const r=null===(t=e.blockListSettings[o])||void 0===t?void 0:t.__experimentalDefaultBlock,l=null===(n=e.blockListSettings[o])||void 0===n?void 0:n.__experimentalDirectInsert;return r&&l?"function"==typeof l?l(j(e,o))?r:null:r:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree[t]])),yt=A(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:(0,r.parse)(n.content,{__unstableSkipMigrationLogs:!0})}:null}),(e=>[e.settings.__experimentalBlockPatterns])),Et=A((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=It(e),o=t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return yt(e,n)})),r=o.filter((e=>{let{blocks:t}=e;return((e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){var o;const e=n.shift();if(!tt(t,e.name||e.blockName,!0))return!1;null===(o=e.innerBlocks)||void 0===o||o.forEach((e=>{n.push(e)}))}return!0})(t,n)}));return r}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),Ct=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=Et(e),o=(0,u.filter)(n,(n=>{let{blocks:o}=n;return o.every((n=>{let{name:o}=n;return ot(e,o,t)}))}));return o}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]])),St=A((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return G;const o=Ct(e,n),r=Array.isArray(t)?t:[t];return o.filter((e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,(e=>r.includes(e)))}))}),((e,t)=>[...Ct.getDependants(e,t)])),wt=A((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return G;if(t.some((t=>{let{clientId:n,innerBlocks:o}=t;return o.length||Ft(e,n)})))return G;const o=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return St(e,o,n)}),((e,t)=>[...St.getDependants(e,t)]));function Bt(e,t){return e.blockListSettings[t]}function It(e){return e.settings}function xt(e){return e.blocks.isPersistentChange}const Tt=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),Nt=A(((e,t)=>{var n;const o=(0,u.find)(Lt(e),(e=>e.id===t));return o?null===(n=o.title)||void 0===n?void 0:n.raw:null}),(e=>[Lt(e)]));function Pt(e){return e.blocks.isIgnoredChange}function Mt(e){return e.lastBlockAttributesChange}function Lt(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:G}function Rt(e){return"navigation"===e.editorMode}function At(e){return e.editorMode}function Dt(e){return e.hasBlockMovingClientId}function Ot(e){return!!e.automaticChangeStatus}function zt(e,t){return e.highlightedBlock===t}function Ft(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Vt=A(((e,t)=>{if(!t.length)return null;const n=ce(e);if(t.includes(U(e,n)))return n;const o=ye(e),r=me(e,n||o[0],t);return r?r[r.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Ht(e,t,n){const{lastBlockInserted:o}=e;return o.clientId===t&&o.source===n}function Gt(e,t){var n,o;return null===(n=null===(o=e.blocks.visibility)||void 0===o?void 0:o[t])||void 0===n||n}const Ut=A((e=>new Set(Object.keys(e.blocks.visibility).filter((t=>e.blocks.visibility[t])))),(e=>[e.blocks.visibility])),Wt=A(((e,t)=>{let n,o=t;for(;e.blocks.parents[o];)o=e.blocks.parents[o],"contentOnly"===et(e,o)&&(n=o);return n}),(e=>[e.blocks.parents,e.blockListSettings]));function $t(e){return e.temporarilyEditingAsBlocks}function jt(e,t){if(!ct(e,t))return!0;const n=At(e);if("zoom-out"===n&&!de(e,t))return!0;const o=(0,r.hasBlockSupport)(U(e,t),"__experimentalDisableBlockOverlay",!1);return("navigation"===n||!o&&Ft(e,t))&&!Oe(e,t)&&!ze(e,t,!0)}function Kt(e,t){let n=e.blocks.parents[t];for(;n;){if(jt(e,n))return!0;n=e.blocks.parents[n]}return!1}var qt=window.wp.a11y;const Yt="†";function Qt(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return"string"==typeof n&&-1!==n.indexOf(Yt)}))}const Zt=e=>Array.isArray(e)?e:[e],Xt=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(Jt(e))},Jt=e=>t=>{let{select:n,dispatch:o}=t;const l=n.getTemplate(),i=n.getTemplateLock(),a=!l||"all"!==i||(0,r.doBlocksMatchTemplate)(e,l);if(a!==n.isValidTemplate())return o.setTemplateValidity(a),a};function en(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function tn(e){return V()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function nn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Zt(e),attributes:t,uniqueByBlock:n}}function on(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function rn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const ln=e=>t=>{let{select:n,dispatch:o}=t;const r=n.getPreviousBlockClientId(e);r&&o.selectBlock(r,-1)},an=e=>t=>{let{select:n,dispatch:o}=t;const r=n.getNextBlockClientId(e);r&&o.selectBlock(r)};function sn(){return{type:"START_MULTI_SELECT"}}function cn(){return{type:"STOP_MULTI_SELECT"}}const un=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o=>{let{select:r,dispatch:l}=o;if(r.getBlockRootClientId(e)!==r.getBlockRootClientId(t))return;l({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const i=r.getSelectedBlockCount();(0,qt.speak)((0,g.sprintf)((0,g._n)("%s block selected.","%s blocks selected.",i),i),"assertive")}};function dn(){return{type:"CLEAR_SELECTED_BLOCK"}}function pn(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function mn(e,t){var n,o;const l=null!==(n=null==t||null===(o=t.__experimentalPreferredStyleVariations)||void 0===o?void 0:o.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!(0,r.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!l[n])return e;const o=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=o&&o.includes("is-style-"))return e;const{attributes:i={}}=e,a=l[n];return{...e,attributes:{...i,className:`${o||""} is-style-${a}`.trim()}}}))}const fn=function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4?arguments[4]:void 0;return l=>{let{select:i,dispatch:a}=l;e=Zt(e),t=mn(Zt(t),i.getSettings());const s=i.getBlockRootClientId(e[0]);for(let e=0;e{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()}))}};function gn(e,t){return fn(e,t)}const hn=e=>(t,n)=>o=>{let{select:r,dispatch:l}=o;r.canMoveBlocks(t,n)&&l({type:e,clientIds:Zt(t),rootClientId:n})},vn=hn("MOVE_BLOCKS_DOWN"),bn=hn("MOVE_BLOCKS_UP"),_n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return r=>{let{select:l,dispatch:i}=r;if(l.canMoveBlocks(e,t)){if(t!==n){if(!l.canRemoveBlocks(e,t))return;if(!l.canInsertBlocks(e,n))return}i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}}};function kn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return _n([e],t,n,o)}function yn(e,t,n,o,r){return En([e],t,n,o,0,r)}const En=function(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,l=arguments.length>5?arguments[5]:void 0;return i=>{let{select:a,dispatch:s}=i;null!==r&&"object"==typeof r&&(l=r,r=0,V()("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=mn(Zt(e),a.getSettings());const c=[];for(const t of e){a.canInsertBlockType(t.name,n)&&c.push(t)}c.length&&s({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:l})}};function Cn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:o}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o}}function Sn(){return{type:"HIDE_INSERTION_POINT"}}function wn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const Bn=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const o=t.getBlocks(),l=t.getTemplate(),i=(0,r.synchronizeBlocksWithTemplate)(o,l);n.resetBlocks(i)},In=e=>t=>{let{registry:n,select:o,dispatch:l}=t;const i=o.getSelectionStart(),a=o.getSelectionEnd();if(i.clientId===a.clientId)return;if(!i.attributeKey||!a.attributeKey||void 0===i.offset||void 0===a.offset)return!1;const s=o.getBlockRootClientId(i.clientId);if(s!==o.getBlockRootClientId(a.clientId))return;const c=o.getBlockOrder(s);let u,d;c.indexOf(i.clientId)>c.indexOf(a.clientId)?(u=a,d=i):(u=i,d=a);const p=e?d:u,m=o.getBlock(p.clientId),f=(0,r.getBlockType)(m.name);if(!f.merge)return;const g=u,h=d,v=o.getBlock(g.clientId),b=(0,r.getBlockType)(v.name),_=o.getBlock(h.clientId),k=(0,r.getBlockType)(_.name),y=v.attributes[g.attributeKey],E=_.attributes[h.attributeKey],C=b.attributes[g.attributeKey],S=k.attributes[h.attributeKey];let w=(0,z.create)({html:y,...H(C)}),B=(0,z.create)({html:E,...H(S)});w=(0,z.remove)(w,g.offset,w.text.length),B=(0,z.insert)(B,Yt,0,h.offset);const I=(0,r.cloneBlock)(v,{[g.attributeKey]:(0,z.toHTMLString)({value:w,...H(C)})}),x=(0,r.cloneBlock)(_,{[h.attributeKey]:(0,z.toHTMLString)({value:B,...H(S)})}),T=e?I:x,N=v.name===_.name?[T]:(0,r.switchToBlockType)(T,f.name);if(!N||!N.length)return;let P;if(e){const e=N.pop();P=f.merge(e.attributes,x.attributes)}else{const e=N.shift();P=f.merge(I.attributes,e.attributes)}const M=Qt(P),L=P[M],R=(0,z.create)({html:L,...H(f.attributes[M])}),A=R.text.indexOf(Yt),D=(0,z.remove)(R,A,A+1),O=(0,z.toHTMLString)({value:D,...H(f.attributes[M])});P[M]=O;const F=o.getSelectedBlockClientIds(),V=[...e?N:[],{...m,attributes:{...m.attributes,...P}},...e?[]:N];n.batch((()=>{l.selectionChange(m.clientId,M,A,A),l.replaceBlocks(F,V,0,o.getSelectedBlocksInitialCaretPosition())}))},xn=()=>e=>{let{select:t,dispatch:n}=e;const o=t.getSelectionStart(),l=t.getSelectionEnd();if(o.clientId===l.clientId)return;if(!o.attributeKey||!l.attributeKey||void 0===o.offset||void 0===l.offset)return;const i=t.getBlockRootClientId(o.clientId);if(i!==t.getBlockRootClientId(l.clientId))return;const a=t.getBlockOrder(i);let s,c;a.indexOf(o.clientId)>a.indexOf(l.clientId)?(s=l,c=o):(s=o,c=l);const u=s,d=c,p=t.getBlock(u.clientId),m=(0,r.getBlockType)(p.name),f=t.getBlock(d.clientId),g=(0,r.getBlockType)(f.name),h=p.attributes[u.attributeKey],v=f.attributes[d.attributeKey],b=m.attributes[u.attributeKey],_=g.attributes[d.attributeKey];let k=(0,z.create)({html:h,...H(b)}),y=(0,z.create)({html:v,...H(_)});k=(0,z.remove)(k,u.offset,k.text.length),y=(0,z.remove)(y,0,d.offset),n.replaceBlocks(t.getSelectedBlockClientIds(),[{...p,attributes:{...p.attributes,[u.attributeKey]:(0,z.toHTMLString)({value:k,...H(b)})}},(0,r.createBlock)((0,r.getDefaultBlockName)()),{...f,attributes:{...f.attributes,[d.attributeKey]:(0,z.toHTMLString)({value:y,...H(_)})}}],1,t.getSelectedBlocksInitialCaretPosition())},Tn=()=>e=>{let{select:t,dispatch:n}=e;const o=t.getSelectionStart(),r=t.getSelectionEnd();n.selectionChange({start:{clientId:o.clientId},end:{clientId:r.clientId}})},Nn=(e,t)=>n=>{let{registry:o,select:l,dispatch:i}=n;const a=[e,t];i({type:"MERGE_BLOCKS",blocks:a});const[s,c]=a,u=l.getBlock(s),d=(0,r.getBlockType)(u.name);if(!d)return;const p=l.getBlock(c);if(d&&!d.merge){const e=(0,r.switchToBlockType)(p,d.name);if(1!==(null==e?void 0:e.length))return void i.selectBlock(u.clientId);const[t]=e;return t.innerBlocks.length<1?void i.selectBlock(u.clientId):void o.batch((()=>{i.insertBlocks(t.innerBlocks,void 0,s),i.removeBlock(c),i.selectBlock(t.innerBlocks[0].clientId)}))}const m=(0,r.getBlockType)(p.name),{clientId:f,attributeKey:g,offset:h}=l.getSelectionStart(),v=(f===s?d:m).attributes[g],b=(f===s||f===c)&&void 0!==g&&void 0!==h&&!!v;v||("number"==typeof g?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 "+typeof g):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const _=(0,r.cloneBlock)(u),k=(0,r.cloneBlock)(p);if(b){const e=f===s?_:k,t=e.attributes[g],n=(0,z.insert)((0,z.create)({html:t,...H(v)}),Yt,h,h);e.attributes[g]=(0,z.toHTMLString)({value:n,...H(v)})}const y=u.name===p.name?[k]:(0,r.switchToBlockType)(k,u.name);if(!y||!y.length)return;const E=d.merge(_.attributes,y[0].attributes);if(b){const e=Qt(E),t=E[e],n=(0,z.create)({html:t,...H(d.attributes[e])}),o=n.text.indexOf(Yt),r=(0,z.remove)(n,o,o+1),l=(0,z.toHTMLString)({value:r,...H(d.attributes[e])});E[e]=l,i.selectionChange(u.clientId,e,o,o)}i.replaceBlocks([u.clientId,p.clientId],[{...u,attributes:{...u.attributes,...E}},...y.slice(1)],0)},Pn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:r}=n;if(!e||!e.length)return;e=Zt(e);const l=o.getBlockRootClientId(e[0]);o.canRemoveBlocks(e,l)&&(t&&r.selectPreviousBlock(e[0]),r({type:"REMOVE_BLOCKS",clientIds:e}),r((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()})))}};function Mn(e,t){return Pn([e],t)}function Ln(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function Rn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function An(){return{type:"START_TYPING"}}function Dn(){return{type:"STOP_TYPING"}}function On(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function zn(){return{type:"STOP_DRAGGING_BLOCKS"}}function Fn(){return V()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Vn(){return V()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Hn(e,t,n,o){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}:{type:"SELECTION_CHANGE",...e}}const Gn=(e,t,n)=>o=>{let{dispatch:l}=o;const i=(0,r.getDefaultBlockName)();if(!i)return;const a=(0,r.createBlock)(i,e);return l.insertBlock(a,n,t)};function Un(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Wn(e){return{type:"UPDATE_SETTINGS",settings:e}}function $n(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function jn(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Kn(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const qn=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},Yn=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n.__unstableSetEditorMode(e?"navigation":"edit")}},Qn=e=>t=>{let{dispatch:n,select:o}=t;if("zoom-out"===e){const e=o.getBlockSelectionStart();e&&n.selectBlock(o.getBlockHierarchyRootClientId(e))}n({type:"SET_EDITOR_MODE",mode:e}),"navigation"===e?(0,qt.speak)((0,g.__)("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.")):"edit"===e?(0,qt.speak)((0,g.__)("You are currently in edit mode. To return to the navigation mode, press Escape.")):"zoom-out"===e&&(0,qt.speak)((0,g.__)("You are currently in zoom-out mode."))},Zn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,qt.speak)((0,g.__)("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."))}},Xn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:l}=n;if(!e||!e.length)return;const i=o.getBlocksByClientId(e);if(i.some((e=>!e)))return;const a=i.map((e=>e.name));if(a.some((e=>!(0,r.hasBlockSupport)(e,"multiple",!0))))return;const s=o.getBlockRootClientId(e[0]),c=Zt(e),u=o.getBlockIndex(c[c.length-1]),d=i.map((e=>(0,r.__experimentalCloneSanitizedBlock)(e)));return l.insertBlocks(d,u+1,s,t),d.length>1&&t&&l.multiSelect(d[0].clientId,d[d.length-1].clientId),d.map((e=>e.clientId))}},Jn=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const r=n.getBlockRootClientId(e);if(n.getTemplateLock(r))return;const l=n.getBlockIndex(e);return o.insertDefaultBlock({},r,l)},eo=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const r=n.getBlockRootClientId(e);if(n.getTemplateLock(r))return;const l=n.getBlockIndex(e);return o.insertDefaultBlock({},r,l+1)};function to(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const no=e=>async t=>{let{dispatch:n}=t;n(to(e,!0)),await new Promise((e=>setTimeout(e,150))),n(to(e,!1))};function oo(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function ro(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function lo(e){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e}}const io="core/block-editor",ao={reducer:P,selectors:e,actions:t},so=(0,p.createReduxStore)(io,{...ao,persist:["preferences"]});(0,p.registerStore)(io,{...ao,persist:["preferences"]});const co={name:"",isSelected:!1},uo=(0,a.createContext)(co),{Provider:po}=uo;function mo(){return(0,a.useContext)(uo)}function fo(){const{isSelected:e,clientId:t,name:n}=mo();return(0,p.useSelect)((o=>{if(e)return!0;const{getBlockName:r,isFirstMultiSelectedBlock:l,getMultiSelectedBlockClientIds:i}=o(so);return!!l(t)&&i().every((e=>r(e)===n))}),[t,e,n])}function go(e){let{group:t="default",controls:n,children:o,__experimentalShareWithChildBlocks:l=!1}=e;const i=function(e,t){const n=fo(),{clientId:o}=mo(),l=(0,p.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:l}=e(so),{hasBlockSupport:i}=e(r.store);return t&&i(n(o),"__experimentalExposeControlsToChildren",!1)&&l(o)}),[t,o]);var i;return n?null===(i=f[e])||void 0===i?void 0:i.Fill:l?f.parent.Fill:null}(t,l);return i?(0,a.createElement)(m.__experimentalStyleProvider,{document:document},(0,a.createElement)(i,null,(e=>{const r=(0,u.isEmpty)(e)?null:e;return(0,a.createElement)(m.__experimentalToolbarContext.Provider,{value:r},"default"===t&&(0,a.createElement)(m.ToolbarGroup,{controls:n}),o)}))):null}function ho(e){let{group:t="default",...n}=e;const o=(0,a.useContext)(m.__experimentalToolbarContext),r=f[t].Slot,l=(0,m.__experimentalUseSlot)(r.__unstableName);return Boolean(l.fills&&l.fills.length)?"default"===t?(0,a.createElement)(r,i({},n,{bubblesVirtually:!0,fillProps:o})):(0,a.createElement)(m.ToolbarGroup,null,(0,a.createElement)(r,i({},n,{bubblesVirtually:!0,fillProps:o}))):null}const vo=go;vo.Slot=ho;const bo=e=>(0,a.createElement)(go,i({group:"inline"},e));bo.Slot=e=>(0,a.createElement)(ho,i({group:"inline"},e));var _o=vo;var ko=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"}));var yo=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"}));var Eo=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"}));var Co=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"}));var So=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M14.3 6.7l-1.1 1.1 4 4H4v1.5h13.3l-4.1 4.4 1.1 1.1 5.8-6.3z"}));var wo=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M16.2 13.2l-4 4V4h-1.5v13.3l-4.5-4.1-1 1.1 6.2 5.8 5.8-5.8-1-1.1z"}));function Bo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e}${t?` ${t}`:""}`)).join(",")}function Io(e,t,n,o){var r,l;let i="";return null!=t&&null!==(r=t[n])&&void 0!==r&&null!==(l=r.spacingStyles)&&void 0!==l&&l.length&&o&&t[n].spacingStyles.forEach((t=>{i+=`${Bo(e,t.selector.trim())} { `,i+=Object.entries(t.rules).map((e=>{let[t,n]=e;return`${t}: ${n||o}`})).join("; "),i+="; }"})),i}function xo(e){const{contentSize:t,wideSize:n}=e,o={},r=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return r.test(t)&&(o.none=(0,g.sprintf)((0,g.__)("Max %s wide"),t)),r.test(n)&&(o.wide=(0,g.sprintf)((0,g.__)("Max %s wide"),n)),o}const To=(0,a.createContext)({refs:new Map,callbacks:new Map});function No(e){let{children:t}=e;const n=(0,a.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,a.createElement)(To.Provider,{value:n},t)}function Po(e){const{refs:t,callbacks:n}=(0,a.useContext)(To),o=(0,a.useRef)();return(0,a.useLayoutEffect)((()=>(t.set(o,e),()=>{t.delete(o)})),[e]),(0,d.useRefEffect)((t=>{o.current=t,n.forEach(((n,o)=>{e===n&&o(t)}))}),[e])}function Mo(e){const{refs:t}=(0,a.useContext)(To),n=(0,a.useRef)();return n.current=e,(0,a.useMemo)((()=>({get current(){let e=null;for(const[o,r]of t.entries())r===n.current&&o.current&&(e=o.current);return e}})),[])}function Lo(e){const{callbacks:t}=(0,a.useContext)(To),n=Mo(e),[o,r]=(0,a.useState)(null);return(0,a.useLayoutEffect)((()=>{if(e)return t.set(r,e),()=>{t.delete(r)}}),[e]),n.current||o}function Ro(e){return!(null==e||!e.includes)&&("0"===e||e.includes("var:preset|spacing|"))}function Ao(e,t){if(!Ro(e))return e;const n=Oo(e),o=t.find((e=>String(e.slug)===n));return null==o?void 0:o.size}function Do(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function Oo(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}const zo={all:(0,g.__)("All sides"),top:(0,g.__)("Top"),bottom:(0,g.__)("Bottom"),left:(0,g.__)("Left"),right:(0,g.__)("Right"),mixed:(0,g.__)("Mixed"),vertical:(0,g.__)("Vertical"),horizontal:(0,g.__)("Horizontal")},Fo={top:void 0,right:void 0,bottom:void 0,left:void 0},Vo=["top","right","bottom","left"];function Ho(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function Go(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Vo;return Object.values(e).length>=1&&Object.values(e).length1}function Uo(e){return null!=e&&!(0,u.isEmpty)(Object.values(e).filter((e=>!!e)))}var Wo=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z"}));const $o=["color","border","typography","spacing"],jo={"color.palette":e=>void 0===e.colors?void 0:e.colors,"color.gradients":e=>void 0===e.gradients?void 0:e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>void 0===e.fontSizes?void 0:e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},Ko={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"};function qo(e){const{name:t,clientId:n}=mo(),o=(0,p.useSelect)((o=>{if($o.includes(e))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let l;const i=(e=>Ko[e]||e)(e);[...o(so).getBlockParents(n),n].forEach((e=>{const n=o(so).getBlockName(e);if((0,r.hasBlockSupport)(n,"__experimentalSettings",!1)){var a;const n=o(so).getBlockAttributes(e),r=null!==(a=(0,u.get)(n,`settings.blocks.${t}.${i}`))&&void 0!==a?a:(0,u.get)(n,`settings.${i}`);void 0!==r&&(l=r)}}));const a=o(so).getSettings();if(void 0===l){var s;const e=`__experimentalFeatures.${i}`,n=`__experimentalFeatures.blocks.${t}.${i}`;l=null!==(s=(0,u.get)(a,n))&&void 0!==s?s:(0,u.get)(a,e)}var c,d;if(void 0!==l)return r.__EXPERIMENTAL_PATHS_WITH_MERGE[i]?null!==(c=null!==(d=l.custom)&&void 0!==d?d:l.theme)&&void 0!==c?c:l.default:l;const p=jo[i]?jo[i](a):void 0;return void 0!==p?p:"typography.dropCap"===i||void 0}),[t,n,e]);return o}function Yo(e){var t;let{spacingSizes:n,value:o,side:r,onChange:l,isMixed:i=!1,type:s,minimumCustomValue:u}=e;o=function(e,t){if(Ro(e))return e;const n=t.find((t=>String(t.size)===String(e)));return null!=n&&n.slug?`var:preset|spacing|${n.slug}`:e}(o,n);let d=n;const f=n.length<=8,h=(0,p.useSelect)((e=>{const t=e(so).getSettings();return null==t?void 0:t.disableCustomSpacingSizes})),[v,b]=(0,a.useState)(!h&&void 0!==o&&!Ro(o)),_=(0,m.__experimentalUseCustomUnits)({availableUnits:qo("spacing.units")||["px","em","rem"]});let k=null;!f&&!v&&void 0!==o&&(!Ro(o)||Ro(o)&&i)?(d=[...n,{name:i?(0,g.__)("Mixed"):(0,g.sprintf)((0,g.__)("Custom (%s)"),o),slug:"custom",size:o}],k=d.length-1):i||(k=v?Ao(o,n):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":Oo(e),o=t.findIndex((e=>String(e.slug)===n));return-1!==o?o:NaN}(o,n));const y=(0,a.useMemo)((()=>(0,m.__experimentalParseQuantityAndUnitFromRawValue)(k)),[k])[1]||_[0].value,E=e=>{var t;return void 0===o||null===(t=n[e])||void 0===t?void 0:t.name},C=parseInt(k,10),S=(e,t)=>{var o;const r=parseInt(e,10);if("selectList"===t){if(0===r)return;if(1===r)return"0"}else if(0===r)return"0";return`var:preset|spacing|${null===(o=n[e])||void 0===o?void 0:o.slug}`},w=i?(0,g.__)("Mixed"):null,B=i?(0,g.__)("Mixed"):E(k),I=d.map(((e,t)=>({key:t,name:e.name}))),x=n.map(((e,t)=>({value:t,label:void 0}))),T=(0,g.sprintf)((0,g.__)("%1$s %2$s"),zo[r],null==s?void 0:s.toLowerCase()),N=f&&!v&&void 0!==B;return(0,a.createElement)(a.Fragment,null,"all"!==r&&(0,a.createElement)(m.__experimentalHStack,{className:"components-spacing-sizes-control__side-labels"},(0,a.createElement)(m.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__side-label"},zo[r]),N&&(0,a.createElement)(m.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-single"},B)),"all"===r&&N&&(0,a.createElement)(m.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-all"},B),!h&&(0,a.createElement)(m.Button,{label:v?(0,g.__)("Use size preset"):(0,g.__)("Set custom size"),icon:Wo,onClick:()=>{b(!v)},isPressed:v,isSmall:!0,className:c()({"components-spacing-sizes-control__custom-toggle-all":"all"===r,"components-spacing-sizes-control__custom-toggle-single":"all"!==r}),iconSize:24}),v&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.__experimentalUnitControl,{onChange:e=>l((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:k,units:_,min:u,placeholder:w,disableUnits:i,label:T,hideLabelFromVision:!0,className:"components-spacing-sizes-control__custom-value-input",style:{gridColumn:"1"},size:"__unstable-large"}),(0,a.createElement)(m.RangeControl,{value:C,min:0,max:100,withInputField:!1,onChange:e=>{l([e,y].join(""))},className:"components-spacing-sizes-control__custom-value-range"})),f&&!v&&(0,a.createElement)(m.RangeControl,{className:"components-spacing-sizes-control__range-control",value:k,onChange:e=>l(S(e)),onMouseDown:e=>{var t;(null==e||null===(t=e.nativeEvent)||void 0===t?void 0:t.offsetX)<35&&void 0===o&&l("0")},withInputField:!1,"aria-valuenow":k,"aria-valuetext":null===(t=n[k])||void 0===t?void 0:t.name,renderTooltipContent:E,min:0,max:n.length-1,marks:x,label:T,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0}),!f&&!v&&(0,a.createElement)(m.CustomSelectControl,{className:"components-spacing-sizes-control__custom-select-control",value:I.find((e=>e.key===k))||"",onChange:e=>{l(S(e.selectedItem.key,"selectList"))},options:I,label:T,hideLabelFromVision:!0,__nextUnconstrainedWidth:!0,size:"__unstable-large"}))}function Qo(e){let{onChange:t,values:n,sides:o,spacingSizes:r,type:l,minimumCustomValue:i}=e;const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ho(Object.values(e))}(n),c=Uo(n)&&Go(n,o);return(0,a.createElement)(Yo,{value:s,onChange:e=>{const r=(0,m.__experimentalApplyValueToSides)(n,e,o);t(r)},side:"all",spacingSizes:r,isMixed:c,type:l,minimumCustomValue:i})}function Zo(e){let{values:t,sides:n,onChange:o,spacingSizes:r,type:l,minimumCustomValue:i}=e;const s=null!=n&&n.length?Vo.filter((e=>n.includes(e))):Vo,c=e=>n=>{const r={...t};r[e]=n,o(r)};return(0,a.createElement)(a.Fragment,null,s.map((e=>(0,a.createElement)(Yo,{value:t[e],label:zo[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,onChange:c(e),spacingSizes:r,type:l,minimumCustomValue:i}))))}const Xo=["vertical","horizontal"];function Jo(e){let{onChange:t,values:n,sides:o,spacingSizes:r,type:l,minimumCustomValue:i}=e;const s=e=>o=>{if(!t)return;const r={...n};"vertical"===e&&(r.top=o,r.bottom=o),"horizontal"===e&&(r.left=o,r.right=o),t(r)},c=null!=o&&o.length?Xo.filter((e=>o.includes(e))):Xo;return(0,a.createElement)(a.Fragment,null,c.map((e=>{const t="vertical"===e?n.top:n.left;return(0,a.createElement)(Yo,{value:t,onChange:s(e),label:zo[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,spacingSizes:r,type:l,minimumCustomValue:i})})))}var er=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.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"}));var tr=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));function nr(e){let{isLinked:t,onClick:n}=e;const o=t?(0,g.__)("Unlink sides"):(0,g.__)("Link sides");return(0,a.createElement)(m.Tooltip,{text:o},(0,a.createElement)("span",{className:"component-spacing-sizes-control__linked-button"},(0,a.createElement)(m.Button,{isSmall:!0,icon:t?er:tr,iconSize:24,"aria-label":o,onClick:n})))}function or(e){let{inputProps:t,onChange:n,label:o=(0,g.__)("Spacing Control"),values:r,sides:l,splitOnAxis:s=!1,useSelect:u,minimumCustomValue:d=0}=e;const p=[{name:0,slug:"0",size:0},...qo("spacing.spacingSizes")||[]];p.length>8&&p.unshift({name:(0,g.__)("Default"),slug:"default",size:void 0});const f=r||Fo,h=Uo(r),v=1===(null==l?void 0:l.length),[b,_]=(0,a.useState)(!h||!Go(f,l)||v),k={...t,onChange:e=>{const t={...r,...e};n(t)},isLinked:b,sides:l,values:f,spacingSizes:p,useSelect:u,type:o,minimumCustomValue:d};return(0,a.createElement)("fieldset",{role:"region",className:c()("component-spacing-sizes-control",{"is-unlinked":!b})},(0,a.createElement)(m.BaseControl.VisualLabel,{as:"legend"},o),!v&&(0,a.createElement)(nr,{onClick:()=>{_(!b)},isLinked:b}),b&&(0,a.createElement)(Qo,i({"aria-label":o},k)),!b&&s&&(0,a.createElement)(Jo,k),!b&&!s&&(0,a.createElement)(Zo,k))}window.wp.warning;var rr={default:(0,m.createSlotFill)("InspectorControls"),advanced:(0,m.createSlotFill)("InspectorAdvancedControls"),border:(0,m.createSlotFill)("InspectorControlsBorder"),color:(0,m.createSlotFill)("InspectorControlsColor"),dimensions:(0,m.createSlotFill)("InspectorControlsDimensions"),typography:(0,m.createSlotFill)("InspectorControlsTypography")};function lr(e){var t;let{__experimentalGroup:n="default",children:o}=e;const r=fo(),l=null===(t=rr[n])||void 0===t?void 0:t.Fill;return l?r?(0,a.createElement)(m.__experimentalStyleProvider,{document:document},(0,a.createElement)(l,null,(e=>{const t=(0,u.isEmpty)(e)?null:e;return(0,a.createElement)(m.__experimentalToolsPanelContext.Provider,{value:t},o)}))):null:("undefined"!=typeof process&&process.env,null)}const ir=e=>e,ar=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=(0,u.pickBy)((0,u.mapValues)(e,ar),ir);return(0,u.isEmpty)(t)?void 0:t};function sr(e,t,n){return(0,u.setWith)(e?(0,u.clone)(e):{},t,n,u.clone)}function cr(e,t,n,o,r,l){var i;if((0,u.every)(e,(e=>!e)))return n;if(1===l.length&&n.innerBlocks.length===o.length)return n;let a=null===(i=o[0])||void 0===i?void 0:i.attributes;if(l.length>1&&o.length>1){if(!o[r])return n;var s;a=null===(s=o[r])||void 0===s?void 0:s.attributes}let c=n;return Object.entries(e).forEach((e=>{let[n,o]=e;o&&t[n].forEach((e=>{const t=(0,u.get)(a,e);t&&(c={...c,attributes:sr(c.attributes,e,t)})}))})),c}function ur(e,t,n){const o=(0,r.getBlockSupport)(e,t),l=null==o?void 0:o.__experimentalSkipSerialization;return Array.isArray(l)?l.includes(n):l}function dr(e){let{children:t,group:n,label:o}=e;const{updateBlockAttributes:r}=(0,p.useDispatch)(so),{getBlockAttributes:l,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:c}=(0,p.useSelect)(so),u=s(),d=(0,a.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},n=c()?i():[u];n.forEach((n=>{const{style:o}=l(n);let r={style:o};e.forEach((e=>{r={...r,...e(r)}})),r={...r,style:ar(r.style)},t[n]=r})),r(n,t,!0)}),[ar,l,i,c,u,r]);return(0,a.createElement)(m.__experimentalToolsPanel,{className:`${n}-block-support-panel`,label:o,resetAll:d,key:u,panelId:u,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},t)}function pr(e){let{Slot:t,...n}=e;const o=(0,a.useContext)(m.__experimentalToolsPanelContext);return(0,a.createElement)(t,i({},n,{fillProps:o,bubblesVirtually:!0}))}function mr(e){var t;let{__experimentalGroup:n="default",label:o,...r}=e;const l=null===(t=rr[n])||void 0===t?void 0:t.Slot,s=(0,m.__experimentalUseSlot)(null==l?void 0:l.__unstableName);if(!l||!s)return"undefined"!=typeof process&&process.env,null;return Boolean(s.fills&&s.fills.length)?o?(0,a.createElement)(dr,{group:n,label:o},(0,a.createElement)(pr,i({},r,{Slot:l}))):(0,a.createElement)(l,i({},r,{bubblesVirtually:!0})):null}const fr=lr;fr.Slot=mr;const gr=e=>(0,a.createElement)(lr,i({},e,{__experimentalGroup:"advanced"}));gr.Slot=e=>(0,a.createElement)(mr,i({},e,{__experimentalGroup:"advanced"})),gr.slotName="InspectorAdvancedControls";var hr=fr,vr=window.wp.isShallowEqual,br=n.n(vr);var _r=function(e){return(0,d.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:o}=t;e.current.scrollBy(n,o)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e])};const kr=Number.MAX_SAFE_INTEGER;var yr=(0,a.forwardRef)((function(e,t){let{clientId:n,bottomClientId:o,children:r,__unstableRefreshSize:l,__unstableCoverTarget:s=!1,__unstablePopoverSlot:u,__unstableContentRef:p,...f}=e;const g=Lo(n),h=Lo(null!=o?o:n),v=(0,d.useMergeRefs)([t,_r(p)]),[b,_]=(0,a.useReducer)((e=>(e+1)%kr),0);(0,a.useLayoutEffect)((()=>{if(!g)return;const e=new window.MutationObserver(_);return e.observe(g,{attributes:!0}),()=>{e.disconnect()}}),[g]);const k=(0,a.useMemo)((()=>b<0||!g||h!==g?{}:{position:"absolute",width:g.offsetWidth,height:g.offsetHeight}),[g,h,l,b]),y=(0,a.useMemo)((()=>{if(!(b<0||!g||o&&!h))return{getBoundingClientRect(){var e,t,n,o;const r=g.getBoundingClientRect(),l=null==h?void 0:h.getBoundingClientRect(),i=Math.min(r.left,null!==(e=null==l?void 0:l.left)&&void 0!==e?e:1/0),a=Math.min(r.top,null!==(t=null==l?void 0:l.top)&&void 0!==t?t:1/0),s=Math.max(r.right,null!==(n=l.right)&&void 0!==n?n:-1/0)-i,c=Math.max(r.bottom,null!==(o=l.bottom)&&void 0!==o?o:-1/0)-a;return new window.DOMRect(i,a,s,c)},ownerDocument:g.ownerDocument}}),[o,h,g,b]);return!g||o&&!h?null:(0,a.createElement)(m.Popover,i({ref:v,animate:!1,position:"top right left",focusOnMount:!1,anchor:y,__unstableSlotName:u||null,resize:!1,flip:!1,shift:!0},f,{className:c()("block-editor-block-popover",f.className)}),s&&(0,a.createElement)("div",{style:k},r),!s&&r)}));function Er(e){const t=(0,r.getBlockSupport)(e,Nr);return!!(!0===t||null!=t&&t.margin)}function Cr(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!qo("spacing.margin"),n=!Dr(e,"margin");return!Er(e)||t||n}function Sr(e){var t,n;const{name:o,attributes:{style:r},setAttributes:l}=e,i=qo("spacing.spacingSizes"),s=(0,m.__experimentalUseCustomUnits)({availableUnits:qo("spacing.units")||["%","px","em","rem","vw"]}),c=Ar(o,"margin"),u=c&&c.some((e=>Mr.includes(e)));if(Cr(e))return null;const d=e=>{const t={...r,spacing:{...null==r?void 0:r.spacing,margin:e}};l({style:ar(t)})};return a.Platform.select({web:(0,a.createElement)(a.Fragment,null,(!i||0===(null==i?void 0:i.length))&&(0,a.createElement)(m.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.margin,onChange:d,label:(0,g.__)("Margin"),sides:c,units:s,allowReset:!1,splitOnAxis:u}),(null==i?void 0:i.length)>0&&(0,a.createElement)(or,{values:null==r||null===(n=r.spacing)||void 0===n?void 0:n.margin,onChange:d,label:(0,g.__)("Margin"),sides:c,units:s,allowReset:!1,splitOnAxis:!1})),native:null})}function wr(e){var t,n;let{clientId:o,attributes:r}=e;const l=null==r||null===(t=r.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin,i=qo("spacing.spacingSizes"),s=(0,a.useMemo)((()=>{const e=null!=l&&l.top?Ao(null==l?void 0:l.top,i):0,t=null!=l&&l.right?Ao(null==l?void 0:l.right,i):0,n=null!=l&&l.bottom?Ao(null==l?void 0:l.bottom,i):0,o=null!=l&&l.left?Ao(null==l?void 0:l.left,i):0;return{borderTopWidth:e,borderRightWidth:t,borderBottomWidth:n,borderLeftWidth:o,top:0!==e?`calc(${e} * -1)`:0,right:0!==t?`calc(${t} * -1)`:0,bottom:0!==n?`calc(${n} * -1)`:0,left:0!==o?`calc(${o} * -1)`:0}}),[l]),[c,u]=(0,a.useState)(!1),d=(0,a.useRef)(l),p=(0,a.useRef)(),m=()=>{p.current&&window.clearTimeout(p.current)};return(0,a.useEffect)((()=>(br()(l,d.current)||(u(!0),d.current=l,m(),p.current=setTimeout((()=>{u(!1)}),400)),()=>m())),[l]),c?(0,a.createElement)(yr,{clientId:o,__unstableCoverTarget:!0,__unstableRefreshSize:l},(0,a.createElement)("div",{className:"block-editor__padding-visualizer",style:s})):null}function Br(e){const t=(0,r.getBlockSupport)(e,Nr);return!!(!0===t||null!=t&&t.padding)}function Ir(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!qo("spacing.padding"),n=!Dr(e,"padding");return!Br(e)||t||n}function xr(e){var t,n;const{name:o,attributes:{style:r},setAttributes:l}=e,i=qo("spacing.spacingSizes"),s=(0,m.__experimentalUseCustomUnits)({availableUnits:qo("spacing.units")||["%","px","em","rem","vw"]}),c=Ar(o,"padding"),u=c&&c.some((e=>Mr.includes(e)));if(Ir(e))return null;const d=e=>{const t={...r,spacing:{...null==r?void 0:r.spacing,padding:e}};l({style:ar(t)})};return a.Platform.select({web:(0,a.createElement)(a.Fragment,null,(!i||0===(null==i?void 0:i.length))&&(0,a.createElement)(m.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:d,label:(0,g.__)("Padding"),sides:c,units:s,allowReset:!1,splitOnAxis:u}),(null==i?void 0:i.length)>0&&(0,a.createElement)(or,{values:null==r||null===(n=r.spacing)||void 0===n?void 0:n.padding,onChange:d,label:(0,g.__)("Padding"),sides:c,units:s,allowReset:!1,splitOnAxis:u})),native:null})}function Tr(e){var t,n;let{clientId:o,attributes:r}=e;const l=null==r||null===(t=r.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding,i=(0,a.useMemo)((()=>({borderTopWidth:Ro(null==l?void 0:l.top)?Do(null==l?void 0:l.top):null==l?void 0:l.top,borderRightWidth:Ro(null==l?void 0:l.right)?Do(null==l?void 0:l.right):null==l?void 0:l.right,borderBottomWidth:Ro(null==l?void 0:l.bottom)?Do(null==l?void 0:l.bottom):null==l?void 0:l.bottom,borderLeftWidth:Ro(null==l?void 0:l.left)?Do(null==l?void 0:l.left):null==l?void 0:l.left})),[l]),[s,c]=(0,a.useState)(!1),u=(0,a.useRef)(l),d=(0,a.useRef)(),p=()=>{d.current&&window.clearTimeout(d.current)};return(0,a.useEffect)((()=>(br()(l,u.current)||(c(!0),u.current=l,p(),d.current=setTimeout((()=>{c(!1)}),400)),()=>p())),[l]),s?(0,a.createElement)(yr,{clientId:o,__unstableCoverTarget:!0,__unstableRefreshSize:l},(0,a.createElement)("div",{className:"block-editor__padding-visualizer",style:i})):null}const Nr="spacing",Pr=["top","right","bottom","left"],Mr=["vertical","horizontal"];function Lr(e){const t=Vr(e),n=Ir(e),o=Cr(e),l=Rr(e),i=function(e){if("web"!==a.Platform.OS)return!1;return Or(e)||Br(e)||Er(e)}(e.name),s=qo("spacing.spacingSizes");if(l||!i)return null;const u=(0,r.getBlockSupport)(e.name,[Nr,"__experimentalDefaultControls"]),d=e=>t=>{var n;return{...t,style:{...t.style,spacing:{...null===(n=t.style)||void 0===n?void 0:n.spacing,[e]:void 0}}}},p=c()({"tools-panel-item-spacing":s&&s.length>0});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(hr,{__experimentalGroup:"dimensions"},!n&&(0,a.createElement)(m.__experimentalToolsPanelItem,{className:p,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding)}(e),label:(0,g.__)("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:ar({...o,spacing:{...null==o?void 0:o.spacing,padding:void 0}})})}(e),resetAllFilter:d("padding"),isShownByDefault:null==u?void 0:u.padding,panelId:e.clientId},(0,a.createElement)(xr,e)),!o&&(0,a.createElement)(m.__experimentalToolsPanelItem,{className:p,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin)}(e),label:(0,g.__)("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:ar({...o,spacing:{...null==o?void 0:o.spacing,margin:void 0}})})}(e),resetAllFilter:d("margin"),isShownByDefault:null==u?void 0:u.margin,panelId:e.clientId},(0,a.createElement)(Sr,e)),!t&&(0,a.createElement)(m.__experimentalToolsPanelItem,{className:p,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.blockGap)}(e),label:(0,g.__)("Block spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:{...o,spacing:{...null==o?void 0:o.spacing,blockGap:void 0}}})}(e),resetAllFilter:d("blockGap"),isShownByDefault:null==u?void 0:u.blockGap,panelId:e.clientId},(0,a.createElement)(Hr,e))),!n&&(0,a.createElement)(Tr,e),!o&&(0,a.createElement)(wr,e))}const Rr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Vr(e),n=Ir(e),o=Cr(e);return t&&n&&o};function Ar(e,t){var n;const o=(0,r.getBlockSupport)(e,Nr);if(o&&"boolean"!=typeof o[t])return Array.isArray(o[t])?o[t]:null!==(n=o[t])&&void 0!==n&&n.sides?o[t].sides:void 0}function Dr(e,t){const n=Ar(e,t);return!(n&&n.some((e=>Pr.includes(e)))&&n.some((e=>Mr.includes(e))))||(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),!1)}function Or(e){const t=(0,r.getBlockSupport)(e,Nr);return!!(!0===t||null!=t&&t.blockGap)}function zr(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:null==e?void 0:e.top,left:t?e:null==e?void 0:e.left}}function Fr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";const n=zr(e);if(!n)return null;const o=Do(null==n?void 0:n.top)||t,r=Do(null==n?void 0:n.left)||t;return o===r?o:`${o} ${r}`}function Vr(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!qo("spacing.blockGap");return!Or(e)||t}function Hr(e){var t;const{clientId:n,attributes:{style:o},name:r,setAttributes:l}=e,i=qo("spacing.spacingSizes"),s=(0,m.__experimentalUseCustomUnits)({availableUnits:qo("spacing.units")||["%","px","em","rem","vw"]}),c=Ar(r,"blockGap"),u=Mo(n);if(Vr(e))return null;const d=c&&c.some((e=>Mr.includes(e))),p=e=>{var t;let n=e;e&&d?n={...zr(e)}:null!=e&&e.hasOwnProperty("top")&&(n=e.top);const r={...o,spacing:{...null==o?void 0:o.spacing,blockGap:n}};l({style:ar(r)});const i=(null===(t=window)||void 0===t?void 0:t.navigator.userAgent)&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome ")&&!window.navigator.userAgent.includes("Chromium ");var a;u.current&&i&&(null===(a=u.current.parentNode)||void 0===a||a.replaceChild(u.current,u.current))},f=zr(null==o||null===(t=o.spacing)||void 0===t?void 0:t.blockGap),h=d?{...f,right:null==f?void 0:f.left,bottom:null==f?void 0:f.top}:{top:null==f?void 0:f.top};return a.Platform.select({web:(0,a.createElement)(a.Fragment,null,(!i||0===(null==i?void 0:i.length))&&(d?(0,a.createElement)(m.__experimentalBoxControl,{label:(0,g.__)("Block spacing"),min:0,onChange:p,units:s,sides:c,values:h,allowReset:!1,splitOnAxis:d}):(0,a.createElement)(m.__experimentalUnitControl,{label:(0,g.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:p,units:s,value:h})),(null==i?void 0:i.length)>0&&(0,a.createElement)(or,{values:h,onChange:p,label:(0,g.__)("Block spacing"),sides:d?c:["top"],units:s,allowReset:!1,splitOnAxis:d})),native:null})}const Gr=(0,a.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(m.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Ur=(0,a.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(m.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),Wr={top:{icon:(0,a.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(m.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:(0,g._x)("Align top","Block vertical alignment setting")},center:{icon:Ur,title:(0,g._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Gr,title:(0,g._x)("Align bottom","Block vertical alignment setting")}},$r=["top","center","bottom"],jr={isAlternate:!0};var Kr=function(e){let{value:t,onChange:n,controls:o=$r,isCollapsed:r=!0,isToolbar:l}=e;const s=Wr[t],c=Wr.top,u=l?m.ToolbarGroup:m.ToolbarDropdownMenu,d=l?{isCollapsed:r}:{popoverProps:{POPOVER_PROPS:jr}};return(0,a.createElement)(u,i({icon:s?s.icon:c.icon,label:(0,g._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((e=>{return{...Wr[e],isActive:t===e,role:r?"menuitemradio":void 0,onClick:(o=e,()=>n(t===o?void 0:o))};var o}))},d))};const qr=e=>(0,a.createElement)(Kr,i({},e,{isToolbar:!1})),Yr=e=>(0,a.createElement)(Kr,i({},e,{isToolbar:!0})),Qr={left:ko,center:yo,right:Eo,"space-between":Co};var Zr=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:o,value:r,popoverProps:l,isToolbar:s}=e;const c=e=>{o(e===r?void 0:e)},u=r?Qr[r]:Qr.left,d=[{name:"left",icon:ko,title:(0,g.__)("Justify items left"),isActive:"left"===r,onClick:()=>c("left")},{name:"center",icon:yo,title:(0,g.__)("Justify items center"),isActive:"center"===r,onClick:()=>c("center")},{name:"right",icon:Eo,title:(0,g.__)("Justify items right"),isActive:"right"===r,onClick:()=>c("right")},{name:"space-between",icon:Co,title:(0,g.__)("Space between items"),isActive:"space-between"===r,onClick:()=>c("space-between")}],p=s?m.ToolbarGroup:m.ToolbarDropdownMenu,f=s?{isCollapsed:n}:{};return(0,a.createElement)(p,i({icon:u,popoverProps:l,label:(0,g.__)("Change items justification"),controls:d.filter((e=>t.includes(e.name)))},f))};const Xr=e=>(0,a.createElement)(Zr,i({},e,{isToolbar:!1})),Jr=e=>(0,a.createElement)(Zr,i({},e,{isToolbar:!0})),el={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},tl={left:"flex-start",right:"flex-end",center:"center"},nl={top:"flex-start",center:"center",bottom:"flex-end"},ol=["wrap","nowrap"];var rl={name:"flex",label:(0,g.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:o={}}=e;const{allowOrientation:r=!0}=o;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.Flex,null,(0,a.createElement)(m.FlexItem,null,(0,a.createElement)(il,{layout:t,onChange:n})),(0,a.createElement)(m.FlexItem,null,r&&(0,a.createElement)(sl,{layout:t,onChange:n}))),(0,a.createElement)(al,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:o}=e;if(null!=o&&o.allowSwitching)return null;const{allowVerticalAlignment:r=!0}=o;return(0,a.createElement)(_o,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(il,{layout:t,onChange:n,isToolbar:!0}),r&&"vertical"!==(null==t?void 0:t.orientation)&&(0,a.createElement)(ll,{layout:t,onChange:n,isToolbar:!0}))},getLayoutStyle:function(e){var t,n;let{selector:o,layout:r,style:l,blockName:i,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{orientation:c="horizontal"}=r,u=null!=l&&null!==(t=l.spacing)&&void 0!==t&&t.blockGap&&!ur(i,"spacing","blockGap")?Fr(null==l||null===(n=l.spacing)||void 0===n?void 0:n.blockGap,"0.5em"):void 0,d=el[r.justifyContent],p=ol.includes(r.flexWrap)?r.flexWrap:"wrap",m=nl[r.verticalAlignment],f=tl[r.justifyContent]||tl.left;let g="";const h=[];return p&&"wrap"!==p&&h.push(`flex-wrap: ${p}`),"horizontal"===c?(m&&h.push(`align-items: ${m}`),d&&h.push(`justify-content: ${d}`)):(h.push("flex-direction: column"),h.push(`align-items: ${f}`)),h.length&&(g=`${Bo(o)} {\n\t\t\t\t${h.join("; ")};\n\t\t\t}`),a&&u&&(g+=Io(o,s,"flex",u)),g},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function ll(e){let{layout:t,onChange:n,isToolbar:o=!1}=e;const{verticalAlignment:r=nl.center}=t,l=e=>{n({...t,verticalAlignment:e})};if(o)return(0,a.createElement)(qr,{onChange:l,value:r});const i=[{value:"flex-start",label:(0,g.__)("Align items top")},{value:"center",label:(0,g.__)("Align items center")},{value:"flex-end",label:(0,g.__)("Align items bottom")}];return(0,a.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,a.createElement)("legend",null,(0,g.__)("Vertical alignment")),(0,a.createElement)("div",null,i.map(((e,t,n)=>(0,a.createElement)(m.Button,{key:e,label:n,icon:t,isPressed:r===e,onClick:()=>l(e)})))))}function il(e){let{layout:t,onChange:n,isToolbar:o=!1}=e;const{justifyContent:r="left",orientation:l="horizontal"}=t,i=e=>{n({...t,justifyContent:e})},s=["left","center","right"];if("horizontal"===l&&s.push("space-between"),o)return(0,a.createElement)(Xr,{allowedControls:s,value:r,onChange:i,popoverProps:{position:"bottom right",isAlternate:!0}});const c=[{value:"left",icon:ko,label:(0,g.__)("Justify items left")},{value:"center",icon:yo,label:(0,g.__)("Justify items center")},{value:"right",icon:Eo,label:(0,g.__)("Justify items right")}];return"horizontal"===l&&c.push({value:"space-between",icon:Co,label:(0,g.__)("Space between items")}),(0,a.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-justification-controls"},(0,a.createElement)("legend",null,(0,g.__)("Justification")),(0,a.createElement)("div",null,c.map((e=>{let{value:t,icon:n,label:o}=e;return(0,a.createElement)(m.Button,{key:t,label:o,icon:n,isPressed:r===t,onClick:()=>i(t)})}))))}function al(e){let{layout:t,onChange:n}=e;const{flexWrap:o="wrap"}=t;return(0,a.createElement)(m.ToggleControl,{label:(0,g.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===o})}function sl(e){let{layout:t,onChange:n}=e;const{orientation:o="horizontal"}=t;return(0,a.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-orientation-controls"},(0,a.createElement)("legend",null,(0,g.__)("Orientation")),(0,a.createElement)(m.Button,{label:(0,g.__)("Horizontal"),icon:So,isPressed:"horizontal"===o,onClick:()=>n({...t,orientation:"horizontal"})}),(0,a.createElement)(m.Button,{label:(0,g.__)("Vertical"),icon:wo,isPressed:"vertical"===o,onClick:()=>n({...t,orientation:"vertical"})}))}var cl={name:"default",label:(0,g.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function(e){var t;let{selector:n,style:o,blockName:r,hasBlockGapSupport:l,layoutDefinitions:i}=e;const a=Fr(null==o||null===(t=o.spacing)||void 0===t?void 0:t.blockGap);let s="";ur(r,"spacing","blockGap")||(null!=a&&a.top?s=Fr(null==a?void 0:a.top):"string"==typeof a&&(s=Fr(a)));let c="";return l&&s&&(c+=Io(n,i,"default",s)),c},getOrientation(){return"vertical"},getAlignments(e){const t=xo(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,r=[{name:"left"},{name:"center"},{name:"right"}];return n&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:t.wide}),r.unshift({name:"none",info:t.none}),r}};var ul=function(e){let{icon:t,size:n=24,...o}=e;return(0,a.cloneElement)(t,{width:n,height:n,...o})};var dl=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"}));var pl=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),ml=window.wp.styleEngine,fl={name:"constrained",label:(0,g.__)("Constrained"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:o,contentSize:r,justifyContent:l="center"}=t,i=[{value:"left",icon:ko,label:(0,g.__)("Justify items left")},{value:"center",icon:yo,label:(0,g.__)("Justify items center")},{value:"right",icon:Eo,label:(0,g.__)("Justify items right")}],s=(0,m.__experimentalUseCustomUnits)({availableUnits:qo("spacing.units")||["%","px","em","rem","vw"]});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,a.createElement)(m.__experimentalUnitControl,{label:(0,g.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:s}),(0,a.createElement)(ul,{icon:dl})),(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,a.createElement)(m.__experimentalUnitControl,{label:(0,g.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:s}),(0,a.createElement)(ul,{icon:pl}))),(0,a.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,g.__)("Customize the width for all elements that are assigned to the center or wide columns.")),(0,a.createElement)(m.__experimentalToggleGroupControl,{__experimentalIsBorderless:!0,label:(0,g.__)("Justification"),value:l,onChange:e=>{n({...t,justifyContent:e})}},i.map((e=>{let{value:t,icon:n,label:o}=e;return(0,a.createElement)(m.__experimentalToggleGroupControlOptionIcon,{key:t,value:t,icon:n,label:o})}))))},toolBarControls:function(){return null},getLayoutStyle:function(e){var t,n;let{selector:o,layout:r={},style:l,blockName:i,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{contentSize:c,wideSize:u,justifyContent:d}=r,p=Fr(null==l||null===(t=l.spacing)||void 0===t?void 0:t.blockGap);let m="";ur(i,"spacing","blockGap")||(null!=p&&p.top?m=Fr(null==p?void 0:p.top):"string"==typeof p&&(m=Fr(p)));const f="left"===d?"0 !important":"auto !important",g="right"===d?"0 !important":"auto !important";let h=c||u?`\n\t\t\t\t\t${Bo(o,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=c?c:u};\n\t\t\t\t\t\tmargin-left: ${f};\n\t\t\t\t\t\tmargin-right: ${g};\n\t\t\t\t\t}\n\t\t\t\t\t${Bo(o,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=u?u:c};\n\t\t\t\t\t}\n\t\t\t\t\t${Bo(o,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if("left"===d?h+=`${Bo(o,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${f}; }`:"right"===d&&(h+=`${Bo(o,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${g}; }`),null!=l&&null!==(n=l.spacing)&&void 0!==n&&n.padding){(0,ml.getCSSRules)(l).forEach((e=>{"paddingRight"===e.key?h+=`\n\t\t\t\t\t${Bo(o,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`:"paddingLeft"===e.key&&(h+=`\n\t\t\t\t\t${Bo(o,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`)}))}return a&&m&&(h+=Io(o,s,"constrained",m)),h},getOrientation(){return"vertical"},getAlignments(e){const t=xo(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,r=[{name:"left"},{name:"center"},{name:"right"}];return n&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:t.wide}),r.unshift({name:"none",info:t.none}),r}};const gl=[cl,rl,fl];function hl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return gl.find((t=>t.name===e))}const vl={type:"default"},bl=(0,a.createContext)(vl),_l=bl.Provider;function kl(){return(0,a.useContext)(bl)}function yl(e){let{layout:t={},css:n,...o}=e;const r=hl(t.type),l=null!==qo("spacing.blockGap");if(r){var i;if(n)return(0,a.createElement)("style",null,n);const e=null===(i=r.getLayoutStyle)||void 0===i?void 0:i.call(r,{hasBlockGapSupport:l,layout:t,...o});if(e)return(0,a.createElement)("style",null,e)}return null}const El=["none","left","center","right","wide","full"],Cl=["wide","full"];function Sl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:El;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n}=(0,p.useSelect)((e=>{const{getSettings:t}=e(so),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout}}),[]),o=kl(),r=hl(null==o?void 0:o.type),l=r.getAlignments(o);if(n){const t=l.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?[]:t}if("default"!==r.name&&"constrained"!==r.name)return[];const{alignments:i=El}=o,a=e.filter((e=>(o.alignments||t||!Cl.includes(e))&&i.includes(e))).map((e=>({name:e})));return 1===a.length&&"none"===a[0].name?[]:a}var wl=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"}));var Bl=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"}));var Il=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"}));var xl=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));const Tl={none:{icon:wl,title:(0,g._x)("None","Alignment option")},left:{icon:Bl,title:(0,g.__)("Align left")},center:{icon:dl,title:(0,g.__)("Align center")},right:{icon:Il,title:(0,g.__)("Align right")},wide:{icon:pl,title:(0,g.__)("Wide width")},full:{icon:xl,title:(0,g.__)("Full width")}},Nl={isAlternate:!0};var Pl=function(e){let{value:t,onChange:n,controls:o,isToolbar:r,isCollapsed:l=!0}=e;const s=Sl(o);if(!!!s.length)return null;function u(e){n([t,"none"].includes(e)?void 0:e)}const d=Tl[t],p=Tl.none,f=r?m.ToolbarGroup:m.ToolbarDropdownMenu,h={icon:d?d.icon:p.icon,label:(0,g.__)("Align")},v=r?{isCollapsed:l,controls:s.map((e=>{let{name:n}=e;return{...Tl[n],isActive:t===n||!t&&"none"===n,role:l?"menuitemradio":void 0,onClick:()=>u(n)}}))}:{toggleProps:{describedBy:(0,g.__)("Change alignment")},popoverProps:Nl,children:e=>{let{onClose:n}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},s.map((e=>{let{name:o,info:r}=e;const{icon:l,title:i}=Tl[o],s=o===t||!t&&"none"===o;return(0,a.createElement)(m.MenuItem,{key:o,icon:l,iconPosition:"left",className:c()("components-dropdown-menu__menu-item",{"is-active":s}),isSelected:s,onClick:()=>{u(o),n()},role:"menuitemradio",info:r},i)}))))}};return(0,a.createElement)(f,i({},h,v))};const Ml=e=>(0,a.createElement)(Pl,i({},e,{isToolbar:!1})),Ll=e=>(0,a.createElement)(Pl,i({},e,{isToolbar:!0})),Rl=["left","center","right","wide","full"],Al=["wide","full"];function Dl(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?Rl.filter((t=>e.includes(t))):!0===e?[...Rl]:[],!o||!0===e&&!n?(0,u.without)(t,...Al):t}const Ol=(0,d.createHigherOrderComponent)((e=>t=>{const n=(0,a.createElement)(e,t),{name:o}=t,l=Sl(Dl((0,r.getBlockSupport)(o,"align"),(0,r.hasBlockSupport)(o,"alignWide",!0))).map((e=>{let{name:t}=e;return t})),i=(0,p.useSelect)((e=>e(so).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);if(!l.length||i)return n;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_o,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(Ml,{value:t.attributes.align,onChange:e=>{if(!e){var n,o;const l=(0,r.getBlockType)(t.name);(null==l||null===(n=l.attributes)||void 0===n||null===(o=n.align)||void 0===o?void 0:o.default)&&(e="")}t.setAttributes({align:e})},controls:l})),n)}),"withToolbarControls"),zl=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,{align:l}=o,s=Sl(Dl((0,r.getBlockSupport)(n,"align"),(0,r.hasBlockSupport)(n,"alignWide",!0)));if(void 0===l)return(0,a.createElement)(e,t);let c=t.wrapperProps;return s.some((e=>e.name===l))&&(c={...c,"data-align":l}),(0,a.createElement)(e,i({},t,{wrapperProps:c}))}));(0,l.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.align)&&void 0!==t?t:{})||(0,r.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...Rl,""]}}),e})),(0,l.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",zl),(0,l.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Ol),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:o}=n;return Dl((0,r.getBlockSupport)(t,"align"),(0,r.hasBlockSupport)(t,"alignWide",!0)).includes(o)&&(e.className=c()(`align${o}`,e.className)),e})),(0,l.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const Fl=/[\s#]/g,Vl={type:"string",source:"attribute",attribute:"id",selector:"*"};const Hl=(0,d.createHigherOrderComponent)((e=>t=>{if((0,r.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===a.Platform.OS,o=(0,a.createElement)(m.TextControl,{className:"html-anchor-control",label:(0,g.__)("HTML anchor"),help:(0,a.createElement)(a.Fragment,null,(0,g.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),n&&(0,a.createElement)(m.ExternalLink,{href:(0,g.__)("https://wordpress.org/support/article/page-jumps/")},(0,g.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,g.__)("Add an anchor"),onChange:e=>{e=e.replace(Fl,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),n&&(0,a.createElement)(hr,{__experimentalGroup:"advanced"},o),!n&&"core/heading"===t.name&&(0,a.createElement)(hr,null,(0,a.createElement)(m.PanelBody,{title:(0,g.__)("Heading settings")},o)))}return(0,a.createElement)(e,t)}),"withInspectorControl");(0,l.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.anchor)&&void 0!==t?t:{})||(0,r.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Vl}),e})),(0,l.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Hl),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,r.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const Gl={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};(0,l.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.ariaLabel)&&void 0!==n&&n.type||(0,r.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:Gl}),e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/ariaLabel/save-props",(function(e,t,n){return(0,r.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e}));const Ul=(0,d.createHigherOrderComponent)((e=>t=>(0,r.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),(0,a.createElement)(hr,{__experimentalGroup:"advanced"},(0,a.createElement)(m.TextControl,{autoComplete:"off",label:(0,g.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,g.__)("Separate multiple classes with spaces.")}))):(0,a.createElement)(e,t)),"withInspectorControl");(0,l.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,r.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,l.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Ul),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,r.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=c()(e.className,n.className)),e})),(0,l.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){if(!(0,r.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===o.length&&e.innerBlocks.length===t.length)return e;if(1===o.length&&t.length>1||o.length>1&&1===t.length)return e;if(t[n]){var l;const o=null===(l=t[n])||void 0===l?void 0:l.attributes.className;if(o)return{...e,attributes:{...e.attributes,className:o}}}return e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,r.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,r.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,r.getBlockDefaultClassName)(t.name)),e}));var Wl=window.wp.dom;const $l=(0,a.createContext)({});function jl(e){let{value:t,children:n}=e;const o=(0,a.useContext)($l),r=(0,a.useMemo)((()=>({...o,...t})),[o,t]);return(0,a.createElement)($l.Provider,{value:r,children:n})}var Kl=$l;const ql={};var Yl=(0,m.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,o=(0,r.getBlockType)(n),l=(0,a.useContext)(Kl),s=(0,a.useMemo)((()=>o&&o.usesContext?(0,u.pick)(l,o.usesContext):ql),[o,l]);if(!o)return null;const d=o.edit||o.save;if(o.apiVersion>1)return(0,a.createElement)(d,i({},e,{context:s}));const p=(0,r.hasBlockSupport)(o,"className",!0)?(0,r.getBlockDefaultClassName)(n):null,m=c()(p,t.className,e.className);return(0,a.createElement)(d,i({},e,{context:s,className:m}))}));function Ql(e){const{name:t,isSelected:n,clientId:o}=e,r={name:t,isSelected:n,clientId:o};return(0,a.createElement)(po,{value:(0,a.useMemo)((()=>r),Object.values(r))},(0,a.createElement)(Yl,e))}var Zl=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));var Xl=function(e){let{className:t,actions:n,children:o,secondaryActions:r}=e;return(0,a.createElement)("div",{style:{display:"contents",all:"initial"}},(0,a.createElement)("div",{className:c()(t,"block-editor-warning")},(0,a.createElement)("div",{className:"block-editor-warning__contents"},(0,a.createElement)("p",{className:"block-editor-warning__message"},o),(a.Children.count(n)>0||r)&&(0,a.createElement)("div",{className:"block-editor-warning__actions"},a.Children.count(n)>0&&a.Children.map(n,((e,t)=>(0,a.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),r&&(0,a.createElement)(m.DropdownMenu,{className:"block-editor-warning__secondary",icon:Zl,label:(0,g.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,a.createElement)(m.MenuGroup,null,r.map(((e,t)=>(0,a.createElement)(m.MenuItem,{onClick:e.onClick,key:t},e.title))))))))))},Jl=n(1973);function ei(e){let{title:t,rawContent:n,renderedContent:o,action:r,actionText:l,className:i}=e;return(0,a.createElement)("div",{className:i},(0,a.createElement)("div",{className:"block-editor-block-compare__content"},(0,a.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,a.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,a.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,a.createElement)(a.RawHTML,null,(0,Wl.safeHTML)(o)))),(0,a.createElement)("div",{className:"block-editor-block-compare__action"},(0,a.createElement)(m.Button,{variant:"secondary",tabIndex:"0",onClick:r},l)))}var ti=function(e){let{block:t,onKeep:n,onConvert:o,convertor:l,convertButtonText:i}=e;const s=(d=l(t),(0,u.castArray)(d).map((e=>(0,r.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var d;const p=(m=t.originalContent,f=s,(0,Jl.Kx)(m,f).map(((e,t)=>{const n=c()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,a.createElement)("span",{key:t,className:n},e.value)})));var m,f;return(0,a.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,a.createElement)(ei,{title:(0,g.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,g.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,a.createElement)(ei,{title:(0,g.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:i,rawContent:p,renderedContent:s}))};const ni=e=>(0,r.rawHandler)({HTML:e.originalContent});var oi=(0,d.compose)([(0,p.withSelect)(((e,t)=>{let{clientId:n}=t;return{block:e(so).getBlock(n)}})),(0,p.withDispatch)(((e,t)=>{let{block:n}=t;const{replaceBlock:o}=e(so);return{convertToClassic(){o(n.clientId,(e=>(0,r.createBlock)("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){o(n.clientId,(e=>(0,r.createBlock)("core/html",{content:e.originalContent}))(n))},convertToBlocks(){o(n.clientId,ni(n))},attemptBlockRecovery(){o(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:o}=e;return(0,r.createBlock)(t,n,o)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:o,attemptBlockRecovery:l,block:i}=e;const s=!!(0,r.getBlockType)("core/html"),[c,u]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>u(!0)),[]),p=(0,a.useCallback)((()=>u(!1)),[]),f=(0,a.useMemo)((()=>[{title:(0,g._x)("Resolve","imperative verb"),onClick:d},s&&{title:(0,g.__)("Convert to HTML"),onClick:t},{title:(0,g.__)("Convert to Classic Block"),onClick:o}].filter(Boolean)),[d,t,o]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Xl,{actions:[(0,a.createElement)(m.Button,{key:"recover",onClick:l,variant:"primary"},(0,g.__)("Attempt Block Recovery"))],secondaryActions:f},(0,g.__)("This block contains unexpected or invalid content.")),c&&(0,a.createElement)(m.Modal,{title:(0,g.__)("Resolve Block"),onRequestClose:p,className:"block-editor-block-compare"},(0,a.createElement)(ti,{block:i,onKeep:t,onConvert:n,convertor:ni,convertButtonText:(0,g.__)("Convert to Blocks")})))}));const ri=(0,a.createElement)(Xl,{className:"block-editor-block-list__block-crash-warning"},(0,g.__)("This block has encountered an error and cannot be previewed."));var li=()=>ri;class ii extends a.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var ai=ii,si=n(773);var ci=function(e){let{clientId:t}=e;const[n,o]=(0,a.useState)(""),l=(0,p.useSelect)((e=>e(so).getBlock(t)),[t]),{updateBlock:i}=(0,p.useDispatch)(so);return(0,a.useEffect)((()=>{o((0,r.getBlockContent)(l))}),[l]),(0,a.createElement)(si.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=(0,r.getBlockType)(l.name);if(!e)return;const a=(0,r.getBlockAttributes)(e,n,l.attributes),s=n||(0,r.getSaveContent)(e,a),[c]=n?(0,r.validateBlock)({...l,attributes:a,originalContent:s}):[!0];i(t,{attributes:a,originalContent:s,isValid:c}),n||o({content:s})},onChange:e=>o(e.target.value)})};let ui=Bi();const di=e=>Ei(e,ui);let pi=Bi();di.write=e=>Ei(e,pi);let mi=Bi();di.onStart=e=>Ei(e,mi);let fi=Bi();di.onFrame=e=>Ei(e,fi);let gi=Bi();di.onFinish=e=>Ei(e,gi);let hi=[];di.setTimeout=(e,t)=>{let n=di.now()+t,o=()=>{let e=hi.findIndex((e=>e.cancel==o));~e&&hi.splice(e,1),ki-=~e?1:0},r={time:n,handler:e,cancel:o};return hi.splice(vi(n),0,r),ki+=1,Ci(),r};let vi=e=>~(~hi.findIndex((t=>t.time>e))||~hi.length);di.cancel=e=>{mi.delete(e),fi.delete(e),gi.delete(e),ui.delete(e),pi.delete(e)},di.sync=e=>{yi=!0,di.batchedUpdates(e),yi=!1},di.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,di.onStart(n)}return o.handler=e,o.cancel=()=>{mi.delete(n),t=null},o};let bi="undefined"!=typeof window?window.requestAnimationFrame:()=>{};di.use=e=>bi=e,di.now="undefined"!=typeof performance?()=>performance.now():Date.now,di.batchedUpdates=e=>e(),di.catch=console.error,di.frameLoop="always",di.advance=()=>{"demand"!==di.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):wi()};let _i=-1,ki=0,yi=!1;function Ei(e,t){yi?(t.delete(e),e(0)):(t.add(e),Ci())}function Ci(){_i<0&&(_i=0,"demand"!==di.frameLoop&&bi(Si))}function Si(){~_i&&(bi(Si),di.batchedUpdates(wi))}function wi(){let e=_i;_i=di.now();let t=vi(_i);t&&(Ii(hi.splice(0,t),(e=>e.handler())),ki-=t),ki?(mi.flush(),ui.flush(e?Math.min(64,_i-e):16.667),fi.flush(),pi.flush(),gi.flush()):_i=-1}function Bi(){let e=new Set,t=e;return{add(n){ki+=t!=e||e.has(n)?0:1,e.add(n)},delete(n){return ki-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,ki-=t.size,Ii(t,(t=>t(n)&&e.add(t))),ki+=e.size,t=e)}}}function Ii(e,t){e.forEach((e=>{try{t(e)}catch(e){di.catch(e)}}))}var xi=n(9196),Ti=n.n(xi);function Ni(){}const Pi={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function Mi(e,t){if(Pi.arr(e)){if(!Pi.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function Ri(e,t,n){if(Pi.arr(e))for(let o=0;oPi.und(e)?[]:Pi.arr(e)?e:[e];function Di(e,t){if(e.size){const n=Array.from(e);e.clear(),Li(n,t)}}const Oi=(e,...t)=>Di(e,(e=>e(...t))),zi=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let Fi,Vi,Hi=null,Gi=!1,Ui=Ni;const Wi=e=>{e.to&&(Vi=e.to),e.now&&(di.now=e.now),void 0!==e.colors&&(Hi=e.colors),null!=e.skipAnimation&&(Gi=e.skipAnimation),e.createStringInterpolator&&(Fi=e.createStringInterpolator),e.requestAnimationFrame&&di.use(e.requestAnimationFrame),e.batchedUpdates&&(di.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Ui=e.willAdvance),e.frameLoop&&(di.frameLoop=e.frameLoop)};var $i=Object.freeze({__proto__:null,get createStringInterpolator(){return Fi},get to(){return Vi},get colors(){return Hi},get skipAnimation(){return Gi},get willAdvance(){return Ui},assign:Wi});const ji=new Set;let Ki=[],qi=[],Yi=0;const Qi={get idle(){return!ji.size&&!Ki.length},start(e){Yi>e.priority?(ji.add(e),di.onStart(Zi)):(Xi(e),di(ea))},advance:ea,sort(e){if(Yi)di.onFrame((()=>Qi.sort(e)));else{const t=Ki.indexOf(e);~t&&(Ki.splice(t,1),Ji(e))}},clear(){Ki=[],ji.clear()}};function Zi(){ji.forEach(Xi),ji.clear(),di(ea)}function Xi(e){Ki.includes(e)||Ji(e)}function Ji(e){Ki.splice(function(e,t){const n=e.findIndex(t);return n<0?e.length:n}(Ki,(t=>t.priority>e.priority)),0,e)}function ea(e){const t=qi;for(let n=0;n0}const ta="[-+]?\\d*\\.?\\d+",na=ta+"%";function oa(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const ra=new RegExp("rgb"+oa(ta,ta,ta)),la=new RegExp("rgba"+oa(ta,ta,ta,ta)),ia=new RegExp("hsl"+oa(ta,na,na)),aa=new RegExp("hsla"+oa(ta,na,na,ta)),sa=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ca=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ua=/^#([0-9a-fA-F]{6})$/,da=/^#([0-9a-fA-F]{8})$/;function pa(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 ma(e,t,n){const o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,l=pa(r,o,e+1/3),i=pa(r,o,e),a=pa(r,o,e-1/3);return Math.round(255*l)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function fa(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ga(e){return(parseFloat(e)%360+360)%360/360}function ha(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function va(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function ba(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ua.exec(e))?parseInt(t[1]+"ff",16)>>>0:Hi&&void 0!==Hi[e]?Hi[e]:(t=ra.exec(e))?(fa(t[1])<<24|fa(t[2])<<16|fa(t[3])<<8|255)>>>0:(t=la.exec(e))?(fa(t[1])<<24|fa(t[2])<<16|fa(t[3])<<8|ha(t[4]))>>>0:(t=sa.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=da.exec(e))?parseInt(t[1],16)>>>0:(t=ca.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=ia.exec(e))?(255|ma(ga(t[1]),va(t[2]),va(t[3])))>>>0:(t=aa.exec(e))?(ma(ga(t[1]),va(t[2]),va(t[3]))|ha(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const _a=(e,t,n)=>{if(Pi.fun(e))return e;if(Pi.arr(e))return _a({range:e,output:t,extrapolate:n});if(Pi.str(e.output[0]))return Fi(e);const o=e,r=o.output,l=o.range||[0,1],i=o.extrapolateLeft||o.extrapolate||"extend",a=o.extrapolateRight||o.extrapolate||"extend",s=o.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n=e);++n);return n-1}(e,l);return function(e,t,n,o,r,l,i,a,s){let c=s?s(e):e;if(cn){if("identity"===a)return c;"clamp"===a&&(c=n)}if(o===r)return o;if(t===n)return e<=t?o:r;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=l(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o;return c}(e,l[t],l[t+1],r[t],r[t+1],s,i,a,o.map)}};function ka(){return ka=Object.assign?Object.assign.bind():function(e){for(var t=1;tBoolean(e&&e[ya]),Sa=e=>e&&e[ya]?e[ya]():e,wa=e=>e[Ea]||null;function Ba(e,t){let n=e[Ea];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}class Ia{constructor(e){if(this[ya]=void 0,this[Ea]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");xa(this,e)}}const xa=(e,t)=>Pa(e,ya,t);function Ta(e,t){if(e[ya]){let n=e[Ea];n||Pa(e,Ea,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Na(e,t){let n=e[Ea];if(n&&n.has(t)){const o=n.size-1;o?n.delete(t):e[Ea]=null,e.observerRemoved&&e.observerRemoved(o,t)}}const Pa=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ma=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,La=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Ra=new RegExp(`(${Ma.source})(%|[a-z]+)`,"i"),Aa=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Da=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Oa=e=>{const[t,n]=za(e);if(!t||zi())return e;const o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(n&&n.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}return n&&Da.test(n)?Oa(n):n||e},za=e=>{const t=Da.exec(e);if(!t)return[,];const[,n,o]=t;return[n,o]};let Fa;const Va=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,Ha=e=>{Fa||(Fa=Hi?new RegExp(`(${Object.keys(Hi).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Sa(e).replace(Da,Oa).replace(La,ba).replace(Fa,ba))),n=t.map((e=>e.match(Ma).map(Number))),o=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))),r=o.map((t=>_a(ka({},e,{output:t}))));return e=>{var n;const o=!Ra.test(t[0])&&(null==(n=t.find((e=>Ra.test(e))))?void 0:n.replace(Ma,""));let l=0;return t[0].replace(Ma,(()=>`${r[l++](e)}${o||""}`)).replace(Aa,Va)}},Ga="react-spring: ",Ua=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Ga}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Wa=Ua(console.warn);const $a=Ua(console.warn);function ja(e){return Pi.str(e)&&("#"==e[0]||/\d/.test(e)||!zi()&&Da.test(e)||e in(Hi||{}))}const Ka=zi()?xi.useEffect:xi.useLayoutEffect;function qa(){const e=(0,xi.useState)()[1],t=(()=>{const e=(0,xi.useRef)(!1);return Ka((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}const Ya=e=>(0,xi.useEffect)(e,Qa),Qa=[];function Za(e){const t=(0,xi.useRef)();return(0,xi.useEffect)((()=>{t.current=e})),t.current}const Xa=Symbol.for("Animated:node"),Ja=e=>e&&e[Xa],es=(e,t)=>{return n=e,o=Xa,r=t,Object.defineProperty(n,o,{value:r,writable:!0,configurable:!0});var n,o,r},ts=e=>e&&e[Xa]&&e[Xa].getPayload();class ns{constructor(){this.payload=void 0,es(this,this)}getPayload(){return this.payload||[]}}class os extends ns{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,Pi.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new os(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Pi.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Pi.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class rs extends os{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=_a({output:[e,e]})}static create(e){return new rs(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(Pi.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=_a({output:[this.getValue(),e]})),this._value=0,super.reset()}}const ls={dependencies:null};class is extends ns{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Ri(this.source,((n,o)=>{var r;(r=n)&&r[Xa]===r?t[o]=n.getValue(e):Ca(n)?t[o]=Sa(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Li(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return Ri(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){ls.dependencies&&Ca(e)&&ls.dependencies.add(e);const t=ts(e);t&&Li(t,(e=>this.add(e)))}}class as extends is{constructor(e){super(e)}static create(e){return new as(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(ss)),!0)}}function ss(e){return(ja(e)?rs:os).create(e)}function cs(e){const t=Ja(e);return t?t.constructor:Pi.arr(e)?as:ja(e)?rs:os}function us(){return us=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const n=!Pi.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,xi.forwardRef)(((o,r)=>{const l=(0,xi.useRef)(null),i=n&&(0,xi.useCallback)((e=>{l.current=function(e,t){e&&(Pi.fun(e)?e(t):e.current=t);return t}(r,e)}),[r]),[a,s]=function(e,t){const n=new Set;ls.dependencies=n,e.style&&(e=us({},e,{style:t.createAnimatedStyle(e.style)}));return e=new is(e),ls.dependencies=null,[e,n]}(o,t),c=qa(),u=()=>{const e=l.current;if(n&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,a.getValue(!0)))&&c()},d=new ps(u,s),p=(0,xi.useRef)();Ka((()=>(p.current=d,Li(s,(e=>Ta(e,d))),()=>{p.current&&(Li(p.current.deps,(e=>Na(e,p.current))),di.cancel(p.current.update))}))),(0,xi.useEffect)(u,[]),Ya((()=>()=>{const e=p.current;Li(e.deps,(t=>Na(t,e)))}));const m=t.getComponentProps(a.getValue());return xi.createElement(e,us({},m,{ref:i}))}))};class ps{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&di.write(this.update)}}const ms=Symbol.for("AnimatedComponent"),fs=e=>Pi.str(e)?e:e&&Pi.str(e.displayName)?e.displayName:Pi.fun(e)&&e.name||null;function gs(){return gs=Object.assign?Object.assign.bind():function(e){for(var t=1;t!0===e||!!(t&&e&&(Pi.fun(e)?e(t):Ai(e).includes(t))),bs=(e,t)=>Pi.obj(e)?t&&e[t]:e,_s=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,ks=e=>e,ys=(e,t=ks)=>{let n=Es;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const o={};for(const r of n){const n=t(e[r],r);Pi.und(n)||(o[r]=n)}return o},Es=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Cs={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Ss(e){const t=function(e){const t={};let n=0;if(Ri(e,((e,o)=>{Cs[o]||(t[o]=e,n++)})),n)return t}(e);if(t){const n={to:t};return Ri(e,((e,o)=>o in t||(n[o]=e))),n}return gs({},e)}function ws(e){return e=Sa(e),Pi.arr(e)?e.map(ws):ja(e)?$i.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Bs(e){for(const t in e)return!0;return!1}function Is(e){return Pi.fun(e)||Pi.arr(e)&&Pi.obj(e[0])}function xs(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}function Ts(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}const Ns=1.70158,Ps=1.525*Ns,Ms=Ns+1,Ls=2*Math.PI/3,Rs=2*Math.PI/4.5,As=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},Ds={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Ms*e*e*e-Ns*e*e,easeOutBack:e=>1+Ms*Math.pow(e-1,3)+Ns*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-Ps)/2:(Math.pow(2*e-2,2)*((Ps+1)*(2*e-2)+Ps)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*Ls),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*Ls)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Rs)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Rs)/2+1,easeInBounce:e=>1-As(1-e),easeOutBounce:As,easeInOutBounce:e=>e<.5?(1-As(1-2*e))/2:(1+As(2*e-1))/2},Os=gs({},{tension:170,friction:26},{mass:1,damping:1,easing:Ds.linear,clamp:!1});class zs{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,Os)}}function Fs(e,t){if(Pi.und(t.decay)){const n=!Pi.und(t.tension)||!Pi.und(t.friction);!n&&Pi.und(t.frequency)&&Pi.und(t.damping)&&Pi.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}const Vs=[];class Hs{constructor(){this.changed=!1,this.values=Vs,this.toValues=null,this.fromValues=Vs,this.to=void 0,this.from=void 0,this.config=new zs,this.immediate=!1}}function Gs(e,{key:t,props:n,defaultProps:o,state:r,actions:l}){return new Promise(((i,a)=>{var s;let c,u,d=vs(null!=(s=n.cancel)?s:null==o?void 0:o.cancel,t);if(d)f();else{Pi.und(n.pause)||(r.paused=vs(n.pause,t));let e=null==o?void 0:o.pause;!0!==e&&(e=r.paused||vs(e,t)),c=hs(n.delay||0,t),e?(r.resumeQueue.add(m),l.pause()):(l.resume(),m())}function p(){r.resumeQueue.add(m),r.timeouts.delete(u),u.cancel(),c=u.time-di.now()}function m(){c>0&&!$i.skipAnimation?(r.delayed=!0,u=di.setTimeout(f,c),r.pauseQueue.add(p),r.timeouts.add(u)):f()}function f(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(p),r.timeouts.delete(u),e<=(r.cancelId||0)&&(d=!0);try{l.start(gs({},n,{callId:e,cancel:d}),i)}catch(e){a(e)}}}))}const Us=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?js(e.get()):t.every((e=>e.noop))?Ws(e.get()):$s(e.get(),t.every((e=>e.finished))),Ws=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),$s=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),js=e=>({value:e,cancelled:!0,finished:!1});function Ks(e,t,n,o){const{callId:r,parentId:l,onRest:i}=t,{asyncTo:a,promise:s}=n;return l||e!==a||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;const c=ys(t,((e,t)=>"onRest"===t?void 0:e));let u,d;const p=new Promise(((e,t)=>(u=e,d=t))),m=e=>{const t=r<=(n.cancelId||0)&&js(o)||r!==n.asyncId&&$s(o,!1);if(t)throw e.result=t,d(e),e},f=(e,t)=>{const l=new Ys,i=new Qs;return(async()=>{if($i.skipAnimation)throw qs(n),i.result=$s(o,!1),d(i),i;m(l);const a=Pi.obj(e)?gs({},e):gs({},t,{to:e});a.parentId=r,Ri(c,((e,t)=>{Pi.und(a[t])&&(a[t]=e)}));const s=await o.start(a);return m(l),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),s})()};let g;if($i.skipAnimation)return qs(n),$s(o,!1);try{let t;t=Pi.arr(e)?(async e=>{for(const t of e)await f(t)})(e):Promise.resolve(e(f,o.stop.bind(o))),await Promise.all([t.then(u),p]),g=$s(o.get(),!0,!1)}catch(e){if(e instanceof Ys)g=e.result;else{if(!(e instanceof Qs))throw e;g=e.result}}finally{r==n.asyncId&&(n.asyncId=l,n.asyncTo=l?a:void 0,n.promise=l?s:void 0)}return Pi.fun(i)&&di.batchedUpdates((()=>{i(g,o,o.item)})),g})():s}function qs(e,t){Di(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class Ys extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}}class Qs extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const Zs=e=>e instanceof Js;let Xs=1;class Js extends Ia{constructor(...e){super(...e),this.id=Xs++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Ja(this);return e&&e.getValue()}to(...e){return $i.to(this,e)}interpolate(...e){return Wa(`${Ga}The "interpolate" function is deprecated in v9 (use "to" instead)`),$i.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Ba(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Qi.sort(this),Ba(this,{type:"priority",parent:this,priority:e})}}const ec=Symbol.for("SpringPhase"),tc=e=>(1&e[ec])>0,nc=e=>(2&e[ec])>0,oc=e=>(4&e[ec])>0,rc=(e,t)=>t?e[ec]|=3:e[ec]&=-3,lc=(e,t)=>t?e[ec]|=4:e[ec]&=-5;class ic extends Js{constructor(e,t){if(super(),this.key=void 0,this.animation=new Hs,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Pi.und(e)||!Pi.und(t)){const n=Pi.obj(e)?gs({},e):gs({},t,{from:e});Pi.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(nc(this)||this._state.asyncTo)||oc(this)}get goal(){return Sa(this.animation.to)}get velocity(){const e=Ja(this);return e instanceof os?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return tc(this)}get isAnimating(){return nc(this)}get isPaused(){return oc(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const o=this.animation;let{config:r,toValues:l}=o;const i=ts(o.to);!i&&Ca(o.to)&&(l=Ai(Sa(o.to))),o.values.forEach(((a,s)=>{if(a.done)return;const c=a.constructor==rs?1:i?i[s].lastPosition:l[s];let u=o.immediate,d=c;if(!u){if(d=a.lastPosition,r.tension<=0)return void(a.done=!0);let t=a.elapsedTime+=e;const n=o.fromValues[s],l=null!=a.v0?a.v0:a.v0=Pi.arr(r.velocity)?r.velocity[s]:r.velocity;let i;const p=r.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(Pi.und(r.duration))if(r.decay){const e=!0===r.decay?.998:r.decay,o=Math.exp(-(1-e)*t);d=n+l/(1-e)*(1-o),u=Math.abs(a.lastPosition-d)<=p,i=l*o}else{i=null==a.lastVelocity?l:a.lastVelocity;const t=r.restVelocity||p/10,o=r.clamp?0:r.bounce,s=!Pi.und(o),m=n==c?a.v0>0:nt,f||(u=Math.abs(c-d)<=p,!u));++e){s&&(g=d==c||d>c==m,g&&(i=-i*o,d=c));i+=(1e-6*-r.tension*(d-c)+.001*-r.friction*i)/r.mass*h,d+=i*h}}else{let o=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,a.durationProgress>0&&(a.elapsedTime=r.duration*a.durationProgress,t=a.elapsedTime+=e)),o=(r.progress||0)+t/this._memoizedDuration,o=o>1?1:o<0?0:o,a.durationProgress=o),d=n+r.easing(o)*(c-n),i=(d-a.lastPosition)/e,u=1==o}a.lastVelocity=i,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}i&&!i[s].done&&(u=!1),u?a.done=!0:t=!1,a.setValue(d,r.round)&&(n=!0)}));const a=Ja(this),s=a.getValue();if(t){const e=Sa(o.to);s===e&&!n||r.decay?n&&r.decay&&this._onChange(s):(a.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(s)}set(e){return di.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(nc(this)){const{to:e,config:t}=this.animation;di.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Pi.und(e)?(n=this.queue||[],this.queue=[]):n=[Pi.obj(e)?e:gs({},t,{to:e})],Promise.all(n.map((e=>this._update(e)))).then((e=>Us(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),qs(this._state,e&&this._lastCallId),di.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:o}=e;n=Pi.obj(n)?n[t]:n,(null==n||Is(n))&&(n=void 0),o=Pi.obj(o)?o[t]:o,null==o&&(o=void 0);const r={to:n,from:o};return tc(this)||(e.reverse&&([n,o]=[o,n]),o=Sa(o),Pi.und(o)?Ja(this)||this._set(n):this._set(o)),r}_update(e,t){let n=gs({},e);const{key:o,defaultProps:r}=this;n.default&&Object.assign(r,ys(n,((e,t)=>/^on/.test(t)?bs(e,o):e))),mc(this,n,"onProps"),fc(this,"onProps",n,this);const l=this._prepareNode(n);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return Gs(++this._lastCallId,{key:o,props:n,defaultProps:r,state:i,actions:{pause:()=>{oc(this)||(lc(this,!0),Oi(i.pauseQueue),fc(this,"onPause",$s(this,ac(this,this.animation.to)),this))},resume:()=>{oc(this)&&(lc(this,!1),nc(this)&&this._resume(),Oi(i.resumeQueue),fc(this,"onResume",$s(this,ac(this,this.animation.to)),this))},start:this._merge.bind(this,l)}}).then((e=>{if(n.loop&&e.finished&&(!t||!e.noop)){const e=sc(n);if(e)return this._update(e,!0)}return e}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(js(this));const o=!Pi.und(e.to),r=!Pi.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(js(this));this._lastToId=t.callId}const{key:l,defaultProps:i,animation:a}=this,{to:s,from:c}=a;let{to:u=s,from:d=c}=e;!r||o||t.default&&!Pi.und(u)||(u=d),t.reverse&&([u,d]=[d,u]);const p=!Mi(d,c);p&&(a.from=d),d=Sa(d);const m=!Mi(u,s);m&&this._focus(u);const f=Is(t.to),{config:g}=a,{decay:h,velocity:v}=g;(o||r)&&(g.velocity=0),t.config&&!f&&function(e,t,n){n&&(Fs(n=gs({},n),t),t=gs({},n,t)),Fs(e,t),Object.assign(e,t);for(const t in Os)null==e[t]&&(e[t]=Os[t]);let{mass:o,frequency:r,damping:l}=e;Pi.und(r)||(r<.01&&(r=.01),l<0&&(l=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*l*o/r)}(g,hs(t.config,l),t.config!==i.config?hs(i.config,l):void 0);let b=Ja(this);if(!b||Pi.und(u))return n($s(this,!0));const _=Pi.und(t.reset)?r&&!t.default:!Pi.und(d)&&vs(t.reset,l),k=_?d:this.get(),y=ws(u),E=Pi.num(y)||Pi.arr(y)||ja(y),C=!f&&(!E||vs(i.immediate||t.immediate,l));if(m){const e=cs(u);if(e!==b.constructor){if(!C)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(y)}}const S=b.constructor;let w=Ca(u),B=!1;if(!w){const e=_||!tc(this)&&p;(m||e)&&(B=Mi(ws(k),y),w=!B),(Mi(a.immediate,C)||C)&&Mi(g.decay,h)&&Mi(g.velocity,v)||(w=!0)}if(B&&nc(this)&&(a.changed&&!_?w=!0:w||this._stop(s)),!f&&((w||Ca(s))&&(a.values=b.getPayload(),a.toValues=Ca(u)?null:S==rs?[1]:Ai(y)),a.immediate!=C&&(a.immediate=C,C||_||this._set(s)),w)){const{onRest:e}=a;Li(pc,(e=>mc(this,t,e)));const o=$s(this,ac(this,s));Oi(this._pendingCalls,o),this._pendingCalls.add(n),a.changed&&di.batchedUpdates((()=>{a.changed=!_,null==e||e(o,this),_?hs(i.onRest,o):null==a.onStart||a.onStart(o,this)}))}_&&this._set(k),f?n(Ks(t.to,t,this._state,this)):w?this._start():nc(this)&&!m?this._pendingCalls.add(n):n(Ws(k))}_focus(e){const t=this.animation;e!==t.to&&(wa(this)&&this._detach(),t.to=e,wa(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Ca(t)&&(Ta(t,this),Zs(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Ca(e)&&Na(e,this)}_set(e,t=!0){const n=Sa(e);if(!Pi.und(n)){const e=Ja(this);if(!e||!Mi(n,e.getValue())){const o=cs(n);e&&e.constructor==o?e.setValue(n):es(this,o.create(n)),e&&di.batchedUpdates((()=>{this._onChange(n,t)}))}}return Ja(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,fc(this,"onStart",$s(this,ac(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),hs(this.animation.onChange,e,this)),hs(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Ja(this).reset(Sa(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),nc(this)||(rc(this,!0),oc(this)||this._resume())}_resume(){$i.skipAnimation?this.finish():Qi.start(this)}_stop(e,t){if(nc(this)){rc(this,!1);const n=this.animation;Li(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Ba(this,{type:"idle",parent:this});const o=t?js(this.get()):$s(this.get(),ac(this,null!=e?e:n.to));Oi(this._pendingCalls,o),n.changed&&(n.changed=!1,fc(this,"onRest",o,this))}}}function ac(e,t){const n=ws(t);return Mi(ws(e.get()),n)}function sc(e,t=e.loop,n=e.to){let o=hs(t);if(o){const r=!0!==o&&Ss(o),l=(r||e).reverse,i=!r||r.reset;return cc(gs({},e,{loop:t,default:!1,pause:void 0,to:!l||Is(n)?n:void 0,from:i?e.from:void 0,reset:i},r))}}function cc(e){const{to:t,from:n}=e=Ss(e),o=new Set;return Pi.obj(t)&&dc(t,o),Pi.obj(n)&&dc(n,o),e.keys=o.size?Array.from(o):null,e}function uc(e){const t=cc(e);return Pi.und(t.default)&&(t.default=ys(t)),t}function dc(e,t){Ri(e,((e,n)=>null!=e&&t.add(n)))}const pc=["onStart","onRest","onChange","onPause","onResume"];function mc(e,t,n){e.animation[n]=t[n]!==_s(t,n)?bs(t[n],e.key):void 0}function fc(e,t,...n){var o,r,l,i;null==(o=(r=e.animation)[t])||o.call(r,...n),null==(l=(i=e.defaultProps)[t])||l.call(i,...n)}const gc=["onStart","onChange","onRest"];let hc=1;class vc{constructor(e,t){this.id=hc++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start(gs({default:!0},e))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];Pi.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(cc(e)),this}start(e){let{queue:t}=this;return e?t=Ai(e).map(cc):this.queue=[],this._flush?this._flush(this,t):(Sc(this,t),bc(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Li(Ai(t),(t=>n[t].stop(!!e)))}else qs(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Pi.und(e))this.start({pause:!0});else{const t=this.springs;Li(Ai(e),(e=>t[e].pause()))}return this}resume(e){if(Pi.und(e))this.start({pause:!1});else{const t=this.springs;Li(Ai(e),(e=>t[e].resume()))}return this}each(e){Ri(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,o=this._active.size>0,r=this._changed.size>0;(o&&!this._started||r&&!this._started)&&(this._started=!0,Di(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const l=!o&&this._started,i=r||l&&n.size?this.get():null;r&&t.size&&Di(t,(([e,t])=>{t.value=i,e(t,this,this._item)})),l&&(this._started=!1,Di(n,(([e,t])=>{t.value=i,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}di.onFrame(this._onFrame)}}function bc(e,t){return Promise.all(t.map((t=>_c(e,t)))).then((t=>Us(e,t)))}async function _c(e,t,n){const{keys:o,to:r,from:l,loop:i,onRest:a,onResolve:s}=t,c=Pi.obj(t.default)&&t.default;i&&(t.loop=!1),!1===r&&(t.to=null),!1===l&&(t.from=null);const u=Pi.arr(r)||Pi.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Li(gc,(n=>{const o=t[n];if(Pi.fun(o)){const r=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=r.get(o);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):r.set(o,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Oi(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),m=!0===t.cancel||!0===_s(t,"cancel");(u||m&&d.asyncId)&&p.push(Gs(++e._lastAsyncId,{props:t,state:d,actions:{pause:Ni,resume:Ni,start(t,n){m?(qs(d,e._lastAsyncId),n(js(e))):(t.onRest=a,n(Ks(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));const f=Us(e,await Promise.all(p));if(i&&f.finished&&(!n||!f.noop)){const n=sc(t,i,r);if(n)return Sc(e,[n]),_c(e,n,!0)}return s&&di.batchedUpdates((()=>s(f,e,e.item))),f}function kc(e,t){const n=gs({},e.springs);return t&&Li(Ai(t),(e=>{Pi.und(e.keys)&&(e=cc(e)),Pi.obj(e.to)||(e=gs({},e,{to:void 0})),Cc(n,e,(e=>Ec(e)))})),yc(e,n),n}function yc(e,t){Ri(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Ta(t,e))}))}function Ec(e,t){const n=new ic;return n.key=e,t&&Ta(n,t),n}function Cc(e,t,n){t.keys&&Li(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function Sc(e,t){Li(t,(t=>{Cc(e.springs,t,(t=>Ec(t,e)))}))}function wc(e,t){if(null==e)return{};var n,o,r={},l=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}const Bc=["children"],Ic=e=>{let{children:t}=e,n=wc(e,Bc);const o=(0,xi.useContext)(xc),r=n.pause||!!o.pause,l=n.immediate||!!o.immediate;n=function(e,t){const[n]=(0,xi.useState)((()=>({inputs:t,result:e()}))),o=(0,xi.useRef)(),r=o.current;let l=r;if(l){const n=Boolean(t&&l.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{o.current=l,r==n&&(n.inputs=n.result=void 0)}),[l]),l.result}((()=>({pause:r,immediate:l})),[r,l]);const{Provider:i}=xc;return xi.createElement(i,{value:n},t)},xc=(Tc=Ic,Nc={},Object.assign(Tc,xi.createContext(Nc)),Tc.Provider._context=Tc,Tc.Consumer._context=Tc,Tc);var Tc,Nc;Ic.Provider=xc.Provider,Ic.Consumer=xc.Consumer;const Pc=()=>{const e=[],t=function(t){$a(`${Ga}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const o=[];return Li(e,((e,r)=>{if(Pi.und(t))o.push(e.start());else{const l=n(t,e,r);l&&o.push(e.start(l))}})),o};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Li(e,(e=>e.pause(...arguments))),this},t.resume=function(){return Li(e,(e=>e.resume(...arguments))),this},t.set=function(t){Li(e,(e=>e.set(t)))},t.start=function(t){const n=[];return Li(e,((e,o)=>{if(Pi.und(t))n.push(e.start());else{const r=this._getProps(t,e,o);r&&n.push(e.start(r))}})),n},t.stop=function(){return Li(e,(e=>e.stop(...arguments))),this},t.update=function(t){return Li(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return Pi.fun(e)?e(n,t):e};return t._getProps=n,t};function Mc(e,t,n){const o=Pi.fun(t)&&t;o&&!n&&(n=[]);const r=(0,xi.useMemo)((()=>o||3==arguments.length?Pc():void 0),[]),l=(0,xi.useRef)(0),i=qa(),a=(0,xi.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=kc(e,t);return l.current>0&&!a.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?bc(e,t):new Promise((o=>{yc(e,n),a.queue.push((()=>{o(bc(e,t))})),i()}))}})),[]),s=(0,xi.useRef)([...a.ctrls]),c=[],u=Za(e)||0;function d(e,n){for(let r=e;r{Li(s.current.slice(e,u),(e=>{xs(e,r),e.stop(!0)})),s.current.length=e,d(u,e)}),[e]),(0,xi.useMemo)((()=>{d(0,Math.min(u,e))}),n);const p=s.current.map(((e,t)=>kc(e,c[t]))),m=(0,xi.useContext)(Ic),f=Za(m),g=m!==f&&Bs(m);Ka((()=>{l.current++,a.ctrls=s.current;const{queue:e}=a;e.length&&(a.queue=[],Li(e,(e=>e()))),Li(s.current,((e,t)=>{null==r||r.add(e),g&&e.start({default:m});const n=c[t];n&&(Ts(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),Ya((()=>()=>{Li(a.ctrls,(e=>e.stop(!0)))}));const h=p.map((e=>gs({},e)));return r?[h,r]:h}function Lc(e,t){const n=Pi.fun(e),[[o],r]=Mc(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[o,r]:o}let Rc;!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(Rc||(Rc={}));class Ac extends Js{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=_a(...t);const n=this._get(),o=cs(n);es(this,o.create(n))}advance(e){const t=this._get();Mi(t,this.get())||(Ja(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Oc(this._active)&&zc(this)}_get(){const e=Pi.arr(this.source)?this.source.map(Sa):Ai(Sa(this.source));return this.calc(...e)}_start(){this.idle&&!Oc(this._active)&&(this.idle=!1,Li(ts(this),(e=>{e.done=!1})),$i.skipAnimation?(di.batchedUpdates((()=>this.advance())),zc(this)):Qi.start(this))}_attach(){let e=1;Li(Ai(this.source),(t=>{Ca(t)&&Ta(t,this),Zs(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Li(Ai(this.source),(e=>{Ca(e)&&Na(e,this)})),this._active.clear(),zc(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Ai(this.source).reduce(((e,t)=>Math.max(e,(Zs(t)?t.priority:0)+1)),0))}}function Dc(e){return!1!==e.idle}function Oc(e){return!e.size||Array.from(e).every(Dc)}function zc(e){e.idle||(e.idle=!0,Li(ts(e),(e=>{e.done=!0})),Ba(e,{type:"idle",parent:e}))}$i.assign({createStringInterpolator:Ha,to:(e,t)=>new Ac(e,t)});Qi.advance;var Fc=window.ReactDOM;function Vc(e,t){if(null==e)return{};var n,o,r={},l=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}const Hc=["style","children","scrollTop","scrollLeft"],Gc=/^--/;function Uc(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Gc.test(e)||$c.hasOwnProperty(e)&&$c[e]?(""+t).trim():t+"px"}const Wc={};let $c={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};const jc=["Webkit","Ms","Moz","O"];$c=Object.keys($c).reduce(((e,t)=>(jc.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),$c);const Kc=["x","y","z"],qc=/^(matrix|translate|scale|rotate|skew)/,Yc=/^(translate)/,Qc=/^(rotate|skew)/,Zc=(e,t)=>Pi.num(e)&&0!==e?e+t:e,Xc=(e,t)=>Pi.arr(e)?e.every((e=>Xc(e,t))):Pi.num(e)?e===t:parseFloat(e)===t;class Jc extends is{constructor(e){let{x:t,y:n,z:o}=e,r=Vc(e,Kc);const l=[],i=[];(t||n||o)&&(l.push([t||0,n||0,o||0]),i.push((e=>[`translate3d(${e.map((e=>Zc(e,"px"))).join(",")})`,Xc(e,0)]))),Ri(r,((e,t)=>{if("transform"===t)l.push([e||""]),i.push((e=>[e,""===e]));else if(qc.test(t)){if(delete r[t],Pi.und(e))return;const n=Yc.test(t)?"px":Qc.test(t)?"deg":"";l.push(Ai(e)),i.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${Zc(r,n)})`,Xc(r,0)]:e=>[`${t}(${e.map((e=>Zc(e,n))).join(",")})`,Xc(e,t.startsWith("scale")?1:0)])}})),l.length&&(r.transform=new eu(l,i)),super(r)}}class eu extends Ia{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Li(this.inputs,((n,o)=>{const r=Sa(n[0]),[l,i]=this.transforms[o](Pi.arr(r)?r:n.map(Sa));e+=" "+l,t=t&&i})),t?"none":e}observerAdded(e){1==e&&Li(this.inputs,(e=>Li(e,(e=>Ca(e)&&Ta(e,this)))))}observerRemoved(e){0==e&&Li(this.inputs,(e=>Li(e,(e=>Ca(e)&&Na(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Ba(this,e)}}const tu=["scrollTop","scrollLeft"];$i.assign({batchedUpdates:Fc.unstable_batchedUpdates,createStringInterpolator:Ha,colors:{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}});const nu=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new is(e)),getComponentProps:o=(e=>e)}={})=>{const r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},l=e=>{const t=fs(e)||"Anonymous";return(e=Pi.str(e)?l[e]||(l[e]=ds(e,r)):e[ms]||(e[ms]=ds(e,r))).displayName=`Animated(${t})`,e};return Ri(e,((t,n)=>{Pi.arr(e)&&(n=fs(t)),l[n]=l(t)})),{animated:l}})(["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"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,o=t,{style:r,children:l,scrollTop:i,scrollLeft:a}=o,s=Vc(o,Hc),c=Object.values(s),u=Object.keys(s).map((t=>n||e.hasAttribute(t)?t:Wc[t]||(Wc[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==l&&(e.textContent=l);for(let t in r)if(r.hasOwnProperty(t)){const n=Uc(t,r[t]);Gc.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==a&&(e.scrollLeft=a)},createAnimatedStyle:e=>new Jc(e),getComponentProps:e=>Vc(e,tu)}),ou=nu.animated,ru=e=>e+1,lu=e=>({top:e.offsetTop,left:e.offsetLeft});var iu=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:o,triggerAnimationOnChange:r}=e;const l=(0,a.useRef)(),i=(0,d.useReducedMotion)()||!o,[s,c]=(0,a.useReducer)(ru,0),[u,p]=(0,a.useReducer)(ru,0),[m,f]=(0,a.useState)({x:0,y:0}),g=(0,a.useMemo)((()=>l.current?lu(l.current):null),[r]),h=(0,a.useMemo)((()=>{if(!n||!l.current)return()=>{};const e=(0,Wl.getScrollContainer)(l.current);if(!e)return()=>{};const t=l.current.getBoundingClientRect();return()=>{const n=l.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[r,n]);return(0,a.useLayoutEffect)((()=>{s&&p()}),[s]),(0,a.useLayoutEffect)((()=>{if(!g)return;if(i)return void h();l.current.style.transform=void 0;const e=lu(l.current);c(),f({x:Math.round(g.left-e.left),y:Math.round(g.top-e.top)})}),[r]),Lc({from:{x:m.x,y:m.y},to:{x:0,y:0},reset:s!==u,config:{mass:5,tension:2e3,friction:200},immediate:i,onChange:function(e){let{value:n}=e;if(!l.current)return;let{x:o,y:r}=n;o=Math.round(o),r=Math.round(r);const i=0===o&&0===r;l.current.style.transformOrigin="center center",l.current.style.transform=i?void 0:`translate3d(${o}px,${r}px,0)`,l.current.style.zIndex=t?"1":"",h()}}),l};const au=".block-editor-block-list__block",su=".block-list-appender",cu=".block-editor-button-block-appender";function uu(e,t){return t.closest([au,su,cu].join(","))===e}function du(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(au);return t?t.id.slice("block-".length):void 0}function pu(e){const t=(0,a.useRef)(),n=function(e){return(0,p.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,__unstableGetEditorMode:o,isBlockSelected:r}=t(so);if(r(e)&&"edit"===o())return n()}),[e])}(e),{isBlockSelected:o,isMultiSelecting:r}=(0,p.useSelect)(so);return(0,a.useEffect)((()=>{if(!o(e)||r())return;if(null==n)return;if(!t.current)return;const{ownerDocument:l}=t.current;if(uu(t.current,l.activeElement))return;const i=Wl.focus.tabbable.find(t.current).filter((e=>(0,Wl.isTextField)(e))),a=-1===n,s=i[a?i.length-1:0]||t.current;if(uu(t.current,s)){if(!t.current.getAttribute("contenteditable")){const e=Wl.focus.tabbable.findNext(t.current);if(e&&uu(t.current,e)&&(0,Wl.isFormElement)(e))return void e.focus()}(0,Wl.placeCaretAtHorizontalEdge)(s,a)}else t.current.focus()}),[n,e]),t}function mu(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function fu(){const e=(0,p.useSelect)((e=>{const{getSettings:t}=e(so);return t().outlineMode}),[]);return(0,d.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",mu),t.addEventListener("mouseover",mu),()=>{t.removeEventListener("mouseout",mu),t.removeEventListener("mouseover",mu),t.classList.remove("is-hovered")}}),[e])}function gu(e){return(0,p.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:o,isBlockSelected:l,isBlockMultiSelected:i,getBlockName:a,getSettings:s,hasSelectedInnerBlock:u,isTyping:d,__unstableIsFullySelected:p,__unstableSelectionHasUnmergeableBlock:m}=t(so),{outlineMode:f}=s(),g=n(e),h=l(e),v=a(e),b=u(e,!0),_=i(e);return c()({"is-selected":h,"is-highlighted":o(e),"is-multi-selected":_,"is-partially-selected":_&&!p()&&!m(),"is-reusable":(0,r.isReusableBlock)((0,r.getBlockType)(v)),"is-dragging":g,"has-child-selected":b,"remove-outline":h&&f&&d()})}),[e])}function hu(e){return(0,p.useSelect)((t=>{const n=t(so).getBlockName(e),o=(0,r.getBlockType)(n);if((null==o?void 0:o.apiVersion)>1)return(0,r.getBlockDefaultClassName)(n)}),[e])}function vu(e){return(0,p.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(so),l=o(e);if(null==l||!l.className)return;const i=(0,r.getBlockType)(n(e));return(null==i?void 0:i.apiVersion)>1?l.className:void 0}),[e])}function bu(e){return(0,p.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:o,getBlockName:r,getBlockRootClientId:l,isBlockSelected:i}=t(so);if(!i(e))return;const a=n();return a?c()("is-block-moving-mode",{"can-insert-moving-block":o(r(a),l(e))}):void 0}),[e])}function _u(e){const{isBlockSelected:t}=(0,p.useSelect)(so),{selectBlock:n,selectionChange:o}=(0,p.useDispatch)(so);return(0,d.useRefEffect)((r=>{function l(l){r.parentElement.closest('[contenteditable="true"]')||(t(e)?l.target.isContentEditable||o(e):uu(r,l.target)&&n(e))}return r.addEventListener("focusin",l),()=>{r.removeEventListener("focusin",l)}}),[t,n])}var ku=window.wp.keycodes;function yu(e){const t=(0,p.useSelect)((t=>t(so).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:o}=(0,p.useSelect)(so),{insertDefaultBlock:r,removeBlock:l}=(0,p.useDispatch)(so);return(0,d.useRefEffect)((i=>{if(t)return i.addEventListener("keydown",a),i.addEventListener("dragstart",s),()=>{i.removeEventListener("keydown",a),i.removeEventListener("dragstart",s)};function a(t){const{keyCode:a,target:s}=t;a!==ku.ENTER&&a!==ku.BACKSPACE&&a!==ku.DELETE||s!==i||(0,Wl.isTextField)(s)||(t.preventDefault(),a===ku.ENTER?r({},n(e),o(e)+1):l(e))}function s(e){e.preventDefault()}}),[e,t,n,o,r,l])}function Eu(e){const{isNavigationMode:t,isBlockSelected:n}=(0,p.useSelect)(so),{setNavigationMode:o,selectBlock:r}=(0,p.useDispatch)(so);return(0,d.useRefEffect)((l=>{function i(l){t()&&!l.defaultPrevented&&(l.preventDefault(),n(e)?o(!1):r(e))}return l.addEventListener("mousedown",i),()=>{l.addEventListener("mousedown",i)}}),[e,t,n,o])}function Cu(){const e=(0,a.useContext)(eh);return(0,d.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function Su(e){return(0,p.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(so);return n(e)}),[e])}function wu(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n,className:o,wrapperProps:l={},isAligned:i}=(0,a.useContext)(Bu),{index:s,mode:u,name:m,blockApiVersion:f,blockTitle:h,isPartOfSelection:v,adjustScrolling:b,enableAnimation:_}=(0,p.useSelect)((e=>{const{getBlockIndex:t,getBlockMode:o,getBlockName:l,isTyping:i,getGlobalBlockCount:a,isBlockSelected:s,isBlockMultiSelected:c,isAncestorMultiSelected:u,isFirstMultiSelectedBlock:d}=e(so),p=s(n),m=c(n)||u(n),f=l(n),g=(0,r.getBlockType)(f);return{index:t(n),mode:o(n),name:f,blockApiVersion:(null==g?void 0:g.apiVersion)||1,blockTitle:null==g?void 0:g.title,isPartOfSelection:p||m,adjustScrolling:p||d(n),enableAnimation:!i()&&a()<=200}}),[n]),k=Su(n),y=(0,g.sprintf)((0,g.__)("Block: %s"),h),E="html"!==u||t?"":"-visual",C=(0,d.useMergeRefs)([e.ref,pu(n),Po(n),_u(n),yu(n),Eu(n),fu(),Cu(),iu({isSelected:v,adjustScrolling:b,enableAnimation:_,triggerAnimationOnChange:s}),(0,d.useDisabled)({isDisabled:!k})]),S=mo();return f<2&&n===S.clientId&&"undefined"!=typeof process&&process.env,{tabIndex:0,...l,...e,ref:C,id:`block-${n}${E}`,role:"document","aria-label":y,"data-block":n,"data-type":m,"data-title":h,className:c()(c()("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":k}),o,e.className,l.className,gu(n),hu(n),vu(n),bu(n)),style:{...l.style,...e.style}}}wu.save=r.__unstableGetBlockProps;const Bu=(0,a.createContext)();function Iu(e){let{children:t,isHtml:n,...o}=e;return(0,a.createElement)("div",wu(o,{__unstableIsHtml:n}),t)}const xu=(0,p.withSelect)(((e,t)=>{let{clientId:n,rootClientId:o}=t;const{isBlockSelected:r,getBlockMode:l,isSelectionEnabled:i,getTemplateLock:a,__unstableGetBlockWithoutInnerBlocks:s,canRemoveBlock:c,canMoveBlock:u}=e(so),d=s(n),p=r(n),m=a(o),f=c(n,o),g=u(n,o),{name:h,attributes:v,isValid:b}=d||{};return{mode:l(n),isSelectionEnabled:i(),isLocked:!!m,canRemove:f,canMove:g,block:d,name:h,attributes:v,isValid:b,isSelected:p}})),Tu=(0,p.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:o,insertBlocks:l,mergeBlocks:i,replaceBlocks:a,toggleSelection:s,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:d,selectBlock:p}=e(so);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n.select(so),l=r(),{clientId:i}=t,a=l.length?l:[i];o(a,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;l(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:r}=t,{getBlockIndex:i}=n.select(so),a=i(o);l(e,a+1,r)},onMerge(e){const{clientId:o,rootClientId:l}=t,{getPreviousBlockClientId:s,getNextBlockClientId:c,getBlock:m,getBlockAttributes:f,getBlockName:g,getBlockOrder:h}=n.select(so);if(e){if(l){const e=c(l);if(e){if(g(l)!==g(e))return void i(l,e);{const t=f(l),o=f(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{u(h(e),e,l),d(e,!1)}))}}}const e=c(o);if(!e)return;const t=(0,r.switchToBlockType)(m(e),"*");t&&t.length?a(e,t):i(o,e)}else{const e=s(o);if(e)i(e,o);else if(l){const e=s(l);if(e&&g(l)===g(e)){const t=f(l),o=f(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{u(h(l),l,e),d(l,!1)}))}const t=(0,r.switchToBlockType)(m(l),"*");t&&t.length&&n.batch((()=>{a(l,t),p(t[0].clientId,0)}))}}},onReplace(e,n,o){e.length&&!(0,r.isUnmodifiedDefaultBlock)(e[e.length-1])&&c(),a([t.clientId],e,n,o)},toggleSelection(e){s(e)}}}));var Nu=(0,d.compose)(d.pure,xu,Tu,(0,d.ifCondition)((e=>{let{block:t}=e;return!!t})),(0,m.withFilters)("editor.BlockListBlock"))((function(e){var t;let{block:{__unstableBlockSource:n},mode:o,isLocked:l,canRemove:i,clientId:s,isSelected:u,isSelectionEnabled:d,className:m,name:f,isValid:g,attributes:h,wrapperProps:v,setAttributes:b,onReplace:_,onInsertBlocksAfter:k,onMerge:y,toggleSelection:E}=e;const{themeSupportsLayout:C,hasContentLockedParent:S,isContentBlock:w,isContentLocking:B,isTemporarilyEditingAsBlocks:I}=(0,p.useSelect)((e=>{const{getSettings:t,__unstableGetContentLockingParent:n,getTemplateLock:o,__unstableGetTemporarilyEditingAsBlocks:l}=e(so),i=!!n(s);return{themeSupportsLayout:t().supportsLayout,isContentBlock:e(r.store).__experimentalHasContentRoleAttribute(f),hasContentLockedParent:i,isContentLocking:"contentOnly"===o(s)&&!i,isTemporarilyEditingAsBlocks:l()===s}}),[f,s]),{removeBlock:x}=(0,p.useDispatch)(so),T=(0,a.useCallback)((()=>x(s)),[s]);let N=(0,a.createElement)(Ql,{name:f,isSelected:u,attributes:h,setAttributes:b,insertBlocksAfter:l?void 0:k,onReplace:i?_:void 0,onRemove:i?T:void 0,mergeBlocks:i?y:void 0,clientId:s,isSelectionEnabled:d,toggleSelection:E});const P=(0,r.getBlockType)(f);S&&!w&&(v={...v,tabIndex:-1}),null!=P&&P.getEditWrapperProps&&(v=function(e,t){const n={...e,...t};return null!=e&&e.className&&null!=t&&t.className&&(n.className=c()(e.className,t.className)),null!=e&&e.style&&null!=t&&t.style&&(n.style={...e.style,...t.style}),n}(v,P.getEditWrapperProps(h)));const M=v&&!!v["data-align"]&&!C;let L;if(M&&(N=(0,a.createElement)("div",{className:"wp-block","data-align":v["data-align"]},N)),g)L="html"===o?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{style:{display:"none"}},N),(0,a.createElement)(Iu,{isHtml:!0},(0,a.createElement)(ci,{clientId:s}))):(null==P?void 0:P.apiVersion)>1?N:(0,a.createElement)(Iu,v,N);else{const e=n?(0,r.serializeRawBlock)(n):(0,r.getSaveContent)(P,h);L=(0,a.createElement)(Iu,{className:"has-warning"},(0,a.createElement)(oi,{clientId:s}),(0,a.createElement)(a.RawHTML,null,(0,Wl.safeHTML)(e)))}const{"data-align":R,...A}=null!==(t=v)&&void 0!==t?t:{},D={clientId:s,className:c()({"is-content-locked":B,"is-content-locked-temporarily-editing-as-blocks":I,"is-content-block":S&&w},R&&C&&`align${R}`,m),wrapperProps:A,isAligned:M},O=(0,a.useMemo)((()=>D),Object.values(D));return(0,a.createElement)(Bu.Provider,{value:O},(0,a.createElement)(ai,{fallback:(0,a.createElement)(Iu,{className:"has-warning"},(0,a.createElement)(li,null))},L))})),Pu=window.wp.htmlEntities;var Mu=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const Lu=[(0,a.createInterpolateElement)((0,g.__)("While writing, you can press / to quickly insert new blocks."),{kbd:(0,a.createElement)("kbd",null)}),(0,a.createInterpolateElement)((0,g.__)("Indent a list by pressing space at the beginning of a line."),{kbd:(0,a.createElement)("kbd",null)}),(0,a.createInterpolateElement)((0,g.__)("Outdent a list by pressing backspace at the beginning of a line."),{kbd:(0,a.createElement)("kbd",null)}),(0,g.__)("Drag files into the editor to automatically insert media blocks."),(0,g.__)("Change a block's type by pressing the block icon on the toolbar.")];var Ru=function(){const[e]=(0,a.useState)(Math.floor(Math.random()*Lu.length));return(0,a.createElement)(m.Tip,null,Lu[e])};var Au=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.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"}));var Du=(0,a.memo)((function(e){var t;let{icon:n,showColors:o=!1,className:r}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:Au});const l=(0,a.createElement)(m.Icon,{icon:n&&n.src?n.src:n}),i=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,a.createElement)("span",{style:i,className:c()("block-editor-block-icon",r,{"has-colors":o})},l)}));var Ou=function(e){let{title:t,icon:n,description:o,blockType:r}=e;return r&&(V()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:o}=r)),(0,a.createElement)("div",{className:"block-editor-block-card"},(0,a.createElement)(Du,{icon:n,showColors:!0}),(0,a.createElement)("div",{className:"block-editor-block-card__content"},(0,a.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,a.createElement)("span",{className:"block-editor-block-card__description"},o)))};const zu=(0,d.createHigherOrderComponent)((e=>(0,p.withRegistry)((t=>{let{useSubRegistry:n=!0,registry:o,...r}=t;if(!n)return(0,a.createElement)(e,i({registry:o},r));const[l,s]=(0,a.useState)(null);return(0,a.useEffect)((()=>{const e=(0,p.createRegistry)({},o);e.registerStore(io,ao),s(e)}),[o]),l?(0,a.createElement)(p.RegistryProvider,{value:l},(0,a.createElement)(e,i({registry:l},r))):null}))),"withRegistryProvider");const Fu=()=>{};function Vu(e){let{clientId:t=null,value:n,selection:o,onChange:l=Fu,onInput:i=Fu}=e;const s=(0,p.useRegistry)(),{resetBlocks:c,resetSelection:u,replaceInnerBlocks:d,setHasControlledInnerBlocks:m,__unstableMarkNextChangeAsNotPersistent:f}=s.dispatch(so),{getBlockName:g,getBlocks:h}=s.select(so),v=(0,p.useSelect)((e=>!t||e(so).areInnerBlocksControlled(t)),[t]),b=(0,a.useRef)({incoming:null,outgoing:[]}),_=(0,a.useRef)(!1),k=()=>{n&&(f(),t?s.batch((()=>{m(t,!0);const e=n.map((e=>(0,r.cloneBlock)(e)));_.current&&(b.current.incoming=e),f(),d(t,e)})):(_.current&&(b.current.incoming=n),c(n)))},y=(0,a.useRef)(i),E=(0,a.useRef)(l);(0,a.useEffect)((()=>{y.current=i,E.current=l}),[i,l]),(0,a.useEffect)((()=>{b.current.outgoing.includes(n)?b.current.outgoing[b.current.outgoing.length-1]===n&&(b.current.outgoing=[]):h(t)!==n&&(b.current.outgoing=[],k(),o&&u(o.selectionStart,o.selectionEnd,o.initialPosition))}),[n,t]),(0,a.useEffect)((()=>{v||(b.current.outgoing=[],k())}),[v]),(0,a.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:o,isLastBlockChangePersistent:r,__unstableIsLastBlockChangeIgnored:l,areInnerBlocksControlled:i}=s.select(so);let a=h(t),c=r(),u=!1;_.current=!0;const d=s.subscribe((()=>{if(null!==t&&null===g(t))return;if(!(!t||i(t)))return;const s=r(),d=h(t),p=d!==a;if(a=d,p&&(b.current.incoming||l()))return b.current.incoming=null,void(c=s);if(p||u&&!p&&s&&!c){c=s,b.current.outgoing.push(a);(c?E.current:y.current)(a,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:o()}})}u=p}));return()=>d()}),[s,t])}var Hu=zu((function(e){const{children:t,settings:n}=e,{updateSettings:o}=(0,p.useDispatch)(so);return(0,a.useEffect)((()=>{o(n)}),[n]),Vu(e),(0,a.createElement)(No,null,t)}));function Gu(e){let{onClick:t}=e;return(0,a.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},(0,a.createElement)(m.Disabled,null,(0,a.createElement)(nh,null)))}function Uu(){const{hasSelectedBlock:e,hasMultiSelection:t}=(0,p.useSelect)(so),{clearSelectedBlock:n}=(0,p.useDispatch)(so);return(0,d.useRefEffect)((o=>{function r(r){(e()||t())&&r.target===o&&n()}return o.addEventListener("mousedown",r),()=>{o.removeEventListener("mousedown",r)}}),[e,t,n])}function Wu(e){return(0,a.createElement)("div",i({ref:Uu()},e))}function $u(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r,getSelectedBlocksInitialCaretPosition:l,__unstableIsFullySelected:i}=e(so);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r(),initialPosition:l(),isFullSelection:i()}}function ju(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r,isFullSelection:l}=(0,p.useSelect)($u,[]);return(0,d.useRefEffect)((r=>{const{ownerDocument:i}=r,{defaultView:a}=i;if(null==e)return;if(!o||t)return;const{length:s}=n;s<2||l&&(r.contentEditable=!0,r.focus(),a.getSelection().removeAllRanges())}),[o,t,n,r,e,l])}function Ku(e,t,n,o){let r,l=Wl.focus.focusable.find(n);return t&&l.reverse(),l=l.slice(l.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),l.find((function(e){if(!Wl.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(o){const t=e.getBoundingClientRect();if(t.left>=r.right||t.right<=r.left)return!1}return!0}))}function qu(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:o,__unstableIsFullySelected:r}=(0,p.useSelect)(so),{selectBlock:l}=(0,p.useDispatch)(so);return(0,d.useRefEffect)((i=>{let a;function s(){a=null}function c(s){const{keyCode:c,target:u}=s,d=c===ku.UP,p=c===ku.DOWN,m=c===ku.LEFT,f=c===ku.RIGHT,g=d||m,h=m||f,v=d||p,b=h||v,_=s.shiftKey,k=_||s.ctrlKey||s.altKey||s.metaKey,y=v?Wl.isVerticalEdge:Wl.isHorizontalEdge,{ownerDocument:E}=i,{defaultView:C}=E;if(o()){if(!r())return;if(s.defaultPrevented)return;if(!b)return;if(_)return;return s.preventDefault(),void(g?l(e()):l(t(),-1))}if(v?a||(a=(0,Wl.computeCaretRect)(C)):a=null,s.defaultPrevented)return;if(!b)return;if(!function(e,t,n){if((t===ku.UP||t===ku.DOWN)&&!n)return!0;const{tagName:o}=e;if("INPUT"===o)return["button","checkbox","color","file","image","radio","reset","submit"].includes(e.getAttribute("type"));return"TEXTAREA"!==o}(u,c,k))return;const S=(0,Wl.isRTL)(u)?!g:g,{keepCaretInsideBlock:w}=n();if(_)(function(e,t){const n=Ku(e,t,i);return n&&du(n)})(u,g)&&y(u,g)&&(i.contentEditable=!0,i.focus());else if(v&&(0,Wl.isVerticalEdge)(u,g)&&!w){const e=Ku(u,g,i,!0);e&&((0,Wl.placeCaretAtVerticalEdge)(e,g,a),s.preventDefault())}else if(h&&C.getSelection().isCollapsed&&(0,Wl.isHorizontalEdge)(u,S)&&!w){const e=Ku(u,S,i);(0,Wl.placeCaretAtHorizontalEdge)(e,g),s.preventDefault()}}return i.addEventListener("mousedown",s),i.addEventListener("keydown",c),()=>{i.removeEventListener("mousedown",s),i.removeEventListener("keydown",c)}}),[])}var Yu=window.wp.keyboardShortcuts;function Qu(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,p.useSelect)(so),{multiSelect:o,selectBlock:r}=(0,p.useDispatch)(so),l=(0,Yu.__unstableUseShortcutEventMatch)();return(0,d.useRefEffect)((i=>{function a(a){if(!l("core/block-editor/select-all",a))return;const s=t();if(s.length<2&&!(0,Wl.isEntirelySelected)(a.target))return;a.preventDefault();const[c]=s,u=n(c),d=e(u);s.length!==d.length?o(d[0],d[d.length-1]):u&&(i.ownerDocument.defaultView.getSelection().removeAllRanges(),r(u))}return i.addEventListener("keydown",a),()=>{i.removeEventListener("keydown",a)}}),[])}function Zu(e,t){e.contentEditable=t,t&&e.focus()}function Xu(){const{startMultiSelect:e,stopMultiSelect:t}=(0,p.useDispatch)(so),{isSelectionEnabled:n,hasMultiSelection:o,isDraggingBlocks:r}=(0,p.useSelect)(so);return(0,d.useRefEffect)((l=>{const{ownerDocument:i}=l,{defaultView:a}=i;let s,c;function u(){t(),a.removeEventListener("mouseup",u),c=a.requestAnimationFrame((()=>{if(o())return;Zu(l,!1);const e=a.getSelection();if(e.rangeCount){const{commonAncestorContainer:t}=e.getRangeAt(0);s.contains(t)&&s.focus()}}))}function d(t){let{buttons:o,target:c}=t;r()||1===o&&c.getAttribute("contenteditable")&&n()&&(s=i.activeElement,e(),a.addEventListener("mouseup",u),Zu(l,!0))}return l.addEventListener("mouseout",d),()=>{l.removeEventListener("mouseout",d),a.removeEventListener("mouseup",u),a.cancelAnimationFrame(c)}}),[e,t,n,o])}function Ju(e,t){e.contentEditable=t,t&&e.focus()}function ed(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,p.useDispatch)(so),{getBlockParents:o,getBlockSelectionStart:r}=(0,p.useSelect)(so);return(0,d.useRefEffect)((n=>{const{ownerDocument:l}=n,{defaultView:i}=l;function a(l){const a=i.getSelection();if(!a.rangeCount)return;const s=l.shiftKey&&"mouseup"===l.type;if(a.isCollapsed&&!s)return void Ju(n,!1);let c=du(function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(a)),u=du(function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:t.childNodes[n]}(a));if(s){const e=r(),t=du(l.target),n=t!==u;(c===u&&a.isCollapsed||!u||n)&&(u=t),c!==e&&(c=e)}if(void 0===c&&void 0===u)return void Ju(n,!1);if(c===u)t(c);else{const t=[...o(c),c],n=[...o(u),u],r=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,n);e(t[r],n[r])}}function s(){l.addEventListener("selectionchange",a),i.addEventListener("mouseup",a)}function c(){l.removeEventListener("selectionchange",a),i.removeEventListener("mouseup",a)}function u(){c(),s()}return s(),n.addEventListener("focusin",u),()=>{c(),n.removeEventListener("focusin",u)}}),[e,t,n,o])}function td(){const{selectBlock:e}=(0,p.useDispatch)(so),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=(0,p.useSelect)(so);return(0,d.useRefEffect)((r=>{function l(l){if(!t()||0!==l.button)return;const i=n(),a=du(l.target);l.shiftKey?i!==a&&(r.contentEditable=!0,r.focus()):o()&&e(a)}return r.addEventListener("mousedown",l),()=>{r.removeEventListener("mousedown",l)}}),[e,t,n,o])}function nd(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:o}=(0,p.useSelect)(so),{replaceBlocks:l,__unstableSplitSelection:i,removeBlocks:a,__unstableDeleteSelection:s,__unstableExpandSelection:c}=(0,p.useDispatch)(so);return(0,d.useRefEffect)((u=>{function d(e){var t;o()&&null!==(t=e.inputType)&&void 0!==t&&t.startsWith("format")&&e.preventDefault()}function p(d){d.defaultPrevented||o()&&(d.keyCode===ku.ENTER?(u.contentEditable=!1,d.preventDefault(),e()?l(t(),(0,r.createBlock)((0,r.getDefaultBlockName)())):i()):d.keyCode===ku.BACKSPACE||d.keyCode===ku.DELETE?(u.contentEditable=!1,d.preventDefault(),e()?a(t()):n()?s(d.keyCode===ku.DELETE):c()):1!==d.key.length||d.metaKey||d.ctrlKey||(u.contentEditable=!1,n()?s(d.keyCode===ku.DELETE):(d.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges())))}function m(e){o()&&(u.contentEditable=!1,n()?s():(e.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges()))}return u.addEventListener("beforeinput",d),u.addEventListener("keydown",p),u.addEventListener("compositionstart",m),()=>{u.removeEventListener("beforeinput",d),u.removeEventListener("keydown",p),u.removeEventListener("compositionstart",m)}}),[])}function od(){const[e,t,n]=function(){const e=(0,a.useRef)(),t=(0,a.useRef)(),n=(0,a.useRef)(),o=(0,a.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:l,getBlockCount:i}=(0,p.useSelect)(so),{setNavigationMode:s}=(0,p.useDispatch)(so),c=(0,p.useSelect)((e=>e(so).isNavigationMode()),[])?void 0:"0",u=(0,a.useRef)();function m(t){if(u.current)u.current=null;else if(r())e.current.focus();else if(l())o.current.focus();else{s(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";Wl.focus.tabbable[n](t.target).focus()}}const f=(0,a.createElement)("div",{ref:t,tabIndex:c,onFocus:m}),g=(0,a.createElement)("div",{ref:n,tabIndex:c,onFocus:m}),h=(0,d.useRefEffect)((a=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===ku.ESCAPE)return e.preventDefault(),void s(!0);if(e.keyCode!==ku.TAB)return;const o=e.shiftKey,i=o?"findPrevious":"findNext";if(!r()&&!l())return void(e.target===a&&s(!0));if(((0,Wl.isFormElement)(e.target)||e.target.getAttribute("data-block")===l())&&(0,Wl.isFormElement)(Wl.focus.tabbable[i](e.target)))return;const c=o?t:n;u.current=!0,c.current.focus({preventScroll:!0})}function d(e){o.current=e.target;const{ownerDocument:t}=a;e.relatedTarget||t.activeElement!==t.body||0!==i()||a.focus()}function p(o){var r;if(o.keyCode!==ku.TAB)return;if("region"===(null===(r=o.target)||void 0===r?void 0:r.getAttribute("role")))return;if(e.current===o.target)return;const l=o.shiftKey?"findPrevious":"findNext",i=Wl.focus.tabbable[l](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:m}=a,{defaultView:f}=m;return f.addEventListener("keydown",p),a.addEventListener("keydown",c),a.addEventListener("focusout",d),()=>{f.removeEventListener("keydown",p),a.removeEventListener("keydown",c),a.removeEventListener("focusout",d)}}),[]);return[f,(0,d.useMergeRefs)([e,h]),g]}(),o=(0,p.useSelect)((e=>e(so).hasMultiSelection()),[]);return[e,(0,d.useMergeRefs)([t,nd(),Xu(),ed(),td(),ju(),Qu(),qu(),(0,d.useRefEffect)((e=>{if(e.tabIndex=-1,e.contentEditable=o,o)return e.classList.add("has-multi-selection"),e.setAttribute("aria-label",(0,g.__)("Multiple selected blocks")),()=>{e.classList.remove("has-multi-selection"),e.removeAttribute("aria-label")}}),[o])]),n]}var rd=(0,a.forwardRef)((function(e,t){let{children:n,...o}=e;const[r,l,s]=od();return(0,a.createElement)(a.Fragment,null,r,(0,a.createElement)("div",i({},o,{ref:(0,d.useMergeRefs)([l,t]),className:c()(o.className,"block-editor-writing-flow")}),n),s)}));const ld="editor-styles-wrapper";function id(e){return(0,a.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}var ad=(0,a.forwardRef)((function(e,t){let{contentRef:n,children:o,head:r,tabIndex:l=0,assets:s,isZoomedOut:u,...p}=e;const[,f]=(0,a.useReducer)((()=>({}))),[h,v]=(0,a.useState)(),[b,_]=(0,a.useState)([]),k=id(null==s?void 0:s.styles),y=id(null==s?void 0:s.scripts),E=Uu(),[C,S,w]=od(),[B,{height:I}]=(0,d.useResizeObserver)(),x=(0,d.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function o(){const{contentDocument:o,ownerDocument:r}=e,{readyState:l,documentElement:i}=o;return t=o,("interactive"===l||"complete"===l)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function o(e){const o=Object.getPrototypeOf(e).constructor.name,r=window[o],l={};for(const t in e)l[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();l.clientX+=e.left,l.clientY+=e.top}const i=new r(e.type,l);!n.dispatchEvent(i)&&e.preventDefault()}const r=["dragover"];for(const t of r)e.addEventListener(t,o)}(o),v(o),E(i),_(Array.from(r.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),o.dir=r.dir,i.removeChild(o.head),i.removeChild(o.body),t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1),!0)}return e.addEventListener("load",o),()=>{var r,l;e.removeEventListener("load",o),null===(r=t)||void 0===r||r.removeEventListener("dragover",n),null===(l=t)||void 0===l||l.removeEventListener("drop",n)}}),[]),T=(0,d.useRefEffect)((e=>{y.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:o}=t;return new Promise(((t,r)=>{const l=e.ownerDocument.createElement("script");l.id=n,o?(l.src=o,l.onload=()=>t(),l.onerror=()=>r()):t(),e.appendChild(l)}))}(e,n)))),Promise.resolve()).finally((()=>{f()}))}),[]),N=(0,d.useMergeRefs)([n,E,S]),P=(0,d.useRefEffect)((e=>{Array.from(document.styleSheets).forEach((t=>{try{t.cssRules}catch(e){return}const{ownerNode:n,cssRules:o}=t;if(o&&"LINK"===n.tagName&&"wp-reset-editor-styles-css"!==n.id&&function e(t){return Array.from(t).find((t=>{let{selectorText:n,conditionText:o,cssRules:r}=t;return o?e(r):n&&(n.includes(`.${ld}`)||n.includes(".wp-block"))}))}(o)&&!e.ownerDocument.getElementById(n.id)){e.appendChild(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.appendChild(o.cloneNode(!0))}}))}),[]);return r=(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,"html{height:auto!important;}body{margin:0}"),k.map((e=>{let{tagName:t,href:n,id:o,rel:r,media:l,textContent:i}=e;const s=t.toLowerCase();return"style"===s?(0,a.createElement)(s,{id:o,key:o},i):(0,a.createElement)(s,{href:n,id:o,rel:r,media:l,key:o})})),r),(0,a.createElement)(a.Fragment,null,l>=0&&C,(0,a.createElement)("iframe",i({},p,{ref:(0,d.useMergeRefs)([t,x]),tabIndex:l,srcDoc:"",title:(0,g.__)("Editor canvas")}),h&&(0,a.createPortal)((0,a.createElement)(a.Fragment,null,(0,a.createElement)("head",{ref:T},r,(0,a.createElement)("style",null,`html { transition: background 5s; ${u?"background: #2f2f2f; transition: background 0s;":""} }`)),(0,a.createElement)("body",{ref:N,className:c()("block-editor-iframe__body",ld,...b,{"is-zoomed-out":u}),style:u?{marginBottom:`-${.55*I-100}px`}:{}},B,(0,a.createElement)("div",{style:{display:"none"},ref:P}),(0,a.createElement)(m.__experimentalStyleProvider,{document:h},o))),h.documentElement)),l>=0&&w)})),sd={grad:.9,turn:360,rad:360/(2*Math.PI)},cd=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},ud=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},dd=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},pd=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},md=function(e){return{r:dd(e.r,0,255),g:dd(e.g,0,255),b:dd(e.b,0,255),a:dd(e.a)}},fd=function(e){return{r:ud(e.r),g:ud(e.g),b:ud(e.b),a:ud(e.a,3)}},gd=/^#([0-9a-f]{3,8})$/i,hd=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},vd=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=Math.max(t,n,o),i=l-Math.min(t,n,o),a=i?l===t?(n-o)/i:l===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(a<0?a+6:a),s:l?i/l*100:0,v:l/255*100,a:r}},bd=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var l=Math.floor(t),i=o*(1-n),a=o*(1-(t-l)*n),s=o*(1-(1-t+l)*n),c=l%6;return{r:255*[o,a,i,i,s,o][c],g:255*[s,o,o,a,i,i][c],b:255*[i,i,s,o,o,a][c],a:r}},_d=function(e){return{h:pd(e.h),s:dd(e.s,0,100),l:dd(e.l,0,100),a:dd(e.a)}},kd=function(e){return{h:ud(e.h),s:ud(e.s),l:ud(e.l),a:ud(e.a,3)}},yd=function(e){return bd((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},Ed=function(e){return{h:(t=vd(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},Cd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Sd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,wd=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bd=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Id={string:[[function(e){var t=gd.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?ud(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?ud(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=wd.exec(e)||Bd.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:md({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Cd.exec(e)||Sd.exec(e);if(!t)return null;var n,o,r=_d({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(sd[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return yd(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=void 0===r?1:r;return cd(t)&&cd(n)&&cd(o)?md({r:Number(t),g:Number(n),b:Number(o),a:Number(l)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,l=void 0===r?1:r;if(!cd(t)||!cd(n)||!cd(o))return null;var i=_d({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return yd(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,l=void 0===r?1:r;if(!cd(t)||!cd(n)||!cd(o))return null;var i=function(e){return{h:pd(e.h),s:dd(e.s,0,100),v:dd(e.v,0,100),a:dd(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(l)});return bd(i)},"hsv"]]},xd=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=fd(this.rgba)).r,n=e.g,o=e.b,l=(r=e.a)<1?hd(ud(255*r)):"","#"+hd(t)+hd(n)+hd(o)+l;var e,t,n,o,r,l},e.prototype.toRgb=function(){return fd(this.rgba)},e.prototype.toRgbString=function(){return t=(e=fd(this.rgba)).r,n=e.g,o=e.b,(r=e.a)<1?"rgba("+t+", "+n+", "+o+", "+r+")":"rgb("+t+", "+n+", "+o+")";var e,t,n,o,r},e.prototype.toHsl=function(){return kd(Ed(this.rgba))},e.prototype.toHslString=function(){return t=(e=kd(Ed(this.rgba))).h,n=e.s,o=e.l,(r=e.a)<1?"hsla("+t+", "+n+"%, "+o+"%, "+r+")":"hsl("+t+", "+n+"%, "+o+"%)";var e,t,n,o,r},e.prototype.toHsv=function(){return e=vd(this.rgba),{h:ud(e.h),s:ud(e.s),v:ud(e.v),a:ud(e.a,3)};var e},e.prototype.invert=function(){return Rd({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),Rd(Nd(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Rd(Nd(this.rgba,-e))},e.prototype.grayscale=function(){return Rd(Nd(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Rd(Md(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Rd(Md(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?Rd({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):ud(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Ed(this.rgba);return"number"==typeof e?Rd({h:e,s:t.s,l:t.l,a:t.a}):ud(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Rd(e).toHex()},e}(),Rd=function(e){return e instanceof Ld?e:new Ld(e)},Ad=[],Dd=function(e){e.forEach((function(e){Ad.indexOf(e)<0&&(e(Ld,Id),Ad.push(e))}))};function Od(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var l={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,i,a=o[this.toHex()];if(a)return a;if(null==t?void 0:t.closest){var s=this.toRgb(),c=1/0,u="black";if(!l.length)for(var d in n)l[d]=new e(n[d]).toRgb();for(var p in n){var m=(r=s,i=l[p],Math.pow(r.r-i.r,2)+Math.pow(r.g-i.g,2)+Math.pow(r.b-i.b,2));m(s=Fd(i))?(a+.05)/(s+.05):(s+.05)/(a+.05),void 0===(o=2)&&(o=0),void 0===r&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(l=(n=t).size)?"normal":l,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===i?7:"AA"===r&&"large"===i?3:4.5);var n,o,r,l,i}}var Hd=n(3124),Gd=n.n(Hd);const Ud=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Wd(e,t){t=t||{};let n=1,o=1;function r(e){const t=e.match(/\n/g);t&&(n+=t.length);const r=e.lastIndexOf("\n");o=~r?e.length-r:o+e.length}function l(){const e={line:n,column:o};return function(t){return t.position=new i(e),m(),t}}function i(e){this.start=e,this.end={line:n,column:o},this.source=t.source}i.prototype.content=e;const a=[];function s(r){const l=new Error(t.source+":"+n+":"+o+": "+r);if(l.reason=r,l.filename=t.source,l.line=n,l.column=o,l.source=e,!t.silent)throw l;a.push(l)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){let t;const n=[];for(m(),f(n);e.length&&"}"!==e.charAt(0)&&(t=S()||w());)!1!==t&&(n.push(t),f(n));return n}function p(t){const n=t.exec(e);if(!n)return;const o=n[0];return r(o),e=e.slice(o.length),n}function m(){p(/^\s*/)}function f(e){let t;for(e=e||[];t=g();)!1!==t&&e.push(t);return e}function g(){const t=l();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return s("End of comment missing");const i=e.slice(2,n-2);return o+=2,r(i),e=e.slice(n),o+=2,t({type:"comment",comment:i})}function h(){const e=p(/^([^{]+)/);if(e)return $d(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(){const e=l();let t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=$d(t[0]),!p(/^:\s*/))return s("property missing ':'");const n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:t.replace(Ud,""),value:n?$d(n[0]).replace(Ud,""):""});return p(/^[;\s]*/),o}function b(){const e=[];if(!c())return s("missing '{'");let t;for(f(e);t=v();)!1!==t&&(e.push(t),f(e));return u()?e:s("missing '}'")}function _(){let e;const t=[],n=l();for(;e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:b()})}const k=C("import"),y=C("charset"),E=C("namespace");function C(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=l(),o=p(t);if(!o)return;const r={type:e};return r[e]=o[1].trim(),n(r)}}function S(){if("@"===e[0])return function(){const e=l();let t=p(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=p(/^([-\w]+)\s*/),!t)return s("@keyframes missing name");const o=t[1];if(!c())return s("@keyframes missing '{'");let r,i=f();for(;r=_();)i.push(r),i=i.concat(f());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):s("@keyframes missing '}'")}()||function(){const e=l(),t=p(/^@media *([^{]+)/);if(!t)return;const n=$d(t[1]);if(!c())return s("@media missing '{'");const o=f().concat(d());return u()?e({type:"media",media:n,rules:o}):s("@media missing '}'")}()||function(){const e=l(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:$d(t[1]),media:$d(t[2])})}()||function(){const e=l(),t=p(/^@supports *([^{]+)/);if(!t)return;const n=$d(t[1]);if(!c())return s("@supports missing '{'");const o=f().concat(d());return u()?e({type:"supports",supports:n,rules:o}):s("@supports missing '}'")}()||k()||y()||E()||function(){const e=l(),t=p(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=$d(t[1]),o=$d(t[2]);if(!c())return s("@document missing '{'");const r=f().concat(d());return u()?e({type:"document",document:o,vendor:n,rules:r}):s("@document missing '}'")}()||function(){const e=l();if(!p(/^@page */))return;const t=h()||[];if(!c())return s("@page missing '{'");let n,o=f();for(;n=v();)o.push(n),o=o.concat(f());return u()?e({type:"page",selectors:t,declarations:o}):s("@page missing '}'")}()||function(){const e=l();if(!p(/^@host\s*/))return;if(!c())return s("@host missing '{'");const t=f().concat(d());return u()?e({type:"host",rules:t}):s("@host missing '}'")}()||function(){const e=l();if(!p(/^@font-face\s*/))return;if(!c())return s("@font-face missing '{'");let t,n=f();for(;t=v();)n.push(t),n=n.concat(f());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}()}function w(){const e=l(),t=h();return t?(f(),e({type:"rule",selectors:t,declarations:b()})):s("selector missing")}return jd(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:a}}}())}function $d(e){return e?e.replace(/^\s+|\s+$/g,""):""}function jd(e,t){const n=e&&"string"==typeof e.type,o=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){jd(e,o)})):n&&"object"==typeof n&&jd(n,o)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Kd=n(8575),qd=n.n(Kd),Yd=Qd;function Qd(e){this.options=e||{}}Qd.prototype.emit=function(e){return e},Qd.prototype.visit=function(e){return this[e.type](e)},Qd.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let o=0,r=e.length;ot=>{if("declaration"===t.type){const l=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const o=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};np(e)&&o.push(e)}return o}(t.value).map((r=e,e=>({...e,newUrl:"url("+e.before+e.quote+op(e.value,r)+e.quote+e.after+")"})));return{...t,value:(n=t.value,o=l,o.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,o,r;return t};const lp=/^(body|html|:root).*$/;var ip=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>{const o=n=>t.includes(n.trim())?n:n.match(lp)?n.replace(/^(body|html|:root)/,e):e+" "+n;return"rule"===n.type?{...n,selectors:n.selectors.map(o)}:n}};var ap=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(e,(e=>{let{css:n,baseURL:o}=e;const r=[];return t&&r.push(ip(t)),o&&r.push(rp(o)),r.length?tp(n,(0,d.compose)(r)):n}))};const sp=".editor-styles-wrapper";function cp(e){return(0,a.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:o}=t,r=t.querySelector(sp);let l;if(r)l=n.getComputedStyle(r,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),o.appendChild(e),l=n.getComputedStyle(e,null).getPropertyValue("background-color"),o.removeChild(e)}const i=Rd(l);i.luminance()>.5||0===i.alpha()?o.classList.remove("is-dark-theme"):o.classList.add("is-dark-theme")}),[e])}function up(e){let{styles:t}=e;const n=(0,a.useMemo)((()=>ap(t,sp)),[t]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",{ref:cp(t)}),n.map(((e,t)=>(0,a.createElement)("style",{key:t},e))))}function dp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Rd(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}function pp(e){let{selector:t,id:n}=e;const o=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,a.createElement)("style",null,o)}function mp(e){let{selector:t}=e;const n=`\n${t} {\n\tfilter: none;\n}\n`;return(0,a.createElement)("style",null,n)}function fp(e){let{id:t,colors:n}=e;const o=dp(n);return(0,a.createElement)(m.SVG,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,a.createElement)("defs",null,(0,a.createElement)("filter",{id:t},(0,a.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,a.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,a.createElement)("feFuncR",{type:"table",tableValues:o.r.join(" ")}),(0,a.createElement)("feFuncG",{type:"table",tableValues:o.g.join(" ")}),(0,a.createElement)("feFuncB",{type:"table",tableValues:o.b.join(" ")}),(0,a.createElement)("feFuncA",{type:"table",tableValues:o.a.join(" ")})),(0,a.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"}))))}function gp(e){let{preset:t}=e;return(0,a.createElement)(fp,{id:`wp-duotone-${t.slug}`,colors:t.colors})}let hp;Dd([Od,Vd]);const vp=2e3;var bp=function(e){let{viewportWidth:t,__experimentalPadding:n,__experimentalMinHeight:o}=e;const[r,{width:l}]=(0,d.useResizeObserver)(),[i,{height:s}]=(0,d.useResizeObserver)(),{styles:c,assets:u,duotone:f}=(0,p.useSelect)((e=>{var t,n;const o=e(so).getSettings();return{styles:o.styles,assets:o.__unstableResolvedAssets,duotone:null===(t=o.__experimentalFeatures)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.duotone}}),[]),g=(0,a.useMemo)((()=>c?[...c,{css:"body{height:auto;overflow:hidden;}",__unstableType:"presets"}]:c),[c]),h=(0,a.useMemo)((()=>{var e,t;return[...null!==(e=null==f?void 0:f.default)&&void 0!==e?e:[],...null!==(t=null==f?void 0:f.theme)&&void 0!==t?t:[]]}),[f]);hp=hp||(0,d.pure)(nh);const v=l/t;return(0,a.createElement)("div",{className:"block-editor-block-preview__container"},r,(0,a.createElement)(m.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${v})`,height:s*v,maxHeight:s>vp?vp*v:void 0,minHeight:o}},(0,a.createElement)(ad,{head:(0,a.createElement)(up,{styles:g}),assets:u,contentRef:(0,d.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.padding=n+"px",e.style.boxSizing="border-box",e.style.position="absolute",e.style.width="100%"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:s,pointerEvents:"none",maxHeight:vp,minHeight:0!==v&&v<1&&o?o/v:o}},i,h.map((e=>(0,a.createElement)(gp,{preset:e,key:e.slug}))),(0,a.createElement)(hp,{renderAppender:!1}))))};var _p=(0,a.memo)((function(e){let{blocks:t,__experimentalPadding:n=0,viewportWidth:o=1200,__experimentalLive:r=!1,__experimentalOnClick:l,__experimentalMinHeight:i}=e;const s=(0,p.useSelect)((e=>e(so).getSettings()),[]),c=(0,a.useMemo)((()=>{const e={...s};return e.__experimentalBlockPatterns=[],e}),[s]),d=(0,a.useMemo)((()=>(0,u.castArray)(t)),[t]);return t&&0!==t.length?(0,a.createElement)(Hu,{value:d,settings:c},r?(0,a.createElement)(Gu,{onClick:l}):(0,a.createElement)(bp,{viewportWidth:o,__experimentalPadding:n,__experimentalMinHeight:i})):null}));function kp(e){let{blocks:t,props:n={},__experimentalLayout:o}=e;const r=(0,p.useSelect)((e=>e(so).getSettings()),[]),l=(0,d.useDisabled)(),i=(0,d.useMergeRefs)([n.ref,l]),s=(0,a.useMemo)((()=>({...r,__experimentalBlockPatterns:[]})),[r]),m=(0,a.useMemo)((()=>(0,u.castArray)(t)),[t]),f=(0,a.createElement)(Hu,{value:m,settings:s},(0,a.createElement)(rh,{renderAppender:!1,__experimentalLayout:o}));return{...n,ref:i,className:c()(n.className,"block-editor-block-preview__live-content","components-disabled"),children:null!=t&&t.length?f:null}}var yp=function(e){var t;let{item:n}=e;const{name:o,title:l,icon:i,description:s,initialAttributes:c,example:u}=n,d=(0,r.isReusableBlock)(n);return(0,a.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,a.createElement)("div",{className:"block-editor-inserter__preview"},d||u?(0,a.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,a.createElement)(_p,{__experimentalPadding:16,viewportWidth:null!==(t=null==u?void 0:u.viewportWidth)&&void 0!==t?t:500,blocks:u?(0,r.getBlockFromExample)(o,{attributes:{...u.attributes,...c},innerBlocks:u.innerBlocks}):(0,r.createBlock)(o,c)})):(0,a.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,g.__)("No Preview Available."))),!d&&(0,a.createElement)(Ou,{title:l,icon:i,description:s}))};var Ep=(0,a.createContext)();var Cp=(0,a.forwardRef)((function(e,t){let{isFirst:n,as:o,children:r,...l}=e;const s=(0,a.useContext)(Ep);return(0,a.createElement)(m.__unstableCompositeItem,i({ref:t,state:s,role:"option",focusable:!0},l),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return o?(0,a.createElement)(o,t,r):"function"==typeof r?r(t):(0,a.createElement)(m.Button,t,r)}))}));var Sp=(0,a.createElement)(D.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"}));function wp(e){let{count:t,icon:n}=e;return(0,a.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,a.createElement)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip"},(0,a.createElement)(m.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,a.createElement)(m.FlexItem,null,n?(0,a.createElement)(Du,{icon:n}):(0,g.sprintf)((0,g._n)("%d block","%d blocks",t),t)),(0,a.createElement)(m.FlexItem,null,(0,a.createElement)(Du,{icon:Sp})))))}var Bp=e=>{let{isEnabled:t,blocks:n,icon:o,children:r}=e;const l={type:"inserter",blocks:n};return(0,a.createElement)(m.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:l,__experimentalDragComponent:(0,a.createElement)(wp,{count:n.length,icon:o})},(e=>{let{onDraggableStart:n,onDraggableEnd:o}=e;return r({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?o:void 0})}))};var Ip=(0,a.memo)((function(e){let{className:t,isFirst:n,item:o,onSelect:l,onHover:s,isDraggable:u,...d}=e;const p=(0,a.useRef)(!1),f=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},g=(0,a.useMemo)((()=>[(0,r.createBlock)(o.name,o.initialAttributes,(0,r.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))]),[o.name,o.initialAttributes,o.initialAttributes]);return(0,a.createElement)(Bp,{isEnabled:u&&!o.disabled,blocks:g,icon:o.icon},(e=>{let{draggable:r,onDragStart:u,onDragEnd:g}=e;return(0,a.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:r,onDragStart:e=>{p.current=!0,u&&(s(null),u(e))},onDragEnd:e=>{p.current=!1,g&&g(e)}},(0,a.createElement)(Cp,i({isFirst:n,className:c()("block-editor-block-types-list__item",t),disabled:o.isDisabled,onClick:e=>{e.preventDefault(),l(o,(0,ku.isAppleOS)()?e.metaKey:e.ctrlKey),s(null)},onKeyDown:e=>{const{keyCode:t}=e;t===ku.ENTER&&(e.preventDefault(),l(o,(0,ku.isAppleOS)()?e.metaKey:e.ctrlKey),s(null))},onFocus:()=>{p.current||s(o)},onMouseEnter:()=>{p.current||s(o)},onMouseLeave:()=>s(null),onBlur:()=>s(null)},d),(0,a.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:f},(0,a.createElement)(Du,{icon:o.icon,showColors:!0})),(0,a.createElement)("span",{className:"block-editor-block-types-list__item-title"},(0,a.createElement)(m.__experimentalTruncate,{numberOfLines:3},o.title))))}))}));var xp=(0,a.forwardRef)((function(e,t){const[n,o]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{n&&(0,qt.speak)((0,g.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,a.createElement)("div",i({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{o(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&o(!1)}},e))}));var Tp=(0,a.forwardRef)((function(e,t){const n=(0,a.useContext)(Ep);return(0,a.createElement)(m.__unstableCompositeGroup,i({state:n,role:"presentation",ref:t},e))}));var Np=function(e){let{items:t=[],onSelect:n,onHover:o=(()=>{}),children:l,label:i,isDraggable:s=!0}=e;return(0,a.createElement)(xp,{className:"block-editor-block-types-list","aria-label":i},function(e,t){const n=[];for(let o=0,r=e.length;o(0,a.createElement)(Tp,{key:t},e.map(((e,l)=>(0,a.createElement)(Ip,{key:e.id,item:e,className:(0,r.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:o,isDraggable:s&&!e.isDisabled,isFirst:0===t&&0===l})))))),l)};var Pp=function(e){let{title:t,icon:n,children:o}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,a.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,a.createElement)(m.Icon,{icon:n})),(0,a.createElement)("div",{className:"block-editor-inserter__panel-content"},o))};var Mp=(e,t)=>{const{categories:n,collections:o,items:l}=(0,p.useSelect)((t=>{const{getInserterItems:n}=t(so),{getCategories:o,getCollections:l}=t(r.store);return{categories:o(),collections:l(),items:n(e)}}),[e]);return[l,n,o,(0,a.useCallback)(((e,n)=>{let{name:o,initialAttributes:l,innerBlocks:i}=e;const a=(0,r.createBlock)(o,l,(0,r.createBlocksFromInnerBlocksTemplate)(i));t(a,void 0,n)}),[t])]};var Lp=function(e){let{children:t}=e;const n=(0,m.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,a.createElement)(Ep.Provider,{value:n},t)};const Rp=[];var Ap=function(e){let{rootClientId:t,onInsert:n,onHover:o,showMostUsedBlocks:r}=e;const[l,i,s,c]=Mp(t,n),p=(0,a.useMemo)((()=>(0,u.orderBy)(l,["frecency"],["desc"]).slice(0,6)),[l]),m=(0,a.useMemo)((()=>l.filter((e=>!e.category))),[l]),f=(0,a.useMemo)((()=>(0,u.flow)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,u.groupBy)(e,"category")))(l)),[l]),h=(0,a.useMemo)((()=>{const e={...s};return Object.keys(s).forEach((t=>{e[t]=l.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[l,s]);(0,a.useEffect)((()=>()=>o(null)),[]);const v=(0,d.useAsyncList)(i),b=i.length===v.length,_=(0,a.useMemo)((()=>Object.entries(s)),[s]),k=(0,d.useAsyncList)(b?_:Rp);return(0,a.createElement)(Lp,null,(0,a.createElement)("div",null,r&&!!p.length&&(0,a.createElement)(Pp,{title:(0,g._x)("Most used","blocks")},(0,a.createElement)(Np,{items:p,onSelect:c,onHover:o,label:(0,g._x)("Most used","blocks")})),(0,u.map)(v,(e=>{const t=f[e.slug];return t&&t.length?(0,a.createElement)(Pp,{key:e.slug,title:e.title,icon:e.icon},(0,a.createElement)(Np,{items:t,onSelect:c,onHover:o,label:e.title})):null})),b&&m.length>0&&(0,a.createElement)(Pp,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,g.__)("Uncategorized")},(0,a.createElement)(Np,{items:m,onSelect:c,onHover:o,label:(0,g.__)("Uncategorized")})),(0,u.map)(k,(e=>{let[t,n]=e;const r=h[t];return r&&r.length?(0,a.createElement)(Pp,{key:t,title:n.title,icon:n.icon},(0,a.createElement)(Np,{items:r,onSelect:c,onHover:o,label:n.title})):null}))))};var Dp=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o,openPatternExplorer:r}=e;const l=(0,d.useViewportMatch)("medium","<"),i=c()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns");return(0,a.createElement)(m.Flex,{justify:"space-between",align:"start",gap:"4",className:i},(0,a.createElement)(m.FlexItem,{isBlock:!0},(0,a.createElement)(m.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:(0,g.__)("Filter patterns"),hideLabelFromVision:!0,value:t.name,onChange:e=>{o(n.find((t=>e===t.name)))},onBlur:e=>{null!=e&&e.relatedTarget||e.stopPropagation()},options:(()=>{const e=[];return n.map((t=>e.push({value:t.name,label:t.label}))),e})()})),!l&&(0,a.createElement)(m.FlexItem,null,(0,a.createElement)(m.Button,{variant:"secondary",className:"block-editor-inserter__patterns-explorer-expand",label:(0,g.__)("Explore all patterns"),onClick:()=>r()},(0,g._x)("Explore","Label for showing all block patterns"))))},Op=window.wp.notices;var zp=(e,t)=>{const{patternCategories:n,patterns:o}=(0,p.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(so);return{patterns:n(t),patternCategories:o().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:l}=(0,p.useDispatch)(Op.store),i=(0,a.useCallback)(((t,n)=>{e((0,u.map)(n,(e=>(0,r.cloneBlock)(e))),t.name),l((0,g.sprintf)((0,g.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[]);return[o,n,i]};function Fp(e){let{isDraggable:t,pattern:n,onClick:o,composite:r}=e;const{blocks:l,viewportWidth:s}=n,c=`block-editor-block-patterns-list__item-description-${(0,d.useInstanceId)(Fp)}`;return(0,a.createElement)(Bp,{isEnabled:t,blocks:l},(e=>{let{draggable:t,onDragStart:u,onDragEnd:d}=e;return(0,a.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":n.title,"aria-describedby":n.description?c:void 0,draggable:t,onDragStart:u,onDragEnd:d},(0,a.createElement)(m.__unstableCompositeItem,i({role:"option",as:"div"},r,{className:"block-editor-block-patterns-list__item",onClick:()=>o(n,l)}),(0,a.createElement)(_p,{blocks:l,viewportWidth:s}),(0,a.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&(0,a.createElement)(m.VisuallyHidden,{id:c},n.description)))}))}function Vp(){return(0,a.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Hp=function(e){let{isDraggable:t,blockPatterns:n,shownPatterns:o,onClickPattern:r,orientation:l,label:s=(0,g.__)("Block Patterns")}=e;const c=(0,m.__unstableUseCompositeState)({orientation:l});return(0,a.createElement)(m.__unstableComposite,i({},c,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":s}),n.map((e=>o.includes(e)?(0,a.createElement)(Fp,{key:e.name,pattern:e,onClick:r,isDraggable:t,composite:c}):(0,a.createElement)(Vp,{key:e.name}))))};function Gp(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o}=e;const r="block-editor-block-patterns-explorer__sidebar";return(0,a.createElement)("div",{className:`${r}__categories-list`},n.map((e=>{let{name:n,label:l}=e;return(0,a.createElement)(m.Button,{key:n,label:l,className:`${r}__categories-list__item`,isPressed:t===n,onClick:()=>{o(n)}},l)})))}function Up(e){let{filterValue:t,setFilterValue:n}=e;return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,a.createElement)(m.SearchControl,{onChange:n,value:t,label:(0,g.__)("Search for patterns"),placeholder:(0,g.__)("Search")}))}var Wp=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o,filterValue:r,setFilterValue:l}=e;return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,a.createElement)(Up,{filterValue:r,setFilterValue:l}),!r&&(0,a.createElement)(Gp,{selectedCategory:t,patternCategories:n,onClickCategory:o}))};var $p=function(){return(0,a.createElement)("div",{className:"block-editor-inserter__no-results"},(0,a.createElement)(ul,{className:"block-editor-inserter__no-results-icon",icon:Au}),(0,a.createElement)("p",null,(0,g.__)("No results found.")))};var jp=function(e){let{rootClientId:t="",insertionIndex:n,clientId:o,isAppender:l,onSelect:i,shouldFocusBlock:s=!0}=e;const{getSelectedBlock:c}=(0,p.useSelect)(so),{destinationRootClientId:d,destinationIndex:m}=(0,p.useSelect)((e=>{const{getSelectedBlockClientId:r,getBlockRootClientId:i,getBlockIndex:a,getBlockOrder:s}=e(so),c=r();let u,d=t;return void 0!==n?u=n:o?u=a(o):!l&&c?(d=i(c),u=a(c)+1):u=s(d).length,{destinationRootClientId:d,destinationIndex:u}}),[t,n,o,l]),{replaceBlocks:f,insertBlocks:h,showInsertionPoint:v,hideInsertionPoint:b}=(0,p.useDispatch)(so),_=(0,a.useCallback)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=c();!l&&o&&(0,r.isUnmodifiedDefaultBlock)(o)?f(o.clientId,e,null,s||n?0:null,t):h(e,m,d,!0,s||n?0:null,t);const a=(0,g.sprintf)((0,g._n)("%d block added.","%d blocks added.",(0,u.castArray)(e).length),(0,u.castArray)(e).length);(0,qt.speak)(a),i&&i()}),[l,c,f,h,d,m,i,s]),k=(0,a.useCallback)((e=>{e?v(d,m):b()}),[v,b,d,m]);return[d,_,k]},Kp=n(4793),qp=n.n(Kp);const Yp=e=>e.name||"",Qp=e=>e.title,Zp=e=>e.description||"",Xp=e=>e.keywords||[],Jp=e=>e.category,em=()=>null;function tm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=qp()(e),e=e.replace(/^\//,""),e=e.toLowerCase(),e}const nm=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,u.words)(tm(e))},om=(e,t)=>e.filter((e=>!nm(t).some((t=>t.includes(e))))),rm=(e,t,n,o)=>{if(0===nm(o).length)return e;return lm(e,o,{getCategory:e=>{var n;return null===(n=(0,u.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:e=>{var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}})},lm=function(){let 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]:{};const o=nm(t);if(0===o.length)return e;const r=e.map((e=>[e,im(e,t,n)])).filter((e=>{let[,t]=e;return t>0}));return r.sort(((e,t)=>{let[,n]=e,[,o]=t;return o-n})),r.map((e=>{let[t]=e;return t}))};function im(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{getName:o=Yp,getTitle:r=Qp,getDescription:l=Zp,getKeywords:i=Xp,getCategory:a=Jp,getCollection:s=em}=n,c=o(e),d=r(e),p=l(e),m=i(e),f=a(e),g=s(e),h=tm(t),v=tm(d);let b=0;if(h===v)b+=30;else if(v.startsWith(h))b+=20;else{const e=[c,d,p,...m,f,g].join(" "),t=(0,u.words)(h);0===om(t,e).length&&(b+=10)}if(0!==b&&c.startsWith("core/")){b+=c!==e.id?1:2}return b}function am(e){let{filterValue:t,filteredBlockPatternsLength:n}=e;return t?(0,a.createElement)(m.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},(0,g.sprintf)((0,g._n)('%1$d pattern found for "%2$s"','%1$d patterns found for "%2$s"',n),n,t)):null}var sm=function(e){let{filterValue:t,selectedCategory:n,patternCategories:o}=e;const r=(0,d.useDebounce)(qt.speak,500),[l,i]=jp({shouldFocusBlock:!0}),[s,,c]=zp(i,l),u=(0,a.useMemo)((()=>o.map((e=>e.name))),[o]),p=(0,a.useMemo)((()=>t?lm(s,t):s.filter((e=>{var t,o;return"uncategorized"===n?!(null!==(t=e.categories)&&void 0!==t&&t.length)||e.categories.every((e=>!u.includes(e))):null===(o=e.categories)||void 0===o?void 0:o.includes(n)}))),[t,n,s]);(0,a.useEffect)((()=>{if(!t)return;const e=p.length,n=(0,g.sprintf)((0,g._n)("%d result found.","%d results found.",e),e);r(n)}),[t,r]);const m=(0,d.useAsyncList)(p,{step:2}),f=!(null==p||!p.length);return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer__list"},f&&(0,a.createElement)(am,{filterValue:t,filteredBlockPatternsLength:p.length}),(0,a.createElement)(Lp,null,!f&&(0,a.createElement)($p,null),f&&(0,a.createElement)(Hp,{shownPatterns:m,blockPatterns:p,onClickPattern:c,isDraggable:!1})))};function cm(e){let{initialCategory:t,patternCategories:n}=e;const[o,r]=(0,a.useState)(""),[l,i]=(0,a.useState)(null==t?void 0:t.name);return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,a.createElement)(Wp,{selectedCategory:l,patternCategories:n,onClickCategory:i,filterValue:o,setFilterValue:r}),(0,a.createElement)(sm,{filterValue:o,selectedCategory:l,patternCategories:n}))}var um=function(e){let{onModalClose:t,...n}=e;return(0,a.createElement)(m.Modal,{title:(0,g.__)("Patterns"),closeLabel:(0,g.__)("Close"),onRequestClose:t,isFullScreen:!0},(0,a.createElement)(cm,n))};function dm(e){let{rootClientId:t,onInsert:n,selectedCategory:o,populatedCategories:r}=e;const[l,,i]=zp(n,t),s=(0,a.useCallback)((e=>{var t;if(null===(t=e.categories)||void 0===t||!t.length)return 1/0;const n=r.reduce(((e,t,n)=>{let{name:o}=t;return e[o]=n,e}),{});return Math.min(...e.categories.map((e=>void 0!==n[e]?n[e]:1/0)))}),[r]),c=(0,a.useMemo)((()=>l.filter((e=>{var t;return"uncategorized"===o.name?s(e)===1/0:null===(t=e.categories)||void 0===t?void 0:t.includes(o.name)}))),[l,o]),u=(0,a.useMemo)((()=>c.sort(((e,t)=>s(e)-s(t)))),[c,s]),p=(0,d.useAsyncList)(u);return c.length?(0,a.createElement)("div",{className:"block-editor-inserter__panel-content"},(0,a.createElement)(Hp,{shownPatterns:p,blockPatterns:c,onClickPattern:i,label:o.label,orientation:"vertical",isDraggable:!0})):null}var pm=function(e){let{rootClientId:t,onInsert:n,onClickCategory:o,selectedCategory:r}=e;const[l,i]=(0,a.useState)(!1),[s,c]=zp(),u=(0,a.useCallback)((e=>!(!e.categories||!e.categories.length)&&e.categories.some((e=>c.some((t=>t.name===e))))),[c]),d=(0,a.useMemo)((()=>{const e=c.filter((e=>s.some((t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)})))).sort(((e,t)=>{let{name:n}=e,{name:o}=t;return[n,o].includes("featured")?"featured"===n?-1:1:0}));return s.some((e=>!u(e)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,g._x)("Uncategorized")}),e}),[s,c]),p=r||d[0];return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Dp,{selectedCategory:p,patternCategories:d,onClickCategory:o,openPatternExplorer:()=>i(!0)}),!l&&(0,a.createElement)(dm,{rootClientId:t,onInsert:n,selectedCategory:p,populatedCategories:d}),l&&(0,a.createElement)(um,{initialCategory:p,patternCategories:d,onModalClose:()=>i(!1)}))},mm=window.wp.url;function fm(e){let{onHover:t,onInsert:n,rootClientId:o}=e;const[r,,,l]=Mp(o,n),i=(0,a.useMemo)((()=>r.filter((e=>{let{category:t}=e;return"reusable"===t}))),[r]);return 0===i.length?(0,a.createElement)($p,null):(0,a.createElement)(Pp,{title:(0,g.__)("Reusable blocks")},(0,a.createElement)(Np,{items:i,onSelect:l,onHover:t,label:(0,g.__)("Reusable blocks")}))}var gm=function(e){let{rootClientId:t,onInsert:n,onHover:o}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(fm,{onHover:o,onInsert:n,rootClientId:t}),(0,a.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,a.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:(0,mm.addQueryArgs)("edit.php",{post_type:"wp_block"})},(0,g.__)("Manage Reusable blocks"))))};const{Fill:hm,Slot:vm}=(0,m.createSlotFill)("__unstableInserterMenuExtension");hm.Slot=vm;var bm=hm;const _m=[];var km=function(e){let{filterValue:t,onSelect:n,onHover:o,rootClientId:r,clientId:l,isAppender:i,__experimentalInsertionIndex:s,maxBlockPatterns:c,maxBlockTypes:p,showBlockDirectory:f=!1,isDraggable:h=!0,shouldFocusBlock:v=!0,prioritizePatterns:b}=e;const _=(0,d.useDebounce)(qt.speak,500),[k,y]=jp({onSelect:n,rootClientId:r,clientId:l,isAppender:i,insertionIndex:s,shouldFocusBlock:v}),[E,C,S,w]=Mp(k,y),[B,,I]=zp(y,k),x=(0,a.useMemo)((()=>{if(0===c)return[];const e=lm(B,t);return void 0!==c?e.slice(0,c):e}),[t,B,c]);let T=p;b&&x.length>2&&(T=0);const N=(0,a.useMemo)((()=>{if(0===T)return[];const e=rm((0,u.orderBy)(E,["frecency"],["desc"]),C,S,t);return void 0!==T?e.slice(0,T):e}),[t,E,C,S,p]);(0,a.useEffect)((()=>{if(!t)return;const e=N.length+x.length,n=(0,g.sprintf)((0,g._n)("%d result found.","%d results found.",e),e);_(n)}),[t,_]);const P=(0,d.useAsyncList)(N,{step:9}),M=(0,d.useAsyncList)(P.length===N.length?x:_m),L=!(0,u.isEmpty)(N)||!(0,u.isEmpty)(x),R=!!N.length&&(0,a.createElement)(Pp,{title:(0,a.createElement)(m.VisuallyHidden,null,(0,g.__)("Blocks"))},(0,a.createElement)(Np,{items:P,onSelect:w,onHover:o,label:(0,g.__)("Blocks"),isDraggable:h})),A=!!x.length&&(0,a.createElement)(Pp,{title:(0,a.createElement)(m.VisuallyHidden,null,(0,g.__)("Block Patterns"))},(0,a.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,a.createElement)(Hp,{shownPatterns:M,blockPatterns:x,onClickPattern:I,isDraggable:h})));return(0,a.createElement)(Lp,null,!f&&!L&&(0,a.createElement)($p,null),b?A:R,!!N.length&&!!x.length&&(0,a.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),b?R:A,f&&(0,a.createElement)(bm.Slot,{fillProps:{onSelect:w,onHover:o,filterValue:t,hasItems:L,rootClientId:k}},(e=>e.length?e:L?null:(0,a.createElement)($p,null))))};const ym={name:"blocks",title:(0,g.__)("Blocks")},Em={name:"patterns",title:(0,g.__)("Patterns")},Cm={name:"reusable",title:(0,g.__)("Reusable")};var Sm=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:o=!1,onSelect:r,prioritizePatterns:l}=e;const i=(0,a.useMemo)((()=>{const e=[];return l&&n&&e.push(Em),e.push(ym),!l&&n&&e.push(Em),o&&e.push(Cm),e}),[l,ym,n,Em,o,Cm]);return(0,a.createElement)(m.TabPanel,{className:"block-editor-inserter__tabs",tabs:i,onSelect:r},t)};var wm=(0,a.forwardRef)((function(e,t){let{rootClientId:n,clientId:o,isAppender:r,__experimentalInsertionIndex:l,onSelect:i,showInserterHelpPanel:s,showMostUsedBlocks:u,__experimentalFilterValue:d="",shouldFocusBlock:f=!0,prioritizePatterns:h}=e;const[v,b]=(0,a.useState)(d),[_,k]=(0,a.useState)(null),[y,E]=(0,a.useState)(null),[C,S,w]=jp({rootClientId:n,clientId:o,isAppender:r,insertionIndex:l,shouldFocusBlock:f}),{showPatterns:B,hasReusableBlocks:I}=(0,p.useSelect)((e=>{var t;const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(so);return{showPatterns:!!n(C).length,hasReusableBlocks:!(null===(t=o().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[C]),x=(0,a.useCallback)(((e,t,n)=>{S(e,t,n),i()}),[S,i]),T=(0,a.useCallback)(((e,t)=>{S(e,{patternName:t}),i()}),[S,i]),N=(0,a.useCallback)((e=>{w(!!e),k(e)}),[w,k]),P=(0,a.useCallback)((e=>{E(e)}),[E]),M=(0,a.useMemo)((()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"block-editor-inserter__block-list"},(0,a.createElement)(Ap,{rootClientId:C,onInsert:x,onHover:N,showMostUsedBlocks:u})),s&&(0,a.createElement)("div",{className:"block-editor-inserter__tips"},(0,a.createElement)(m.VisuallyHidden,{as:"h2"},(0,g.__)("A tip for using the block editor")),(0,a.createElement)(Ru,null)))),[C,x,N,v,u,s]),L=(0,a.useMemo)((()=>(0,a.createElement)(pm,{rootClientId:C,onInsert:T,onClickCategory:P,selectedCategory:y})),[C,T,P,y]),R=(0,a.useMemo)((()=>(0,a.createElement)(gm,{rootClientId:C,onInsert:x,onHover:N})),[C,x,N]),A=(0,a.useCallback)((e=>"blocks"===e.name?M:"patterns"===e.name?L:R),[M,L,R]),D=(0,a.useRef)();(0,a.useImperativeHandle)(t,(()=>({focusSearch:()=>{D.current.focus()}})));const O=!v&&(B||I);return(0,a.createElement)("div",{className:"block-editor-inserter__menu"},(0,a.createElement)("div",{className:c()("block-editor-inserter__main-area",{"show-as-tabs":O})},(0,a.createElement)(m.SearchControl,{className:"block-editor-inserter__search",onChange:e=>{_&&k(null),b(e)},value:v,label:(0,g.__)("Search for blocks and patterns"),placeholder:(0,g.__)("Search"),ref:D}),!!v&&(0,a.createElement)("div",{className:"block-editor-inserter__no-tab-container"},(0,a.createElement)(km,{filterValue:v,onSelect:i,onHover:N,rootClientId:n,clientId:o,isAppender:r,__experimentalInsertionIndex:l,showBlockDirectory:!0,shouldFocusBlock:f})),O&&(0,a.createElement)(Sm,{showPatterns:B,showReusableBlocks:I,prioritizePatterns:h},A),!v&&!O&&(0,a.createElement)("div",{className:"block-editor-inserter__no-tab-container"},M)),s&&_&&(0,a.createElement)(yp,{item:_}))}));function Bm(e){let{onSelect:t,rootClientId:n,clientId:o,isAppender:r,prioritizePatterns:l}=e;const[i,s]=(0,a.useState)(""),[u,d]=jp({onSelect:t,rootClientId:n,clientId:o,isAppender:r}),[f]=Mp(u,d),[h]=zp(d,u),{setInserterIsOpened:v,insertionIndex:b}=(0,p.useSelect)((e=>{const{getSettings:t,getBlockIndex:n,getBlockCount:r}=e(so),l=t(),i=n(o),a=r();return{setInserterIsOpened:l.__experimentalSetIsInserterOpened,insertionIndex:-1===i?a:i}}),[o]),_=h.length&&(!!i||l),k=_&&h.length>6||f.length>6;(0,a.useEffect)((()=>{v&&v(!1)}),[v]);let y=0;return _&&(y=l?4:2),(0,a.createElement)("div",{className:c()("block-editor-inserter__quick-inserter",{"has-search":k,"has-expand":v})},k&&(0,a.createElement)(m.SearchControl,{className:"block-editor-inserter__search",value:i,onChange:e=>{s(e)},label:(0,g.__)("Search for blocks and patterns"),placeholder:(0,g.__)("Search")}),(0,a.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,a.createElement)(km,{filterValue:i,onSelect:t,rootClientId:n,clientId:o,isAppender:r,maxBlockPatterns:y,maxBlockTypes:6,isDraggable:!1,prioritizePatterns:l})),v&&(0,a.createElement)(m.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{v({rootClientId:n,insertionIndex:b,filterValue:i})},"aria-label":(0,g.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,g.__)("Browse all")))}const Im=e=>{let t,{onToggle:n,disabled:o,isOpen:r,blockTitle:l,hasSingleBlockType:s,toggleProps:c={},prioritizePatterns:u}=e;t=s?(0,g.sprintf)((0,g._x)("Add %s","directly add the only allowed block"),l):u?(0,g.__)("Add pattern"):(0,g._x)("Add block","Generic label for block inserter button");const{onClick:d,...p}=c;return(0,a.createElement)(m.Button,i({icon:Mu,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),d&&d(e)},className:"block-editor-inserter__toggle","aria-haspopup":!s&&"true","aria-expanded":!s&&r,disabled:o},p))};class xm extends a.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle(e){let{onToggle:t,isOpen:n}=e;const{disabled:o,blockTitle:r,hasSingleBlockType:l,directInsertBlock:i,toggleProps:a,hasItems:s,renderToggle:c=Im,prioritizePatterns:u}=this.props;return c({onToggle:t,isOpen:n,disabled:o||!s,blockTitle:r,hasSingleBlockType:l,directInsertBlock:i,toggleProps:a,prioritizePatterns:u})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l,__experimentalIsQuick:i,prioritizePatterns:s}=this.props;return i?(0,a.createElement)(Bm,{onSelect:()=>{t()},rootClientId:n,clientId:o,isAppender:r,prioritizePatterns:s}):(0,a.createElement)(wm,{onSelect:()=>{t()},rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l,prioritizePatterns:s})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:o,__experimentalIsQuick:r,onSelectOrClose:l}=this.props;return t||n?this.renderToggle({onToggle:o}):(0,a.createElement)(m.Dropdown,{className:"block-editor-inserter",contentClassName:c()("block-editor-inserter__popover",{"is-quick":r}),position:e,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,g.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:l})}}var Tm=(0,d.compose)([(0,p.withSelect)(((e,t)=>{var n;let{clientId:o,rootClientId:l}=t;const{getBlockRootClientId:i,hasInserterItems:a,__experimentalGetAllowedBlocks:s,__experimentalGetDirectInsertBlock:c,getSettings:u}=e(so),{getBlockVariations:d}=e(r.store);l=l||i(o)||void 0;const p=s(l),m=c(l),f=u(),g=1===(null==p?void 0:p.length)&&0===(null===(n=d(p[0].name,"inserter"))||void 0===n?void 0:n.length);let h=!1;return g&&(h=p[0]),{hasItems:a(l),hasSingleBlockType:g,blockTitle:h?h.title:"",allowedBlockType:h,directInsertBlock:m,rootClientId:l,prioritizePatterns:f.__experimentalPreferPatternsOnRoot&&!l}})),(0,p.withDispatch)(((e,t,n)=>{let{select:o}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:l,isAppender:i,hasSingleBlockType:a,allowedBlockType:s,directInsertBlock:c,onSelectOrClose:u}=t;if(!a&&!c)return;const{insertBlock:d}=e(so);let p;if(c){const e=function(e){const{getBlock:t,getPreviousBlockClientId:r}=o(so);if(!e||!l&&!n)return{};const i={};let a={};if(l){const e=t(l),n=t(r(l));(null==e?void 0:e.name)===(null==n?void 0:n.name)&&(a=(null==n?void 0:n.attributes)||{})}else{var s;const e=t(n);if(null!=e&&null!==(s=e.innerBlocks)&&void 0!==s&&s.length){const t=e.innerBlocks[e.innerBlocks.length-1];c&&(null==c?void 0:c.name)===t.name&&(a=t.attributes)}}return e.forEach((e=>{a.hasOwnProperty(e)&&(i[e]=a[e])})),i}(c.attributesToCopy);p=(0,r.createBlock)(c.name,{...c.attributes||{},...e})}else p=(0,r.createBlock)(s.name);d(p,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:r,getBlockRootClientId:a}=o(so);if(l)return e(l);const s=t();return!i&&s&&a(s)===n?e(s)+1:r(n).length}(),n),u&&u();const m=(0,g.sprintf)((0,g.__)("%s block added"),s.title);(0,qt.speak)(m)}}})),(0,d.ifCondition)((e=>{let{hasItems:t,isAppender:n,rootClientId:o,clientId:r}=e;return t||!n&&!o&&!r}))])(xm);var Nm=(0,d.compose)((0,p.withSelect)(((e,t)=>{const{getBlockCount:n,getSettings:o,getTemplateLock:r}=e(so),l=!n(t.rootClientId),{bodyPlaceholder:i}=o();return{showPrompt:l,isLocked:!!r(t.rootClientId),placeholder:i}})),(0,p.withDispatch)(((e,t)=>{const{insertDefaultBlock:n,startTyping:o}=e(so);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),o()}}})))((function(e){let{isLocked:t,onAppend:n,showPrompt:o,placeholder:r,rootClientId:l}=e;if(t)return null;const i=(0,Pu.decodeEntities)(r)||(0,g.__)("Type / to choose a block");return(0,a.createElement)("div",{"data-root-client-id":l||"",className:c()("block-editor-default-block-appender",{"has-visible-prompt":o})},(0,a.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,g.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{ku.ENTER!==e.keyCode&&ku.SPACE!==e.keyCode||n()},onClick:()=>n(),onFocus:()=>{o&&n()}},o?i:"\ufeff"),(0,a.createElement)(Tm,{rootClientId:l,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function Pm(e,t){let{rootClientId:n,className:o,onFocus:r,tabIndex:l}=e;return(0,a.createElement)(Tm,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:i,disabled:s,isOpen:u,blockTitle:d,hasSingleBlockType:p}=e;n=p?(0,g.sprintf)((0,g._x)("Add %s","directly add the only allowed block"),d):(0,g._x)("Add block","Generic label for block inserter button");const f=!p;let h=(0,a.createElement)(m.Button,{ref:t,onFocus:r,tabIndex:l,className:c()(o,"block-editor-button-block-appender"),onClick:i,"aria-haspopup":f?"true":void 0,"aria-expanded":f?u:void 0,disabled:s,label:n},!p&&(0,a.createElement)(m.VisuallyHidden,{as:"span"},n),(0,a.createElement)(ul,{icon:Mu}));return(f||p)&&(h=(0,a.createElement)(m.Tooltip,{text:n},h)),h},isAppender:!0})}const Mm=(0,a.forwardRef)(((e,t)=>(V()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),Pm(e,t))));var Lm=(0,a.forwardRef)(Pm);var Rm=function(e){let{rootClientId:t,renderAppender:n,className:o,tagName:l="div"}=e;const{hideInserter:i,canInsertDefaultBlock:s,selectedBlockClientId:u}=(0,p.useSelect)((e=>{const{canInsertBlockType:n,getTemplateLock:o,getSelectedBlockClientId:l,__unstableGetEditorMode:i}=e(so);return{hideInserter:!!o(t)||"zoom-out"===i(),canInsertDefaultBlock:n((0,r.getDefaultBlockName)(),t),selectedBlockClientId:l()}}),[t]);if(i||!1===n)return null;let d;if(n)d=(0,a.createElement)(n,null);else{if(!(u===t||!t&&!u))return null;d=s?(0,a.createElement)(Nm,{rootClientId:t}):(0,a.createElement)(Lm,{rootClientId:t,className:"block-list-appender__toggle"})}return(0,a.createElement)(l,{tabIndex:-1,className:c()("block-list-appender wp-block",o),contentEditable:!1,"data-block":!0},d)};const Am=Number.MAX_SAFE_INTEGER;(0,a.createContext)();var Dm=function(e){let{previousClientId:t,nextClientId:n,children:o,__unstablePopoverSlot:r,__unstableContentRef:l,...s}=e;const[u,d]=(0,a.useReducer)((e=>(e+1)%Am),0),{orientation:f,rootClientId:h,isVisible:v}=(0,p.useSelect)((e=>{var o;const{getBlockListSettings:r,getBlockRootClientId:l,isBlockVisible:i}=e(so),a=l(null!=t?t:n);return{orientation:(null===(o=r(a))||void 0===o?void 0:o.orientation)||"vertical",rootClientId:a,isVisible:i(t)&&i(n)}}),[t,n]),b=Lo(t),_=Lo(n),k="vertical"===f,y=(0,a.useMemo)((()=>{if(u<0||!b&&!_||!v)return{};const e=b?b.getBoundingClientRect():null,t=_?_.getBoundingClientRect():null;if(k)return{width:e?e.width:t.width,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=(0,g.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:e?e.height:t.height}}),[b,_,k,u,v]),E=(0,a.useMemo)((()=>{if(u<0||!b&&!_||!v)return;const{ownerDocument:e}=b||_;return{ownerDocument:e,getBoundingClientRect(){const e=b?b.getBoundingClientRect():null,t=_?_.getBoundingClientRect():null;let n=0,o=0;return k?(o=e?e.bottom:t.top,n=(0,g.isRTL)()?e?e.right:t.right:e?e.left:t.left):(o=e?e.top:t.top,n=(0,g.isRTL)()?e?e.left:t.right:e?e.right:t.left),new window.DOMRect(n,o,0,0)}}}),[b,_,u,k,v]),C=_r(l);return(0,a.useLayoutEffect)((()=>{if(!b)return;const e=new window.MutationObserver(d);return e.observe(b,{attributes:!0}),()=>{e.disconnect()}}),[b]),(0,a.useLayoutEffect)((()=>{if(!_)return;const e=new window.MutationObserver(d);return e.observe(_,{attributes:!0}),()=>{e.disconnect()}}),[_]),(0,a.useLayoutEffect)((()=>{if(b)return b.ownerDocument.defaultView.addEventListener("resize",d),()=>{var e;null===(e=b.ownerDocument.defaultView)||void 0===e||e.removeEventListener("resize",d)}}),[b]),(b||_)&&v?(0,a.createElement)(m.Popover,i({ref:C,animate:!1,anchor:E,focusOnMount:!1,__unstableSlotName:r||null,key:n+"--"+h},s,{className:c()("block-editor-block-popover","block-editor-block-popover__inbetween",s.className),resize:!1,flip:!1,placement:"bottom-start"}),(0,a.createElement)("div",{className:"block-editor-block-popover__inbetween-container",style:y},o)):null};const Om=(0,a.createContext)();function zm(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:o,hideInsertionPoint:r}=(0,p.useDispatch)(so),l=(0,a.useContext)(Om),i=(0,a.useRef)(),{orientation:s,previousClientId:u,nextClientId:f,rootClientId:g,isInserterShown:h}=(0,p.useSelect)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:o,getBlockInsertionPoint:r,isBlockBeingDragged:l,getPreviousBlockClientId:i,getNextBlockClientId:a}=e(so),s=r(),c=n(s.rootClientId);if(!c.length)return{};let u=c[s.index-1],d=c[s.index];for(;l(u);)u=i(u);for(;l(d);)d=a(d);return{previousClientId:u,nextClientId:d,orientation:(null===(t=o(s.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:s.rootClientId,isInserterShown:null==s?void 0:s.__unstableWithInserter}}),[]),v="vertical"===s,b=(0,d.useReducedMotion)();const _={start:{...v?{height:0,left:"50%",right:"50%",y:0}:{width:0,top:"50%",bottom:"50%",x:0},opacity:0},rest:{...v?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:h?.4:0}},hover:{...v?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:.4}}},k={start:{scale:b?1:0},rest:{scale:1,transition:{delay:.2}}},y=c()("block-editor-block-list__insertion-point","is-"+s);return(0,a.createElement)(Dm,{previousClientId:u,nextClientId:f,__unstablePopoverSlot:t,__unstableContentRef:n},(0,a.createElement)(m.__unstableMotion.div,{layout:!b,initial:b?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:i,tabIndex:-1,onClick:function(e){e.target===i.current&&f&&o(f,-1)},onFocus:function(e){e.target!==i.current&&(l.current=!0)},className:c()(y,{"is-with-inserter":h}),onHoverEnd:function(e){e.target!==i.current||l.current||r()}},(0,a.createElement)(m.__unstableMotion.div,{variants:_,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),h&&(0,a.createElement)(m.__unstableMotion.div,{variants:k,className:c()("block-editor-block-list__insertion-point-inserter")},(0,a.createElement)(Tm,{position:"bottom center",clientId:f,rootClientId:g,__experimentalIsQuick:!0,onToggle:e=>{l.current=e},onSelectOrClose:()=>{l.current=!1}}))))}function Fm(e){return(0,p.useSelect)((e=>e(so).isBlockInsertionPointVisible()),[])&&(0,a.createElement)(zm,e)}function Vm(){const e=(0,a.useContext)(Om),t=(0,p.useSelect)((e=>e(so).getSettings().hasReducedUI||"zoom-out"===e(so).__unstableGetEditorMode()),[]),{getBlockListSettings:n,getBlockRootClientId:o,getBlockIndex:r,isBlockInsertionPointVisible:l,isMultiSelecting:i,getSelectedBlockClientIds:s,getTemplateLock:c,__unstableIsWithinBlockOverlay:u}=(0,p.useSelect)(so),{showInsertionPoint:m,hideInsertionPoint:f}=(0,p.useDispatch)(so);return(0,d.useRefEffect)((o=>{if(!t)return o.addEventListener("mousemove",a),()=>{o.removeEventListener("mousemove",a)};function a(t){var o;if(e.current)return;if(i())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void(l()&&f());let a;if(!t.target.classList.contains("is-root-container")){a=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")}if(c(a))return;const d=(null===(o=n(a))||void 0===o?void 0:o.orientation)||"vertical",p=t.target.getBoundingClientRect(),g=t.clientY-p.top,h=t.clientX-p.left;let v=Array.from(t.target.children).find((e=>e.classList.contains("wp-block")&&"vertical"===d&&e.offsetTop>g||e.classList.contains("wp-block")&&"horizontal"===d&&e.offsetLeft>h));if(!v)return;if(!v.id&&(v=v.firstElementChild,!v))return;const b=v.id.slice("block-".length);if(!b||u(b))return;if(s().includes(b))return;const _=v.getBoundingClientRect();if("horizontal"===d&&(t.clientY>_.bottom||t.clientY<_.top)||"vertical"===d&&(t.clientX>_.right||t.clientX<_.left))return void(l()&&f());const k=r(b);0!==k?m(a,k,{__unstableWithInserter:!0}):l()&&f()}}),[e,n,o,r,l,i,m,f,s,t])}const Hm="undefined"==typeof window?e=>{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,Gm="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function Um(e){return(0,p.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(so),{getBlockType:l,getActiveBlockVariation:i}=t(r.store),a=n(e),s=l(a);if(!s)return null;const c=o(e),u=i(a,c),d={title:s.title,icon:s.icon,description:s.description,anchor:null==c?void 0:c.anchor};return u?{title:u.title||s.title,icon:u.icon||s.icon,description:u.description||s.description,anchor:null==c?void 0:c.anchor}:d}),[e])}function Wm(e){let{clientId:t,maximumLength:n,context:o}=e;const{attributes:l,name:i,reusableBlockTitle:a}=(0,p.useSelect)((e=>{if(!t)return{};const{getBlockName:n,getBlockAttributes:o,__experimentalGetReusableBlockTitle:l}=e(so),i=n(t);if(!i)return{};const a=(0,r.isReusableBlock)((0,r.getBlockType)(i));return{attributes:o(t),name:i,reusableBlockTitle:a&&l(o(t).ref)}}),[t]),s=Um(t);if(!i||!s)return null;const c=(0,r.getBlockType)(i),u=c?(0,r.__experimentalGetBlockLabel)(c,l,o):null,d=a||u,m=d&&d!==c.title?d:s.title;if(n&&n>0&&m.length>n){const e="...";return m.slice(0,n-e.length)+e}return m}function $m(e){let{clientId:t,maximumLength:n,context:o}=e;return Wm({clientId:t,maximumLength:n,context:o})}var jm=e=>{let{children:t,clientIds:n,cloneClassname:o,onDragStart:l,onDragEnd:i}=e;const{srcRootClientId:s,isDraggable:c,icon:u}=(0,p.useSelect)((e=>{var t;const{canMoveBlocks:o,getBlockRootClientId:l,getBlockName:i}=e(so),a=l(n[0]),s=i(n[0]);return{srcRootClientId:a,isDraggable:o(n,a),icon:null===(t=(0,r.getBlockType)(s))||void 0===t?void 0:t.icon}}),[n]),d=(0,a.useRef)(!1),[f,g,h]=function(){const e=(0,a.useRef)(null),t=(0,a.useRef)(null),n=(0,a.useRef)(null),o=(0,a.useRef)(null);return(0,a.useEffect)((()=>()=>{o.current&&(clearInterval(o.current),o.current=null)}),[]),[(0,a.useCallback)((r=>{e.current=r.clientY,n.current=(0,Wl.getScrollContainer)(r.target),o.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,a.useCallback)((o=>{if(!n.current)return;const r=n.current.offsetHeight,l=e.current-n.current.offsetTop,i=o.clientY-n.current.offsetTop;if(o.clientY>l){const e=Math.max(r-l-50,0),n=Math.max(i-l-50,0)/e;t.current=25*n}else if(o.clientY{e.current=null,n.current=null,o.current&&(clearInterval(o.current),o.current=null)}]}(),{startDraggingBlocks:v,stopDraggingBlocks:b}=(0,p.useDispatch)(so);if((0,a.useEffect)((()=>()=>{d.current&&b()}),[]),!c)return t({isDraggable:!1});const _={type:"block",srcClientIds:n,srcRootClientId:s};return(0,a.createElement)(m.Draggable,{cloneClassname:o,__experimentalTransferDataType:"wp-blocks",transferData:_,onDragStart:e=>{v(n),d.current=!0,f(e),l&&l()},onDragOver:g,onDragEnd:()=>{b(),d.current=!1,h(),i&&i()},__experimentalDragComponent:(0,a.createElement)(wp,{count:n.length,icon:u})},(e=>{let{onDraggableStart:n,onDraggableEnd:o}=e;return t({draggable:!0,onDragStart:n,onDragEnd:o})}))};var Km=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var qm=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));var Ym=(0,a.createElement)(D.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(D.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));var Qm=(0,a.createElement)(D.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(D.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const Zm=(e,t)=>"up"===e?"horizontal"===t?(0,g.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===t?(0,g.isRTL)()?"left":"right":"down":null;function Xm(e,t,n,o,r,l,i){const a=n+1;if(e>1)return function(e,t,n,o,r,l){const i=t+1;if(n&&o)return(0,g.__)("All blocks are selected, and cannot be moved");if(r>0&&!o){const t=Zm("down",l);if("down"===t)return(0,g.sprintf)((0,g.__)("Move %1$d blocks from position %2$d down by one place"),e,i);if("left"===t)return(0,g.sprintf)((0,g.__)("Move %1$d blocks from position %2$d left by one place"),e,i);if("right"===t)return(0,g.sprintf)((0,g.__)("Move %1$d blocks from position %2$d right by one place"),e,i)}if(r>0&&o){const e=Zm("down",l);if("down"===e)return(0,g.__)("Blocks cannot be moved down as they are already at the bottom");if("left"===e)return(0,g.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,g.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(r<0&&!n){const t=Zm("up",l);if("up"===t)return(0,g.sprintf)((0,g.__)("Move %1$d blocks from position %2$d up by one place"),e,i);if("left"===t)return(0,g.sprintf)((0,g.__)("Move %1$d blocks from position %2$d left by one place"),e,i);if("right"===t)return(0,g.sprintf)((0,g.__)("Move %1$d blocks from position %2$d right by one place"),e,i)}if(r<0&&n){const e=Zm("up",l);if("up"===e)return(0,g.__)("Blocks cannot be moved up as they are already at the top");if("left"===e)return(0,g.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,g.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}(e,n,o,r,l,i);if(o&&r)return(0,g.sprintf)((0,g.__)("Block %s is the only block, and cannot be moved"),t);if(l>0&&!r){const e=Zm("down",i);if("down"===e)return(0,g.sprintf)((0,g.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if("left"===e)return(0,g.sprintf)((0,g.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if("right"===e)return(0,g.sprintf)((0,g.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(l>0&&r){const e=Zm("down",i);if("down"===e)return(0,g.sprintf)((0,g.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,g.sprintf)((0,g.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,g.sprintf)((0,g.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(l<0&&!o){const e=Zm("up",i);if("up"===e)return(0,g.sprintf)((0,g.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if("left"===e)return(0,g.sprintf)((0,g.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if("right"===e)return(0,g.sprintf)((0,g.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(l<0&&o){const e=Zm("up",i);if("up"===e)return(0,g.sprintf)((0,g.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,g.sprintf)((0,g.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,g.sprintf)((0,g.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const Jm=(e,t)=>"up"===e?"horizontal"===t?(0,g.isRTL)()?Km:qm:Ym:"down"===e?"horizontal"===t?(0,g.isRTL)()?qm:Km:Qm:null,ef=(e,t)=>"up"===e?"horizontal"===t?(0,g.isRTL)()?(0,g.__)("Move right"):(0,g.__)("Move left"):(0,g.__)("Move up"):"down"===e?"horizontal"===t?(0,g.isRTL)()?(0,g.__)("Move left"):(0,g.__)("Move right"):(0,g.__)("Move down"):null,tf=(0,a.forwardRef)(((e,t)=>{let{clientIds:n,direction:o,orientation:l,...s}=e;const u=(0,d.useInstanceId)(tf),f=Array.isArray(n)?n:[n],g=f.length,{blockType:h,isDisabled:v,rootClientId:b,isFirst:_,isLast:k,firstIndex:y,orientation:E="vertical"}=(0,p.useSelect)((e=>{const{getBlockIndex:t,getBlockRootClientId:n,getBlockOrder:i,getBlock:a,getBlockListSettings:s}=e(so),c=f[0],u=n(c),d=t(c),p=t(f[f.length-1]),m=i(u),g=a(c),h=0===d,v=p===m.length-1,{orientation:b}=s(u)||{};return{blockType:g?(0,r.getBlockType)(g.name):null,isDisabled:"up"===o?h:v,rootClientId:u,firstIndex:d,isFirst:h,isLast:v,orientation:l||b}}),[n,o]),{moveBlocksDown:C,moveBlocksUp:S}=(0,p.useDispatch)(so),w="up"===o?S:C,B=`block-editor-block-mover-button__description-${u}`;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.Button,i({ref:t,className:c()("block-editor-block-mover-button",`is-${o}-button`),icon:Jm(o,E),label:ef(o,E),"aria-describedby":B},s,{onClick:v?null:e=>{w(n,b),s.onClick&&s.onClick(e)},disabled:v,__experimentalIsFocusable:!0})),(0,a.createElement)(m.VisuallyHidden,{id:B},Xm(g,h&&h.title,y,_,k,"up"===o?-1:1,E)))})),nf=(0,a.forwardRef)(((e,t)=>(0,a.createElement)(tf,i({direction:"up",ref:t},e)))),of=(0,a.forwardRef)(((e,t)=>(0,a.createElement)(tf,i({direction:"down",ref:t},e))));var rf=function(e){let{clientIds:t,hideDragHandle:n}=e;const{canMove:o,rootClientId:r,isFirst:l,isLast:s,orientation:u}=(0,p.useSelect)((e=>{var n;const{getBlockIndex:o,getBlockListSettings:r,canMoveBlocks:l,getBlockOrder:i,getBlockRootClientId:a}=e(so),s=Array.isArray(t)?t:[t],c=s[0],u=a(c),d=o(c),p=o(s[s.length-1]),m=i(u);return{canMove:l(t,u),rootClientId:u,isFirst:0===d,isLast:p===m.length-1,orientation:null===(n=r(u))||void 0===n?void 0:n.orientation}}),[t]);if(!o||l&&s&&!r)return null;const d=(0,g.__)("Drag");return(0,a.createElement)(m.ToolbarGroup,{className:c()("block-editor-block-mover",{"is-horizontal":"horizontal"===u})},!n&&(0,a.createElement)(jm,{clientIds:t},(e=>(0,a.createElement)(m.Button,i({icon:Sp,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:d,tabIndex:"-1"},e)))),(0,a.createElement)("div",{className:"block-editor-block-mover__move-button-container"},(0,a.createElement)(m.ToolbarItem,null,(e=>(0,a.createElement)(nf,i({clientIds:t},e)))),(0,a.createElement)(m.ToolbarItem,null,(e=>(0,a.createElement)(of,i({clientIds:t},e))))))};var lf=function(e){let{clientId:t,rootClientId:n}=e;const o=Um(t),l=(0,p.useSelect)((e=>{var o;const{getBlock:r,getBlockIndex:l,hasBlockMovingClientId:i,getBlockListSettings:a,__unstableGetEditorMode:s}=e(so),c=l(t),{name:u,attributes:d}=r(t);return{index:c,name:u,attributes:d,blockMovingMode:i(),orientation:null===(o=a(n))||void 0===o?void 0:o.orientation,editorMode:s()}}),[t,n]),{index:s,name:u,attributes:d,blockMovingMode:f,orientation:h,editorMode:v}=l,{setNavigationMode:b,removeBlock:_}=(0,p.useDispatch)(so),k=(0,a.useRef)(),y=(0,r.getBlockType)(u),E=(0,r.__experimentalGetAccessibleBlockLabel)(y,d,s+1,h);(0,a.useEffect)((()=>{k.current.focus(),(0,qt.speak)(E)}),[E]);const C=Lo(t),{hasBlockMovingClientId:S,getBlockIndex:w,getBlockRootClientId:B,getClientIdsOfDescendants:I,getSelectedBlockClientId:x,getMultiSelectedBlocksEndClientId:T,getPreviousBlockClientId:N,getNextBlockClientId:P}=(0,p.useSelect)(so),{selectBlock:M,clearSelectedBlock:L,setBlockMovingClientId:R,moveBlockToPosition:A}=(0,p.useDispatch)(so),D=c()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!f}),O=(0,g.__)("Drag");return(0,a.createElement)("div",{className:D},(0,a.createElement)(m.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,a.createElement)(m.FlexItem,null,(0,a.createElement)(Du,{icon:null==o?void 0:o.icon,showColors:!0})),(0,a.createElement)(m.FlexItem,null,"zoom-out"===v&&(0,a.createElement)(rf,{clientIds:[t],hideDragHandle:!0}),"navigation"===v&&(0,a.createElement)(jm,{clientIds:[t]},(e=>(0,a.createElement)(m.Button,i({icon:Sp,className:"block-selection-button_drag-handle","aria-hidden":"true",label:O,tabIndex:"-1"},e))))),(0,a.createElement)(m.FlexItem,null,(0,a.createElement)(m.Button,{ref:k,onClick:"navigation"===v?()=>b(!1):void 0,onKeyDown:function(e){const{keyCode:n}=e,o=n===ku.UP,r=n===ku.DOWN,l=n===ku.LEFT,i=n===ku.RIGHT,a=n===ku.TAB,s=n===ku.ESCAPE,c=n===ku.ENTER,u=n===ku.SPACE,d=e.shiftKey;if(n===ku.BACKSPACE||n===ku.DELETE)return _(t),void e.preventDefault();const p=x(),m=T(),f=N(m||p),g=P(m||p),h=a&&d||o,v=a&&!d||r,b=l,k=i;let y;if(h)y=f;else if(v)y=g;else if(b){var E;y=null!==(E=B(p))&&void 0!==E?E:p}else if(k){var D;y=null!==(D=I([p])[0])&&void 0!==D?D:p}const O=S();if(s&&O&&!e.defaultPrevented&&(R(null),e.preventDefault()),(c||u)&&O){const e=B(O),t=B(p),n=w(O);let o=w(p);n{!function(e){const[t]=Wl.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[]);(0,Yu.useShortcut)("core/block-editor/focus-toolbar",s),(0,a.useEffect)((()=>{l&&s()}),[n,l,s]),(0,a.useEffect)((()=>{let t=0;return i&&!l&&(t=window.requestAnimationFrame((()=>{const t=af(e.current),n=i||0;var o;t[n]&&(o=e.current).contains(o.ownerDocument.activeElement)&&t[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(t),!r||!e.current)return;const n=af(e.current).findIndex((e=>0===e.tabIndex));r(n)}}),[i,l])}var cf=function(e){let{children:t,focusOnMount:n,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,...l}=e;const s=(0,a.useRef)(),c=function(e){const[t,n]=(0,a.useState)(!0),o=(0,a.useCallback)((()=>{const t=!Wl.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||V()("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)}),[]);return(0,a.useLayoutEffect)((()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(s);return sf(s,n,c,o,r),c?(0,a.createElement)(m.Toolbar,i({label:l["aria-label"],ref:s},l),t):(0,a.createElement)(m.NavigableMenu,i({orientation:"horizontal",role:"toolbar",ref:s},l),t)};const{clearTimeout:uf,setTimeout:df}=window,pf=()=>{},mf=200;function ff(e){let{ref:t,isFocused:n,debounceTimeout:o=mf,onChange:r=pf}=e;const[l,i]=(0,a.useState)(!1),s=(0,a.useRef)(),c=e=>{null!=t&&t.current&&i(e),r(e)},u=()=>{const e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e},d=()=>{const e=s.current;e&&uf&&uf(e)};return(0,a.useEffect)((()=>()=>{c(!1),d()}),[]),{showMovers:l,debouncedShowMovers:e=>{e&&e.stopPropagation(),d(),l||c(!0)},debouncedHideMovers:e=>{e&&e.stopPropagation(),d(),s.current=df((()=>{u()&&c(!1)}),o)}}}function gf(e){let{ref:t,debounceTimeout:n=mf,onChange:o=pf}=e;const[r,l]=(0,a.useState)(!1),{showMovers:i,debouncedShowMovers:s,debouncedHideMovers:c}=ff({ref:t,debounceTimeout:n,isFocused:r,onChange:o}),u=(0,a.useRef)(!1),d=()=>(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement);return(0,a.useEffect)((()=>{const e=t.current,n=()=>{d()&&(l(!0),s())},o=()=>{d()||(l(!1),c())};return e&&!u.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",o,!0),u.current=!0),()=>{e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",o))}}),[t,u,l,s,c]),{showMovers:i,gestures:{onMouseMove:s,onMouseLeave:c}}}function hf(){const{selectBlock:e,toggleBlockHighlight:t}=(0,p.useDispatch)(so),{firstParentClientId:n,shouldHide:o,hasReducedUI:l}=(0,p.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:o,getSettings:l}=e(so),{hasBlockSupport:i}=e(r.store),a=n(o()),s=a[a.length-1],c=t(s),u=(0,r.getBlockType)(c),d=l();return{firstParentClientId:s,shouldHide:!i(u,"__experimentalParentSelector",!0),hasReducedUI:d.hasReducedUI}}),[]),s=Um(n),c=(0,a.useRef)(),{gestures:u}=gf({ref:c,onChange(e){e&&l||t(n,e)}});return o||void 0===n?null:(0,a.createElement)("div",i({className:"block-editor-block-parent-selector",key:n,ref:c},u),(0,a.createElement)(m.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:(0,g.sprintf)((0,g.__)("Select %s"),null==s?void 0:s.title),showTooltip:!0,icon:(0,a.createElement)(Du,{icon:null==s?void 0:s.icon})}))}var vf=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.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 bf(e){let{blocks:t}=e;return(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,a.createElement)(m.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,g.__)("Preview")),(0,a.createElement)(_p,{viewportWidth:500,blocks:t})))))}function _f(e){let{restTransformations:t,onSelect:n,setHoveredTransformItemName:o}=e;return t.map((e=>(0,a.createElement)(kf,{key:e.name,item:e,onSelect:n,setHoveredTransformItemName:o})))}function kf(e){let{item:t,onSelect:n,setHoveredTransformItemName:o}=e;const{name:l,icon:i,title:s,isDisabled:c}=t;return(0,a.createElement)(m.MenuItem,{className:(0,r.getBlockMenuDefaultClassName)(l),onClick:e=>{e.preventDefault(),n(l)},disabled:c,onMouseLeave:()=>o(null),onMouseEnter:()=>o(l)},(0,a.createElement)(Du,{icon:i,showColors:!0}),s)}var yf=e=>{let{className:t,possibleBlockTransformations:n,onSelect:o,blocks:l}=e;const[i,s]=(0,a.useState)(),{priorityTextTransformations:c,restTransformations:u}=function(e){const t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},n=(0,a.useMemo)((()=>{const n=Object.keys(t);return e.reduce(((e,t)=>{const{name:o}=t;return n.includes(o)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]})}),[e]);return n.priorityTextTransformations.sort(((e,n)=>{let{name:o}=e,{name:r}=n;return t[o](0,a.createElement)(kf,{key:e.name,item:e,onSelect:o,setHoveredTransformItemName:s}))),!d&&p),!!d&&(0,a.createElement)(m.MenuGroup,{className:t},p))};var Ef=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),Cf=window.wp.tokenList,Sf=n.n(Cf);function wf(e,t,n){const o=new(Sf())(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}function Bf(e){return(0,u.find)(e,"isDefault")}function If(e){let{clientId:t,onSwitch:n}=e;const{styles:o,block:l,blockType:i,className:s}=(0,p.useSelect)((e=>{const{getBlock:n}=e(so),o=n(t);if(!o)return{};const l=(0,r.getBlockType)(o.name),{getBlockStyles:i}=e(r.store);return{block:o,blockType:l,styles:i(o.name),className:o.attributes.className||""}}),[t]),{updateBlockAttributes:c}=(0,p.useDispatch)(so),d=function(e){return e&&0!==e.length?Bf(e)?e:[{name:"default",label:(0,g._x)("Default","block style"),isDefault:!0},...e]:[]}(o),m=function(e,t){for(const n of new(Sf())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),o=(0,u.find)(e,{name:t});if(o)return o}return(0,u.find)(e,"isDefault")}(d,s),f=function(e,t){return(0,a.useMemo)((()=>{const n=null==t?void 0:t.example,o=null==t?void 0:t.name;return n&&o?(0,r.getBlockFromExample)(o,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,r.cloneBlock)(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(l,i);return{onSelect:e=>{const o=wf(s,m,e);c(t,{className:o}),n()},stylesToRender:d,activeStyle:m,genericPreviewBlock:f,className:s}}const xf=()=>{};function Tf(e){let{clientId:t,onSwitch:n=xf}=e;const{onSelect:o,stylesToRender:r,activeStyle:l}=If({clientId:t,onSwitch:n});return r&&0!==r.length?(0,a.createElement)(a.Fragment,null,r.map((e=>{const t=e.label||e.name;return(0,a.createElement)(m.MenuItem,{key:e.name,icon:l.name===e.name?Ef:null,onClick:()=>o(e)},(0,a.createElement)(m.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function Nf(e){let{hoveredBlock:t,onSwitch:n}=e;const{clientId:o}=t;return(0,a.createElement)(m.MenuGroup,{label:(0,g.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,a.createElement)(Tf,{clientId:o,onSwitch:n}))}const Pf=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const{clientId:o,name:r,innerBlocks:l=[]}=e;if(!n.has(o)){if(r===t)return e;for(const e of l){const o=Pf(e,t,n);if(o)return o}}},Mf=(e,t)=>{const n=((e,t)=>{const n=(0,r.__experimentalGetBlockAttributesNamesByRole)(e,"content");return null!=n&&n.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}};var Lf=(e,t)=>(0,a.useMemo)((()=>e.reduce(((e,n)=>{const o=((e,t)=>{const n=t.map((e=>(0,r.cloneBlock)(e))),o=new Set;for(const t of e){let e=!1;for(const r of n){const n=Pf(r,t.name,o);if(n){e=!0,o.add(n.clientId),Mf(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e}),[])),[e,t]);function Rf(e){let{patterns:t,onSelect:n}=e;return(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,a.createElement)(m.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,g.__)("Preview")),(0,a.createElement)(Af,{patterns:t,onSelect:n})))))}function Af(e){let{patterns:t,onSelect:n}=e;const o=(0,m.__unstableUseCompositeState)();return(0,a.createElement)(m.__unstableComposite,i({},o,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,g.__)("Patterns list")}),t.map((e=>(0,a.createElement)(Df,{key:e.name,pattern:e,onSelect:n,composite:o}))))}function Df(e){let{pattern:t,onSelect:n,composite:o}=e;const r="block-editor-block-switcher__preview-patterns-container",l=(0,d.useInstanceId)(Df,`${r}-list__item-description`);return(0,a.createElement)("div",{className:`${r}-list__list-item`,"aria-label":t.title,"aria-describedby":t.description?l:void 0},(0,a.createElement)(m.__unstableCompositeItem,i({role:"option",as:"div"},o,{className:`${r}-list__item`,onClick:()=>n(t.transformedBlocks)}),(0,a.createElement)(_p,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),(0,a.createElement)("div",{className:`${r}-list__item-title`},t.title)),!!t.description&&(0,a.createElement)(m.VisuallyHidden,{id:l},t.description))}var Of=function(e){let{blocks:t,patterns:n,onSelect:o}=e;const[r,l]=(0,a.useState)(!1),i=Lf(n,t);return i.length?(0,a.createElement)(m.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},r&&(0,a.createElement)(Rf,{patterns:i,onSelect:o}),(0,a.createElement)(m.MenuItem,{onClick:e=>{e.preventDefault(),l(!r)},icon:Km},(0,g.__)("Patterns"))):null};const zf=e=>{let{clientIds:t,blocks:n}=e;const{replaceBlocks:o}=(0,p.useDispatch)(so),l=Um(n[0].clientId),{possibleBlockTransformations:i,canRemove:s,hasBlockStyles:c,icon:d,patterns:f}=(0,p.useSelect)((e=>{const{getBlockRootClientId:o,getBlockTransformItems:i,__experimentalGetPatternTransformItems:a}=e(so),{getBlockStyles:s,getBlockType:c}=e(r.store),{canRemoveBlocks:d}=e(so),p=o((0,u.castArray)(t)[0]),[{name:m}]=n,f=1===n.length,g=f&&s(m);let h;if(f)h=null==l?void 0:l.icon;else{var v;h=1===new Set(n.map((e=>{let{name:t}=e;return t}))).size?null===(v=c(m))||void 0===v?void 0:v.icon:vf}return{possibleBlockTransformations:i(n,p),canRemove:d(t,p),hasBlockStyles:!(null==g||!g.length),icon:h,patterns:a(n,p)}}),[t,n,null==l?void 0:l.icon]),h=Wm({clientId:Array.isArray(t)?t[0]:t,maximumLength:35}),v=1===n.length&&(0,r.isReusableBlock)(n[0]),b=1===n.length&&(0,r.isTemplatePart)(n[0]),_=!!i.length&&s&&!b,k=!(null==f||!f.length)&&s;if(!c&&!_)return(0,a.createElement)(m.ToolbarGroup,null,(0,a.createElement)(m.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:h,icon:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Du,{icon:d,showColors:!0}),(v||b)&&(0,a.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},h))}));const y=h,E=1===n.length?(0,g.sprintf)((0,g.__)("%s: Change block type or style"),h):(0,g.sprintf)((0,g._n)("Change type of %d block","Change type of %d blocks",n.length),n.length),C=c||_||k;return(0,a.createElement)(m.ToolbarGroup,null,(0,a.createElement)(m.ToolbarItem,null,(e=>(0,a.createElement)(m.DropdownMenu,{className:"block-editor-block-switcher",label:y,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Du,{icon:d,className:"block-editor-block-switcher__toggle",showColors:!0}),(v||b)&&(0,a.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},h)),toggleProps:{describedBy:E,...e},menuProps:{orientation:"both"}},(e=>{let{onClose:l}=e;return C&&(0,a.createElement)("div",{className:"block-editor-block-switcher__container"},k&&(0,a.createElement)(Of,{blocks:n,patterns:f,onSelect:e=>{(e=>{o(t,e)})(e),l()}}),_&&(0,a.createElement)(yf,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,blocks:n,onSelect:e=>{(e=>{o(t,(0,r.switchToBlockType)(n,e))})(e),l()}}),c&&(0,a.createElement)(Nf,{hoveredBlock:n[0],onSwitch:l}))})))))};var Ff=e=>{let{clientIds:t}=e;const n=(0,p.useSelect)((e=>e(so).getBlocksByClientId(t)),[t]);return!n.length||n.some((e=>!e))?null:(0,a.createElement)(zf,{clientIds:t,blocks:n})};const{Fill:Vf,Slot:Hf}=(0,m.createSlotFill)("__unstableBlockToolbarLastItem");Vf.Slot=Hf;var Gf=Vf;var Uf=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),Wf=window.wp.blob;function $f(e,t){if(t&&1===(null==e?void 0:e.length)&&0===e[0].type.indexOf("image/")){var n;const e=/<\s*img\b/gi;if(1!==(null===(n=t.match(e))||void 0===n?void 0:n.length))return!0;const o=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(o))return!0}return!1}function jf(){const{getBlockName:e}=(0,p.useSelect)(so),{getBlockType:t}=(0,p.useSelect)(r.store),{createSuccessNotice:n}=(0,p.useDispatch)(Op.store);return(0,a.useCallback)(((o,r)=>{let l="";if(1===r.length){var i;const n=r[0],a=null===(i=t(e(n)))||void 0===i?void 0:i.title;l="copy"===o?(0,g.sprintf)((0,g.__)('Copied "%s" to clipboard.'),a):(0,g.sprintf)((0,g.__)('Moved "%s" to clipboard.'),a)}else l="copy"===o?(0,g.sprintf)((0,g._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):(0,g.sprintf)((0,g._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(l,{type:"snackbar"})}),[])}function Kf(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:o,__unstableIsFullySelected:l,__unstableIsSelectionCollapsed:i,__unstableIsSelectionMergeable:a,__unstableGetSelectedBlocksWithPartialSelection:s}=(0,p.useSelect)(so),{flashBlock:c,removeBlocks:u,replaceBlocks:m,__unstableDeleteSelection:f,__unstableExpandSelection:g}=(0,p.useDispatch)(so),h=jf();return(0,d.useRefEffect)((d=>{function p(p){const v=t();if(0===v.length)return;if(!n()){const{target:e}=p,{ownerDocument:t}=e;if("copy"===p.type||"cut"===p.type?(0,Wl.documentHasUncollapsedSelection)(t):(0,Wl.documentHasSelection)(t))return}if(!d.contains(p.target.ownerDocument.activeElement))return;const b=p.defaultPrevented;p.preventDefault();const _=a(),k=i()||l(),y=!k&&!_;if("copy"===p.type||"cut"===p.type)if(1===v.length&&c(v[0]),y)g();else{let t;if(h(p.type,v),k)t=e(v);else{const[n,o]=s();t=[n,...e(v.slice(1,v.length-1)),o]}const n=p.clipboardData.getData("__unstableWrapperBlockName");n&&(t=(0,r.createBlock)(n,JSON.parse(p.clipboardData.getData("__unstableWrapperBlockAttributes")),t));const o=(0,r.serialize)(t);p.clipboardData.setData("text/plain",function(e){e=e.replace(/
/g,"\n");return(0,Wl.__unstableStripHTML)(e).trim().replace(/\n\n+/g,"\n\n")}(o)),p.clipboardData.setData("text/html",o)}if("cut"===p.type)k&&!y?u(v):f();else if("paste"===p.type){if(b)return;const{__experimentalCanUserUseUnfilteredHTML:e}=o(),{plainText:t,html:n}=function(e){let{clipboardData:t}=e,n="",o="";try{n=t.getData("text/plain"),o=t.getData("text/html")}catch(e){try{o=t.getData("Text")}catch(e){return}}const r=(0,Wl.getFilesFromDataTransfer)(t).filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)}));return r.length&&!$f(r,o)&&(o=r.map((e=>``)).join(""),n=""),{html:o,plainText:n}}(p),l=(0,r.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});m(v,l,l.length-1,-1)}}return d.ownerDocument.addEventListener("copy",p),d.ownerDocument.addEventListener("cut",p),d.ownerDocument.addEventListener("paste",p),()=>{d.ownerDocument.removeEventListener("copy",p),d.ownerDocument.removeEventListener("cut",p),d.ownerDocument.removeEventListener("paste",p)}}),[])}var qf=function(e){let{children:t}=e;return(0,a.createElement)("div",{ref:Kf()},t)};function Yf(e){let{clientIds:t,children:n,__experimentalUpdateSelection:o}=e;const{canInsertBlockType:l,getBlockRootClientId:i,getBlocksByClientId:a,canMoveBlocks:s,canRemoveBlocks:c}=(0,p.useSelect)(so),{getDefaultBlockName:u,getGroupingBlockName:d}=(0,p.useSelect)(r.store),m=a(t),f=i(t[0]),g=m.every((e=>!!e&&(0,r.hasBlockSupport)(e.name,"multiple",!0)&&l(e.name,f))),h=l(u(),f),v=s(t,f),b=c(t,f),{removeBlocks:_,replaceBlocks:k,duplicateBlocks:y,insertAfterBlock:E,insertBeforeBlock:C,flashBlock:S,setBlockMovingClientId:w,setNavigationMode:B,selectBlock:I}=(0,p.useDispatch)(so),x=jf();return n({canDuplicate:g,canInsertDefaultBlock:h,canMove:v,canRemove:b,rootClientId:f,blocks:m,onDuplicate(){return y(t,o)},onRemove(){return _(t,o)},onInsertBefore(){const e=Array.isArray(t)?t[0]:e;C(e)},onInsertAfter(){const e=Array.isArray(t)?t[t.length-1]:e;E(e)},onMoveTo(){B(!0),I(t[0]),w(t[0])},onGroup(){if(!m.length)return;const e=d(),n=(0,r.switchToBlockType)(m,e);n&&k(t,n)},onUngroup(){if(!m.length)return;const e=m[0].innerBlocks;e.length&&k(t,e)},onCopy(){const e=m.map((e=>{let{clientId:t}=e;return t}));1===m.length&&S(e[0]),x("copy",e)}})}const Qf=()=>{};var Zf=(0,d.compose)([(0,p.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlock:o,getBlockMode:l,getSettings:i}=e(so),a=o(n),s=i().codeEditingEnabled;return{mode:l(n),blockType:a?(0,r.getBlockType)(a.name):null,isCodeEditingEnabled:s}})),(0,p.withDispatch)(((e,t)=>{let{onToggle:n=Qf,clientId:o}=t;return{onToggleMode(){e(so).toggleBlockMode(o),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:o,small:l=!1,isCodeEditingEnabled:i=!0}=e;if(!t||!(0,r.hasBlockSupport)(t,"html",!0)||!i)return null;const s="visual"===n?(0,g.__)("Edit as HTML"):(0,g.__)("Edit visually");return(0,a.createElement)(m.MenuItem,{onClick:o},!l&&s)}));var Xf=(0,d.compose)((0,p.withSelect)(((e,t)=>{let{clientId:n}=t;const o=e(so).getBlock(n);return{block:o,shouldRender:o&&"core/html"===o.name}})),(0,p.withDispatch)(((e,t)=>{let{block:n}=t;return{onClick:()=>e(so).replaceBlocks(n.clientId,(0,r.rawHandler)({HTML:(0,r.getBlockContent)(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:o}=e;if(!t)return null;const r=(0,g.__)("Convert to Blocks");return(0,a.createElement)(m.MenuItem,{onClick:n},!o&&r)}));const{Fill:Jf,Slot:eg}=(0,m.createSlotFill)("__unstableBlockSettingsMenuFirstItem");Jf.Slot=eg;var tg=Jf;function ng(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:l}=(0,p.useSelect)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:o,canInsertBlockType:l,getSelectedBlockClientIds:i}=e(so),{getGroupingBlockName:a}=e(r.store),s=i(),c=a(),u=l(c,null!=s&&s.length?n(s[0]):void 0),d=o(s),p=1===d.length&&(null===(t=d[0])||void 0===t?void 0:t.name)===c;return{clientIds:s,isGroupable:u&&d.length,isUngroupable:p&&!!d[0].innerBlocks.length,blocksSelection:d,groupingBlockName:c}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:l}}function og(e){let{clientIds:t,isGroupable:n,isUngroupable:o,blocksSelection:l,groupingBlockName:i,onClose:s=(()=>{})}=e;const{replaceBlocks:c}=(0,p.useDispatch)(so);return n||o?(0,a.createElement)(a.Fragment,null,n&&(0,a.createElement)(m.MenuItem,{onClick:()=>{(()=>{const e=(0,r.switchToBlockType)(l,i);e&&c(t,e)})(),s()}},(0,g._x)("Group","verb")),o&&(0,a.createElement)(m.MenuItem,{onClick:()=>{(()=>{const e=l[0].innerBlocks;e.length&&c(t,e)})(),s()}},(0,g._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function rg(e){return(0,p.useSelect)((t=>{const{canEditBlock:n,canMoveBlock:o,canRemoveBlock:r,canLockBlockType:l,getBlockName:i,getBlockRootClientId:a,getTemplateLock:s}=t(so),c=a(e),u=n(e),d=o(e,c),p=r(e,c);return{canEdit:u,canMove:d,canRemove:p,canLock:l(i(e)),isContentLocked:"contentOnly"===s(e),isLocked:!u||!d||!p}}),[e])}var lg=(0,a.createElement)(D.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(D.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"}));var ig=(0,a.createElement)(D.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(D.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"}));function ag(e){return e.remove&&e.move?"all":!(!e.remove||e.move)&&"insert"}function sg(e){let{clientId:t,onClose:n}=e;const[o,l]=(0,a.useState)({move:!1,remove:!1}),{canEdit:i,canMove:s,canRemove:c}=rg(t),{isReusable:u,templateLock:f,hasTemplateLock:h}=(0,p.useSelect)((e=>{var n,o;const{getBlockName:l,getBlockAttributes:i}=e(so),a=l(t),s=(0,r.getBlockType)(a);return{isReusable:(0,r.isReusableBlock)(s),templateLock:null===(n=i(t))||void 0===n?void 0:n.templateLock,hasTemplateLock:!(null==s||null===(o=s.attributes)||void 0===o||!o.templateLock)}}),[t]),[v,b]=(0,a.useState)(!!f),{updateBlockAttributes:_}=(0,p.useDispatch)(so),k=Um(t),y=(0,d.useInstanceId)(sg,"block-editor-block-lock-modal__options-title");(0,a.useEffect)((()=>{l({move:!s,remove:!c,...u?{edit:!i}:{}})}),[i,s,c,u]);const E=Object.values(o).every(Boolean),C=Object.values(o).some(Boolean)&&!E;return(0,a.createElement)(m.Modal,{title:(0,g.sprintf)((0,g.__)("Lock %s"),k.title),overlayClassName:"block-editor-block-lock-modal",closeLabel:(0,g.__)("Close"),onRequestClose:n},(0,a.createElement)("p",null,(0,g.__)("Choose specific attributes to restrict or lock all available options.")),(0,a.createElement)("form",{onSubmit:e=>{e.preventDefault(),_([t],{lock:o,templateLock:v?ag(o):void 0}),n()}},(0,a.createElement)("div",{role:"group","aria-labelledby":y,className:"block-editor-block-lock-modal__options"},(0,a.createElement)(m.CheckboxControl,{className:"block-editor-block-lock-modal__options-title",label:(0,a.createElement)("span",{id:y},(0,g.__)("Lock all")),checked:E,indeterminate:C,onChange:e=>l({move:e,remove:e,...u?{edit:e}:{}})}),(0,a.createElement)("ul",{className:"block-editor-block-lock-modal__checklist"},u&&(0,a.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,a.createElement)(m.CheckboxControl,{label:(0,a.createElement)(a.Fragment,null,(0,g.__)("Restrict editing"),(0,a.createElement)(m.Icon,{icon:o.edit?ig:lg})),checked:!!o.edit,onChange:e=>l((t=>({...t,edit:e})))})),(0,a.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,a.createElement)(m.CheckboxControl,{label:(0,a.createElement)(a.Fragment,null,(0,g.__)("Disable movement"),(0,a.createElement)(m.Icon,{icon:o.move?ig:lg})),checked:o.move,onChange:e=>l((t=>({...t,move:e})))})),(0,a.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,a.createElement)(m.CheckboxControl,{label:(0,a.createElement)(a.Fragment,null,(0,g.__)("Prevent removal"),(0,a.createElement)(m.Icon,{icon:o.remove?ig:lg})),checked:o.remove,onChange:e=>l((t=>({...t,remove:e})))}))),h&&(0,a.createElement)(m.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,g.__)("Apply to all blocks inside"),checked:v,disabled:o.move&&!o.remove,onChange:()=>b(!v)})),(0,a.createElement)(m.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,a.createElement)(m.FlexItem,null,(0,a.createElement)(m.Button,{variant:"tertiary",onClick:n},(0,g.__)("Cancel"))),(0,a.createElement)(m.FlexItem,null,(0,a.createElement)(m.Button,{variant:"primary",type:"submit"},(0,g.__)("Apply"))))))}function cg(e){let{clientId:t}=e;const{canLock:n,isLocked:o}=rg(t),[r,l]=(0,a.useReducer)((e=>!e),!1);if(!n)return null;const i=o?(0,g.__)("Unlock"):(0,g.__)("Lock");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.MenuItem,{icon:o?lg:ig,onClick:l},i),r&&(0,a.createElement)(sg,{clientId:t,onClose:l}))}const{Fill:ug,Slot:dg}=(0,m.createSlotFill)("BlockSettingsMenuControls");function pg(e){let{...t}=e;return(0,a.createElement)(m.__experimentalStyleProvider,{document:document},(0,a.createElement)(ug,t))}pg.Slot=e=>{let{fillProps:t,clientIds:n=null,__unstableDisplayLocation:o}=e;const{selectedBlocks:r,selectedClientIds:l,canRemove:s}=(0,p.useSelect)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:o,canRemoveBlocks:r}=e(so),l=null!==n?n:o();return{selectedBlocks:(0,u.map)(t(l).filter(Boolean),(e=>e.name)),selectedClientIds:l,canRemove:r(l)}}),[n]),{canLock:c}=rg(l[0]),d=1===l.length&&c,f=ng(),{isGroupable:g,isUngroupable:h}=f,v=(g||h)&&s;return(0,a.createElement)(dg,{fillProps:{...t,__unstableDisplayLocation:o,selectedBlocks:r,selectedClientIds:l}},(e=>!(null!=e&&e.length)>0&&!v&&!d?null:(0,a.createElement)(m.MenuGroup,null,d&&(0,a.createElement)(cg,{clientId:l[0]}),e,v&&(0,a.createElement)(og,i({},f,{onClose:null==t?void 0:t.onClose})))))};var mg=pg;const fg=()=>{},gg={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function hg(e){let{blocks:t,onCopy:n}=e;const o=(0,d.useCopyToClipboard)((()=>(0,r.serialize)(t)),n),l=t.length>1?(0,g.__)("Copy blocks"):(0,g.__)("Copy block");return(0,a.createElement)(m.MenuItem,{ref:o},l)}var vg=function(e){let{clientIds:t,__experimentalSelectBlock:n,children:o,__unstableDisplayLocation:l,...s}=e;const c=(0,u.castArray)(t),d=c.length,f=c[0],{firstParentClientId:h,hasReducedUI:v,onlyBlock:b,parentBlockType:_,previousBlockClientId:k,nextBlockClientId:y,selectedBlockClientIds:E}=(0,p.useSelect)((e=>{const{getBlockCount:t,getBlockName:n,getBlockParents:o,getPreviousBlockClientId:l,getNextBlockClientId:i,getSelectedBlockClientIds:a,getSettings:s}=e(so),c=o(f),u=c[c.length-1],d=n(u);return{firstParentClientId:u,hasReducedUI:s().hasReducedUI,onlyBlock:1===t(),parentBlockType:(0,r.getBlockType)(d),previousBlockClientId:l(f),nextBlockClientId:i(f),selectedBlockClientIds:a()}}),[f]),C=(0,p.useSelect)((e=>{const{getShortcutRepresentation:t}=e(Yu.store);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")}}),[]),{selectBlock:S,toggleBlockHighlight:w}=(0,p.useDispatch)(so),B=(0,a.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:fg,[n]),I=Wm({clientId:f,maximumLength:25}),x=(0,a.useCallback)(n?()=>{const e=k||y;e&&E.includes(f)&&!E.includes(e)&&n(e)}:fg,[n,k,y,E]),T=(0,g.sprintf)((0,g.__)("Remove %s"),I),N=1===d?T:(0,g.__)("Remove blocks"),P=(0,a.useRef)(),{gestures:M}=gf({ref:P,onChange(e){e&&v||w(h,e)}});return(0,a.createElement)(Yf,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:r,canMove:c,canRemove:p,onDuplicate:v,onInsertAfter:k,onInsertBefore:y,onRemove:E,onCopy:w,onMoveTo:I,blocks:T}=e;return(0,a.createElement)(m.DropdownMenu,i({icon:Uf,label:(0,g.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:gg,noIcons:!0},s),(e=>{let{onClose:s}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.MenuGroup,null,(0,a.createElement)(tg.Slot,{fillProps:{onClose:s}}),void 0!==h&&(0,a.createElement)(m.MenuItem,i({},M,{ref:P,icon:(0,a.createElement)(Du,{icon:_.icon}),onClick:()=>S(h)}),(0,g.sprintf)((0,g.__)("Select parent block (%s)"),_.title)),1===d&&(0,a.createElement)(Xf,{clientId:f}),(0,a.createElement)(hg,{blocks:T,onCopy:w}),n&&(0,a.createElement)(m.MenuItem,{onClick:(0,u.flow)(s,v,B),shortcut:C.duplicate},(0,g.__)("Duplicate")),r&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.MenuItem,{onClick:(0,u.flow)(s,y),shortcut:C.insertBefore},(0,g.__)("Insert before")),(0,a.createElement)(m.MenuItem,{onClick:(0,u.flow)(s,k),shortcut:C.insertAfter},(0,g.__)("Insert after"))),c&&!b&&(0,a.createElement)(m.MenuItem,{onClick:(0,u.flow)(s,I)},(0,g.__)("Move to")),1===d&&(0,a.createElement)(Zf,{clientId:f,onToggle:s})),(0,a.createElement)(mg.Slot,{fillProps:{onClose:s},clientIds:t,__unstableDisplayLocation:l}),"function"==typeof o?o({onClose:s}):a.Children.map((e=>(0,a.cloneElement)(e,{onClose:s}))),p&&(0,a.createElement)(m.MenuGroup,null,(0,a.createElement)(m.MenuItem,{onClick:(0,u.flow)(s,E,x),shortcut:C.remove},N)))}))}))};var bg=function(e){let{clientIds:t,...n}=e;return(0,a.createElement)(m.ToolbarGroup,null,(0,a.createElement)(m.ToolbarItem,null,(e=>(0,a.createElement)(vg,i({clientIds:t,toggleProps:e},n)))))};function _g(e){let{clientId:t}=e;const n=Um(t),{canEdit:o,canMove:r,canRemove:l,canLock:i}=rg(t),[s,c]=(0,a.useReducer)((e=>!e),!1);return i?o&&r&&l?null:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.ToolbarGroup,{className:"block-editor-block-lock-toolbar"},(0,a.createElement)(m.ToolbarButton,{icon:ig,label:(0,g.sprintf)((0,g.__)("Unlock %s"),n.title),onClick:c})),s&&(0,a.createElement)(sg,{clientId:t,onClose:c})):null}var kg=(0,a.createElement)(D.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(D.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"}));var yg=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M9.2 6.5H4V8h5.2c.3 0 .5.2.5.5v7c0 .3-.2.5-.5.5H4v1.5h5.2c1.1 0 2-.9 2-2v-7c0-1.1-.8-2-2-2zM14.8 8H20V6.5h-5.2c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2H20V16h-5.2c-.3 0-.5-.2-.5-.5v-7c-.1-.3.2-.5.5-.5z"}));var Eg=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M16 4v5.2c0 .3-.2.5-.5.5h-7c-.3.1-.5-.2-.5-.5V4H6.5v5.2c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V4H16zm-.5 8.8h-7c-1.1 0-2 .9-2 2V20H8v-5.2c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5V20h1.5v-5.2c0-1.2-.9-2-2-2z"}));const Cg={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}};var Sg=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:o}=ng(),{replaceBlocks:l}=(0,p.useDispatch)(so),{canRemove:i,variations:s}=(0,p.useSelect)((e=>{const{canRemoveBlocks:o}=e(so),{getBlockVariations:l}=e(r.store);return{canRemove:o(t),variations:l(n,"transform")}}),[t,n]),c=o=>{const i=(0,r.switchToBlockType)(e,n);"string"!=typeof o&&(o="group"),i&&i.length>0&&(i[0].attributes.layout=Cg[o],l(t,i))};if(!o||!i)return null;const u=!!s.find((e=>{let{name:t}=e;return"group-row"===t})),d=!!s.find((e=>{let{name:t}=e;return"group-stack"===t}));return(0,a.createElement)(m.ToolbarGroup,null,(0,a.createElement)(m.ToolbarButton,{icon:kg,label:(0,g._x)("Group","verb"),onClick:c}),u&&(0,a.createElement)(m.ToolbarButton,{icon:yg,label:(0,g._x)("Row","single horizontal line"),onClick:()=>c("row")}),d&&(0,a.createElement)(m.ToolbarButton,{icon:Eg,label:(0,g._x)("Stack","verb"),onClick:()=>c("stack")}))};function wg(e){let{clientIds:t}=e;const n=1===t.length?t[0]:void 0,o=(0,p.useSelect)((e=>!!n&&"html"===e(so).getBlockMode(n)),[n]),{toggleBlockMode:r}=(0,p.useDispatch)(so);return o?(0,a.createElement)(m.ToolbarGroup,null,(0,a.createElement)(m.ToolbarButton,{onClick:()=>{r(n)}},(0,g.__)("Edit visually"))):null}var Bg=(0,a.createContext)("");var Ig=e=>{let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:o,blockType:l,hasFixedToolbar:s,hasReducedUI:u,isValid:f,isVisual:g,isContentLocked:h}=(0,p.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:o,isBlockValid:l,getBlockRootClientId:i,getSettings:a,__unstableGetContentLockingParent:s}=e(so),c=o(),u=c[0],d=i(u),p=a();return{blockClientIds:c,blockClientId:u,blockType:u&&(0,r.getBlockType)(t(u)),hasFixedToolbar:p.hasFixedToolbar,hasReducedUI:p.hasReducedUI,rootClientId:d,isValid:c.every((e=>l(e))),isVisual:c.every((e=>"visual"===n(e))),isContentLocked:!!s(u)}}),[]),{toggleBlockHighlight:v}=(0,p.useDispatch)(so),b=(0,a.useRef)(),{showMovers:_,gestures:k}=gf({ref:b,onChange(e){e&&u||v(o,e)}}),y=(0,d.useViewportMatch)("medium","<")||s;if(l&&!(0,r.hasBlockSupport)(l,"__experimentalToolbar",!0))return null;const E=y||_;if(0===n.length)return null;const C=f&&g,S=n.length>1,w=c()("block-editor-block-toolbar",E&&"is-showing-movers");return(0,a.createElement)("div",{className:w},!S&&!y&&!h&&(0,a.createElement)(hf,null),(0,a.createElement)("div",i({ref:b},k),(C||S)&&!h&&(0,a.createElement)(m.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,a.createElement)(Ff,{clientIds:n}),!S&&(0,a.createElement)(_g,{clientId:n[0]}),(0,a.createElement)(rf,{clientIds:n,hideDragHandle:t||u}))),C&&S&&(0,a.createElement)(Sg,null),C&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_o.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(_o.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(_o.Slot,{className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(_o.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(_o.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(Bg.Provider,{value:null==l?void 0:l.name},(0,a.createElement)(Gf.Slot,null))),(0,a.createElement)(wg,{clientIds:n}),!h&&(0,a.createElement)(bg,{clientIds:n}))};var xg=function(e){let{focusOnMount:t,isFixed:n,...o}=e;const{blockType:l,hasParents:s,showParentSelector:u}=(0,p.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:o,__unstableGetContentLockingParent:l}=e(so),{getBlockType:i}=e(r.store),a=o(),s=a[0],c=n(s),u=i(t(c[c.length-1]));return{blockType:s&&i(t(s)),hasParents:c.length,showParentSelector:u&&(0,r.hasBlockSupport)(u,"__experimentalParentSelector",!0)&&a.length<=1&&!l(s)}}),[]);if(l&&!(0,r.hasBlockSupport)(l,"__experimentalToolbar",!0))return null;const d=c()("block-editor-block-contextual-toolbar",{"has-parent":s&&u,"is-fixed":n});return(0,a.createElement)(cf,i({focusOnMount:t,className:d,"aria-label":(0,g.__)("Block tools")},o),(0,a.createElement)(Ig,{hideDragHandle:n}))};const Tg={flip:!1,shift:!0},Ng={flip:!0,shift:!1};function Pg(e,t,n){if(!e||!t)return Tg;const o=t.getBoundingClientRect(),r=e.getBoundingClientRect(),l=e.ownerDocument.documentElement.clientHeight,i=o.top-r.top>n,a=o.height>l-n;return i||a?Tg:Ng}function Mg(e){const{__unstableGetEditorMode:t,isMultiSelecting:n,hasMultiSelection:o,isTyping:r,getSettings:l,getLastMultiSelectedBlockClientId:i}=e(so);return{editorMode:t(),isMultiSelecting:n(),isTyping:r(),hasFixedToolbar:l().hasFixedToolbar,lastClientId:o()?i():null}}function Lg(e){let{clientId:t,rootClientId:n,isEmptyDefaultBlock:o,capturingClientId:r,__unstablePopoverSlot:l,__unstableContentRef:s}=e;const{editorMode:u,isMultiSelecting:m,isTyping:f,hasFixedToolbar:g,lastClientId:h}=(0,p.useSelect)(Mg,[]),v=(0,p.useSelect)((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:o,getBlockOrder:r}=e(so);if(!n())return!1;const l=o();return r(l.rootClientId)[l.index]===t}),[t]),b=(0,d.useViewportMatch)("medium"),_=(0,a.useRef)(!1),{stopTyping:k}=(0,p.useDispatch)(so),y=!f&&"edit"===u&&o,E="navigation"===u||"zoom-out"===u,C="edit"===u&&!g&&b&&!m&&!y&&!f,S="edit"===u&&!C&&!g&&!o;(0,Yu.useShortcut)("core/block-editor/focus-toolbar",(()=>{_.current=!0,k(!0)}),{isDisabled:!S}),(0,a.useEffect)((()=>{_.current=!1}));const w=(0,a.useRef)(),B=function(e){let{contentElement:t,clientId:n}=e;const o=Lo(n),[r,l]=(0,a.useState)(0),[i,s]=(0,a.useState)((()=>Pg(t,o,r))),c=(0,p.useSelect)((e=>e(so).getBlockIndex(n)),[n]),u=(0,d.useRefEffect)((e=>{l(e.offsetHeight)}),[]),m=(0,a.useCallback)((()=>s(Pg(t,o,r))),[t,o,r]);return(0,a.useLayoutEffect)(m,[c,m]),(0,a.useLayoutEffect)((()=>{var e,n,r;if(!t||!o)return;const l=null==t||null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView;let i;null==l||null===(n=l.addEventHandler)||void 0===n||n.call(l,"resize",m);const a=null==o||null===(r=o.ownerDocument)||void 0===r?void 0:r.defaultView;return a.ResizeObserver&&(i=new a.ResizeObserver(m),i.observe(o)),()=>{var e;null==l||null===(e=l.removeEventHandler)||void 0===e||e.call(l,"resize",m),i&&i.disconnect()}}),[m,t,o]),{...i,ref:u}}({contentElement:null==s?void 0:s.current,clientId:t});return E||C||y?(0,a.createElement)(a.Fragment,null,y&&(0,a.createElement)(yr,i({clientId:r||t,__unstableCoverTarget:!0,bottomClientId:h,className:c()("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":v}),__unstablePopoverSlot:l,__unstableContentRef:s,resize:!1,shift:!1},B),(0,a.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,a.createElement)(Tm,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0}))),(E||C)&&(0,a.createElement)(yr,i({clientId:r||t,bottomClientId:h,className:c()("block-editor-block-list__block-popover",{"is-insertion-point-visible":v}),__unstablePopoverSlot:l,__unstableContentRef:s,resize:!1},B),C&&(0,a.createElement)(xg,{focusOnMount:_.current,__experimentalInitialIndex:w.current,__experimentalOnIndexChange:e=>{w.current=e},key:t}),E&&(0,a.createElement)(lf,{clientId:t,rootClientId:n}))):null}function Rg(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:o,getBlock:l,getBlockParents:i,__experimentalGetBlockListSettingsForBlocks:a}=e(so),s=t()||n();if(!s)return;const{name:c,attributes:d={}}=l(s)||{},p=i(s),m=a(p),f=(0,u.find)(p,(e=>{var t;return null===(t=m[e])||void 0===t?void 0:t.__experimentalCaptureToolbars}));return{clientId:s,rootClientId:o(s),name:c,isEmptyDefaultBlock:c&&(0,r.isUnmodifiedDefaultBlock)({name:c,attributes:d}),capturingClientId:f}}function Ag(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const o=(0,p.useSelect)(Rg,[]);if(!o)return null;const{clientId:r,rootClientId:l,name:i,isEmptyDefaultBlock:s,capturingClientId:c}=o;return i?(0,a.createElement)(Lg,{clientId:r,rootClientId:l,isEmptyDefaultBlock:s,capturingClientId:c,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function Dg(e){let{children:t}=e;const n=(0,a.useContext)(Om),o=(0,a.useContext)(m.Disabled.Context);return n||o?t:(V()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools",since:"5.8"}),(0,a.createElement)(Fm,{__unstablePopoverSlot:"block-toolbar"},(0,a.createElement)(Ag,{__unstablePopoverSlot:"block-toolbar"}),t))}var Og=(0,d.createHigherOrderComponent)((e=>t=>{const{clientId:n}=mo();return(0,a.createElement)(e,i({},t,{clientId:n}))}),"withClientId");var zg=Og((e=>{let{clientId:t,showSeparator:n,isFloating:o,onAddBlock:r,isToggle:l}=e;return(0,a.createElement)(Lm,{className:c()({"block-list-appender__toggle":l}),rootClientId:t,showSeparator:n,isFloating:o,onAddBlock:r})}));var Fg=(0,d.compose)([Og,(0,p.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:o}=e(so),r=o(n);return{lastBlockClientId:r[r.length-1]}}))])((e=>{let{clientId:t}=e;return(0,a.createElement)(Nm,{rootClientId:t})}));const Vg=new WeakMap;const Hg=new WeakMap;function Gg(e,t,n,o,l,i,a){return s=>{const{srcRootClientId:c,srcClientIds:u,type:d,blocks:p}=function(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(s);if("inserter"===d){a();const n=p.map((e=>(0,r.cloneBlock)(e)));i(n,t,e,!0,null)}if("block"===d){const r=n(u[0]);if(c===e&&r===t)return;if(u.includes(e)||o(u).some((t=>t===e)))return;const i=c===e,a=u.length;l(u,c,e,i&&re(so).getSettings().mediaUpload),[]),{canInsertBlockType:o,getBlockIndex:l,getClientIdsOfDescendants:i}=(0,p.useSelect)(so),{insertBlocks:a,moveBlocksToPosition:s,updateBlockAttributes:c,clearSelectedBlock:u}=(0,p.useDispatch)(so),d=Gg(e,t,l,i,s,a,u),m=function(e,t,n,o,l,i){return a=>{if(!n)return;const s=(0,r.findTransform)((0,r.getBlockTransforms)("from"),(t=>"files"===t.type&&l(t.blockName,e)&&t.isMatch(a)));if(s){const n=s.transform(a,o);i(n,t,e)}}}(e,t,n,c,o,a),f=function(e,t,n){return o=>{const l=(0,r.pasteHandler)({HTML:o,mode:"BLOCKS"});l.length&&n(l,t,e)}}(e,t,a);return e=>{const t=(0,Wl.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?f(n):t.length?m(t):d(e)}}function Wg(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:l}=e,i=o?r:l,a=o?l:r,s=o?t.left:t.top,c=o?t.right:t.bottom,u=t[n];let d;return d=i>=s&&i<=c?i:i2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return r.forEach((r=>{const l=Wg(e,t,r);(void 0===n||l{const a=e.getBoundingClientRect(),[s,c]=$g(t,a,o);if(void 0===i||s0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,a.useState)(null),o=(0,p.useSelect)((t=>{const{getTemplateLock:n,__unstableIsWithinBlockOverlay:o,__unstableHasActiveBlockOverlayActive:r}=t(so),l=n(e);return["all","contentOnly"].some((e=>e===l))||r(e)||o(e)}),[e]),{getBlockListSettings:r}=(0,p.useSelect)(so),{showInsertionPoint:l,hideInsertionPoint:i}=(0,p.useDispatch)(so),s=Ug(e,t),c=(0,d.useThrottle)((0,a.useCallback)(((t,o)=>{var i;const a=jg(Array.from(o.children).filter((e=>e.classList.contains("wp-block"))),{x:t.clientX,y:t.clientY},null===(i=r(e))||void 0===i?void 0:i.orientation);n(void 0===a?0:a),null!==a&&l(e,a)}),[]),200);return(0,d.__experimentalUseDropZone)({isDisabled:o,onDrop:s,onDragOver(e){c(e,e.currentTarget)},onDragLeave(){c.cancel(),i(),n(null)},onDragEnd(){c.cancel(),i(),n(null)}})}function qg(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:o,__experimentalDirectInsert:l,template:i,templateLock:s,wrapperRef:c,templateInsertUpdatesSelection:d,__experimentalCaptureToolbars:m,__experimentalAppenderTagName:f,renderAppender:g,orientation:h,placeholder:v,__experimentalLayout:b}=e;!function(e,t,n,o,r,l,i,s){const{updateBlockListSettings:c}=(0,p.useDispatch)(so),u=(0,p.useRegistry)(),{blockListSettings:d,parentLock:m}=(0,p.useSelect)((t=>{const n=t(so).getBlockRootClientId(e);return{blockListSettings:t(so).getBlockListSettings(e),parentLock:t(so).getTemplateLock(n)}}),[e]),f=(0,a.useMemo)((()=>t),t);(0,a.useLayoutEffect)((()=>{const t={allowedBlocks:f,templateLock:void 0===r||"contentOnly"===m?m:r};if(void 0!==l&&(t.__experimentalCaptureToolbars=l),void 0!==i)t.orientation=i;else{const e=hl(null==s?void 0:s.type);t.orientation=e.getOrientation(s)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==o&&(t.__experimentalDirectInsert=o),br()(d,t)||(Vg.get(u)||Vg.set(u,[]),Vg.get(u).push([e,t]),window.queueMicrotask((()=>{var e;null!==(e=Vg.get(u))&&void 0!==e&&e.length&&u.batch((()=>{Vg.get(u).forEach((e=>{c(...e)})),Vg.set(u,[])}))})))}),[e,d,f,n,o,r,m,l,i,c,s,u])}(t,n,o,l,s,m,h,b),function(e,t,n,o){const{getSelectedBlocksInitialCaretPosition:l,isBlockSelected:i}=(0,p.useSelect)(so),{replaceInnerBlocks:s}=(0,p.useDispatch)(so),c=(0,p.useSelect)((t=>t(so).getBlocks(e)),[e]),{getBlocks:d}=(0,p.useSelect)(so),m=(0,a.useRef)(null);(0,a.useLayoutEffect)((()=>{window.queueMicrotask((()=>{const a=d(e),c=0===a.length||"all"===n||"contentOnly"===n,p=!(0,u.isEqual)(t,m.current);if(!c||!p)return;m.current=t;const f=(0,r.synchronizeBlocksWithTemplate)(a,t);(0,u.isEqual)(f,a)||s(e,f,0===a.length&&o&&0!==f.length&&i(e),l())}))}),[c,t,n,e])}(t,i,s,d);const _=(0,p.useSelect)((e=>{const n=e(so).getBlock(t);if(!n)return;const o=(0,r.getBlockType)(n.name);return o&&o.providesContext?function(e,t){Hg.has(t)||Hg.set(t,new WeakMap);const n=Hg.get(t);if(!n.has(e)){const o=(0,u.mapValues)(t.providesContext,(t=>e[t]));n.set(e,o)}return n.get(e)}(n.attributes,o):void 0}),[t]);return(0,a.createElement)(jl,{value:_},(0,a.createElement)(rh,{rootClientId:t,renderAppender:g,__experimentalAppenderTagName:f,__experimentalLayout:b,wrapperRef:c,placeholder:v}))}function Yg(e){return Vu(e),(0,a.createElement)(qg,e)}const Qg=(0,a.forwardRef)(((e,t)=>{const n=Zg({ref:t},e);return(0,a.createElement)("div",{className:"block-editor-inner-blocks"},(0,a.createElement)("div",n))}));function Zg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{__unstableDisableDropZone:n}=t,{clientId:o}=mo(),l=(0,d.useViewportMatch)("medium","<"),{__experimentalCaptureToolbars:s,hasOverlay:u}=(0,p.useSelect)((e=>{if(!o)return{};const{getBlockName:t,isBlockSelected:n,hasSelectedInnerBlock:i,__unstableGetEditorMode:a}=e(so),s=t(o),c="navigation"===a()||l;return{__experimentalCaptureToolbars:e(r.store).hasBlockSupport(s,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==s&&!n(o)&&!i(o,!0)&&c}}),[o,l]),m=Kg({rootClientId:o}),f=(0,d.useMergeRefs)([e.ref,n?null:m]),g={__experimentalCaptureToolbars:s,...t},h=g.value&&g.onChange?Yg:qg;return{...e,ref:f,className:c()(e.className,"block-editor-block-list__layout",{"has-overlay":u}),children:o?(0,a.createElement)(h,i({},g,{clientId:o})):(0,a.createElement)(rh,t)}}Zg.save=r.__unstableGetInnerBlocksProps,Qg.DefaultBlockAppender=Fg,Qg.ButtonBlockAppender=zg,Qg.Content=()=>Zg.save().children;var Xg=Qg;const Jg=(0,a.createContext)(),eh=(0,a.createContext)();function th(e){let{className:t,...n}=e;const[o,r]=(0,a.useState)(),l=(0,d.useViewportMatch)("medium"),{isOutlineMode:i,isFocusMode:s,editorMode:u}=(0,p.useSelect)((e=>{const{getSettings:t,__unstableGetEditorMode:n}=e(so),{outlineMode:o,focusMode:r}=t();return{isOutlineMode:o,isFocusMode:r,editorMode:n()}}),[]),{setBlockVisibility:m}=(0,p.useDispatch)(so),f=(0,a.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{const t={};for(const n of e){t[n.target.getAttribute("data-block")]=n.isIntersecting}m(t)}))}),[]),g=Zg({ref:(0,d.useMergeRefs)([Uu(),Vm(),r]),className:c()("is-root-container",t,{"is-outline-mode":i,"is-focus-mode":s&&l,"is-navigate-mode":"navigation"===u})},n);return(0,a.createElement)(Jg.Provider,{value:o},(0,a.createElement)(eh.Provider,{value:f},(0,a.createElement)("div",g)))}function nh(e){return function(){const e=(0,p.useSelect)((e=>e(so).getSettings().__experimentalBlockPatterns),[]);(0,a.useEffect)((()=>{if(null==e||!e.length)return;let t,n=-1;const o=()=>{n++,n>=e.length||((0,p.select)(so).__experimentalGetParsedPattern(e[n].name),t=Hm(o))};return t=Hm(o),()=>Gm(t)}),[e])}(),(0,a.createElement)(Dg,null,(0,a.createElement)(po,{value:co},(0,a.createElement)(th,e)))}function oh(e){let{placeholder:t,rootClientId:n,renderAppender:o,__experimentalAppenderTagName:r,__experimentalLayout:l=vl}=e;const{order:i,selectedBlocks:s,visibleBlocks:c}=(0,p.useSelect)((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:o,__unstableGetVisibleBlocks:r}=e(so);return{order:t(n),selectedBlocks:o(),visibleBlocks:r()}}),[n]);return(0,a.createElement)(_l,{value:l},i.map((e=>(0,a.createElement)(p.AsyncModeProvider,{key:e,value:!c.has(e)&&!s.includes(e)},(0,a.createElement)(Nu,{rootClientId:n,clientId:e})))),i.length<1&&t,(0,a.createElement)(Rm,{tagName:r,rootClientId:n,renderAppender:o}))}function rh(e){return(0,a.createElement)(p.AsyncModeProvider,{value:!1},(0,a.createElement)(oh,e))}function lh(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function ih(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{flat:t,...n}=e;return t||lh(Object.values(n).filter(Boolean))||"px"}function ah(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,m.__experimentalParseQuantityAndUnitFromRawValue)(e))),n=t.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),o=t.map((e=>e[1])),r=n.every((e=>e===n[0]))?n[0]:"",l=lh(o),i=0===r||r?`${r}${l}`:void 0;return i}function sh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=ah(e),n="string"!=typeof e&&isNaN(parseFloat(t));return n}function ch(e){if(!e)return!1;if("string"==typeof e)return!0;return!!Object.values(e).filter((e=>!!e||0===e)).length}function uh(e){let{onChange:t,selectedUnits:n,setSelectedUnits:o,values:r,...l}=e,s=ah(r);void 0===s&&(s=ih(n));const c=ch(r)&&sh(r),u=c?(0,g.__)("Mixed"):null;return(0,a.createElement)(m.__experimentalUnitControl,i({},l,{"aria-label":(0,g.__)("Border radius"),disableUnits:c,isOnly:!0,value:s,onChange:e=>{const n=!isNaN(parseFloat(e));t(n?e:void 0)},onUnitChange:e=>{o({topLeft:e,topRight:e,bottomLeft:e,bottomRight:e})},placeholder:u}))}nh.__unstableElementContext=Jg;const dh={topLeft:(0,g.__)("Top left"),topRight:(0,g.__)("Top right"),bottomLeft:(0,g.__)("Bottom left"),bottomRight:(0,g.__)("Bottom right")};function ph(e){let{onChange:t,selectedUnits:n,setSelectedUnits:o,values:r,...l}=e;const s=e=>n=>{if(!t)return;const o=!isNaN(parseFloat(n))?n:void 0;t({...c,[e]:o})},c="string"!=typeof r?r:{topLeft:r,topRight:r,bottomLeft:r,bottomRight:r};return(0,a.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(dh).map((e=>{let[t,r]=e;const[u,d]=(0,m.__experimentalParseQuantityAndUnitFromRawValue)(c[t]),p=c[t]?d:n[t]||n.flat;return(0,a.createElement)(m.Tooltip,{text:r,position:"top",key:t},(0,a.createElement)("div",{className:"components-border-radius-control__tooltip-wrapper"},(0,a.createElement)(m.__experimentalUnitControl,i({},l,{"aria-label":r,value:[u,p].join(""),onChange:s(t),onUnitChange:(f=t,e=>{const t={...n};t[f]=e,o(t)})}))));var f})))}function mh(e){let{isLinked:t,...n}=e;const o=t?(0,g.__)("Unlink radii"):(0,g.__)("Link radii");return(0,a.createElement)(m.Tooltip,{text:o},(0,a.createElement)("span",null,(0,a.createElement)(m.Button,i({},n,{className:"component-border-radius-control__linked-button",isSmall:!0,icon:t?er:tr,iconSize:24,"aria-label":o}))))}const fh={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},gh={px:100,em:20,rem:20};function hh(e){let{onChange:t,values:n}=e;const[o,r]=(0,a.useState)(!ch(n)||!sh(n)),[l,i]=(0,a.useState)({flat:"string"==typeof n?(0,m.__experimentalParseQuantityAndUnitFromRawValue)(n)[1]:void 0,topLeft:(0,m.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.topLeft)[1],topRight:(0,m.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.topRight)[1],bottomLeft:(0,m.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.bottomLeft)[1],bottomRight:(0,m.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.bottomRight)[1]}),s=(0,m.__experimentalUseCustomUnits)({availableUnits:qo("spacing.units")||["px","em","rem"]}),c=ih(l),u=s&&s.find((e=>e.value===c)),d=(null==u?void 0:u.step)||1,[p]=(0,m.__experimentalParseQuantityAndUnitFromRawValue)(ah(n));return(0,a.createElement)("fieldset",{className:"components-border-radius-control"},(0,a.createElement)(m.BaseControl.VisualLabel,{as:"legend"},(0,g.__)("Radius")),(0,a.createElement)("div",{className:"components-border-radius-control__wrapper"},o?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(uh,{className:"components-border-radius-control__unit-control",values:n,min:0,onChange:t,selectedUnits:l,setSelectedUnits:i,units:s}),(0,a.createElement)(m.RangeControl,{label:(0,g.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:null!=p?p:"",min:0,max:gh[c],initialPosition:0,withInputField:!1,onChange:e=>{t(void 0!==e?`${e}${c}`:void 0)},step:d})):(0,a.createElement)(ph,{min:0,onChange:t,selectedUnits:l,setSelectedUnits:i,values:n||fh,units:s}),(0,a.createElement)(mh,{onClick:()=>r(!o),isLinked:o})))}function vh(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,a.createElement)(hh,{values:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,onChange:e=>{const t=ar({...n,border:{...null==n?void 0:n.border,radius:e}});o({style:t})}})}Dd([Od,Vd]);const bh=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{color:n}},_h=(e,t)=>(0,u.find)(e,{color:t});function kh(e,t){if(e&&t)return`has-${(0,u.kebabCase)(t)}-${e}`}function yh(){return{disableCustomColors:!qo("color.custom"),disableCustomGradients:!qo("color.customGradient")}}function Eh(){const e=yh(),t=qo("color.palette.custom"),n=qo("color.palette.theme"),o=qo("color.palette.default"),r=qo("color.defaultPalette");e.colors=(0,a.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,g._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,g._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,g._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[o,n,t]);const l=qo("color.gradients.custom"),i=qo("color.gradients.theme"),s=qo("color.gradients.default"),c=qo("color.defaultGradients");return e.gradients=(0,a.useMemo)((()=>{const e=[];return i&&i.length&&e.push({name:(0,g._x)("Theme","Indicates this palette comes from the theme."),gradients:i}),c&&s&&s.length&&e.push({name:(0,g._x)("Default","Indicates this palette comes from WordPress."),gradients:s}),l&&l.length&&e.push({name:(0,g._x)("Custom","Indicates this palette is created by the user."),gradients:l}),e}),[l,i,s]),e}const Ch="__experimentalBorder",Sh=["top","right","bottom","left"],wh=e=>{var t,n;return{...e,borderColor:void 0,style:{...e.style,border:{radius:null===(t=e.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius}}}},Bh=(e,t,n)=>{let o;return e.some((e=>e.colors.some((e=>e[t]===n&&(o=e,!0))))),o},Ih=e=>{let{colors:t,namedColor:n,customColor:o}=e;if(n){const e=Bh(t,"slug",n);if(e)return e}if(!o)return{color:void 0};const r=Bh(t,"color",o);return r||{color:o}};function xh(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function Th(e){const{attributes:t,clientId:n,setAttributes:o}=e,{style:l}=t,{colors:i}=Eh(),s=Nh(e.name),c=qo("border.color")&&Nh(e.name,"color"),u=qo("border.radius")&&Nh(e.name,"radius"),d=qo("border.style")&&Nh(e.name,"style"),p=qo("border.width")&&Nh(e.name,"width");if([!c,!u,!d,!p].every(Boolean)||!s)return null;const f=(0,r.getBlockSupport)(e.name,[Ch,"__experimentalDefaultControls"]),h=(null==f?void 0:f.color)||(null==f?void 0:f.width),v=((e,t)=>{const{borderColor:n,style:o}=e,{border:r}=o||{};if(n){const{color:e}=Ih({colors:t,namedColor:n});return e?{...r,color:e}:r}if(!r)return r;const l={...r};return Sh.forEach((e=>{var n;const o=xh(null===(n=l[e])||void 0===n?void 0:n.color);if(o){const{color:n}=Ih({colors:t,namedColor:o});l[e]={...l[e],color:n}}})),l})(t,i);return(0,a.createElement)(hr,{__experimentalGroup:"border"},(p||c)&&(0,a.createElement)(m.__experimentalToolsPanelItem,{hasValue:()=>(e=>{const{borderColor:t,style:n}=e.attributes;return(0,m.__experimentalIsDefinedBorder)(null==n?void 0:n.border)||!!t})(e),label:(0,g.__)("Border"),onDeselect:()=>(e=>{var t;let{attributes:n={},setAttributes:o}=e;const{style:r}=n;o({borderColor:void 0,style:{...r,border:ar({radius:null==r||null===(t=r.border)||void 0===t?void 0:t.radius})}})})(e),isShownByDefault:h,resetAllFilter:wh,panelId:n},(0,a.createElement)(m.__experimentalBorderBoxControl,{colors:i,enableAlpha:!0,enableStyle:d,onChange:e=>{var t;let n,r={...e};if((0,m.__experimentalHasSplitBorders)(e))r={top:{...e.top},right:{...e.right},bottom:{...e.bottom},left:{...e.left}},Sh.forEach((t=>{var n;if(null!==(n=e[t])&&void 0!==n&&n.color){var o;const n=Ih({colors:i,customColor:null===(o=e[t])||void 0===o?void 0:o.color});n.slug&&(r[t].color=`var:preset|color|${n.slug}`)}}));else if(null!=e&&e.color){const t=null==e?void 0:e.color,o=Ih({colors:i,customColor:t});o.slug&&(n=o.slug,r.color=void 0)}const a=ar({...l,border:{radius:null==l||null===(t=l.border)||void 0===t?void 0:t.radius,...r}});o({style:a,borderColor:n})},popoverOffset:40,popoverPlacement:"left-start",value:v,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0})),u&&(0,a.createElement)(m.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;const o=null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius;return"object"==typeof o?Object.entries(o).some(Boolean):!!o}(e),label:(0,g.__)("Radius"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Ph(o,"radius")})}(e),isShownByDefault:null==f?void 0:f.radius,resetAllFilter:e=>{var t;return{...e,style:{...e.style,border:{...null===(t=e.style)||void 0===t?void 0:t.border,radius:void 0}}}},panelId:n},(0,a.createElement)(vh,e)))}function Nh(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==a.Platform.OS)return!1;const n=(0,r.getBlockSupport)(e,Ch);return!0===n||("any"===t?!!(null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style):!(null==n||!n[t]))}function Ph(e,t){return ar({...e,border:{...null==e?void 0:e.border,[t]:void 0}})}function Mh(e,t,n){if(!Nh(t,"color")||ur(t,Ch,"color"))return e;const o=Lh(n),r=c()(e.className,o);return e.className=r||void 0,e}function Lh(e){var t;const{borderColor:n,style:o}=e,r=kh("border-color",n);return c()({"has-border-color":n||(null==o||null===(t=o.border)||void 0===t?void 0:t.color),[r]:!!r})}const Rh=(0,d.createHigherOrderComponent)((e=>t=>{var n,o,r,l,s,c,u,d,p;const{name:m,attributes:f}=t,{borderColor:g,style:h}=f,{colors:v}=Eh();if(!Nh(m,"color")||ur(m,Ch,"color"))return(0,a.createElement)(e,t);const{color:b}=Ih({colors:v,namedColor:g}),{color:_}=Ih({colors:v,namedColor:xh(null==h||null===(n=h.border)||void 0===n||null===(o=n.top)||void 0===o?void 0:o.color)}),{color:k}=Ih({colors:v,namedColor:xh(null==h||null===(r=h.border)||void 0===r||null===(l=r.right)||void 0===l?void 0:l.color)}),{color:y}=Ih({colors:v,namedColor:xh(null==h||null===(s=h.border)||void 0===s||null===(c=s.bottom)||void 0===c?void 0:c.color)}),{color:E}=Ih({colors:v,namedColor:xh(null==h||null===(u=h.border)||void 0===u||null===(d=u.left)||void 0===d?void 0:d.color)}),C={borderTopColor:_||b,borderRightColor:k||b,borderBottomColor:y||b,borderLeftColor:E||b};let S=t.wrapperProps;return S={...t.wrapperProps,style:{...null===(p=t.wrapperProps)||void 0===p?void 0:p.style,...C}},(0,a.createElement)(e,i({},t,{wrapperProps:S}))}));function Ah(e){if(e)return`has-${e}-gradient-background`}function Dh(e,t){const n=(0,u.find)(e,["slug",t]);return n&&n.gradient}function Oh(e,t){return(0,u.find)(e,["gradient",t])}function zh(e,t){const n=Oh(e,t);return n&&n.slug}function Fh(){let{gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clientId:n}=mo(),o=qo("color.gradients.custom"),r=qo("color.gradients.theme"),l=qo("color.gradients.default"),i=(0,a.useMemo)((()=>[...o||[],...r||[],...l||[]]),[o,r,l]),{gradient:s,customGradient:c}=(0,p.useSelect)((o=>{const{getBlockAttributes:r}=o(so),l=r(n)||{};return{customGradient:l[t],gradient:l[e]}}),[n,e,t]),{updateBlockAttributes:u}=(0,p.useDispatch)(so),d=(0,a.useCallback)((o=>{const r=zh(i,o);u(n,r?{[e]:r,[t]:void 0}:{[e]:void 0,[t]:o})}),[i,n,u]),m=Ah(s);let f;return f=s?Dh(i,s):c,{gradientClass:m,gradientValue:f,setGradient:d}}(0,l.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Nh(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",Mh),(0,l.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!Nh(e,"color")||ur(e,Ch,"color"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Mh(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",Rh);const Vh=["colors","disableCustomColors","gradients","disableCustomGradients"],Hh={name:"color",title:"Solid",value:"color"},Gh={name:"gradient",title:"Gradient",value:"gradient"},Uh=[Hh,Gh];function Wh(e){let{colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,__experimentalHasMultipleOrigins:l,__experimentalIsRenderedInSidebar:i,className:s,label:d,onColorChange:p,onGradientChange:f,colorValue:g,gradientValue:h,clearable:v,showTitle:b=!0,enableAlpha:_}=e;const k=p&&(!(0,u.isEmpty)(t)||!o),y=f&&(!(0,u.isEmpty)(n)||!r);if(!k&&!y)return null;const E={[Hh.value]:(0,a.createElement)(m.ColorPalette,{value:g,onChange:y?e=>{p(e),f()}:p,colors:t,disableCustomColors:o,__experimentalHasMultipleOrigins:l,__experimentalIsRenderedInSidebar:i,clearable:v,enableAlpha:_}),[Gh.value]:(0,a.createElement)(m.GradientPicker,{__nextHasNoMargin:!0,value:h,onChange:k?e=>{f(e),p()}:f,gradients:n,disableCustomGradients:r,__experimentalHasMultipleOrigins:l,__experimentalIsRenderedInSidebar:i,clearable:v})},C=e=>(0,a.createElement)("div",{className:"block-editor-color-gradient-control__panel"},E[e]);return(0,a.createElement)(m.BaseControl,{__nextHasNoMarginBottom:!0,className:c()("block-editor-color-gradient-control",s)},(0,a.createElement)("fieldset",{className:"block-editor-color-gradient-control__fieldset"},(0,a.createElement)(m.__experimentalVStack,{spacing:1},b&&(0,a.createElement)("legend",null,(0,a.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,a.createElement)(m.BaseControl.VisualLabel,null,d))),k&&y&&(0,a.createElement)(m.TabPanel,{className:"block-editor-color-gradient-control__tabs",tabs:Uh,initialTabName:h?Gh.value:!!k&&Hh.value},(e=>C(e.value))),!y&&C(Hh.value),!k&&C(Gh.value))))}function $h(e){const t={};return t.colors=qo("color.palette"),t.gradients=qo("color.gradients"),t.disableCustomColors=!qo("color.custom"),t.disableCustomGradients=!qo("color.customGradient"),(0,a.createElement)(Wh,i({},t,e))}var jh=function(e){return(0,u.every)(Vh,(t=>e.hasOwnProperty(t)))?(0,a.createElement)(Wh,e):(0,a.createElement)($h,e)};const Kh=e=>{let{setting:t,children:n,panelId:o,...r}=e;return(0,a.createElement)(m.__experimentalToolsPanelItem,i({hasValue:()=>!!t.colorValue||!!t.gradientValue,label:t.label,onDeselect:()=>{t.colorValue?t.onColorChange():t.gradientValue&&t.onGradientChange()},isShownByDefault:void 0===t.isShownByDefault||t.isShownByDefault},r,{className:"block-editor-tools-panel-color-gradient-settings__item",panelId:o,resetAllFilter:t.resetAllFilter}),n)},qh=e=>{let{colorValue:t,label:n}=e;return(0,a.createElement)(m.__experimentalHStack,{justify:"flex-start"},(0,a.createElement)(m.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:t}),(0,a.createElement)(m.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:n},n))},Yh=e=>t=>{let{onToggle:n,isOpen:o}=t;const{colorValue:r,label:l}=e,i={onClick:n,className:c()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":o}),"aria-expanded":o};return(0,a.createElement)(m.Button,i,(0,a.createElement)(qh,{colorValue:r,label:l}))};function Qh(e){let t,{colors:n,disableCustomColors:o,disableCustomGradients:r,enableAlpha:l,gradients:s,settings:c,__experimentalHasMultipleOrigins:u,__experimentalIsRenderedInSidebar:d,...p}=e;return d&&(t={placement:"left-start",offset:36,shift:!0}),(0,a.createElement)(a.Fragment,null,c.map(((e,c)=>{var f;const g={clearable:!1,colorValue:e.colorValue,colors:n,disableCustomColors:o,disableCustomGradients:r,enableAlpha:l,gradientValue:e.gradientValue,gradients:s,label:e.label,onColorChange:e.onColorChange,onGradientChange:e.onGradientChange,showTitle:!1,__experimentalHasMultipleOrigins:u,__experimentalIsRenderedInSidebar:d,...e},h={colorValue:null!==(f=e.gradientValue)&&void 0!==f?f:e.colorValue,label:e.label};return e&&(0,a.createElement)(Kh,i({key:c,setting:e},p),(0,a.createElement)(m.Dropdown,{popoverProps:t,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:Yh(h),renderContent:()=>(0,a.createElement)(m.__experimentalDropdownContentWrapper,{paddingSize:"none"},(0,a.createElement)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content"},(0,a.createElement)(jh,g)))}))})))}Dd([Od,Vd]);var Zh=function(e){let{backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:o,fallbackLinkColor:r,fontSize:l,isLargeText:i,textColor:s,linkColor:c,enableAlphaChecker:u=!1}=e;const d=t||n;if(!d)return null;const p=s||o,f=c||r;if(!p&&!f)return null;const h=[{color:p,description:(0,g.__)("text color")},{color:f,description:(0,g.__)("link color")}],v=Rd(d),b=v.alpha()<1,_=v.brightness(),k={level:"AA",size:i||!1!==i&&l>=24?"large":"small"};let y="",E="";for(const e of h){if(!e.color)continue;const t=Rd(e.color),n=t.isReadable(v,k),o=t.alpha()<1;if(!n){if(b||o)continue;y=_null==e?void 0:e.colorValue));(0,a.useEffect)((()=>{var e;if(!r||!f.length)return;if(!m.current)return;u(Xh(m.current).color);const t=null===(e=m.current)||void 0===e?void 0:e.querySelector("a");t&&t.innerText&&p(Xh(t).color);let n=m.current,o=Xh(n).backgroundColor;for(;"rgba(0, 0, 0, 0)"===o&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,o=Xh(n).backgroundColor;s(o)}));const g=Eh();return(0,a.createElement)(hr,{__experimentalGroup:"color"},(0,a.createElement)(Qh,i({enableAlpha:t,panelId:o,settings:n,__experimentalIsItemGroup:!1,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0},g)),r&&(0,a.createElement)(Zh,{backgroundColor:l,textColor:c,enableAlphaChecker:t,linkColor:d}))}const ev="color",tv=e=>{const t=(0,r.getBlockSupport)(e,ev);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},nv=e=>{if("web"!==a.Platform.OS)return!1;const t=(0,r.getBlockSupport)(e,ev);return null!==t&&"object"==typeof t&&!!t.link},ov=e=>{const t=(0,r.getBlockSupport)(e,ev);return null!==t&&"object"==typeof t&&!!t.gradients},rv=e=>{const t=(0,r.getBlockSupport)(e,ev);return t&&!1!==t.background},lv=e=>{const t=(0,r.getBlockSupport)(e,ev);return t&&!1!==t.text},iv=(e,t)=>ar(sr(t,e,void 0)),av=e=>({textColor:void 0,style:iv(["color","text"],e.style)}),sv=e=>({style:iv(["elements","link","color","text"],e.style)}),cv=e=>{var t;return{backgroundColor:void 0,gradient:void 0,style:{...e.style,color:{...null===(t=e.style)||void 0===t?void 0:t.color,background:void 0,gradient:void 0}}}};function uv(e,t,n){var o,r,l,i,a,s;if(!tv(t)||ur(t,ev))return e;const u=ov(t),{backgroundColor:d,textColor:p,gradient:m,style:f}=n,g=e=>!ur(t,ev,e),h=g("text")?kh("color",p):void 0,v=g("gradients")?Ah(m):void 0,b=g("background")?kh("background-color",d):void 0,_=g("background")||g("gradients"),k=d||(null==f||null===(o=f.color)||void 0===o?void 0:o.background)||u&&(m||(null==f||null===(r=f.color)||void 0===r?void 0:r.gradient)),y=c()(e.className,h,v,{[b]:!(u&&null!=f&&null!==(l=f.color)&&void 0!==l&&l.gradient||!b),"has-text-color":g("text")&&(p||(null==f||null===(i=f.color)||void 0===i?void 0:i.text)),"has-background":_&&k,"has-link-color":g("link")&&(null==f||null===(a=f.elements)||void 0===a||null===(s=a.link)||void 0===s?void 0:s.color)});return e.className=y||void 0,e}const dv=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?bh(e,n[1]).color:t};function pv(e){var t,n,o,l,i,s,c,u,d;const{name:p,attributes:m}=e,f=qo("color.palette.custom"),h=qo("color.palette.theme"),v=qo("color.palette.default"),b=(0,a.useMemo)((()=>[...f||[],...h||[],...v||[]]),[f,h,v]),_=qo("color.gradients.custom"),k=qo("color.gradients.theme"),y=qo("color.gradients.default"),E=(0,a.useMemo)((()=>[..._||[],...k||[],...y||[]]),[_,k,y]),C=qo("color.custom"),S=qo("color.customGradient"),w=qo("color.background"),B=qo("color.link"),I=qo("color.text"),x=C||!h||(null==h?void 0:h.length)>0,T=S||!k||(null==k?void 0:k.length)>0,N=(0,a.useRef)(m);if((0,a.useEffect)((()=>{N.current=m}),[m]),!tv(p))return null;const P=nv(p)&&B&&x,M=lv(p)&&I&&x,L=rv(p)&&w&&x,R=ov(p)&&T;if(!(P||M||L||R))return null;const{style:A,textColor:D,backgroundColor:O,gradient:z}=m;let F;if(R&&z)F=Dh(E,z);else if(R){var V;F=null==A||null===(V=A.color)||void 0===V?void 0:V.gradient}const H=t=>n=>{var o,r;const l=_h(b,n),i=t+"Color",a={...N.current.style,color:{...null===(o=N.current)||void 0===o||null===(r=o.style)||void 0===r?void 0:r.color,[t]:null!=l&&l.slug?void 0:n}},s=null!=l&&l.slug?l.slug:void 0,c={style:ar(a),[i]:s};e.setAttributes(c),N.current={...N.current,...c}},G=(0,r.getBlockSupport)(e.name,[ev,"__experimentalDefaultControls"]),U=!("web"!==a.Platform.OS||z||null!=A&&null!==(t=A.color)&&void 0!==t&&t.gradient||!1===(0,r.getBlockSupport)(e.name,[ev,"enableContrastChecker"]));return(0,a.createElement)(Jh,{enableContrastChecking:U,clientId:e.clientId,enableAlpha:!0,settings:[...M?[{label:(0,g.__)("Text"),onColorChange:H("text"),colorValue:bh(b,D,null==A||null===(n=A.color)||void 0===n?void 0:n.text).color,isShownByDefault:null==G?void 0:G.text,resetAllFilter:av}]:[],...L||R?[{label:(0,g.__)("Background"),onColorChange:L?H("background"):void 0,colorValue:bh(b,O,null==A||null===(o=A.color)||void 0===o?void 0:o.background).color,gradientValue:F,onGradientChange:R?t=>{const n=zh(E,t);let o;if(n){var r,l,i;const e={...null===(r=N.current)||void 0===r?void 0:r.style,color:{...null===(l=N.current)||void 0===l||null===(i=l.style)||void 0===i?void 0:i.color,gradient:void 0}};o={style:ar(e),gradient:n}}else{var a,s,c;const e={...null===(a=N.current)||void 0===a?void 0:a.style,color:{...null===(s=N.current)||void 0===s||null===(c=s.style)||void 0===c?void 0:c.color,gradient:t}};o={style:ar(e),gradient:void 0}}e.setAttributes(o),N.current={...N.current,...o}}:void 0,isShownByDefault:null==G?void 0:G.background,resetAllFilter:cv}]:[],...P?[{label:(0,g.__)("Link"),onColorChange:t=>{var n;const o=_h(b,t),r=null!=o&&o.slug?`var:preset|color|${o.slug}`:t,l=ar(sr(null===(n=N.current)||void 0===n?void 0:n.style,["elements","link","color","text"],r));e.setAttributes({style:l}),N.current={...N.current,style:l}},colorValue:dv(b,null==A||null===(l=A.elements)||void 0===l||null===(i=l.link)||void 0===i||null===(s=i.color)||void 0===s?void 0:s.text),clearable:!(null==A||null===(c=A.elements)||void 0===c||null===(u=c.link)||void 0===u||null===(d=u.color)||void 0===d||!d.text),isShownByDefault:null==G?void 0:G.link,resetAllFilter:sv}]:[]]})}const mv=(0,d.createHigherOrderComponent)((e=>t=>{var n;const{name:o,attributes:r}=t,{backgroundColor:l,textColor:s}=r,c=qo("color.palette.custom")||[],u=qo("color.palette.theme")||[],d=qo("color.palette.default")||[],p=(0,a.useMemo)((()=>[...c||[],...u||[],...d||[]]),[c,u,d]);if(!tv(o)||ur(o,ev))return(0,a.createElement)(e,t);const m={};var f,g;s&&!ur(o,ev,"text")&&(m.color=null===(f=bh(p,s))||void 0===f?void 0:f.color);l&&!ur(o,ev,"background")&&(m.backgroundColor=null===(g=bh(p,l))||void 0===g?void 0:g.color);let h=t.wrapperProps;return h={...t.wrapperProps,style:{...m,...null===(n=t.wrapperProps)||void 0===n?void 0:n.style}},(0,a.createElement)(e,i({},t,{wrapperProps:h}))})),fv={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};(0,l.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return tv(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),ov(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",uv),(0,l.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!tv(e)||ur(e,ev))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),uv(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",mv),(0,l.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){const r=e.name;return cr({linkColor:nv(r),textColor:lv(r),backgroundColor:rv(r),gradient:ov(r)},fv,e,t,n,o)}));const gv=[{name:(0,g._x)("Regular","font style"),value:"normal"},{name:(0,g._x)("Italic","font style"),value:"italic"}],hv=[{name:(0,g._x)("Thin","font weight"),value:"100"},{name:(0,g._x)("Extra Light","font weight"),value:"200"},{name:(0,g._x)("Light","font weight"),value:"300"},{name:(0,g._x)("Regular","font weight"),value:"400"},{name:(0,g._x)("Medium","font weight"),value:"500"},{name:(0,g._x)("Semi Bold","font weight"),value:"600"},{name:(0,g._x)("Bold","font weight"),value:"700"},{name:(0,g._x)("Extra Bold","font weight"),value:"800"},{name:(0,g._x)("Black","font weight"),value:"900"}],vv=(e,t)=>e?t?(0,g.__)("Appearance"):(0,g.__)("Font style"):(0,g.__)("Font weight");function bv(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:o=!0,value:{fontStyle:r,fontWeight:l},...s}=e,c=n||o,u=vv(n,o),d={key:"default",name:(0,g.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},p=(0,a.useMemo)((()=>n&&o?(()=>{const e=[d];return gv.forEach((t=>{let{name:n,value:o}=t;hv.forEach((t=>{let{name:r,value:l}=t;const i="normal"===o?r:(0,g.sprintf)((0,g.__)("%1$s %2$s"),r,n);e.push({key:`${o}-${l}`,name:i,style:{fontStyle:o,fontWeight:l}})}))})),e})():n?(()=>{const e=[d];return gv.forEach((t=>{let{name:n,value:o}=t;e.push({key:o,name:n,style:{fontStyle:o,fontWeight:void 0}})})),e})():(()=>{const e=[d];return hv.forEach((t=>{let{name:n,value:o}=t;e.push({key:o,name:n,style:{fontStyle:void 0,fontWeight:o}})})),e})()),[e.options]),f=p.find((e=>e.style.fontStyle===r&&e.style.fontWeight===l))||p[0];return c&&(0,a.createElement)(m.CustomSelectControl,i({},s,{className:"components-font-appearance-control",label:u,describedBy:f?n?o?(0,g.sprintf)((0,g.__)("Currently selected font appearance: %s"),f.name):(0,g.sprintf)((0,g.__)("Currently selected font style: %s"),f.name):(0,g.sprintf)((0,g.__)("Currently selected font weight: %s"),f.name):(0,g.__)("No selected font appearance"),options:p,value:f,onChange:e=>{let{selectedItem:n}=e;return t(n.style)},__nextUnconstrainedWidth:!0}))}const _v=1.5,kv=.1;var yv=e=>{let{value:t,onChange:n,__nextHasNoMarginBottom:o=!1,__unstableInputWidth:r="60px",...l}=e;const s=function(e){return void 0!==e&&""!==e}(t),c=s?t:"";o||V()("Bottom margin styles for wp.blockEditor.LineHeightControl",{since:"6.0",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"});const u=o?void 0:{marginBottom:24};return(0,a.createElement)("div",{className:"block-editor-line-height-control",style:u},(0,a.createElement)(m.__experimentalNumberControl,i({},l,{__unstableInputWidth:r,__unstableStateReducer:(e,t)=>{var n;const o=["insertText","insertFromPaste"].includes(null===(n=t.payload.event.nativeEvent)||void 0===n?void 0:n.inputType),r=((e,t)=>{if(s)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return _v;default:return e}})(e.value,o);return{...e,value:r}},onChange:n,label:(0,g.__)("Line height"),placeholder:_v,step:kv,value:c,min:0})))};const Ev="typography.lineHeight";function Cv(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,a.createElement)(yv,{__unstableInputWidth:"100%",__nextHasNoMarginBottom:!0,value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:e=>{const t={...n,typography:{...null==n?void 0:n.typography,lineHeight:e}};o({style:ar(t)})},size:"__unstable-large"})}function Sv(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!qo("typography.lineHeight");return!(0,r.hasBlockSupport)(e,Ev)||t}const wv="typography.__experimentalFontStyle",Bv="typography.__experimentalFontWeight";function Iv(e){var t,n;const{attributes:{style:o},setAttributes:r}=e,l=!xv(e),i=!Tv(e),s=null==o||null===(t=o.typography)||void 0===t?void 0:t.fontStyle,c=null==o||null===(n=o.typography)||void 0===n?void 0:n.fontWeight;return(0,a.createElement)(bv,{onChange:e=>{r({style:ar({...o,typography:{...null==o?void 0:o.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:l,hasFontWeights:i,value:{fontStyle:s,fontWeight:c},size:"__unstable-large"})}function xv(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,r.hasBlockSupport)(e,wv),n=qo("typography.fontStyle");return!t||!n}function Tv(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,r.hasBlockSupport)(e,Bv),n=qo("typography.fontWeight");return!t||!n}function Nv(e){const t=xv(e),n=Tv(e);return t&&n}function Pv(e){let{value:t="",onChange:n,fontFamilies:o,...r}=e;const l=qo("typography.fontFamilies");if(o||(o=l),(0,u.isEmpty)(o))return null;const s=[{value:"",label:(0,g.__)("Default")},...o.map((e=>{let{fontFamily:t,name:n}=e;return{value:t,label:n||t}}))];return(0,a.createElement)(m.SelectControl,i({label:(0,g.__)("Font"),options:s,value:t,onChange:n,labelPosition:"top"},r))}const Mv="typography.__experimentalFontFamily";function Lv(e,t,n){if(!(0,r.hasBlockSupport)(t,Mv))return e;if(ur(t,kb,"fontFamily"))return e;if(null==n||!n.fontFamily)return e;const o=new(Sf())(e.className);o.add(`has-${(0,u.kebabCase)(null==n?void 0:n.fontFamily)}-font-family`);const l=o.value;return e.className=l||void 0,e}function Rv(e){var t;let{setAttributes:n,attributes:{fontFamily:o}}=e;const r=qo("typography.fontFamilies"),l=null===(t=(0,u.find)(r,(e=>{let{slug:t}=e;return o===t})))||void 0===t?void 0:t.fontFamily;return(0,a.createElement)(Pv,{className:"block-editor-hooks-font-family-control",fontFamilies:r,value:l,onChange:function(e){const t=(0,u.find)(r,(t=>{let{fontFamily:n}=t;return n===e}));n({fontFamily:null==t?void 0:t.slug})},size:"__unstable-large",__nextHasNoMarginBottom:!0})}function Av(e){let{name:t}=e;const n=qo("typography.fontFamilies");return!n||0===n.length||!(0,r.hasBlockSupport)(t,Mv)}(0,l.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,r.hasBlockSupport)(e,Mv)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",Lv),(0,l.addFilter)("blocks.registerBlockType","core/fontFamily/addEditProps",(function(e){if(!(0,r.hasBlockSupport)(e,Mv))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Lv(o,e,n)},e}));const Dv=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{size:n}};function Ov(e,t){const n=(0,u.find)(e,{size:t});return n||{size:t}}function zv(e){if(e)return`has-${(0,u.kebabCase)(e)}-font-size`}var Fv=function(e){const t=qo("typography.fontSizes"),n=!qo("typography.customFontSize");return(0,a.createElement)(m.FontSizePicker,i({},e,{fontSizes:t,disableCustomFontSizes:n}))};const Vv="1600px",Hv="768px",Gv=1,Uv=.75,Wv="14px";function $v(e){let{minimumFontSize:t,maximumFontSize:n,fontSize:o,minimumViewPortWidth:r=Hv,maximumViewPortWidth:l=Vv,scaleFactor:i=Gv,minimumFontSizeFactor:a=Uv,minimumFontSizeLimit:s=Wv}=e;if(o){const e=jv(o);if(null==e||!e.unit)return null;const r=jv(s,{coerceTo:e.unit});if(null!=r&&r.value&&!t&&!n&&(null==e?void 0:e.value)<=(null==r?void 0:r.value))return null;if(n||(n=`${e.value}${e.unit}`),!t){const n=Kv(e.value*a,3);t=null!=r&&r.value&&n<(null==r?void 0:r.value)?`${r.value}${r.unit}`:`${n}${e.unit}`}}const c=jv(t),u=(null==c?void 0:c.unit)||"rem",d=jv(n,{coerceTo:u});if(!c||!d)return null;const p=jv(t,{coerceTo:"rem"}),m=jv(l,{coerceTo:u}),f=jv(r,{coerceTo:u});if(!m||!f||!p)return null;const g=Kv(f.value/100,3),h=Kv(g,3)+u,v=Kv(((d.value-c.value)/(m.value-f.value)*100||1)*i,3);return`clamp(${t}, ${`${p.value}${p.unit} + ((1vw - ${h}) * ${v})`}, ${n})`}function jv(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e&&"number"!=typeof e)return null;isFinite(e)&&(e=`${e}px`);const{coerceTo:n,rootSizeValue:o,acceptableUnits:r}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},l=null==r?void 0:r.join("|"),i=new RegExp(`^(\\d*\\.?\\d+)(${l}){1,1}$`),a=e.match(i);if(!a||a.length<3)return null;let[,s,c]=a,u=parseFloat(s);return"px"!==n||"em"!==c&&"rem"!==c||(u*=o,c=n),"px"!==c||"em"!==n&&"rem"!==n||(u/=o,c=n),"em"!==n&&"rem"!==n||"em"!==c&&"rem"!==c||(c=n),{value:Kv(u,3),unit:c}}function Kv(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;const n=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*n)/n):void 0}const qv="typography.fontSize";function Yv(e,t,n){if(!(0,r.hasBlockSupport)(t,qv))return e;if(ur(t,kb,"fontSize"))return e;const o=new(Sf())(e.className);o.add(zv(n.fontSize));const l=o.value;return e.className=l||void 0,e}function Qv(e){var t,n;const{attributes:{fontSize:o,style:r},setAttributes:l}=e,i=qo("typography.fontSizes"),s=Dv(i,o,null==r||null===(t=r.typography)||void 0===t?void 0:t.fontSize),c=(null==s?void 0:s.size)||(null==r||null===(n=r.typography)||void 0===n?void 0:n.fontSize)||o;return(0,a.createElement)(Fv,{onChange:e=>{const t=Ov(i,e).slug;l({style:ar({...r,typography:{...null==r?void 0:r.typography,fontSize:t?void 0:e}}),fontSize:t})},value:c,withReset:!1,size:"__unstable-large",__nextHasNoMarginBottom:!0})}function Zv(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=qo("typography.fontSizes"),n=!(null==t||!t.length);return!(0,r.hasBlockSupport)(e,qv)||!n}const Xv=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const l=qo("typography.fontSizes"),{name:i,attributes:{fontSize:s,style:c},wrapperProps:u}=t;if(!(0,r.hasBlockSupport)(i,qv)||ur(i,kb,"fontSize")||!s||null!=c&&null!==(n=c.typography)&&void 0!==n&&n.fontSize)return(0,a.createElement)(e,t);const d=Dv(l,s,null==c||null===(o=c.typography)||void 0===o?void 0:o.fontSize).size,p={...t,wrapperProps:{...u,style:{fontSize:d,...null==u?void 0:u.style}}};return(0,a.createElement)(e,p)}),"withFontSizeInlineStyles"),Jv={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,l.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,r.hasBlockSupport)(e,qv)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",Yv),(0,l.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!(0,r.hasBlockSupport)(e,qv))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Yv(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",Xv),(0,l.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,o){const l=e.name;return cr({fontSize:(0,r.hasBlockSupport)(l,qv)},Jv,e,t,n,o)})),(0,l.addFilter)("blocks.registerBlockType","core/font-size/addEditPropsForFluidCustomFontSizes",(function(e){if(!(0,r.hasBlockSupport)(e,qv)||ur(e,kb,"fontSize"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=e=>{var n,o,r;const l=t?t(e):{},i=null==l||null===(n=l.style)||void 0===n?void 0:n.fontSize,a=!(null===(o=(0,p.select)(so).getSettings().__experimentalFeatures)||void 0===o||null===(r=o.typography)||void 0===r||!r.fluid),s=i&&a?$v({fontSize:i}):null;return null===s?l:{...l,style:{...null==l?void 0:l.style,fontSize:s}}},e}),11);var eb=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M7 11.5h10V13H7z"}));var tb=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"}));var nb=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));const ob=[{name:(0,g.__)("None"),value:"none",icon:eb},{name:(0,g.__)("Underline"),value:"underline",icon:tb},{name:(0,g.__)("Strikethrough"),value:"line-through",icon:nb}];function rb(e){let{value:t,onChange:n,className:o}=e;return(0,a.createElement)("fieldset",{className:c()("block-editor-text-decoration-control",o)},(0,a.createElement)(m.BaseControl.VisualLabel,{as:"legend"},(0,g.__)("Decoration")),(0,a.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},ob.map((e=>(0,a.createElement)(m.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===t,onClick:()=>{n(e.value===t?void 0:e.value)}})))))}const lb="typography.__experimentalTextDecoration";function ib(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,a.createElement)(rb,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){o({style:ar({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})},size:"__unstable-large"})}function ab(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,lb),n=qo("typography.textDecoration");return t||!n}var sb=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"}));var cb=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"}));var ub=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"}));const db=[{name:(0,g.__)("None"),value:"none",icon:eb},{name:(0,g.__)("Uppercase"),value:"uppercase",icon:sb},{name:(0,g.__)("Lowercase"),value:"lowercase",icon:cb},{name:(0,g.__)("Capitalize"),value:"capitalize",icon:ub}];function pb(e){let{className:t,value:n,onChange:o}=e;return(0,a.createElement)("fieldset",{className:c()("block-editor-text-transform-control",t)},(0,a.createElement)(m.BaseControl.VisualLabel,{as:"legend"},(0,g.__)("Letter case")),(0,a.createElement)("div",{className:"block-editor-text-transform-control__buttons"},db.map((e=>(0,a.createElement)(m.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===n,onClick:()=>{o(e.value===n?void 0:e.value)}})))))}const mb="typography.__experimentalTextTransform";function fb(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,a.createElement)(pb,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){o({style:ar({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})},size:"__unstable-large"})}function gb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,mb),n=qo("typography.textTransform");return t||!n}function hb(e){let{value:t,onChange:n,__unstableInputWidth:o="60px",...r}=e;const l=(0,m.__experimentalUseCustomUnits)({availableUnits:qo("spacing.units")||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,a.createElement)(m.__experimentalUnitControl,i({},r,{label:(0,g.__)("Letter spacing"),value:t,__unstableInputWidth:o,units:l,onChange:n}))}const vb="typography.__experimentalLetterSpacing";function bb(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,a.createElement)(hb,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){o({style:ar({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})},__unstableInputWidth:"100%",size:"__unstable-large"})}function _b(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,vb),n=qo("typography.letterSpacing");return t||!n}const kb="typography",yb=[Ev,qv,wv,Bv,Mv,lb,mb,vb];function Eb(e){const{clientId:t}=e,n=Av(e),o=Zv(e),l=Nv(e),i=Sv(e),s=ab(e),c=gb(e),u=_b(e),d=!xv(e),p=!Tv(e),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[Nv(e),Zv(e),Sv(e),Av(e),ab(e),gb(e),_b(e)];return t.filter(Boolean).length===t.length}(e),h=Cb(e.name);if(f||!h)return null;const v=(0,r.getBlockSupport)(e.name,[kb,"__experimentalDefaultControls"]),b=e=>t=>{var n;return{...t,style:{...t.style,typography:{...null===(n=t.style)||void 0===n?void 0:n.typography,[e]:void 0}}}};return(0,a.createElement)(hr,{__experimentalGroup:"typography"},!n&&(0,a.createElement)(m.__experimentalToolsPanelItem,{hasValue:()=>function(e){return!!e.attributes.fontFamily}(e),label:(0,g.__)("Font family"),onDeselect:()=>function(e){let{setAttributes:t}=e;t({fontFamily:void 0})}(e),isShownByDefault:null==v?void 0:v.fontFamily,resetAllFilter:e=>({...e,fontFamily:void 0}),panelId:t},(0,a.createElement)(Rv,e)),!o&&(0,a.createElement)(m.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{fontSize:n,style:o}=e.attributes;return!!n||!(null==o||null===(t=o.typography)||void 0===t||!t.fontSize)}(e),label:(0,g.__)("Font size"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({fontSize:void 0,style:ar({...o,typography:{...null==o?void 0:o.typography,fontSize:void 0}})})}(e),isShownByDefault:null==v?void 0:v.fontSize,resetAllFilter:e=>{var t;return{...e,fontSize:void 0,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontSize:void 0}}}},panelId:t},(0,a.createElement)(Qv,e)),!l&&(0,a.createElement)(m.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t;const{fontStyle:n,fontWeight:o}=(null===(t=e.attributes.style)||void 0===t?void 0:t.typography)||{};return!!n||!!o}(e),label:vv(d,p),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:ar({...o,typography:{...null==o?void 0:o.typography,fontStyle:void 0,fontWeight:void 0}})})}(e),isShownByDefault:null==v?void 0:v.fontAppearance,resetAllFilter:e=>{var t;return{...e,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontStyle:void 0,fontWeight:void 0}}}},panelId:t},(0,a.createElement)(Iv,e)),!i&&(0,a.createElement)(m.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.lineHeight)}(e),label:(0,g.__)("Line height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:ar({...o,typography:{...null==o?void 0:o.typography,lineHeight:void 0}})})}(e),isShownByDefault:null==v?void 0:v.lineHeight,resetAllFilter:b("lineHeight"),panelId:t},(0,a.createElement)(Cv,e)),!u&&(0,a.createElement)(m.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.letterSpacing)}(e),label:(0,g.__)("Letter spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:ar({...o,typography:{...null==o?void 0:o.typography,letterSpacing:void 0}})})}(e),isShownByDefault:null==v?void 0:v.letterSpacing,resetAllFilter:b("letterSpacing"),panelId:t},(0,a.createElement)(bb,e)),!s&&(0,a.createElement)(m.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textDecoration)}(e),label:(0,g.__)("Decoration"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:ar({...o,typography:{...null==o?void 0:o.typography,textDecoration:void 0}})})}(e),isShownByDefault:null==v?void 0:v.textDecoration,resetAllFilter:b("textDecoration"),panelId:t},(0,a.createElement)(ib,e)),!c&&(0,a.createElement)(m.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textTransform)}(e),label:(0,g.__)("Letter case"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:ar({...o,typography:{...null==o?void 0:o.typography,textTransform:void 0}})})}(e),isShownByDefault:null==v?void 0:v.textTransform,resetAllFilter:b("textTransform"),panelId:t},(0,a.createElement)(fb,e)))}const Cb=e=>yb.some((t=>(0,r.hasBlockSupport)(e,t)));const Sb=[...yb,Ch,ev,Nr],wb=e=>Sb.some((t=>(0,r.hasBlockSupport)(e,t)));function Bb(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};return(0,ml.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const Ib={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[ev],[`${kb}.__experimentalSkipSerialization`]:[kb],[`${Nr}.__experimentalSkipSerialization`]:["spacing"]},xb={...Ib,[`${Nr}`]:["spacing.blockGap"]},Tb={gradients:"gradient"};function Nb(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:xb;if(!wb(t))return e;let{style:l}=n;return Object.entries(o).forEach((e=>{let[n,o]=e;const i=(0,r.getBlockSupport)(t,n);!0===i&&(l=(0,u.omit)(l,o)),Array.isArray(i)&&i.forEach((e=>{const t=Tb[e]||e;l=(0,u.omit)(l,[[...o,t]])}))})),e.style={...Bb(l),...e.style},e}const Pb=(0,d.createHigherOrderComponent)((e=>t=>{const n=fo();return(0,a.createElement)(a.Fragment,null,n&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(pv,t),(0,a.createElement)(Eb,t),(0,a.createElement)(Th,t),(0,a.createElement)(Lr,t)),(0,a.createElement)(e,t))}),"withToolbarControls"),Mb=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const l=`wp-elements-${(0,d.useInstanceId)(e)}`,s=ur(t.name,ev,"link"),u=(0,a.useMemo)((()=>{var e;const n=null===(e=t.attributes.style)||void 0===e?void 0:e.elements,o=[];if(n&&Object.keys(n).length>0){var i;const e={...n,link:{...n.link,color:s||null===(i=n.link)||void 0===i?void 0:i.color}};for(const[t,n]of Object.entries(e)){const e=(0,ml.compileCSS)(n,{selector:`.editor-styles-wrapper .${l} ${r.__EXPERIMENTAL_ELEMENTS[t]}`});e&&o.push(e)}}return o.length>0?o:void 0}),[null===(n=t.attributes.style)||void 0===n?void 0:n.elements]),p=(0,a.useContext)(nh.__unstableElementContext);return(0,a.createElement)(a.Fragment,null,u&&p&&(0,a.createPortal)((0,a.createElement)("style",{dangerouslySetInnerHTML:{__html:u}}),p),(0,a.createElement)(e,i({},t,{className:null!==(o=t.attributes.style)&&void 0!==o&&o.elements?c()(t.className,l):t.className})))}));(0,l.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return wb(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",Nb),(0,l.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!wb(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Nb(o,e,n,Ib)},e})),(0,l.addFilter)("editor.BlockEdit","core/style/with-block-controls",Pb),(0,l.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",Mb);(0,l.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){var t,n;return n=e,(0,r.hasBlockSupport)(n,"__experimentalSettings",!1)?(null!=e&&null!==(t=e.attributes)&&void 0!==t&&t.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e}));var Lb=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"}));var Rb=function(e){let t,{colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:l,value:i,onChange:s}=e;return t="unset"===i?(0,a.createElement)(m.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?(0,a.createElement)(m.DuotoneSwatch,{values:i}):(0,a.createElement)(ul,{icon:Lb}),(0,a.createElement)(m.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,g.__)("Duotone"),isAlternate:!0},renderToggle:e=>{let{isOpen:n,onToggle:o}=e;return(0,a.createElement)(m.ToolbarButton,{showTooltip:!0,onClick:o,"aria-haspopup":"true","aria-expanded":n,onKeyDown:e=>{n||e.keyCode!==ku.DOWN||(e.preventDefault(),o())},label:(0,g.__)("Apply duotone filter"),icon:t})},renderContent:()=>(0,a.createElement)(m.MenuGroup,{label:(0,g.__)("Duotone")},(0,a.createElement)("div",{className:"block-editor-duotone-control__description"},(0,g.__)("Create a two-tone color effect without losing your original image.")),(0,a.createElement)(m.DuotonePicker,{colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:l,value:i,onChange:s}))})};const Ab=[];function Db(e){let{selector:t,id:n,colors:o}=e;return"unset"===o?(0,a.createElement)(mp,{selector:t}):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(fp,{id:n,colors:o}),(0,a.createElement)(pp,{id:n,selector:t}))}function Ob(e){let{presetSetting:t,defaultSetting:n}=e;const o=!qo(n),r=qo(`${t}.custom`)||Ab,l=qo(`${t}.theme`)||Ab,i=qo(`${t}.default`)||Ab;return(0,a.useMemo)((()=>[...r,...l,...o?Ab:i]),[o,r,l,i])}function zb(e){var t;let{attributes:n,setAttributes:o}=e;const r=null==n?void 0:n.style,l=null==r||null===(t=r.color)||void 0===t?void 0:t.duotone,i=Ob({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),s=Ob({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),c=!qo("color.custom"),u=!qo("color.customDuotone")||0===(null==s?void 0:s.length)&&c;return 0===(null==i?void 0:i.length)&&u?null:(0,a.createElement)(_o,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(Rb,{duotonePalette:i,colorPalette:s,disableCustomDuotone:u,disableCustomColors:c,value:l,onChange:e=>{const t={...r,color:{...null==r?void 0:r.color,duotone:e}};o({style:t})}}))}Dd([Od]);const Fb=(0,d.createHigherOrderComponent)((e=>t=>{const n=(0,r.hasBlockSupport)(t.name,"color.__experimentalDuotone"),o=(0,p.useSelect)((e=>e(so).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),n&&!o&&(0,a.createElement)(zb,t))}),"withDuotoneControls");const Vb=(0,d.createHigherOrderComponent)((e=>t=>{var n,o,l;const s=(0,r.getBlockSupport)(t.name,"color.__experimentalDuotone"),u=null==t||null===(n=t.attributes)||void 0===n||null===(o=n.style)||void 0===o||null===(l=o.color)||void 0===l?void 0:l.duotone;if(!s||!u)return(0,a.createElement)(e,t);const p=`wp-duotone-${(0,d.useInstanceId)(e)}`,m=function(e,t){const n=e.split(","),o=t.split(","),r=[];return n.forEach((e=>{o.forEach((t=>{r.push(`${e.trim()} ${t.trim()}`)}))})),r.join(", ")}(`.editor-styles-wrapper .${p}`,s),f=c()(null==t?void 0:t.className,p),g=(0,a.useContext)(nh.__unstableElementContext);return(0,a.createElement)(a.Fragment,null,g&&(0,a.createPortal)((0,a.createElement)(Db,{selector:m,id:p,colors:u}),g),(0,a.createElement)(e,i({},t,{className:f})))}),"withDuotoneStyles");(0,l.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,r.hasBlockSupport)(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,l.addFilter)("editor.BlockEdit","core/editor/duotone/with-editor-controls",Fb),(0,l.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",Vb);const Hb="__experimentalLayout";function Gb(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=(0,p.useSelect)((e=>{var t;const{getSettings:n}=e(so);return null===(t=n().__experimentalFeatures)||void 0===t?void 0:t.useRootPaddingAwareAlignments}),[]),l=qo("layout")||{},{attributes:i={},name:a}=n,{layout:s}=i,{default:c}=(0,r.getBlockSupport)(a,Hb)||{},d=null!=s&&s.inherit||null!=s&&s.contentSize||null!=s&&s.wideSize?{...s,type:"constrained"}:s||c||{},m=[];var f,g;null!=l&&null!==(e=l.definitions)&&void 0!==e&&null!==(t=e[(null==d?void 0:d.type)||"default"])&&void 0!==t&&t.className&&m.push(null==l||null===(f=l.definitions)||void 0===f||null===(g=f[(null==d?void 0:d.type)||"default"])||void 0===g?void 0:g.className);return(null!=d&&d.inherit||null!=d&&d.contentSize||"constrained"===(null==d?void 0:d.type))&&o&&m.push("has-global-padding"),null!=d&&d.orientation&&m.push(`is-${(0,u.kebabCase)(d.orientation)}`),null!=d&&d.justifyContent&&m.push(`is-content-justification-${(0,u.kebabCase)(d.justifyContent)}`),null!=d&&d.flexWrap&&"nowrap"===d.flexWrap&&m.push("is-nowrap"),m}function Ub(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const{attributes:o={},name:r}=t,{layout:l={},style:i={}}=o,a=null!=l&&l.inherit||null!=l&&l.contentSize||null!=l&&l.wideSize?{...l,type:"constrained"}:l||{},s=hl((null==a?void 0:a.type)||"default"),c=qo("layout")||{},u=qo("spacing.blockGap"),d=null!==u,p=null==s||null===(e=s.getLayoutStyle)||void 0===e?void 0:e.call(s,{blockName:r,selector:n,layout:l,layoutDefinitions:null==c?void 0:c.definitions,style:i,hasBlockGapSupport:d});return p}function Wb(e){let{setAttributes:t,attributes:n,name:o}=e;const{layout:l}=n,i=qo("layout"),s=(0,p.useSelect)((e=>{const{getSettings:t}=e(so);return t().supportsLayout}),[]),c=(0,r.getBlockSupport)(o,Hb,{}),{allowSwitching:u,allowEditing:d=!0,allowInheriting:f=!0,default:h}=c;if(!d)return null;const v=!(!f||!i||null!=l&&l.type&&"default"!==(null==l?void 0:l.type)&&"constrained"!==(null==l?void 0:l.type)&&(null==l||!l.inherit)),b=l||h||{},{inherit:_=!1,type:k="default",contentSize:y=null}=b;if(("default"===k||"constrained"===k)&&!s)return null;const E=hl(k),C=hl("constrained"),S=!b.type&&(y||_),w=!!_||!!y,B=e=>t({layout:e});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(hr,null,(0,a.createElement)(m.PanelBody,{title:(0,g.__)("Layout")},v&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.ToggleControl,{className:"block-editor-hooks__toggle-control",label:(0,g.__)("Inner blocks use content width"),checked:"constrained"===(null==E?void 0:E.name)||w,onChange:()=>t({layout:{type:"constrained"===(null==E?void 0:E.name)||w?"default":"constrained"}}),help:"constrained"===(null==E?void 0:E.name)||w?(0,g.__)("Nested blocks use content width with options for full and wide widths."):(0,g.__)("Nested blocks will fill the width of this container. Toggle to constrain.")})),!_&&u&&(0,a.createElement)($b,{type:k,onChange:e=>t({layout:{type:e}})}),E&&"default"!==E.name&&(0,a.createElement)(E.inspectorControls,{layout:b,onChange:B,layoutBlockSupport:c}),C&&S&&(0,a.createElement)(C.inspectorControls,{layout:b,onChange:B,layoutBlockSupport:c}))),!_&&E&&(0,a.createElement)(E.toolBarControls,{layout:b,onChange:B,layoutBlockSupport:c}))}function $b(e){let{type:t,onChange:n}=e;return(0,a.createElement)(m.ButtonGroup,null,gl.map((e=>{let{name:o,label:r}=e;return(0,a.createElement)(m.Button,{key:o,isPressed:t===o,onClick:()=>n(o)},r)})))}const jb=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,r.hasBlockSupport)(n,Hb)&&(0,a.createElement)(Wb,i({key:"layout"},t)),(0,a.createElement)(e,i({key:"edit"},t))]}),"withInspectorControls"),Kb=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o,block:l}=t,s=(0,r.hasBlockSupport)(n,Hb),u=(0,p.useSelect)((e=>{const{getSettings:t}=e(so);return!!t().disableLayoutStyles})),m=s&&!u,f=(0,d.useInstanceId)(e),g=qo("layout")||{},h=(0,a.useContext)(nh.__unstableElementContext),{layout:v}=o,{default:b}=(0,r.getBlockSupport)(n,Hb)||{},_=null!=v&&v.inherit||null!=v&&v.contentSize||null!=v&&v.wideSize?{...v,type:"constrained"}:v||b||{},k=s?Gb(l):null,y=`.${(0,r.getBlockDefaultClassName)(n)}.wp-container-${f}`,E=null!==qo("spacing.blockGap");let C;if(m){var S;const e=hl((null==_?void 0:_.type)||"default");C=null==e||null===(S=e.getLayoutStyle)||void 0===S?void 0:S.call(e,{blockName:n,selector:y,layout:_,layoutDefinitions:null==g?void 0:g.definitions,style:null==o?void 0:o.style,hasBlockGapSupport:E})}const w=c()(null==t?void 0:t.className,{[`wp-container-${f}`]:m&&!!C},k);return(0,a.createElement)(a.Fragment,null,m&&h&&!!C&&(0,a.createPortal)((0,a.createElement)(yl,{blockName:n,selector:y,css:C,layout:_,style:null==o?void 0:o.style}),h),(0,a.createElement)(e,i({},t,{className:w})))}));function qb(e){let{clientId:t,stopEditingAsBlock:n}=e;const o=(0,p.useSelect)((e=>{const{isBlockSelected:n,hasSelectedInnerBlock:o}=e(so);return n(t)||o(t,!0)}),[t]);return(0,a.useEffect)((()=>{o||n()}),[o]),null}(0,l.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.layout)&&void 0!==t?t:{})||(0,r.hasBlockSupport)(e,Hb)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,l.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",Kb),(0,l.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",jb);const Yb=(0,d.createHigherOrderComponent)((e=>t=>{const{getBlockListSettings:n,getSettings:o}=(0,p.useSelect)(so),r=(0,a.useRef)(),{templateLock:l,isLockedByParent:s,isEditingAsBlocks:u}=(0,p.useSelect)((e=>{const{__unstableGetContentLockingParent:n,getTemplateLock:o,__unstableGetTemporarilyEditingAsBlocks:r}=e(so);return{templateLock:o(t.clientId),isLockedByParent:!!n(t.clientId),isEditingAsBlocks:r()===t.clientId}}),[t.clientId]),{updateSettings:d,updateBlockListSettings:f,__unstableSetTemporarilyEditingAsBlocks:h}=(0,p.useDispatch)(so),v=!s&&"contentOnly"===l,{__unstableMarkNextChangeAsNotPersistent:b,updateBlockAttributes:_}=(0,p.useDispatch)(so),k=(0,a.useCallback)((()=>{b(),_(t.clientId,{templateLock:"contentOnly"}),f(t.clientId,{...n(t.clientId),templateLock:"contentOnly"}),d({focusMode:r.current}),h()}),[t.clientId,r,d,f,n,b,_,h]);return v||u?(0,a.createElement)(a.Fragment,null,u&&!v&&(0,a.createElement)(qb,{clientId:t.clientId,stopEditingAsBlock:k}),(0,a.createElement)(_o,{group:"other"},(0,a.createElement)(m.ToolbarButton,{onClick:()=>{u&&!v?k():(b(),_(t.clientId,{templateLock:void 0}),f(t.clientId,{...n(t.clientId),templateLock:!1}),r.current=o().focusMode,d({focusMode:!0}),h(t.clientId))}},u&&!v?(0,g.__)("Done"):(0,g.__)("Modify"))),(0,a.createElement)(e,i({},t,{className:c()(t.className,u&&"is-content-locked-editing-as-blocks")}))):(0,a.createElement)(e,t)}),"withToolbarControls");(0,l.addFilter)("editor.BlockEdit","core/style/with-block-controls",Yb);const Qb="metadata";function Zb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=(0,r.getBlockSupport)(e,"__experimentalMetadata");return!!(!0===n||null!=n&&n[t])}function Xb(e){var t;const n=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:Lh(e)||void 0,style:Bb({border:n})}}function Jb(e){const{colors:t}=Eh(),n=Xb(e),{borderColor:o}=e;if(o){const e=Ih({colors:t,namedColor:o});n.style.borderColor=e.color}return n}function e_(e){var t,n,o,r,l,i;const{backgroundColor:a,textColor:s,gradient:u,style:d}=e,p=kh("background-color",a),m=kh("color",s),f=Ah(u),g=f||(null==d||null===(t=d.color)||void 0===t?void 0:t.gradient);return{className:c()(m,f,{[p]:!g&&!!p,"has-text-color":s||(null==d||null===(n=d.color)||void 0===n?void 0:n.text),"has-background":a||(null==d||null===(o=d.color)||void 0===o?void 0:o.background)||u||(null==d||null===(r=d.color)||void 0===r?void 0:r.gradient),"has-link-color":null==d||null===(l=d.elements)||void 0===l||null===(i=l.link)||void 0===i?void 0:i.color})||void 0,style:Bb({color:(null==d?void 0:d.color)||{}})}}(0,l.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.metadata)&&void 0!==n&&n.type||Zb(e,"name",!1)&&(e.attributes={...e.attributes,[Qb]:{type:"object"}}),e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/metadata/save-props",(function(e,t,n){return Zb(t)&&(e.metadata=n.metadata),e})),(0,l.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",(function(e){return e.__experimentalLabel||Zb(e,"name",!1)&&(e.__experimentalLabel=(e,t)=>{let{context:n}=t;const{metadata:o}=e;if("list-view"===n&&null!=o&&o.name)return o.name}),e}));const t_={};function n_(e){const{backgroundColor:t,textColor:n,gradient:o}=e,r=qo("color.palette.custom")||[],l=qo("color.palette.theme")||[],i=qo("color.palette.default")||[],s=qo("color.gradients")||t_,c=(0,a.useMemo)((()=>[...r||[],...l||[],...i||[]]),[r,l,i]),u=(0,a.useMemo)((()=>[...(null==s?void 0:s.custom)||[],...(null==s?void 0:s.theme)||[],...(null==s?void 0:s.default)||[]]),[s]),d=e_(e);if(t){const e=bh(c,t);d.style.backgroundColor=e.color}if(o&&(d.style.background=Dh(u,o)),n){const e=bh(c,n);d.style.color=e.color}return d}function o_(e){const{style:t}=e;return{style:Bb({spacing:(null==t?void 0:t.spacing)||{}})}}function r_(e,t){var n;let o=(null==e||null===(n=e.style)||void 0===n?void 0:n.typography)||{};var r,l;t&&(o={...o,fontSize:$v({fontSize:null==e||null===(r=e.style)||void 0===r||null===(l=r.typography)||void 0===l?void 0:l.fontSize})});const i=Bb({typography:o}),a=null!=e&&e.fontFamily?`has-${(0,u.kebabCase)(e.fontFamily)}-font-family`:"";return{className:c()(a,zv(null==e?void 0:e.fontSize)),style:i}}function l_(e){const[t,n]=(0,a.useState)(e);return(0,a.useEffect)((()=>{e&&n(e)}),[e]),t}const i_=e=>{let[t,...n]=e;return t.toUpperCase()+n.join("")},a_=e=>(0,d.createHigherOrderComponent)((t=>n=>(0,a.createElement)(t,i({},n,{colors:e}))),"withCustomColorPalette"),s_=()=>(0,d.createHigherOrderComponent)((e=>t=>{const n=qo("color.palette.custom"),o=qo("color.palette.theme"),r=qo("color.palette.default"),l=(0,a.useMemo)((()=>[...n||[],...o||[],...r||[]]),[n,o,r]);return(0,a.createElement)(e,i({},t,{colors:l}))}),"withEditorColorPalette");function c_(e,t){const n=(0,u.reduce)(e,((e,t)=>({...e,..."string"==typeof t?{[t]:(0,u.kebabCase)(t)}:t})),{});return(0,d.compose)([t,e=>class extends a.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=Rd(t),o=e=>{let{color:t}=e;return n.contrast(t)},r=Math.max(...e.map(o));return e.find((e=>o(e)===r)).color}(t,e)}createSetters(){return(0,u.reduce)(n,((e,t,n)=>{const o=i_(n),r=`custom${o}`;return e[`set${o}`]=this.createSetColor(n,r),e}),{})}createSetColor(e,t){return n=>{const o=_h(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:o,colors:r}=e;return(0,u.reduce)(n,((e,n,l)=>{const i=bh(r,o[l],o[`custom${i_(l)}`]),a=t[l];return(null==a?void 0:a.color)===i.color&&a?e[l]=a:e[l]={...i,class:kh(n,i.slug)},e}),{})}render(){return(0,a.createElement)(e,i({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function u_(e){return function(){const t=a_(e);for(var n=arguments.length,o=new Array(n),r=0;r{let[t,...n]=e;return t.toUpperCase()+n.join("")};var f_=function(){for(var e=arguments.length,t=new Array(e),n=0;n(e[t]=`custom${m_(t)}`,e)),{});return(0,d.createHigherOrderComponent)((0,d.compose)([(0,d.createHigherOrderComponent)((e=>t=>{const n=qo("typography.fontSizes")||p_;return(0,a.createElement)(e,i({},t,{fontSizes:n}))}),"withFontSizes"),e=>class extends a.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return(0,u.reduce)(o,((e,t,n)=>(e[`set${m_(n)}`]=this.createSetFontSize(n,t),e)),{})}createSetFontSize(e,t){return n=>{const o=(0,u.find)(this.props.fontSizes,{size:Number(n)});this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:n,fontSizes:r}=e;const l=(e,o)=>!t[o]||(n[o]?n[o]!==t[o].slug:t[o].size!==n[e]);if(!(0,u.some)(o,l))return null;const i=(0,u.reduce)((0,u.pickBy)(o,l),((e,t,o)=>{const l=n[o],i=Dv(r,l,n[t]);return e[o]={...i,class:zv(l)},e}),{});return{...t,...i}}render(){return(0,a.createElement)(e,i({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")};var g_=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));var h_=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));var v_=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const b_=[{icon:g_,title:(0,g.__)("Align text left"),align:"left"},{icon:h_,title:(0,g.__)("Align text center"),align:"center"},{icon:v_,title:(0,g.__)("Align text right"),align:"right"}],__={position:"bottom right",isAlternate:!0};var k_=function(e){let{value:t,onChange:n,alignmentControls:o=b_,label:r=(0,g.__)("Align"),describedBy:l=(0,g.__)("Change text alignment"),isCollapsed:s=!0,isToolbar:c}=e;function d(e){return()=>n(t===e?void 0:e)}const p=(0,u.find)(o,(e=>e.align===t)),f=c?m.ToolbarGroup:m.ToolbarDropdownMenu,h=c?{isCollapsed:s}:{toggleProps:{describedBy:l},popoverProps:__};return(0,a.createElement)(f,i({icon:p?p.icon:(0,g.isRTL)()?v_:g_,label:r,controls:o.map((e=>{const{align:n}=e,o=t===n;return{...e,isActive:o,role:s?"menuitemradio":void 0,onClick:d(n)}}))},h))};const y_=e=>(0,a.createElement)(k_,i({},e,{isToolbar:!1})),E_=e=>(0,a.createElement)(k_,i({},e,{isToolbar:!0})),C_=()=>{};var S_={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,p.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:o}=e(so),r=t();return{selectedBlockName:r?n(r):null,rootClientId:o().rootClientId}}),[]),[o,r,l]=Mp(t,C_),i=(0,a.useMemo)((()=>(e.trim()?rm(o,r,l,e):(0,u.orderBy)(o,["frecency"],["desc"])).filter((e=>e.name!==n)).slice(0,9)),[e,n,o,r,l]),s=(0,a.useMemo)((()=>i.map((e=>{const{title:t,icon:n,isDisabled:o}=e;return{key:`block-${e.id}`,value:e,label:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Du,{key:"icon",icon:n,showColors:!0}),t),isDisabled:o}}))),[i]);return[s]},allowContext(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:o}=e;return{action:"replace",value:(0,r.createBlock)(t,n,(0,r.createBlocksFromInnerBlocksTemplate)(o))}}},w_=window.wp.apiFetch,B_=n.n(w_);var I_=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));var x_=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}));var T_={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await B_()({path:(0,mm.addQueryArgs)("/wp/v2/search",{per_page:10,search:e,type:"post",order_by:"menu_order"})});return t=t.filter((e=>""!==e.title)),t},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ul,{key:"icon",icon:"page"===e.subtype?I_:x_}),e.title)},getOptionCompletion(e){return(0,a.createElement)("a",{href:e.url},e.title)}};const N_=[];function P_(e){let{completers:t=N_}=e;const{name:n}=mo();return(0,a.useMemo)((()=>{let e=[...t,T_];return(n===(0,r.getDefaultBlockName)()||(0,r.getBlockSupport)(n,"__experimentalSlashInserter",!1))&&(e=[...e,S_]),(0,l.hasFilter)("editor.Autocomplete.completers")&&(e===t&&(e=e.map(u.clone)),e=(0,l.applyFilters)("editor.Autocomplete.completers",e,n)),e}),[t,n])}var M_=function(e){return(0,a.createElement)(m.Autocomplete,i({},e,{completers:P_(e)}))};var L_=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"}));var R_=function(e){let{isActive:t,label:n=(0,g.__)("Toggle full height"),onToggle:o,isDisabled:r}=e;return(0,a.createElement)(m.ToolbarButton,{isActive:t,icon:L_,label:n,onClick:()=>o(!t),disabled:r})};const A_=()=>{};var D_=function(e){const{label:t=(0,g.__)("Change matrix alignment"),onChange:n=A_,value:o="center",isDisabled:r}=e,l=(0,a.createElement)(m.__experimentalAlignmentMatrixControl.Icon,{value:o});return(0,a.createElement)(m.Dropdown,{position:"bottom right",popoverProps:{isAlternate:!0},renderToggle:e=>{let{onToggle:n,isOpen:o}=e;return(0,a.createElement)(m.ToolbarButton,{onClick:n,"aria-haspopup":"true","aria-expanded":o,onKeyDown:e=>{o||e.keyCode!==ku.DOWN||(e.preventDefault(),n())},label:t,icon:l,showTooltip:!0,disabled:r})},renderContent:()=>(0,a.createElement)(m.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:o})})};var O_=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));var z_=function(e){let{rootLabelText:t}=e;const{selectBlock:n,clearSelectedBlock:o}=(0,p.useDispatch)(so),{clientId:r,parents:l,hasSelection:i}=(0,p.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:o}=e(so),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}}),[]),s=t||(0,g.__)("Document");return(0,a.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,g.__)("Block breadcrumb")},(0,a.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&(0,a.createElement)(m.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:o},s),!i&&s,!!r&&(0,a.createElement)(ul,{icon:O_,className:"block-editor-block-breadcrumb__separator"})),l.map((e=>(0,a.createElement)("li",{key:e},(0,a.createElement)(m.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>n(e)},(0,a.createElement)($m,{clientId:e,maximumLength:35})),(0,a.createElement)(ul,{icon:O_,className:"block-editor-block-breadcrumb__separator"})))),!!r&&(0,a.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,a.createElement)($m,{clientId:r,maximumLength:35})))};const F_=()=>(0,a.createElement)(m.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,a.createElement)(m.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"})),V_=e=>{let{style:t,className:n}=e;return(0,a.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,a.createElement)("div",{className:`${n} block-library-colors-selector__state-selection`,style:t},(0,a.createElement)(F_,null)))},H_=e=>{let{TextColor:t,BackgroundColor:n}=e;return e=>{let{onToggle:o,isOpen:r}=e;return(0,a.createElement)(m.ToolbarGroup,null,(0,a.createElement)(m.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,g.__)("Open Colors Selector"),onClick:o,onKeyDown:e=>{r||e.keyCode!==ku.DOWN||(e.preventDefault(),o())},icon:(0,a.createElement)(n,null,(0,a.createElement)(t,null,(0,a.createElement)(V_,null)))}))}};var G_=e=>{let{children:t,...n}=e;return V()("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,a.createElement)(m.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:H_(n),renderContent:()=>t})};var U_=(0,a.createElement)(D.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(D.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));const W_=ou(m.__experimentalTreeGridRow);function $_(e){let{isSelected:t,position:n,level:o,rowCount:r,children:l,className:s,path:u,...d}=e;const p=iu({isSelected:t,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:u});return(0,a.createElement)(W_,i({ref:p,className:c()("block-editor-list-view-leaf",s),level:o,positionInSet:n,setSize:r},d),l)}var j_=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"}));function K_(e){let{onClick:t}=e;return(0,a.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true"},(0,a.createElement)(ul,{icon:(0,g.isRTL)()?j_:O_}))}var q_=(0,a.forwardRef)((function(e,t){let{className:n,block:{clientId:o},onClick:r,onToggleExpanded:l,tabIndex:i,onFocus:s,onDragStart:u,onDragEnd:d,draggable:p}=e;const f=Um(o),g=Wm({clientId:o,context:"list-view"}),{isLocked:h}=rg(o);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.Button,{className:c()("block-editor-list-view-block-select-button",n),onClick:r,onKeyDown:function(e){e.keyCode!==ku.ENTER&&e.keyCode!==ku.SPACE||r(e)},ref:t,tabIndex:i,onFocus:s,onDragStart:e=>{e.dataTransfer.clearData(),null==u||u(e)},onDragEnd:d,draggable:p,href:`#block-${o}`,"aria-hidden":!0},(0,a.createElement)(K_,{onClick:l}),(0,a.createElement)(Du,{icon:null==f?void 0:f.icon,showColors:!0}),(0,a.createElement)(m.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1},(0,a.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,a.createElement)(m.__experimentalTruncate,{ellipsizeMode:"auto"},g)),(null==f?void 0:f.anchor)&&(0,a.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper"},(0,a.createElement)(m.__experimentalTruncate,{className:"block-editor-list-view-block-select-button__anchor",ellipsizeMode:"auto"},f.anchor)),h&&(0,a.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,a.createElement)(ul,{icon:ig})))))}));const Y_=(0,a.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:o,block:r,isSelected:l,position:s,siblingBlockCount:u,level:d,isExpanded:m,selectedClientIds:f,...g}=e;const{clientId:h}=r,{blockMovingClientId:v,selectedBlockInBlockEditor:b}=(0,p.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n}=e(so);return{blockMovingClientId:t(),selectedBlockInBlockEditor:n()}}),[h]),_=v&&b===h,k=c()("block-editor-list-view-block-contents",{"is-dropping-before":_}),y=f.includes(h)?f:[h];return(0,a.createElement)(jm,{clientIds:y},(e=>{let{draggable:c,onDragStart:p,onDragEnd:f}=e;return(0,a.createElement)(q_,i({ref:t,className:k,block:r,onClick:n,onToggleExpanded:o,isSelected:l,position:s,siblingBlockCount:u,level:d,draggable:c,onDragStart:p,onDragEnd:f,isExpanded:m},g))}))}));var Q_=Y_;const Z_=(0,a.createContext)({}),X_=()=>(0,a.useContext)(Z_);var J_=(0,a.memo)((function e(t){let{block:n,isDragged:o,isSelected:l,isBranchSelected:i,selectBlock:s,position:u,level:f,rowCount:h,siblingBlockCount:v,showBlockMovers:b,path:_,isExpanded:k,selectedClientIds:y,preventAnnouncement:E}=t;const C=(0,a.useRef)(null),[S,w]=(0,a.useState)(!1),{clientId:B}=n,{isLocked:I,isContentLocked:x}=rg(B),T=(0,p.useSelect)((e=>!l&&(!!x&&e(so).hasSelectedInnerBlock(B,!0))),[x,B,l]),N=T||l&&y[0]===B,P=T||l&&y[y.length-1]===B,{toggleBlockHighlight:M}=(0,p.useDispatch)(so),L=Um(B),R=(0,p.useSelect)((e=>e(so).getBlockName(B)),[B]),A=(0,r.hasBlockSupport)(R,"__experimentalToolbar",!0),D=`list-view-block-select-button__${(0,d.useInstanceId)(e)}`,O=((e,t,n)=>(0,g.sprintf)((0,g.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(u,v,f);let z=(0,g.__)("Link");L&&(z=I?(0,g.sprintf)((0,g.__)("%s link (locked)"),L.title):(0,g.sprintf)((0,g.__)("%s link"),L.title));const F=L?(0,g.sprintf)((0,g.__)("Options for %s block"),L.title):(0,g.__)("Options"),{isTreeGridMounted:V,expand:H,collapse:G}=X_(),U=b&&v>0,W=c()("block-editor-list-view-block__mover-cell",{"is-visible":S||l}),$=c()("block-editor-list-view-block__menu-cell",{"is-visible":S||N});(0,a.useEffect)((()=>{!V&&l&&C.current.focus()}),[]);const j=(0,a.useCallback)((()=>{w(!0),M(B,!0)}),[B,w,M]),K=(0,a.useCallback)((()=>{w(!1),M(B,!1)}),[B,w,M]),q=(0,a.useCallback)((e=>{s(e,B),e.preventDefault()}),[B,s]),Y=(0,a.useCallback)((e=>{s(void 0,e)}),[s]),Q=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===k?G(B):!1===k&&H(B)}),[B,H,G,k]);let Z;U?Z=2:A||(Z=3);const X=c()({"is-selected":l||T,"is-first-selected":N,"is-last-selected":P,"is-branch-selected":i,"is-dragging":o,"has-single-cell":!A}),J=y.includes(B)?y:[B];return(0,a.createElement)($_,{className:X,onMouseEnter:j,onMouseLeave:K,onFocus:j,onBlur:K,level:f,position:u,rowCount:h,path:_,id:`list-view-block-${B}`,"data-block":B,isExpanded:x?void 0:k,"aria-selected":!!l||T},(0,a.createElement)(m.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:Z,ref:C,"aria-label":z,"aria-selected":!!l||T,"aria-expanded":x?void 0:k,"aria-describedby":D},(e=>{let{ref:t,tabIndex:o,onFocus:r}=e;return(0,a.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,a.createElement)(Q_,{block:n,onClick:q,onToggleExpanded:Q,isSelected:l,position:u,siblingBlockCount:v,level:f,ref:t,tabIndex:o,onFocus:r,isExpanded:k,selectedClientIds:y,preventAnnouncement:E}),(0,a.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:D},O))})),U&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.__experimentalTreeGridCell,{className:W,withoutGridItem:!0},(0,a.createElement)(m.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,a.createElement)(nf,{orientation:"vertical",clientIds:[B],ref:t,tabIndex:n,onFocus:o})})),(0,a.createElement)(m.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,a.createElement)(of,{orientation:"vertical",clientIds:[B],ref:t,tabIndex:n,onFocus:o})})))),A&&(0,a.createElement)(m.__experimentalTreeGridCell,{className:$,"aria-selected":!!l||T},(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,a.createElement)(vg,{clientIds:J,icon:Uf,label:F,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:Y})})))}));function ek(e,t,n,o){var r;if(null==n?void 0:n.includes(e.clientId))return 0;return(null!==(r=t[e.clientId])&&void 0!==r?r:o)?1+e.innerBlocks.reduce(tk(t,n,o),0):1}const tk=(e,t,n)=>(o,r)=>{var l;if(null==t?void 0:t.includes(r.clientId))return o;return(null!==(l=e[r.clientId])&&void 0!==l?l:n)&&r.innerBlocks.length>0?o+ek(r,e,t,n):o+1};function nk(e){const{blocks:t,selectBlock:n,showBlockMovers:o,selectedClientIds:r,level:l=1,path:i="",isBranchSelected:s=!1,listPosition:c=0,fixedListWindow:u,isExpanded:d,parentId:m,shouldShowInnerBlocks:f=!0}=e,g=(0,p.useSelect)((e=>!(!m||"contentOnly"!==e(so).getTemplateLock(m))),[m]),{expandedState:h,draggedClientIds:v}=X_();if(g)return null;const b=t.filter(Boolean),_=b.length;let k=c;return(0,a.createElement)(a.Fragment,null,b.map(((e,t)=>{var c;const{clientId:m,innerBlocks:g}=e;t>0&&(k+=ek(b[t-1],h,v,d));const{itemInView:y}=u,E=y(k),C=t+1,S=i.length>0?`${i}_${C}`:`${C}`,w=!(null==g||!g.length),B=w&&f?null!==(c=h[m])&&void 0!==c?c:d:void 0,I=!(null==v||!v.includes(m)),x=I||E,T=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(m,r),N=s||T&&w;return(0,a.createElement)(p.AsyncModeProvider,{key:m,value:!T},x&&(0,a.createElement)(J_,{block:e,selectBlock:n,isSelected:T,isBranchSelected:N,isDragged:I,level:l,position:C,rowCount:_,siblingBlockCount:_,showBlockMovers:o,path:S,isExpanded:B,listPosition:k,selectedClientIds:r}),!x&&(0,a.createElement)("tr",null,(0,a.createElement)("td",{className:"block-editor-list-view-placeholder"})),w&&B&&!I&&(0,a.createElement)(nk,{parentId:m,blocks:g,selectBlock:n,showBlockMovers:o,level:l+1,path:S,listPosition:k+1,fixedListWindow:u,isBranchSelected:N,selectedClientIds:r,isExpanded:d}))})))}nk.defaultProps={selectBlock:()=>{}};var ok=(0,a.memo)(nk);function rk(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:o,clientId:r,dropPosition:l}=n||{},[i,s]=(0,a.useMemo)((()=>{if(!t.current)return[];return[o?t.current.querySelector(`[data-block="${o}"]`):void 0,r?t.current.querySelector(`[data-block="${r}"]`):void 0]}),[o,r]),c=s||i,u=(0,a.useCallback)((()=>{if(!i)return 0;const e=c.getBoundingClientRect();return i.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[i,c]),d=(0,a.useMemo)((()=>{if(!c)return{};const e=u();return{width:c.offsetWidth-e}}),[u,c]),p=(0,a.useMemo)((()=>{if(c&&("top"===l||"bottom"===l||"inside"===l))return{ownerDocument:c.ownerDocument,getBoundingClientRect(){const e=c.getBoundingClientRect(),t=u(),n=e.left+t,o=e.right;let r=0,i=0;"top"===l?(r=e.top,i=e.top):(r=e.bottom,i=e.bottom);const a=o-n,s=i-r;return new window.DOMRect(n,r,a,s)}}}),[c,l,u]);return c?(0,a.createElement)(m.Popover,{animate:!1,anchor:p,focusOnMount:!1,className:"block-editor-list-view-drop-indicator"},(0,a.createElement)("div",{style:d,className:"block-editor-list-view-drop-indicator__line"})):null}function lk(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,p.useDispatch)(so),{getBlockName:o,getBlockParents:l,getBlockSelectionStart:i,getBlockSelectionEnd:s,getSelectedBlockClientIds:c,hasMultiSelection:u,hasSelectedBlock:d}=(0,p.useSelect)(so),{getBlockType:m}=(0,p.useSelect)(r.store),f=(0,a.useCallback)((async(r,a,s)=>{if(null==r||!r.shiftKey)return void n(a);r.preventDefault();const p="keydown"===r.type&&(r.keyCode===ku.UP||r.keyCode===ku.DOWN||r.keyCode===ku.HOME||r.keyCode===ku.END);if(!p&&!d()&&!u())return void n(a,null);const f=c(),h=[...l(a),a];p&&!f.some((e=>h.includes(e)))&&await e();let v=i(),b=a;p&&(d()||u()||(v=a),s&&(b=s));const _=l(v),k=l(b),{start:y,end:E}=function(e,t,n,o){const r=[...n,e],l=[...o,t],i=Math.min(r.length,l.length)-1;return{start:r[i],end:l[i]}}(v,b,_,k);await t(y,E,null);const C=c();if((r.keyCode===ku.HOME||r.keyCode===ku.END)&&C.length>1)return;const S=f.filter((e=>!C.includes(e)));let w;if(1===S.length){var B;const e=null===(B=m(o(S[0])))||void 0===B?void 0:B.title;e&&(w=(0,g.sprintf)((0,g.__)("%s deselected."),e))}else S.length>1&&(w=(0,g.sprintf)((0,g.__)("%s blocks deselected."),S.length));w&&(0,qt.speak)(w)}),[e,o,m,l,i,s,c,u,d,t,n]);return{updateBlockSelection:f}}function ik(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}const ak=["top","bottom"];function sk(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:o,canInsertBlocks:r}=(0,p.useSelect)(so),[l,i]=(0,a.useState)(),{rootClientId:s,blockIndex:c}=l||{},u=Ug(s,c),m=o(),f=(0,d.useThrottle)((0,a.useCallback)(((o,l)=>{const a={x:o.clientX,y:o.clientY},s=!(null==m||!m.length),c=function(e,t){let n,o,r,l;for(const i of e){if(i.isDraggedBlock)continue;const a=i.element.getBoundingClientRect(),[s,c]=$g(t,a,ak),u=ik(t,a);if(void 0===r||s0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,l)))return{rootClientId:o.clientId,blockIndex:0,dropPosition:"inside"};if(!o.canInsertDraggedBlocksAsSibling)return;const a=i?1:0;return{rootClientId:o.rootClientId,clientId:o.clientId,blockIndex:o.blockIndex+a,dropPosition:n}}(Array.from(l.querySelectorAll("[data-block]")).map((o=>{const l=o.dataset.block,i=e(l);return{clientId:l,rootClientId:i,blockIndex:t(l),element:o,isDraggedBlock:!!s&&m.includes(l),innerBlockCount:n(l),canInsertDraggedBlocksAsSibling:!s||r(m,i),canInsertDraggedBlocksAsChild:!s||r(m,l)}})),a);c&&i(c)}),[m]),200);return{ref:(0,d.__experimentalUseDropZone)({onDrop:u,onDragOver(e){f(e,e.currentTarget)},onDragEnd(){f.cancel(),i(null)}}),target:l}}const ck=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;var uk=(0,a.forwardRef)((function(e,t){let{id:n,blocks:o,showBlockMovers:r=!1,isExpanded:l=!1}=e;const{clientIdsTree:i,draggedClientIds:s,selectedClientIds:c}=function(e){return(0,p.useSelect)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:o,__unstableGetClientIdsTree:r}=t(so);return{selectedClientIds:o(),draggedClientIds:n(),clientIdsTree:e||r()}}),[e])}(o),{visibleBlockCount:u,shouldShowInnerBlocks:f}=(0,p.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n,__unstableGetEditorMode:o}=e(so),r=(null==s?void 0:s.length)>0?n(s).length+1:0;return{visibleBlockCount:t()-r,shouldShowInnerBlocks:"zoom-out"!==o()}}),[s]),{updateBlockSelection:h}=lk(),[v,b]=(0,a.useReducer)(ck,{}),{ref:_,target:k}=sk(),y=(0,a.useRef)(),E=(0,d.useMergeRefs)([y,_,t]),C=(0,a.useRef)(!1),{setSelectedTreeId:S}=function(e){let{firstSelectedBlockClientId:t,setExpandedState:n}=e;const[o,r]=(0,a.useState)(null),{selectedBlockParentClientIds:l}=(0,p.useSelect)((e=>{const{getBlockParents:n}=e(so);return{selectedBlockParentClientIds:n(t,!1)}}),[t]),i=Array.isArray(l)&&l.length?l:null;return(0,a.useEffect)((()=>{o!==t&&i&&n({type:"expand",clientIds:l})}),[t]),{setSelectedTreeId:r}}({firstSelectedBlockClientId:c[0],setExpandedState:b}),w=(0,a.useCallback)(((e,t)=>{h(e,t),S(t)}),[S,h]);(0,a.useEffect)((()=>{C.current=!0}),[]);const[B]=(0,d.__experimentalUseFixedWindowList)(y,36,u,{useWindowing:!0,windowOverscan:40}),I=(0,a.useCallback)((e=>{e&&b({type:"expand",clientIds:[e]})}),[b]),x=(0,a.useCallback)((e=>{e&&b({type:"collapse",clientIds:[e]})}),[b]),T=(0,a.useCallback)((e=>{var t;I(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[I]),N=(0,a.useCallback)((e=>{var t;x(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[x]),P=(0,a.useCallback)(((e,t,n)=>{var o,r;e.shiftKey&&h(e,null==t||null===(o=t.dataset)||void 0===o?void 0:o.block,null==n||null===(r=n.dataset)||void 0===r?void 0:r.block)}),[h]),M=(0,a.useMemo)((()=>({isTreeGridMounted:C.current,draggedClientIds:s,expandedState:v,expand:I,collapse:x})),[C.current,s,v,I,x]);return(0,a.createElement)(p.AsyncModeProvider,{value:!0},(0,a.createElement)(rk,{listViewRef:y,blockDropTarget:k}),(0,a.createElement)(m.__experimentalTreeGrid,{id:n,className:"block-editor-list-view-tree","aria-label":(0,g.__)("Block navigation structure"),ref:E,onCollapseRow:N,onExpandRow:T,onFocusRow:P,applicationAriaLabel:(0,g.__)("Block navigation structure")},(0,a.createElement)(Z_.Provider,{value:M},(0,a.createElement)(ok,{blocks:i,selectBlock:w,showBlockMovers:r,fixedListWindow:B,selectedClientIds:c,isExpanded:l,shouldShowInnerBlocks:f}))))}));function dk(e){let{isEnabled:t,onToggle:n,isOpen:o,innerRef:r,...l}=e;return(0,a.createElement)(m.Button,i({},l,{ref:r,icon:U_,"aria-expanded":o,"aria-haspopup":"true",onClick:t?n:void 0,label:(0,g.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!t}))}var pk=(0,a.forwardRef)((function(e,t){let{isDisabled:n,...o}=e;V()("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});const r=(0,p.useSelect)((e=>!!e(so).getBlockCount()),[])&&!n;return(0,a.createElement)(m.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:e=>{let{isOpen:n,onToggle:l}=e;return(0,a.createElement)(dk,i({},o,{innerRef:t,isOpen:n,onToggle:l,isEnabled:r}))},renderContent:()=>(0,a.createElement)("div",{className:"block-editor-block-navigation__container"},(0,a.createElement)("p",{className:"block-editor-block-navigation__label"},(0,g.__)("List view")),(0,a.createElement)(uk,null))})}));function mk(e){var t;let{genericPreviewBlock:n,style:o,className:l,activeStyle:i}=e;const s=null===(t=(0,r.getBlockType)(n.name))||void 0===t?void 0:t.example,c=wf(l,i,o),u=(0,a.useMemo)((()=>({...n,title:o.label||o.name,description:o.description,initialAttributes:{...n.attributes,className:c+" block-editor-block-styles__block-preview-container"},example:s})),[n,c]);return(0,a.createElement)(yp,{item:u,isStylePreview:!0})}function fk(e){let{children:t,scope:n,...o}=e;return(0,a.createElement)(m.Fill,{name:`BlockStylesPreviewPanel/${n}`},(0,a.createElement)("div",o,t))}const gk=()=>{};function hk(e){let{clientId:t,onSwitch:n=gk,onHoverClassName:o=gk,scope:r}=e;const{onSelect:l,stylesToRender:i,activeStyle:s,genericPreviewBlock:p,className:f}=If({clientId:t,onSwitch:n}),[g,h]=(0,a.useState)(null),[v,b]=(0,a.useState)(0),_=(0,d.useViewportMatch)("medium","<");if((0,a.useLayoutEffect)((()=>{const e=document.querySelector(".interface-interface-skeleton__content"),t=(null==e?void 0:e.scrollTop)||0;b(t+16)}),[g]),!i||0===i.length)return null;const k=(0,u.debounce)(h,250),y=e=>{var t;g!==e?(k(e),o(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null)):k.cancel()};return(0,a.createElement)("div",{className:"block-editor-block-styles"},(0,a.createElement)("div",{className:"block-editor-block-styles__variants"},i.map((e=>{const t=e.label||e.name;return(0,a.createElement)(m.Button,{className:c()("block-editor-block-styles__item",{"is-active":s.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>y(e),onFocus:()=>y(e),onMouseLeave:()=>y(null),onBlur:()=>y(null),onClick:()=>(e=>{l(e),o(null),h(null),k.cancel()})(e),"aria-current":s.name===e.name},(0,a.createElement)(m.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text"},t))}))),g&&!_&&(0,a.createElement)(fk,{scope:r,className:"block-editor-block-styles__preview-panel",style:{top:v},onMouseLeave:()=>y(null)},(0,a.createElement)(mk,{activeStyle:s,className:f,genericPreviewBlock:p,style:g})))}hk.Slot=function(e){let{scope:t}=e;return(0,a.createElement)(m.Slot,{name:`BlockStylesPreviewPanel/${t}`})};var vk=hk;var bk=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));var _k=function(e){let{icon:t=bk,label:n=(0,g.__)("Choose variation"),instructions:o=(0,g.__)("Select a variation to start with."),variations:r,onSelect:l,allowSkip:i}=e;const s=c()("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,a.createElement)(m.Placeholder,{icon:t,label:n,instructions:o,className:s},(0,a.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,g.__)("Block variations")},r.map((e=>(0,a.createElement)("li",{key:e.name},(0,a.createElement)(m.Button,{variant:"secondary",icon:e.icon,iconSize:48,onClick:()=>l(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,a.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))))),i&&(0,a.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,a.createElement)(m.Button,{variant:"link",onClick:()=>l()},(0,g.__)("Skip"))))};var kk=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"}));const yk="carousel",Ek="grid",Ck=e=>{let{onBlockPatternSelect:t}=e;return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},(0,a.createElement)(m.Button,{variant:"primary",onClick:t},(0,g.__)("Choose")))},Sk=e=>{let{handlePrevious:t,handleNext:n,activeSlide:o,totalSlides:r}=e;return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,a.createElement)(m.Button,{icon:qm,label:(0,g.__)("Previous pattern"),onClick:t,disabled:0===o}),(0,a.createElement)(m.Button,{icon:Km,label:(0,g.__)("Next pattern"),onClick:n,disabled:o===r-1}))};var wk=e=>{let{viewMode:t,setViewMode:n,handlePrevious:o,handleNext:r,activeSlide:l,totalSlides:i,onBlockPatternSelect:s}=e;const c=t===yk,u=(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,a.createElement)(m.Button,{icon:xl,label:(0,g.__)("Carousel view"),onClick:()=>n(yk),isPressed:c}),(0,a.createElement)(m.Button,{icon:kk,label:(0,g.__)("Grid view"),onClick:()=>n(Ek),isPressed:t===Ek}));return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},c&&(0,a.createElement)(Sk,{handlePrevious:o,handleNext:r,activeSlide:l,totalSlides:i}),u,c&&(0,a.createElement)(Ck,{onBlockPatternSelect:s}))};var Bk=function(e,t,n){return(0,p.useSelect)((o=>{const{getBlockRootClientId:r,__experimentalGetPatternsByBlockTypes:l,__experimentalGetAllowedPatterns:i}=o(so),a=r(e);return n?i(a).filter(n):l(t,a)}),[e,t,n])};const Ik=e=>{let{viewMode:t,activeSlide:n,patterns:o,onBlockPatternSelect:r}=e;const l=(0,m.__unstableUseCompositeState)(),s="block-editor-block-pattern-setup__container";if(t===yk){const e=new Map([[n,"active-slide"],[n-1,"previous-slide"],[n+1,"next-slide"]]);return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__carousel"},(0,a.createElement)("div",{className:s},(0,a.createElement)("ul",{className:"carousel-container"},o.map(((t,n)=>(0,a.createElement)(Tk,{className:e.get(n)||"",key:t.name,pattern:t}))))))}return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__grid"},(0,a.createElement)(m.__unstableComposite,i({},l,{role:"listbox",className:s,"aria-label":(0,g.__)("Patterns list")}),o.map((e=>(0,a.createElement)(xk,{key:e.name,pattern:e,onSelect:r,composite:l})))))};function xk(e){let{pattern:t,onSelect:n,composite:o}=e;const r="block-editor-block-pattern-setup-list",{blocks:l,description:s,viewportWidth:c=700}=t,u=(0,d.useInstanceId)(xk,`${r}__item-description`);return(0,a.createElement)("div",{className:`${r}__list-item`,"aria-label":t.title,"aria-describedby":t.description?u:void 0},(0,a.createElement)(m.__unstableCompositeItem,i({role:"option",as:"div"},o,{className:`${r}__item`,onClick:()=>n(l)}),(0,a.createElement)(_p,{blocks:l,viewportWidth:c})),!!s&&(0,a.createElement)(m.VisuallyHidden,{id:u},s))}function Tk(e){let{className:t,pattern:n,minHeight:o}=e;const{blocks:r,title:l,description:i}=n,s=(0,d.useInstanceId)(Tk,"block-editor-block-pattern-setup-list__item-description");return(0,a.createElement)("li",{className:`pattern-slide ${t}`,"aria-label":l,"aria-describedby":i?s:void 0},(0,a.createElement)(_p,{blocks:r,__experimentalMinHeight:o}),!!i&&(0,a.createElement)(m.VisuallyHidden,{id:s},i))}var Nk=e=>{let{clientId:t,blockName:n,filterPatternsFn:o,onBlockPatternSelect:l}=e;const[i,s]=(0,a.useState)(yk),[c,u]=(0,a.useState)(0),{replaceBlock:d}=(0,p.useDispatch)(so),m=Bk(t,n,o);if(null==m||!m.length)return null;const f=l||(e=>{const n=e.map((e=>(0,r.cloneBlock)(e)));d(t,n)});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${i}`},(0,a.createElement)(Ik,{viewMode:i,activeSlide:c,patterns:m,onBlockPatternSelect:f}),(0,a.createElement)(wk,{viewMode:i,setViewMode:s,activeSlide:c,totalSlides:m.length,handleNext:()=>{u((e=>e+1))},handlePrevious:()=>{u((e=>e-1))},onBlockPatternSelect:()=>{f(m[c].blocks)}})))};function Pk(e){let{className:t,onSelectVariation:n,selectedValue:o,variations:r}=e;return(0,a.createElement)("fieldset",{className:t},(0,a.createElement)(m.VisuallyHidden,{as:"legend"},(0,g.__)("Transform to variation")),r.map((e=>(0,a.createElement)(m.Button,{key:e.name,icon:(0,a.createElement)(Du,{icon:e.icon,showColors:!0}),isPressed:o===e.name,label:o===e.name?e.title:(0,g.sprintf)((0,g.__)("Transform to %s"),e.title),onClick:()=>n(e.name),"aria-label":e.title,showTooltip:!0}))))}function Mk(e){let{className:t,onSelectVariation:n,selectedValue:o,variations:r}=e;const l=r.map((e=>{let{name:t,title:n,description:o}=e;return{value:t,label:n,info:o}}));return(0,a.createElement)(m.DropdownMenu,{className:t,label:(0,g.__)("Transform to variation"),text:(0,g.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${t}__popover`},icon:Qm,toggleProps:{iconPosition:"right"}},(()=>(0,a.createElement)("div",{className:`${t}__container`},(0,a.createElement)(m.MenuGroup,null,(0,a.createElement)(m.MenuItemsChoice,{choices:l,value:o,onSelect:n})))))}var Lk=function(e){let{blockClientId:t}=e;const{updateBlockAttributes:n}=(0,p.useDispatch)(so),{activeBlockVariation:o,variations:l}=(0,p.useSelect)((e=>{const{getActiveBlockVariation:n,getBlockVariations:o}=e(r.store),{getBlockName:l,getBlockAttributes:i}=e(so),a=t&&l(t);return{activeBlockVariation:n(a,i(t)),variations:a&&o(a,"transform")}}),[t]),i=null==o?void 0:o.name,s=(0,a.useMemo)((()=>{const e=new Set;return!!l&&(l.forEach((t=>{var n;t.icon&&e.add((null===(n=t.icon)||void 0===n?void 0:n.src)||t.icon)})),e.size===l.length)}),[l]);if(null==l||!l.length)return null;const c=s?Pk:Mk;return(0,a.createElement)(c,{className:"block-editor-block-variation-transforms",onSelectVariation:e=>{n(t,{...l.find((t=>{let{name:n}=t;return n===e})).attributes})},selectedValue:i,variations:l})},Rk=(0,d.createHigherOrderComponent)((e=>t=>{const n=qo("color.palette"),o=!qo("color.custom"),r=void 0===t.colors?n:t.colors,l=void 0===t.disableCustomColors?o:t.disableCustomColors,s=!(0,u.isEmpty)(r)||!l;return(0,a.createElement)(e,i({},t,{colors:r,disableCustomColors:l,hasColorsToChoose:s}))}),"withColorContext"),Ak=Rk(m.ColorPalette);function Dk(e){let{onChange:t,value:n,...o}=e;return(0,a.createElement)(jh,i({},o,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var Ok=window.wp.date;const zk=new Date(2022,0,25);function Fk(e){let{format:t,defaultFormat:n,onChange:o}=e;return(0,a.createElement)("fieldset",{className:"block-editor-date-format-picker"},(0,a.createElement)(m.VisuallyHidden,{as:"legend"},(0,g.__)("Date format")),(0,a.createElement)(m.ToggleControl,{label:(0,a.createElement)(a.Fragment,null,(0,g.__)("Default format"),(0,a.createElement)("span",{className:"block-editor-date-format-picker__default-format-toggle-control__hint"},(0,Ok.dateI18n)(n,zk))),checked:!t,onChange:e=>o(e?null:n)}),t&&(0,a.createElement)(Vk,{format:t,onChange:o}))}function Vk(e){var t;let{format:n,onChange:o}=e;const r=[...new Set(["Y-m-d",(0,g._x)("n/j/Y","short date format"),(0,g._x)("n/j/Y g:i A","short date format with time"),(0,g._x)("M j, Y","medium date format"),(0,g._x)("M j, Y g:i A","medium date format with time"),(0,g._x)("F j, Y","long date format"),(0,g._x)("M j","short date format without the year")])],l=r.map(((e,t)=>({key:`suggested-${t}`,name:(0,Ok.dateI18n)(e,zk),format:e}))),i={key:"custom",name:(0,g.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",__experimentalHint:(0,g.__)("Enter your own date format")},[s,c]=(0,a.useState)((()=>!!n&&!r.includes(n)));return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.BaseControl,{className:"block-editor-date-format-picker__custom-format-select-control"},(0,a.createElement)(m.CustomSelectControl,{__nextUnconstrainedWidth:!0,label:(0,g.__)("Choose a format"),options:[...l,i],value:s?i:null!==(t=l.find((e=>e.format===n)))&&void 0!==t?t:i,onChange:e=>{let{selectedItem:t}=e;t===i?c(!0):(c(!1),o(t.format))}})),s&&(0,a.createElement)(m.TextControl,{label:(0,g.__)("Custom format"),hideLabelFromVision:!0,help:(0,a.createInterpolateElement)((0,g.__)("Enter a date or time format string."),{Link:(0,a.createElement)(m.ExternalLink,{href:(0,g.__)("https://wordpress.org/support/article/formatting-date-and-time/")})}),value:n,onChange:e=>o(e)}))}const Hk=["colors","disableCustomColors","gradients","disableCustomGradients"],Gk=e=>{let{className:t,colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,children:i,settings:s,title:f,showTitle:g=!0,__experimentalHasMultipleOrigins:h,__experimentalIsRenderedInSidebar:v,enableAlpha:b}=e;const _=(0,d.useInstanceId)(Gk),{batch:k}=(0,p.useRegistry)();return(0,u.isEmpty)(n)&&(0,u.isEmpty)(o)&&r&&l&&(0,u.every)(s,(e=>(0,u.isEmpty)(e.colors)&&(0,u.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)))?null:(0,a.createElement)(m.__experimentalToolsPanel,{className:c()("block-editor-panel-color-gradient-settings",t),label:g?f:void 0,resetAll:()=>{k((()=>{s.forEach((e=>{let{colorValue:t,gradientValue:n,onColorChange:o,onGradientChange:r}=e;t?o():n&&r()}))}))},panelId:_,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},(0,a.createElement)(Qh,{settings:s,panelId:_,colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,__experimentalHasMultipleOrigins:h,__experimentalIsRenderedInSidebar:v,enableAlpha:b}),!!i&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.__experimentalSpacer,{marginY:4})," ",i))},Uk=e=>{const t=yh();return t.colors=qo("color.palette"),t.gradients=qo("color.gradients"),(0,a.createElement)(Gk,i({},t,e))},Wk=e=>{const t=Eh();return(0,a.createElement)(Gk,i({},t,e))};var $k=e=>(0,u.every)(Hk,(t=>e.hasOwnProperty(t)))?(0,a.createElement)(Gk,e):e.__experimentalHasMultipleOrigins?(0,a.createElement)(Wk,e):(0,a.createElement)(Uk,e),jk=function(e,t){return jk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},jk(e,t)};var Kk=function(){return Kk=Object.assign||function(e){for(var t,n=1,o=arguments.length;nu*r?{width:u*r,height:u}:{width:c,height:c/r}}function Zk(e,t,n,o,r){void 0===r&&(r=0);var l=ay(t.width,t.height,r),i=l.width,a=l.height;return{x:Xk(e.x,i,n.width,o),y:Xk(e.y,a,n.height,o)}}function Xk(e,t,n,o){var r=t*o/2-n/2;return sy(e,-r,r)}function Jk(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function ey(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function ty(e,t,n,o,r,l,i){void 0===l&&(l=0),void 0===i&&(i=!0);var a=i?ny:oy,s=ay(t.width,t.height,l),c=ay(t.naturalWidth,t.naturalHeight,l),u={x:a(100,((s.width-n.width/r)/2-e.x/r)/s.width*100),y:a(100,((s.height-n.height/r)/2-e.y/r)/s.height*100),width:a(100,n.width/s.width*100/r),height:a(100,n.height/s.height*100/r)},d=Math.round(a(c.width,u.width*c.width/100)),p=Math.round(a(c.height,u.height*c.height/100)),m=c.width>=c.height*o?{width:Math.round(p*o),height:p}:{width:d,height:Math.round(d/o)};return{croppedAreaPercentages:u,croppedAreaPixels:Kk(Kk({},m),{x:Math.round(a(c.width-m.width,u.x*c.width/100)),y:Math.round(a(c.height-m.height,u.y*c.height/100))})}}function ny(e,t){return Math.min(e,Math.max(0,t))}function oy(e,t){return t}function ry(e,t,n,o,r,l){var i=ay(t.width,t.height,n),a=sy(o.width/i.width*(100/e.width),r,l);return{crop:{x:a*i.width/2-o.width/2-i.width*a*(e.x/100),y:a*i.height/2-o.height/2-i.height*a*(e.y/100)},zoom:a}}function ly(e,t,n,o,r,l){void 0===n&&(n=0);var i=ay(t.naturalWidth,t.naturalHeight,n),a=sy(function(e,t,n){var o=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*o):n.width/(e.width*o)}(e,t,o),r,l),s=o.height>o.width?o.height/e.height:o.width/e.width;return{crop:{x:((i.width-e.width)/2-e.x)*s,y:((i.height-e.height)/2-e.y)*s},zoom:a}}function iy(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function ay(e,t,n){var o=n*Math.PI/180;return{width:Math.abs(Math.cos(o)*e)+Math.abs(Math.sin(o)*t),height:Math.abs(Math.sin(o)*e)+Math.abs(Math.cos(o)*t)}}function sy(e,t,n){return Math.min(Math.max(e,t),n)}function cy(){for(var e=[],t=0;t0})).join(" ").trim()}var uy=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=Ti().createRef(),n.videoRef=Ti().createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=document,n.currentWindow=window,n.state={cropSize:null,hasWheelJustStarted:!1},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd)},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=ry(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),o=t.crop,r=t.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}else if(n.props.initialCroppedAreaPixels){var l=ly(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);o=l.crop,r=l.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}},n.computeSizes=function(){var e,t,o,r,l,i,a=n.imageRef.current||n.videoRef.current;if(a&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var s=n.containerRect.width/n.containerRect.height,c=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(o=n.imageRef.current)||void 0===o?void 0:o.naturalHeight)||(null===(r=n.videoRef.current)||void 0===r?void 0:r.videoHeight)||0,d=c/u,p=void 0;if(a.offsetWidthd?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":p={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":p={width:n.containerRect.height*d,height:n.containerRect.height};break;case"auto-cover":p=c>u?{width:n.containerRect.width,height:n.containerRect.width/d}:{width:n.containerRect.height*d,height:n.containerRect.height}}else p={width:a.offsetWidth,height:a.offsetHeight};n.mediaSize=Kk(Kk({},p),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var m=n.props.cropSize?n.props.cropSize:Qk(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(l=n.state.cropSize)||void 0===l?void 0:l.height)===m.height&&(null===(i=n.state.cropSize)||void 0===i?void 0:i.width)===m.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(m),n.setState({cropSize:m},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(m),m}},n.onMouseDown=function(e){e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0])))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var o=t.getMousePoint(e),r=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(r,o,{shouldUpdatePosition:!0}),n.props.onRotationChange){var l=n.gestureRotationStart+e.rotation;n.props.onRotationChange(l)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,o,r=e.x,l=e.y;n.dragStartPosition={x:r,y:l},n.dragStartCrop=Kk({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,o=e.y;n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==o){var e=t-n.dragStartPosition.x,r=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},i=n.props.restrictPosition?Zk(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(i)}}))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(!n.props.onWheelRequest||n.props.onWheelRequest(e)){e.preventDefault();var o=t.getMousePoint(e),r=Yk()(e).pixelY,l=n.props.zoom-r*n.props.zoomSpeed/200;n.setNewZoom(l,o,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e){var t=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(o-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,l=r.crop,i=r.zoom;return{x:(t+l.x)/i,y:(o+l.y)/i}},n.setNewZoom=function(e,t,o){var r=(void 0===o?{}:o).shouldUpdatePosition,l=void 0===r||r;if(n.state.cropSize&&n.props.onZoomChange){var i=sy(e,n.props.minZoom,n.props.maxZoom);if(l){var a=n.getPointOnContainer(t),s=n.getPointOnMedia(a),c={x:s.x*i-a.x,y:s.y*i-a.y},u=n.props.restrictPosition?Zk(c,n.mediaSize,n.state.cropSize,i,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(i)}},n.getCropData=function(){return n.state.cropSize?ty(n.props.restrictPosition?Zk(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,o)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?Zk(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function n(){this.constructor=e}jk(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef)},t.prototype.componentWillUnmount=function(){var e;this.currentWindow.removeEventListener("resize",this.computeSizes),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(e=this.styleRef.parentNode)||void 0===e||e.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){var t,n,o,r,l,i,a,s,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(o=e.cropSize)||void 0===o?void 0:o.width)!==(null===(r=this.props.cropSize)||void 0===r?void 0:r.width)?this.computeSizes():(null===(l=e.crop)||void 0===l?void 0:l.x)===(null===(i=this.props.crop)||void 0===i?void 0:i.x)&&(null===(a=e.crop)||void 0===a?void 0:a.y)===(null===(s=this.props.crop)||void 0===s?void 0:s.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef.current)||void 0===c||c.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=Jk(n,o),this.lastPinchRotation=ey(n,o),this.onDragStart(iy(n,o))},t.prototype.onPinchMove=function(e){var n=this,o=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),l=iy(o,r);this.onDrag(l),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=Jk(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,l,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var i=ey(o,r),a=n.props.rotation+(i-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(a),n.lastPinchRotation=i}))},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,l=t.transform,i=t.crop,a=i.x,s=i.y,c=t.rotation,u=t.zoom,d=t.cropShape,p=t.showGrid,m=t.style,f=m.containerStyle,g=m.cropAreaStyle,h=m.mediaStyle,v=t.classes,b=v.containerClassName,_=v.cropAreaClassName,k=v.mediaClassName,y=t.objectFit;return Ti().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:f,className:cy("reactEasyCrop_Container",b)},n?Ti().createElement("img",Kk({alt:"",className:cy("reactEasyCrop_Image","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical","auto-cover"===y&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),k)},r,{src:n,ref:this.imageRef,style:Kk(Kk({},h),{transform:l||"translate("+a+"px, "+s+"px) rotate("+c+"deg) scale("+u+")"}),onLoad:this.onMediaLoad})):o&&Ti().createElement("video",Kk({autoPlay:!0,loop:!0,muted:!0,className:cy("reactEasyCrop_Video","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical","auto-cover"===y&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),k)},r,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Kk(Kk({},h),{transform:l||"translate("+a+"px, "+s+"px) rotate("+c+"deg) scale("+u+")"}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return Ti().createElement("source",Kk({key:e.src},e))}))),this.state.cropSize&&Ti().createElement("div",{style:Kk(Kk({},g),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:cy("reactEasyCrop_CropArea","round"===d&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",_)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(Ti().Component),dy=uy;const py={position:"bottom right",isAlternate:!0};function my(e,t){const n=function(e){let{url:t,naturalWidth:n,naturalHeight:o}=e;const[r,i]=(0,a.useState)(),[s,c]=(0,a.useState)(),[u,d]=(0,a.useState)({x:0,y:0}),[p,m]=(0,a.useState)(),[f,g]=(0,a.useState)(),[h,v]=(0,a.useState)(),[b,_]=(0,a.useState)(),k=(0,a.useCallback)((()=>{d({x:0,y:0}),m(100),g(0),v(n/o),_(n/o)}),[n,o,d,m,g,v,_]),y=(0,a.useCallback)((()=>{const e=(f+90)%360;let r=n/o;if(f%180==90&&(r=o/n),0===e)return i(),g(e),v(n/o),void d({x:-u.y*r,y:u.x*r});const a=new window.Image;a.src=t,a.onload=function(t){const n=document.createElement("canvas");let o=0,l=0;e%180?(n.width=t.target.height,n.height=t.target.width):(n.width=t.target.width,n.height=t.target.height),90!==e&&180!==e||(o=n.width),270!==e&&180!==e||(l=n.height);const a=n.getContext("2d");a.translate(o,l),a.rotate(e*Math.PI/180),a.drawImage(t.target,0,0),n.toBlob((t=>{i(URL.createObjectURL(t)),g(e),v(n.width/n.height),d({x:-u.y*r,y:u.x*r})}))};const s=(0,l.applyFilters)("media.crossOrigin",void 0,t);"string"==typeof s&&(a.crossOrigin=s)}),[f,n,o,i,g,v,d]);return(0,a.useMemo)((()=>({editedUrl:r,setEditedUrl:i,crop:s,setCrop:c,position:u,setPosition:d,zoom:p,setZoom:m,rotation:f,setRotation:g,rotateClockwise:y,aspect:h,setAspect:v,defaultAspect:b,initializeTransformValues:k})),[r,i,s,c,u,d,p,m,f,g,y,h,v,b,k])}(e),{initializeTransformValues:o}=n;return(0,a.useEffect)((()=>{t&&o()}),[t,o]),n}const fy=(0,a.createContext)({}),gy=()=>(0,a.useContext)(fy);function hy(e){let{id:t,url:n,naturalWidth:o,naturalHeight:r,isEditing:l,onFinishEditing:i,onSaveImage:s,children:c}=e;const u=my({url:n,naturalWidth:o,naturalHeight:r},l),d=function(e){let{crop:t,rotation:n,height:o,width:r,aspect:l,url:i,id:s,onSaveImage:c,onFinishEditing:u}=e;const{createErrorNotice:d}=(0,p.useDispatch)(Op.store),[m,f]=(0,a.useState)(!1),h=(0,a.useCallback)((()=>{f(!1),u()}),[f,u]),v=(0,a.useCallback)((()=>{f(!0);let e={};(t.width<99.9||t.height<99.9)&&(e=t),n>0&&(e.rotation=n),e.src=i,B_()({path:`/wp/v2/media/${s}/edit`,method:"POST",data:e}).then((e=>{c({id:e.id,url:e.source_url,height:o&&r?r/l:void 0})})).catch((e=>{d((0,g.sprintf)((0,g.__)("Could not edit image. %s"),(0,Wl.__unstableStripHTML)(e.message)),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{f(!1),u()}))}),[f,t,n,o,r,l,i,c,d,f,u]);return(0,a.useMemo)((()=>({isInProgress:m,apply:v,cancel:h})),[m,v,h])}({id:t,url:n,onSaveImage:s,onFinishEditing:i,...u}),m=(0,a.useMemo)((()=>({...u,...d})),[u,d]);return(0,a.createElement)(fy.Provider,{value:m},c)}function vy(e){let{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i,borderProps:s}=e;const{isInProgress:u,editedUrl:d,position:p,zoom:f,aspect:g,setPosition:h,setCrop:v,setZoom:b,rotation:_}=gy();let k=o||r*l/i;return _%180==90&&(k=r*i/l),(0,a.createElement)("div",{className:c()("wp-block-image__crop-area",null==s?void 0:s.className,{"is-applying":u}),style:{...null==s?void 0:s.style,width:n||r,height:k}},(0,a.createElement)(dy,{image:d||t,disabled:u,minZoom:1,maxZoom:3,crop:p,zoom:f/100,aspect:g,onCropChange:h,onCropComplete:e=>{v(e)},onZoomChange:e=>{b(100*e)}}),u&&(0,a.createElement)(m.Spinner,null))}var by=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.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"}));function _y(){const{isInProgress:e,zoom:t,setZoom:n}=gy();return(0,a.createElement)(m.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:py,renderToggle:t=>{let{isOpen:n,onToggle:o}=t;return(0,a.createElement)(m.ToolbarButton,{icon:by,label:(0,g.__)("Zoom"),onClick:o,"aria-expanded":n,disabled:e})},renderContent:()=>(0,a.createElement)(m.RangeControl,{label:(0,g.__)("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}var ky=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}));function yy(e){let{aspectRatios:t,isDisabled:n,label:o,onClick:r,value:l}=e;return(0,a.createElement)(m.MenuGroup,{label:o},t.map((e=>{let{title:t,aspect:o}=e;return(0,a.createElement)(m.MenuItem,{key:o,disabled:n,onClick:()=>{r(o)},role:"menuitemradio",isSelected:o===l,icon:o===l?Ef:void 0},t)})))}function Ey(e){let{toggleProps:t}=e;const{isInProgress:n,aspect:o,setAspect:r,defaultAspect:l}=gy();return(0,a.createElement)(m.DropdownMenu,{icon:ky,label:(0,g.__)("Aspect Ratio"),popoverProps:py,toggleProps:t,className:"wp-block-image__aspect-ratio"},(e=>{let{onClose:t}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(yy,{isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,g.__)("Original"),aspect:l},{title:(0,g.__)("Square"),aspect:1}]}),(0,a.createElement)(yy,{label:(0,g.__)("Landscape"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,g.__)("16:10"),aspect:1.6},{title:(0,g.__)("16:9"),aspect:16/9},{title:(0,g.__)("4:3"),aspect:4/3},{title:(0,g.__)("3:2"),aspect:1.5}]}),(0,a.createElement)(yy,{label:(0,g.__)("Portrait"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,g.__)("10:16"),aspect:.625},{title:(0,g.__)("9:16"),aspect:9/16},{title:(0,g.__)("3:4"),aspect:3/4},{title:(0,g.__)("2:3"),aspect:2/3}]}))}))}var Cy=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));function Sy(){const{isInProgress:e,rotateClockwise:t}=gy();return(0,a.createElement)(m.ToolbarButton,{icon:Cy,label:(0,g.__)("Rotate"),onClick:t,disabled:e})}function wy(){const{isInProgress:e,apply:t,cancel:n}=gy();return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.ToolbarButton,{onClick:t,disabled:e},(0,g.__)("Apply")),(0,a.createElement)(m.ToolbarButton,{onClick:n},(0,g.__)("Cancel")))}function By(e){let{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i,borderProps:s}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(vy,{borderProps:s,url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}),(0,a.createElement)(_o,null,(0,a.createElement)(m.ToolbarGroup,null,(0,a.createElement)(_y,null),(0,a.createElement)(m.ToolbarItem,null,(e=>(0,a.createElement)(Ey,{toggleProps:e}))),(0,a.createElement)(Sy,null)),(0,a.createElement)(m.ToolbarGroup,null,(0,a.createElement)(wy,null))))}const Iy=[25,50,75,100],xy=()=>{};function Ty(e){let{imageSizeHelp:t,imageWidth:n,imageHeight:o,imageSizeOptions:r=[],isResizable:l=!0,slug:i,width:s,height:c,onChange:d,onChangeImage:p=xy}=e;const{currentHeight:f,currentWidth:h,updateDimension:v,updateDimensions:b}=function(e,t,n,o,r){var l,i;const[s,c]=(0,a.useState)(null!==(l=null!=t?t:o)&&void 0!==l?l:""),[u,d]=(0,a.useState)(null!==(i=null!=e?e:n)&&void 0!==i?i:"");return(0,a.useEffect)((()=>{void 0===t&&void 0!==o&&c(o),void 0===e&&void 0!==n&&d(n)}),[o,n]),(0,a.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(s)&&c(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(u)&&d(e)}),[t,e]),{currentHeight:u,currentWidth:s,updateDimension:(e,t)=>{"width"===e?c(t):d(t),r({[e]:""===t?void 0:parseInt(t,10)})},updateDimensions:(e,t)=>{d(null!=e?e:n),c(null!=t?t:o),r({height:e,width:t})}}}(c,s,o,n,d);return(0,a.createElement)(a.Fragment,null,!(0,u.isEmpty)(r)&&(0,a.createElement)(m.SelectControl,{label:(0,g.__)("Image size"),value:i,options:r,onChange:p,help:t}),l&&(0,a.createElement)("div",{className:"block-editor-image-size-control"},(0,a.createElement)("p",{className:"block-editor-image-size-control__row"},(0,g.__)("Image dimensions")),(0,a.createElement)("div",{className:"block-editor-image-size-control__row"},(0,a.createElement)(m.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:(0,g.__)("Width"),value:h,min:1,onChange:e=>v("width",e)}),(0,a.createElement)(m.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:(0,g.__)("Height"),value:f,min:1,onChange:e=>v("height",e)})),(0,a.createElement)("div",{className:"block-editor-image-size-control__row"},(0,a.createElement)(m.ButtonGroup,{"aria-label":(0,g.__)("Image size presets")},Iy.map((e=>{const t=Math.round(n*(e/100)),r=Math.round(o*(e/100)),l=h===t&&f===r;return(0,a.createElement)(m.Button,{key:e,isSmall:!0,variant:l?"primary":void 0,isPressed:l,onClick:()=>b(r,t)},e,"%")}))),(0,a.createElement)(m.Button,{isSmall:!0,onClick:()=>b()},(0,g.__)("Reset")))))}var Ny=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(D.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));const Py=()=>{};var My=e=>{let{value:t,onChange:n=Py,settings:o}=e;if(!o||!o.length)return null;const r=e=>o=>{n({...t,[e.id]:o})},l=o.map((e=>(0,a.createElement)(m.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:r(e),checked:!!t&&!!t[e.id]})));return(0,a.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,a.createElement)(m.VisuallyHidden,{as:"legend"},(0,g.__)("Currently selected link settings")),l)},Ly=n(5425),Ry=n.n(Ly);function Ay(e){return"function"==typeof e}class Dy extends a.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||(0,a.createRef)(),this.inputRef=(0,a.createRef)(),this.updateSuggestions=(0,u.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.isUpdatingSuggestions=!1,this.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:o,__experimentalShowInitialSuggestions:r=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,Ry()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===o||this.props.disableSuggestions||this.isUpdatingSuggestions||(null!=o&&o.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),delete this.suggestionsRequest}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{suggestions:e}=this.state,{__experimentalShowInitialSuggestions:t=!1,value:n}=this.props;return!this.isUpdatingSuggestions&&t&&!(n&&n.length)&&!(e&&e.length)}updateSuggestions(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{__experimentalFetchLinkSuggestions:n,__experimentalHandleURLSuggestions:o}=this.props;if(!n)return;const r=!(null!==(e=t)&&void 0!==e&&e.length);if(t=t.trim(),!r&&(t.length<2||!o&&(0,mm.isURL)(t)))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});const l=n(t,{isInitialSuggestions:r});l.then((e=>{this.suggestionsRequest===l&&(this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak((0,g.sprintf)((0,g._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):this.props.debouncedSpeak((0,g.__)("No results."),"assertive"),this.isUpdatingSuggestions=!1)})).catch((()=>{this.suggestionsRequest===l&&(this.setState({loading:!1}),this.isUpdatingSuggestions=!1)})),this.suggestionsRequest=l}onChange(e){const t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n)}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case ku.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case ku.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case ku.ENTER:e.preventDefault(),this.props.onSubmit&&this.props.onSubmit(null,e)}return}const l=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case ku.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case ku.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case ku.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(l),this.props.speak((0,g.__)("Link selected.")));break;case ku.ENTER:e.preventDefault(),null!==this.state.selectedSuggestion?(this.selectLink(l),this.props.onSubmit&&this.props.onSubmit(l,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps(e,t){let{value:n,instanceId:o,disableSuggestions:r,__experimentalShowInitialSuggestions:l=!1}=e,{showSuggestions:i}=t,a=i;const s=n&&n.length;return l||s||(a=!1),!0===r&&(a=!1),{showSuggestions:a,suggestionsListboxId:`block-editor-url-input-suggestions-${o}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${o}`}}render(){return(0,a.createElement)(a.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{label:e=null,className:t,isFullWidth:n,instanceId:o,placeholder:r=(0,g.__)("Paste URL or type to search"),__experimentalRenderControl:l,value:i=""}=this.props,{loading:s,showSuggestions:u,selectedSuggestion:d,suggestionsListboxId:p,suggestionOptionIdPrefix:f}=this.state,h=`url-input-control-${o}`,v={id:h,label:e,className:c()("block-editor-url-input",t,{"is-full-width":n})},b={id:h,value:i,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:r,onKeyDown:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,g.__)("URL"),"aria-expanded":u,"aria-autocomplete":"list","aria-controls":p,"aria-activedescendant":null!==d?`${f}-${d}`:void 0,ref:this.inputRef};return l?l(v,b,s):(0,a.createElement)(m.BaseControl,v,(0,a.createElement)("input",b),s&&(0,a.createElement)(m.Spinner,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:o=!1}=this.props,{showSuggestions:r,suggestions:l,selectedSuggestion:s,suggestionsListboxId:u,suggestionOptionIdPrefix:d,loading:p}=this.state,f={id:u,ref:this.autocompleteRef,role:"listbox"},g=(e,t)=>({role:"option",tabIndex:"-1",id:`${d}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===s});return Ay(t)&&r&&l.length?t({suggestions:l,selectedSuggestion:s,suggestionsListProps:f,buildSuggestionItemProps:g,isLoading:p,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:o&&!(n&&n.length)}):!Ay(t)&&r&&l.length?(0,a.createElement)(m.Popover,{position:"bottom",focusOnMount:!1},(0,a.createElement)("div",i({},f,{className:c()("block-editor-url-input__suggestions",`${e}__suggestions`)}),l.map(((e,t)=>(0,a.createElement)(m.Button,i({},g(0,t),{key:e.id,className:c()("block-editor-url-input__suggestion",{"is-selected":t===s}),onClick:()=>this.handleOnClick(e)}),e.title))))):null}}var Oy=(0,d.compose)(d.withSafeTimeout,m.withSpokenMessages,d.withInstanceId,(0,p.withSelect)(((e,t)=>{if(Ay(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(so);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(Dy);var zy=e=>{let t,{searchTerm:n,onClick:o,itemProps:r,isSelected:l,buttonText:s}=e;return n?(t=s?"function"==typeof s?s(n):s:(0,a.createInterpolateElement)((0,g.sprintf)((0,g.__)("Create: %s"),n),{mark:(0,a.createElement)("mark",null)}),(0,a.createElement)(m.Button,i({},r,{className:c()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":l}),onClick:o}),(0,a.createElement)(ul,{className:"block-editor-link-control__search-item-icon",icon:Mu}),(0,a.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,a.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null};var Fy=(0,a.createElement)(D.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(D.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 11h2V9H7v2zm0 4h2v-2H7v2zm3-4h7V9h-7v2zm0 4h7v-2h-7v2z"}));var Vy=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z"}));var Hy=(0,a.createElement)(D.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(D.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"}));var Gy=(0,a.createElement)(D.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(D.Path,{d:"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5z"}));var Uy=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"}));const Wy={post:Fy,page:I_,post_tag:Vy,category:Hy,attachment:Gy};function $y(e){let{isURL:t,suggestion:n}=e,o=null;return t?o=Uy:n.type in Wy&&(o=Wy[n.type]),o?(0,a.createElement)(ul,{className:"block-editor-link-control__search-item-icon",icon:o}):null}var jy=e=>{let{itemProps:t,suggestion:n,isSelected:o=!1,onClick:r,isURL:l=!1,searchTerm:s="",shouldShowType:u=!1}=e;return(0,a.createElement)(m.Button,i({},t,{onClick:r,className:c()("block-editor-link-control__search-item",{"is-selected":o,"is-url":l,"is-entity":!l})}),(0,a.createElement)($y,{suggestion:n,isURL:l}),(0,a.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,a.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,a.createElement)(m.TextHighlight,{text:n.title,highlight:s})),(0,a.createElement)("span",{"aria-hidden":!l,className:"block-editor-link-control__search-item-info"},!l&&((0,mm.filterURLForDisplay)((0,mm.safeDecodeURI)(n.url))||""),l&&(0,g.__)("Press ENTER to add this link"))),u&&n.type&&(0,a.createElement)("span",{className:"block-editor-link-control__search-item-type"},function(e){if(e.isFrontPage)return"front page";return"post_tag"===e.type?"tag":e.type}(n)))};const Ky="__CREATE__",qy="mailto",Yy="internal",Qy=["URL",qy,"tel",Yy],Zy=[{id:"opensInNewTab",title:(0,g.__)("Open in new tab")}];function Xy(e){let{instanceId:t,withCreateSuggestion:n,currentInputValue:o,handleSuggestionClick:r,suggestionsListProps:l,buildSuggestionItemProps:s,suggestions:u,selectedSuggestion:d,isLoading:p,isInitialSuggestions:f,createSuggestionButtonText:h,suggestionsQuery:v}=e;const b=c()("block-editor-link-control__search-results",{"is-loading":p}),_=1===u.length&&Qy.includes(u[0].type),k=n&&!_&&!f,y=!(null!=v&&v.type),E=`block-editor-link-control-search-results-label-${t}`,C=f?(0,g.__)("Recently updated"):(0,g.sprintf)((0,g.__)('Search results for "%s"'),o),S=(0,a.createElement)(f?a.Fragment:m.VisuallyHidden,{},(0,a.createElement)("span",{className:"block-editor-link-control__search-results-label",id:E},C));return(0,a.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},S,(0,a.createElement)("div",i({},l,{className:b,"aria-labelledby":E}),u.map(((e,t)=>k&&Ky===e.type?(0,a.createElement)(zy,{searchTerm:o,buttonText:h,onClick:()=>r(e),key:e.type,itemProps:s(e,t),isSelected:t===d}):Ky===e.type?null:(0,a.createElement)(jy,{key:`${e.id}-${e.type}`,itemProps:s(e,t),suggestion:e,index:t,onClick:()=>{r(e)},isSelected:t===d,isURL:Qy.includes(e.type),searchTerm:o,shouldShowType:y,isFrontPage:null==e?void 0:e.isFrontPage})))))}function Jy(e){const t=null==e?void 0:e.startsWith("#");return(0,mm.isURL)(e)||e&&e.includes("www.")||t}const eE=()=>Promise.resolve([]),tE=e=>{let t="URL";const n=(0,mm.getProtocol)(e)||"";return n.includes("mailto")&&(t=qy),n.includes("tel")&&(t="tel"),null!=e&&e.startsWith("#")&&(t=Yy),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,mm.prependHTTP)(e):e,type:t}])};function nE(e,t,n,o){const{fetchSearchSuggestions:r,pageOnFront:l}=(0,p.useSelect)((e=>{const{getSettings:t}=e(so);return{pageOnFront:t().pageOnFront,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),i=t?tE:eE;return(0,a.useCallback)(((t,a)=>{let{isInitialSuggestions:s}=a;return Jy(t)?i(t,{isInitialSuggestions:s}):(async(e,t,n,o,r,l,i)=>{const{isInitialSuggestions:a}=t;let s=!1,c=await Promise.all([n(e,t),o(e)]);c[0]=c[0].map((e=>Number(e.id)===i?(s=!0,e.isFrontPage=!0,e):e));const u=!e.includes(" ");return c=!s&&u&&l&&!a?c[0].concat(c[1]):c[0],a||Jy(e)||!r?c:c.concat({title:e,url:e,type:Ky})})(t,{...e,isInitialSuggestions:s},r,i,n,o,l)}),[i,r,n])}const oE=()=>Promise.resolve([]),rE=()=>{},lE=(0,a.forwardRef)(((e,t)=>{let{value:n,children:o,currentLink:r={},className:l=null,placeholder:i=null,withCreateSuggestion:s=!1,onCreateSuggestion:u=rE,onChange:p=rE,onSelect:m=rE,showSuggestions:f=!0,renderSuggestions:h=(e=>(0,a.createElement)(Xy,e)),fetchSuggestions:v=null,allowDirectEntry:b=!0,showInitialSuggestions:_=!1,suggestionsQuery:k={},withURLSuggestion:y=!0,createSuggestionButtonText:E,useLabel:C=!1}=e;const S=nE(k,b,s,y),w=f?v||S:oE,B=(0,d.useInstanceId)(lE),[I,x]=(0,a.useState)(),T=async e=>{let t=e;if(Ky!==e.type){if(b||t&&Object.keys(t).length>=1){const{id:e,url:n,...o}=r;m({...o,...t},t)}}else try{var n;t=await u(e.title),null!==(n=t)&&void 0!==n&&n.url&&m(t)}catch(e){}},N=c()(l,{"has-no-label":!C});return(0,a.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,a.createElement)(Oy,{label:C?"URL":void 0,className:N,value:n,onChange:(e,t)=>{p(e),x(t)},placeholder:null!=i?i:(0,g.__)("Search or type url"),__experimentalRenderSuggestions:f?e=>h({...e,instanceId:B,withCreateSuggestion:s,currentInputValue:n,createSuggestionButtonText:E,suggestionsQuery:k,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),T(t)}}):null,__experimentalFetchLinkSuggestions:w,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:_,onSubmit:(e,t)=>{var o;const r=e||I;r||null!=n&&null!==(o=n.trim())&&void 0!==o&&o.length?T(r||{url:n}):t.preventDefault()},ref:t}),o)}));var iE=lE;var aE=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));var sE=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.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"}));const{Slot:cE,Fill:uE}=(0,m.createSlotFill)("BlockEditorLinkControlViewer");function dE(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}var pE=function(e){const[t,n]=(0,a.useReducer)(dE,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,p.useSelect)((e=>{const{getSettings:t}=e(so);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,a.useEffect)((()=>{if(null!=e&&e.length&&o&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,r=t.signal;return o(e,{signal:r}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{r.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t};function mE(e){var t;let{value:n,onEditClick:o,hasRichPreviews:r=!1,hasUnlinkControl:l=!1,onRemove:i}=e;const s=r?null==n?void 0:n.url:null,{richData:u,isFetching:d}=pE(s),p=u&&Object.keys(u).length,f=n&&(0,mm.filterURLForDisplay)((0,mm.safeDecodeURI)(n.url),16)||"",h=(null==u?void 0:u.title)||(null==n?void 0:n.title)||f,v=!(null!=n&&null!==(t=n.url)&&void 0!==t&&t.length);let b;return b=null!=u&&u.icon?(0,a.createElement)("img",{src:null==u?void 0:u.icon,alt:""}):v?(0,a.createElement)(ul,{icon:aE,size:32}):(0,a.createElement)(ul,{icon:Uy}),(0,a.createElement)("div",{"aria-label":(0,g.__)("Currently selected"),className:c()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":p,"is-fetching":!!d,"is-preview":!0,"is-error":v})},(0,a.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,a.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,a.createElement)("span",{className:c()("block-editor-link-control__search-item-icon",{"is-image":null==u?void 0:u.icon})},b),(0,a.createElement)("span",{className:"block-editor-link-control__search-item-details"},v?(0,a.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},(0,g.__)("Link is empty")):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.ExternalLink,{className:"block-editor-link-control__search-item-title",href:n.url},(0,Wl.__unstableStripHTML)(h)),(null==n?void 0:n.url)&&(0,a.createElement)("span",{className:"block-editor-link-control__search-item-info"},f)))),(0,a.createElement)(m.Button,{icon:sE,label:(0,g.__)("Edit"),className:"block-editor-link-control__search-item-action",onClick:o,iconSize:24}),l&&(0,a.createElement)(m.Button,{icon:tr,label:(0,g.__)("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:i,iconSize:24}),(0,a.createElement)(cE,{fillProps:n})),!!(p&&(null!=u&&u.image||null!=u&&u.description)||d)&&(0,a.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==u?void 0:u.image)||d)&&(0,a.createElement)("div",{"aria-hidden":!(null!=u&&u.image),className:c()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=u&&u.image)})},(null==u?void 0:u.image)&&(0,a.createElement)("img",{src:null==u?void 0:u.image,alt:""})),((null==u?void 0:u.description)||d)&&(0,a.createElement)("div",{"aria-hidden":!(null!=u&&u.description),className:c()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=u&&u.description)})},(null==u?void 0:u.description)&&(0,a.createElement)(m.__experimentalText,{truncate:!0,numberOfLines:"2"},u.description))))}const fE=e=>{let t=!1;return{promise:new Promise(((n,o)=>{e.then((e=>t?o({isCanceled:!0}):n(e)),(e=>o(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}},gE=()=>{};function hE(e){var t,n,o;let{searchInputPlaceholder:r,value:l,settings:i=Zy,onChange:s=gE,onRemove:u,noDirectEntry:d=!1,showSuggestions:p=!0,showInitialSuggestions:f,forceIsEditingLink:h,createSuggestion:v,withCreateSuggestion:b,inputValue:_="",suggestionsQuery:k={},noURLSuggestion:y=!1,createSuggestionButtonText:E,hasRichPreviews:C=!1,hasTextControl:S=!1,renderControlBottom:w=null}=e;void 0===b&&v&&(b=!0);const B=(0,a.useRef)(!0),I=(0,a.useRef)(),x=(0,a.useRef)(),[T,N]=(0,a.useState)((null==l?void 0:l.url)||""),[P,M]=(0,a.useState)((null==l?void 0:l.title)||""),L=_||T,[R,A]=(0,a.useState)(void 0!==h?h:!l||!l.url),D=(0,a.useRef)(!1),O=!(null!=L&&null!==(t=L.trim())&&void 0!==t&&t.length),{createPage:z,isCreatingPage:F,errorMessage:V}=function(e){const t=(0,a.useRef)(),[n,o]=(0,a.useState)(!1),[r,l]=(0,a.useState)(null);return(0,a.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),l(null);try{return t.current=fE(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw l(e.message||(0,g.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(v);function H(){var e;D.current=!(null===(e=I.current)||void 0===e||!e.contains(I.current.ownerDocument.activeElement)),A(!1)}(0,a.useEffect)((()=>{void 0!==h&&h!==R&&A(h)}),[h]),(0,a.useEffect)((()=>{if(B.current)return void(B.current=!1);const e=null!=x&&x.current?1:0;(Wl.focus.focusable.find(I.current)[e]||I.current).focus(),D.current=!1}),[R,F]),(0,a.useEffect)((()=>{null!=l&&l.title&&l.title!==P&&M(l.title),null!=l&&l.url&&N(l.url)}),[l]);const G=()=>{L===(null==l?void 0:l.url)&&P===(null==l?void 0:l.title)||s({...l,url:L,title:P}),H()},U=u&&l&&!R&&!F,W=!(null==i||!i.length),$=(null==l||null===(n=l.url)||void 0===n||null===(o=n.trim())||void 0===o?void 0:o.length)>0&&S;return(0,a.createElement)("div",{tabIndex:-1,ref:I,className:"block-editor-link-control"},F&&(0,a.createElement)("div",{className:"block-editor-link-control__loading"},(0,a.createElement)(m.Spinner,null)," ",(0,g.__)("Creating"),"…"),(R||!l)&&!F&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:c()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":$})},$&&(0,a.createElement)(m.TextControl,{ref:x,className:"block-editor-link-control__field block-editor-link-control__text-content",label:"Text",value:P,onChange:M,onKeyDown:e=>{const{keyCode:t}=e;t!==ku.ENTER||O||(e.preventDefault(),G())}}),(0,a.createElement)(iE,{currentLink:l,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:r,value:L,withCreateSuggestion:b,onCreateSuggestion:z,onChange:N,onSelect:e=>{s({...e,title:P||(null==e?void 0:e.title)}),H()},showInitialSuggestions:f,allowDirectEntry:!d,showSuggestions:p,suggestionsQuery:k,withURLSuggestion:!y,createSuggestionButtonText:E,useLabel:$},(0,a.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,a.createElement)(m.Button,{onClick:G,label:(0,g.__)("Submit"),icon:Ny,className:"block-editor-link-control__search-submit",disabled:O})))),V&&(0,a.createElement)(m.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},V)),l&&!R&&!F&&(0,a.createElement)(mE,{key:null==l?void 0:l.url,value:l,onEditClick:()=>A(!0),hasRichPreviews:C,hasUnlinkControl:U,onRemove:u}),W&&(0,a.createElement)("div",{className:"block-editor-link-control__tools"},(0,a.createElement)(My,{value:l,settings:i,onChange:s})),w&&w())}hE.ViewerFill=uE;var vE=hE;var bE=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));var _E=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.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"}));var kE=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"}));var yE=(0,m.withFilters)("editor.MediaUpload")((()=>null));var EE=function(e){let{fallback:t=null,children:n}=e;const o=(0,p.useSelect)((e=>{const{getSettings:t}=e(so);return!!t().mediaUpload}),[]);return o?n:t};const CE=()=>{};let SE=0;var wE=(0,d.compose)([(0,p.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(Op.store);return{createNotice:t,removeNotice:n}})),(0,m.withFilters)("editor.MediaReplaceFlow")])((e=>{let{mediaURL:t,mediaId:n,mediaIds:o,allowedTypes:r,accept:l,onError:i,onSelect:s,onSelectURL:c,onToggleFeaturedImage:u,useFeaturedImage:d,onFilesUpload:f=CE,name:h=(0,g.__)("Replace"),createNotice:v,removeNotice:b,children:_,multiple:k=!1,addToGallery:y,handleUpload:E=!0}=e;const C=(0,p.useSelect)((e=>e(so).getSettings().mediaUpload),[]),S=(0,a.useRef)(),w="block-editor/media-replace-flow/error-notice/"+ ++SE,B=e=>{const t=(0,Wl.__unstableStripHTML)(e);i?i(t):setTimeout((()=>{v("error",t,{speak:!0,id:w,isDismissible:!0})}),1e3)},I=(e,t)=>{d&&u&&u(),t(),s(e),(0,qt.speak)((0,g.__)("The media file has been replaced")),b(w)},x=e=>{e.keyCode===ku.DOWN&&(e.preventDefault(),e.target.click())},T=k&&!(!r||0===r.length)&&r.every((e=>"image"===e||e.startsWith("image/")));return(0,a.createElement)(m.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,a.createElement)(m.ToolbarButton,{ref:S,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:x},h)},renderContent:e=>{let{onClose:i}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,a.createElement)(a.Fragment,null,(0,a.createElement)(yE,{gallery:T,addToGallery:y,multiple:k,value:k?o:n,onSelect:e=>I(e,i),allowedTypes:r,render:e=>{let{open:t}=e;return(0,a.createElement)(m.MenuItem,{icon:bE,onClick:t},(0,g.__)("Open Media Library"))}}),(0,a.createElement)(EE,null,(0,a.createElement)(m.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!E)return t(),s(n);f(n),C({allowedTypes:r,filesList:n,onFileChange:e=>{let[n]=e;I(n,t)},onError:B})})(e,i)},accept:l,multiple:k,render:e=>{let{openFileDialog:t}=e;return(0,a.createElement)(m.MenuItem,{icon:_E,onClick:()=>{t()}},(0,g.__)("Upload"))}}))),u&&(0,a.createElement)(m.MenuItem,{icon:kE,onClick:u,isPressed:d},(0,g.__)("Use featured image")),_),c&&(0,a.createElement)("form",{className:"block-editor-media-flow__url-input"},(0,a.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},(0,g.__)("Current media URL:")),(0,a.createElement)(m.Tooltip,{text:t,position:"bottom"},(0,a.createElement)("div",null,(0,a.createElement)(vE,{value:{url:t},settings:[],showSuggestions:!1,onChange:e=>{let{url:t}=e;c(t),S.current.focus()}})))))}})}));function BE(e){let{url:t,urlLabel:n,className:o}=e;const r=c()(o,"block-editor-url-popover__link-viewer-url");return t?(0,a.createElement)(m.ExternalLink,{className:r,href:t},n||(0,mm.filterURLForDisplay)((0,mm.safeDecodeURI)(t))):(0,a.createElement)("span",{className:r})}function IE(e){let{additionalControls:t,children:n,renderSettings:o,position:r="bottom center",focusOnMount:l="firstElement",...s}=e;const[c,u]=(0,a.useState)(!1),d=!!o&&c;return(0,a.createElement)(m.Popover,i({className:"block-editor-url-popover",focusOnMount:l,position:r,shift:!0},s),(0,a.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,a.createElement)("div",{className:"block-editor-url-popover__row"},n,!!o&&(0,a.createElement)(m.Button,{className:"block-editor-url-popover__settings-toggle",icon:Qm,label:(0,g.__)("Link settings"),onClick:()=>{u(!c)},"aria-expanded":c})),d&&(0,a.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},o())),t&&!d&&(0,a.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}IE.LinkEditor=function(e){let{autocompleteRef:t,className:n,onChangeInputValue:o,value:r,...l}=e;return(0,a.createElement)("form",i({className:c()("block-editor-url-popover__link-editor",n)},l),(0,a.createElement)(Oy,{value:r,onChange:o,autocompleteRef:t}),(0,a.createElement)(m.Button,{icon:Ny,label:(0,g.__)("Apply"),type:"submit"}))},IE.LinkViewer=function(e){let{className:t,linkClassName:n,onEditLinkClick:o,url:r,urlLabel:l,...s}=e;return(0,a.createElement)("div",i({className:c()("block-editor-url-popover__link-viewer",t)},s),(0,a.createElement)(BE,{url:r,urlLabel:l,className:n}),o&&(0,a.createElement)(m.Button,{icon:sE,label:(0,g.__)("Edit"),onClick:o}))};var xE=IE;const TE=()=>{},NE=e=>{let{src:t,onChange:n,onSubmit:o,onClose:r}=e;return(0,a.createElement)(xE,{onClose:r},(0,a.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o},(0,a.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,g.__)("URL"),placeholder:(0,g.__)("Paste or type URL"),onChange:n,value:t}),(0,a.createElement)(m.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Ny,label:(0,g.__)("Apply"),type:"submit"})))};var PE=(0,m.withFilters)("editor.MediaPlaceholder")((function(e){let{value:t={},allowedTypes:n,className:o,icon:r,labels:l={},mediaPreview:i,notices:s,isAppender:u,accept:d,addToGallery:f,multiple:h=!1,handleUpload:v=!0,disableDropZone:b,disableMediaButtons:_,onError:k,onSelect:y,onCancel:E,onSelectURL:C,onToggleFeaturedImage:S,onDoubleClick:w,onFilesPreUpload:B=TE,onHTMLDrop:I=TE,children:x,mediaLibraryButton:T,placeholder:N,style:P}=e;const M=(0,p.useSelect)((e=>{const{getSettings:t}=e(so);return t().mediaUpload}),[]),[L,R]=(0,a.useState)(""),[A,D]=(0,a.useState)(!1);(0,a.useEffect)((()=>{var e;R(null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"")}),[null==t?void 0:t.src]);const O=e=>{R(e.target.value)},z=()=>{D(!0)},F=()=>{D(!1)},V=e=>{e.preventDefault(),L&&C&&(C(L),F())},H=e=>{if(!v)return y(e);let o;if(B(e),h)if(f){let e=[];o=n=>{const o=(null!=t?t:[]).filter((t=>t.id?!e.some((e=>{let{id:n}=e;return Number(n)===Number(t.id)})):!e.some((e=>{let{urlSlug:n}=e;return t.url.includes(n)}))));y(o.concat(n)),e=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else o=y;else o=e=>{let[t]=e;return y(t)};M({allowedTypes:n,filesList:e,onFileChange:o,onError:k})},G=e=>{H(e.target.files)},U=null!=N?N:e=>{let{instructions:t,title:d}=l;if(M||C||(t=(0,g.__)("To edit this block, you need permission to upload media.")),void 0===t||void 0===d){const e=null!=n?n:[],[o]=e,r=1===e.length,l=r&&"audio"===o,i=r&&"image"===o,a=r&&"video"===o;void 0===t&&M&&(t=(0,g.__)("Upload a media file or pick one from your media library."),l?t=(0,g.__)("Upload an audio file, pick one from your media library, or add one with a URL."):i?t=(0,g.__)("Upload an image file, pick one from your media library, or add one with a URL."):a&&(t=(0,g.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===d&&(d=(0,g.__)("Media"),l?d=(0,g.__)("Audio"):i?d=(0,g.__)("Image"):a&&(d=(0,g.__)("Video")))}const p=c()("block-editor-media-placeholder",o,{"is-appender":u});return(0,a.createElement)(m.Placeholder,{icon:r,label:d,instructions:t,className:p,notices:s,onDoubleClick:w,preview:i,style:P},e,x)},W=()=>b?null:(0,a.createElement)(m.DropZone,{onFilesDrop:H,onHTMLDrop:I}),$=()=>E&&(0,a.createElement)(m.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,g.__)("Cancel"),variant:"link",onClick:E},(0,g.__)("Cancel")),j=()=>C&&(0,a.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,a.createElement)(m.Button,{className:"block-editor-media-placeholder__button",onClick:z,isPressed:A,variant:"tertiary"},(0,g.__)("Insert from URL")),A&&(0,a.createElement)(NE,{src:L,onChange:O,onSubmit:V,onClose:F})),K=()=>S&&(0,a.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,a.createElement)(m.Button,{className:"block-editor-media-placeholder__button",onClick:S,variant:"tertiary"},(0,g.__)("Use featured image")));return _?(0,a.createElement)(EE,null,W()):(0,a.createElement)(EE,{fallback:U(j())},(()=>{const e=null!=T?T:e=>{let{open:t}=e;return(0,a.createElement)(m.Button,{variant:"tertiary",onClick:()=>{t()}},(0,g.__)("Media Library"))},o=(0,a.createElement)(yE,{addToGallery:f,gallery:h&&!(!n||0===n.length)&&n.every((e=>"image"===e||e.startsWith("image/"))),multiple:h,onSelect:y,allowedTypes:n,mode:"browse",value:Array.isArray(t)?t.map((e=>{let{id:t}=e;return t})):t.id,render:e});if(M&&u)return(0,a.createElement)(a.Fragment,null,W(),(0,a.createElement)(m.FormFileUpload,{onChange:G,accept:d,multiple:h,render:e=>{let{openFileDialog:t}=e;const n=(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.Button,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:t},(0,g.__)("Upload")),o,j(),K(),$());return U(n)}}));if(M){const e=(0,a.createElement)(a.Fragment,null,W(),(0,a.createElement)(m.FormFileUpload,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:G,accept:d,multiple:h},(0,g.__)("Upload")),o,j(),K(),$());return U(e)}return U(o)})())}));var ME=e=>{let{colorSettings:t,...n}=e;const o=t.map((e=>{if(!e)return e;const{value:t,onChange:n,...o}=e;return{...o,colorValue:t,onColorChange:n}}));return(0,a.createElement)($k,i({settings:o,gradients:[],disableCustomGradients:!0},n))};const LE={position:"bottom right",isAlternate:!0};var RE=()=>(0,a.createElement)(a.Fragment,null,["bold","italic","link"].map((e=>(0,a.createElement)(m.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,a.createElement)(m.Slot,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((e=>{let[{props:t}]=e;return t})).some((e=>{let{isActive:t}=e;return t}));return(0,a.createElement)(m.ToolbarItem,null,(n=>(0,a.createElement)(m.DropdownMenu,{icon:Qm,label:(0,g.__)("More"),toggleProps:{...n,className:c()(n.className,{"is-pressed":t}),describedBy:(0,g.__)("Displays more block tools")},controls:(0,u.orderBy)(e.map((e=>{let[{props:t}]=e;return t})),"title"),popoverProps:LE})))})));function AE(e){let{value:t,editableContentElement:n,activeFormats:o}=e;const r=o[o.length-1],l=null==r?void 0:r.type,i=(0,p.useSelect)((e=>e(z.store).getFormatType(l)),[l]),s=(0,z.useAnchor)({editableContentElement:n,value:t,settings:i});return(0,a.createElement)(DE,{popoverAnchor:s})}function DE(e){let{popoverAnchor:t}=e;return(0,a.createElement)(m.Popover,{position:"top center",focusOnMount:!1,anchor:t,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,a.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},(0,a.createElement)(m.ToolbarGroup,null,(0,a.createElement)(RE,null))))}var OE=e=>{let{inline:t,editableContentElement:n,value:o}=e;const r=(0,p.useSelect)((e=>e(so).getSettings().hasInlineToolbar),[]);if(t)return(0,a.createElement)(DE,{popoverAnchor:n});if(r){const e=(0,z.getActiveFormats)(o);return(0,z.isCollapsed)(o)&&!e.length?null:(0,a.createElement)(AE,{editableContentElement:n,value:o,activeFormats:e})}return(0,a.createElement)(_o,{group:"inline"},(0,a.createElement)(RE,null))};function zE(){const{didAutomaticChange:e,getSettings:t}=(0,p.useSelect)(so);return(0,d.useRefEffect)((n=>{function o(n){const{keyCode:o}=n;n.defaultPrevented||o!==ku.DELETE&&o!==ku.BACKSPACE&&o!==ku.ESCAPE||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}}),[])}function FE(e){return e.filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)})).map((e=>``)).join("")}var VE=window.wp.shortcode;function HE(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function GE(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function UE(e){let{allowedFormats:t,formattingControls:n,disableFormats:o}=e;return o?UE.EMPTY_ARRAY:t||n?t||(V()("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats",version:"6.2"}),n.map((e=>`core/${e}`))):void 0}UE.EMPTY_ARRAY=[];function WE(e){let{value:t,pastedBlocks:n=[],onReplace:o,onSplit:r,onSplitMiddle:l,multilineTag:i}=e;if(!o||!r)return;const{start:a=0,end:s=0}=t,c={...t,start:a,end:s},u=[],[d,p]=(0,z.split)(c),m=n.length>0;let f=-1;const g=(0,z.isEmpty)(d)&&!(0,z.isEmpty)(p);m&&(0,z.isEmpty)(d)||(u.push(r((0,z.toHTMLString)({value:d,multilineTag:i}),!g)),f+=1),m?(u.push(...n),f+=n.length):l&&u.push(l()),(m||l)&&(0,z.isEmpty)(p)||u.push(r((0,z.toHTMLString)({value:p,multilineTag:i}),g));o(u,m?f:1,m?-1:0)}function $E(e,t){return t?(0,z.replace)(e,/\n+/g,z.__UNSTABLE_LINE_SEPARATOR):(0,z.replace)(e,new RegExp(z.__UNSTABLE_LINE_SEPARATOR,"g"),"\n")}function jE(e){const t=(0,a.useRef)(e);return t.current=e,(0,d.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:o,onChange:l,value:i,formatTypes:a,tagName:s,onReplace:c,onSplit:u,onSplitMiddle:d,__unstableEmbedURLOnPaste:p,multilineTag:m,preserveWhiteSpace:f,pastePlainText:g}=t.current;if(!n)return;const{clipboardData:h}=e;let v="",b="";try{v=h.getData("text/plain"),b=h.getData("text/html")}catch(e){try{b=h.getData("Text")}catch(e){return}}if(b=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;e=e.substring(n+t.length);const o="\x3c!--EndFragment--\x3e",r=e.indexOf(o);r>-1&&(e=e.substring(0,r));return e}(b),b=function(e){const t="";if(e.startsWith(t))return e.slice(t.length);return e}(b),e.preventDefault(),window.console.log("Received HTML:\n\n",b),window.console.log("Received plain text:\n\n",v),o)return void l((0,z.insert)(i,v));const _=a.reduce(((e,t)=>{let{__unstablePasteRule:n}=t;return n&&e===i&&(e=n(i,{html:b,plainText:v})),e}),i);if(_!==i)return void l(_);const k=[...(0,Wl.getFilesFromDataTransfer)(h)];if("true"===h.getData("rich-text")){const e=h.getData("rich-text-multi-line-tag")||void 0;let t=(0,z.create)({html:b,multilineTag:e,multilineWrapperTags:"li"===e?["ul","ol"]:void 0,preserveWhiteSpace:f});return t=$E(t,!!m),HE(t,i.activeFormats),void l((0,z.insert)(i,t))}if(g)return void l((0,z.insert)(i,(0,z.create)({text:v})));if(null!=k&&k.length&&!$f(k,b)){const e=(0,r.pasteHandler)({HTML:FE(k),mode:"BLOCKS",tagName:s,preserveWhiteSpace:f});return window.console.log("Received items:\n\n",k),void(c&&(0,z.isEmpty)(i)?c(e):WE({value:i,pastedBlocks:e,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:m}))}let y=c&&u?"AUTO":"INLINE";var E;"AUTO"===y&&(0,z.isEmpty)(i)&&(E=v,(0,VE.regexp)(".*").test(E))&&(y="BLOCKS"),p&&(0,z.isEmpty)(i)&&(0,mm.isURL)(v.trim())&&(y="BLOCKS");const C=(0,r.pasteHandler)({HTML:b,plainText:v,mode:y,tagName:s,preserveWhiteSpace:f});if("string"==typeof C){let e=(0,z.create)({html:C});e=$E(e,!!m),HE(e,i.activeFormats),l((0,z.insert)(i,e))}else C.length>0&&(c&&(0,z.isEmpty)(i)?c(C,C.length-1,-1):WE({value:i,pastedBlocks:C,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:m}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}const KE=["`",'"',"'","“”","‘’"];function qE(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,p.useDispatch)(so),o=(0,a.useRef)(e);return o.current=e,(0,d.useRefEffect)((e=>{function r(r){const{inputType:i,data:a}=r,{value:s,onChange:c}=o.current;if("insertText"!==i)return;if((0,z.isCollapsed)(s))return;const u=(0,l.applyFilters)("blockEditor.wrapSelectionSettings",KE).find((e=>{let[t,n]=e;return t===a||n===a}));if(!u)return;const[d,p=d]=u,m=s.start,f=s.end+d.length;let g=(0,z.insert)(s,d,m,m);g=(0,z.insert)(g,p,f,f),t(),c(g),n();const h={};for(const e in r)h[e]=r[e];h.data=p;const{ownerDocument:v}=e,{defaultView:b}=v,_=new b.InputEvent("input",h);r.target.dispatchEvent(_),r.preventDefault()}return e.addEventListener("beforeinput",r),()=>{e.removeEventListener("beforeinput",r)}}),[])}function YE(e){let t=e.length;for(;t--;){const n=Qt(e[t].attributes);if(n)return e[t].attributes[n]=e[t].attributes[n].replace(Yt,""),e[t].clientId;const o=YE(e[t].innerBlocks);if(o)return o}}function QE(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,p.useDispatch)(so),o=(0,a.useRef)(e);return o.current=e,(0,d.useRefEffect)((e=>{function l(){const{value:e,onReplace:t,selectionChange:l}=o.current;if(!t)return;const{start:i,text:a}=e;if(" "!==a.slice(i-1,i))return;const s=a.slice(0,i).trim(),c=(0,r.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"prefix"===t})),u=(0,r.findTransform)(c,(e=>{let{prefix:t}=e;return s===t}));if(!u)return;const d=(0,z.toHTMLString)({value:(0,z.insert)(e,Yt,0,i)}),p=u.transform(d);l(YE([p])),t([p]),n()}function i(e){const{inputType:r,type:i}=e,{value:a,onChange:s,__unstableAllowPrefixTransformations:c,formatTypes:u}=o.current;if("insertText"!==r&&"compositionend"!==i)return;c&&l&&l();const d=u.reduce(((e,t)=>{let{__unstableInputRule:n}=t;return n&&(e=n(e)),e}),function(e){const t="tales of gutenberg",{start:n,text:o}=e;return n{e.removeEventListener("input",i),e.removeEventListener("compositionend",i)}}),[])}function ZE(e){const{__unstableMarkAutomaticChange:t}=(0,p.useDispatch)(so),n=(0,a.useRef)(e);return n.current=e,(0,d.useRefEffect)((e=>{function o(e){if(e.defaultPrevented)return;const{removeEditorOnlyFormats:o,value:l,onReplace:i,onSplit:a,onSplitMiddle:s,multilineTag:c,onChange:u,disableLineBreaks:d,onSplitAtEnd:p}=n.current;if(e.keyCode!==ku.ENTER)return;e.preventDefault();const m={...l};m.formats=o(l);const f=i&&a;if(i){const e=(0,r.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"enter"===t})),n=(0,r.findTransform)(e,(e=>e.regExp.test(m.text)));n&&(i([n.transform({content:m.text})]),t())}if(c)e.shiftKey?d||u((0,z.insert)(m,"\n")):f&&(0,z.__unstableIsEmptyLine)(m)?WE({value:m,onReplace:i,onSplit:a,onSplitMiddle:s,multilineTag:c}):u((0,z.__unstableInsertLineSeparator)(m));else{const{text:t,start:n,end:o}=m,r=p&&n===o&&o===t.length;e.shiftKey||!f&&!r?d||u((0,z.insert)(m,"\n")):!f&&r?p():f&&WE({value:m,onReplace:i,onSplit:a,onSplitMiddle:s,multilineTag:c})}}return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o)}}),[])}function XE(e){return e(z.store).getFormatTypes()}const JE=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function eC(e,t){return"object"!=typeof e?{[t]:e}:Object.fromEntries(Object.entries(e).map((e=>{let[n,o]=e;return[`${t}.${n}`,o]})))}function tC(e,t){return e[t]?e[t]:Object.keys(e).filter((e=>e.startsWith(t+"."))).reduce(((n,o)=>(n[o.slice(t.length+1)]=e[o],n)),{})}function nC(e){return(0,d.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function oC(e){return(0,d.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function rC(){const{isMultiSelecting:e}=(0,p.useSelect)(so);return(0,d.useRefEffect)((t=>{function n(){if(!e())return;const n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}),[])}function lC(e){let{formatTypes:t,onChange:n,onFocus:o,value:r,forwardedRef:l}=e;return t.map((e=>{const{name:t,edit:i}=e;if(!i)return null;const s=(0,z.getActiveFormat)(r,t);let c=void 0!==s;const d=(0,z.getActiveObject)(r),p=void 0!==d&&d.type===t;if("core/link"===t&&!(0,z.isCollapsed)(r)){const e=r.formats,t=(0,u.find)(e[r.start],{type:"core/link"}),n=(0,u.find)(e[r.end-1],{type:"core/link"});t&&n&&t===n||(c=!1)}return(0,a.createElement)(i,{key:t,isActive:c,activeAttributes:c&&s.attributes||{},isObjectActive:p,activeObjectAttributes:p&&d.attributes||{},value:r,onChange:n,onFocus:o,contentRef:l})}))}const iC=(0,a.createContext)(),aC=(0,a.createContext)();const sC=(0,a.forwardRef)((function e(t,n){let{children:o,tagName:l="div",value:s="",onChange:u,isSelected:f,multiline:g,inlineToolbar:h,wrapperClassName:v,autocompleters:b,onReplace:_,placeholder:k,allowedFormats:y,formattingControls:E,withoutInteractiveFormatting:C,onRemove:S,onMerge:w,onSplit:B,__unstableOnSplitAtEnd:I,__unstableOnSplitMiddle:x,identifier:T,preserveWhiteSpace:N,__unstablePastePlainText:P,__unstableEmbedURLOnPaste:M,__unstableDisableFormats:L,disableLineBreaks:R,unstableOnFocus:A,__unstableAllowPrefixTransformations:D,...O}=t;g&&V()("wp.blockEditor.RichText multiline prop",{since:"6.1",version:"6.3",alternative:"nested blocks (InnerBlocks)",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/"});const F=(0,d.useInstanceId)(e);T=T||F,O=function(e){const{__unstableMobileNoFocusOnMount:t,deleteEnter:n,placeholderTextColor:o,textAlign:r,selectionColor:l,tagsToEliminate:i,rootTagsToEliminate:a,disableEditingMenu:s,fontSize:c,fontFamily:u,fontWeight:d,fontStyle:p,minWidth:m,maxWidth:f,setRef:g,disableSuggestions:h,disableAutocorrection:v,...b}=e;return b}(O);const H=(0,a.useRef)(),{clientId:G}=mo(),{selectionStart:U,selectionEnd:W,isSelected:$}=(0,p.useSelect)((e=>{const{getSelectionStart:t,getSelectionEnd:n}=e(so),o=t(),r=n();let l;return void 0===f?l=o.clientId===G&&r.clientId===G&&o.attributeKey===T:f&&(l=o.clientId===G),{selectionStart:l?o.offset:void 0,selectionEnd:l?r.offset:void 0,isSelected:l}})),{selectionChange:j}=(0,p.useDispatch)(so),K=GE(g),q=UE({allowedFormats:y,formattingControls:E,disableFormats:L}),Y=!q||q.length>0;let Q=s,Z=u;Array.isArray(s)&&(V()("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),Q=r.children.toHTML(s),Z=e=>u(r.children.fromDOM((0,z.__unstableCreateElement)(document,e).childNodes)));const X=(0,a.useCallback)(((e,t)=>{const n={},o=void 0===e&&void 0===t;("number"==typeof e||o)&&(n.start={clientId:G,attributeKey:T,offset:e}),("number"==typeof t||o)&&(n.end={clientId:G,attributeKey:T,offset:t}),j(n)}),[G,T]),{formatTypes:J,prepareHandlers:ee,valueHandlers:te,changeHandlers:ne,dependencies:oe}=function(e){let{clientId:t,identifier:n,withoutInteractiveFormatting:o,allowedFormats:r}=e;const l=(0,p.useSelect)(XE,[]),i=(0,a.useMemo)((()=>l.filter((e=>{let{name:t,tagName:n}=e;return!(r&&!r.includes(t)||o&&JE.has(n))}))),[l,r,JE]),s=(0,p.useSelect)((e=>i.reduce(((o,r)=>r.__experimentalGetPropsForEditableTreePreparation?{...o,...eC(r.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:n,blockClientId:t}),r.name)}:o),{})),[i,t,n]),c=(0,p.useDispatch)(),u=[],d=[],m=[],f=[];for(const e in s)f.push(s[e]);return i.forEach((e=>{if(e.__experimentalCreatePrepareEditableTree){const o=e.__experimentalCreatePrepareEditableTree(tC(s,e.name),{richTextIdentifier:n,blockClientId:t});e.__experimentalCreateOnChangeEditableValue?d.push(o):u.push(o)}if(e.__experimentalCreateOnChangeEditableValue){let o={};e.__experimentalGetPropsForEditableTreeChangeHandler&&(o=e.__experimentalGetPropsForEditableTreeChangeHandler(c,{richTextIdentifier:n,blockClientId:t}));const r=tC(s,e.name);m.push(e.__experimentalCreateOnChangeEditableValue({..."object"==typeof r?r:{},...o},{richTextIdentifier:n,blockClientId:t}))}})),{formatTypes:i,prepareHandlers:u,valueHandlers:d,changeHandlers:m,dependencies:f}}({clientId:G,identifier:T,withoutInteractiveFormatting:C,allowedFormats:q});function re(e){return J.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,z.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:le,onChange:ie,ref:ae}=(0,z.__unstableUseRichText)({value:Q,onChange(e,t){let{__unstableFormats:n,__unstableText:o}=t;Z(e),Object.values(ne).forEach((e=>{e(n,o)}))},selectionStart:U,selectionEnd:W,onSelectionChange:X,placeholder:k,__unstableIsSelected:$,__unstableMultilineTag:K,__unstableDisableFormats:L,preserveWhiteSpace:N,__unstableDependencies:[...oe,l],__unstableAfterParse:function(e){return te.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:re,__unstableAddInvisibleFormats:function(e){return ee.reduce(((t,n)=>n(t,e.text)),e.formats)}}),se=function(e){return(0,m.__unstableUseAutocompleteProps)({...e,completers:P_(e)})}({onReplace:_,completers:b,record:le,onChange:ie});!function(e){let{html:t,value:n}=e;const o=(0,a.useRef)(),r=n.activeFormats&&!!n.activeFormats.length,{__unstableMarkLastChangeAsPersistent:l}=(0,p.useDispatch)(so);(0,a.useLayoutEffect)((()=>{if(o.current){if(o.current!==n.text){const e=window.setTimeout((()=>{l()}),1e3);return o.current=n.text,()=>{window.clearTimeout(e)}}l()}else o.current=n.text}),[t,r])}({html:Q,value:le});const ce=(0,a.useRef)(new Set),ue=(0,a.useRef)(new Set);function de(){var e;null===(e=H.current)||void 0===e||e.focus()}const pe=l;return(0,a.createElement)(a.Fragment,null,$&&(0,a.createElement)(iC.Provider,{value:ce},(0,a.createElement)(aC.Provider,{value:ue},(0,a.createElement)(m.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},o&&o({value:le,onChange:ie,onFocus:de}),(0,a.createElement)(lC,{value:le,onChange:ie,onFocus:de,formatTypes:J,forwardedRef:H})))),$&&Y&&(0,a.createElement)(OE,{inline:h,editableContentElement:H.current,value:le}),(0,a.createElement)(pe,i({role:"textbox","aria-multiline":!R,"aria-label":k},O,se,{ref:(0,d.useMergeRefs)([n,se.ref,O.ref,ae,qE({value:le,onChange:ie}),QE({value:le,onChange:ie,__unstableAllowPrefixTransformations:D,formatTypes:J,onReplace:_,selectionChange:j}),(0,d.useRefEffect)((e=>{function t(e){(ku.isKeyboardEvent.primary(e,"z")||ku.isKeyboardEvent.primary(e,"y")||ku.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),nC(ce),oC(ue),zE(),jE({isSelected:$,disableFormats:L,onChange:ie,value:le,formatTypes:J,tagName:l,onReplace:_,onSplit:B,onSplitMiddle:x,__unstableEmbedURLOnPaste:M,multilineTag:K,preserveWhiteSpace:N,pastePlainText:P}),ZE({removeEditorOnlyFormats:re,value:le,onReplace:_,onSplit:B,onSplitMiddle:x,multilineTag:K,onChange:ie,disableLineBreaks:R,onSplitAtEnd:I}),rC(),H]),contentEditable:!0,suppressContentEditableWarning:!0,className:c()("block-editor-rich-text__editable",O.className,"rich-text"),onFocus:A,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===ku.DELETE||t===ku.BACKSPACE)){const{start:n,end:o,text:r}=le,l=t===ku.BACKSPACE,i=le.activeFormats&&!!le.activeFormats.length;if(!(0,z.isCollapsed)(le)||i||l&&0!==n||!l&&o!==r.length)return;w&&w(!l),S&&(0,z.isEmpty)(le)&&l&&S(!l),e.preventDefault()}}})))}));sC.Content=e=>{let{value:t,tagName:n,multiline:o,...l}=e;Array.isArray(t)&&(V()("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),t=r.children.toHTML(t));const i=GE(o);!t&&i&&(t=`<${i}>`);const s=(0,a.createElement)(a.RawHTML,null,t);if(n){const{format:e,...t}=l;return(0,a.createElement)(n,t,s)}return s},sC.isEmpty=e=>!e||0===e.length;var cC=sC;const uC=(0,a.forwardRef)(((e,t)=>(0,a.createElement)(cC,i({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));uC.Content=e=>{let{value:t="",tagName:n="div",...o}=e;return(0,a.createElement)(n,o,t)};var dC=uC;var pC=(0,a.forwardRef)(((e,t)=>{let{__experimentalVersion:n,...o}=e;if(2===n)return(0,a.createElement)(dC,i({ref:t},o));const{className:r,onChange:l,...s}=o;return(0,a.createElement)(si.Z,i({ref:t,className:c()("block-editor-plain-text",r),onChange:e=>l(e.target.value)},s))}));function mC(e){let{property:t,viewport:n,desc:o}=e;const r=(0,d.useInstanceId)(mC),l=o||(0,g.sprintf)((0,g._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(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{"aria-describedby":`rbc-desc-${r}`},n.label),(0,a.createElement)(m.VisuallyHidden,{as:"span",id:`rbc-desc-${r}`},l))}var fC=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:l,renderResponsiveControls:i,isResponsive:s=!1,defaultLabel:u={id:"all",label:(0,g.__)("All")},viewports:d=[{id:"small",label:(0,g.__)("Small screens")},{id:"medium",label:(0,g.__)("Medium screens")},{id:"large",label:(0,g.__)("Large screens")}]}=e;if(!t||!n||!l)return null;const p=o||(0,g.sprintf)((0,g.__)("Use the same %s on all screensizes."),n),f=(0,g.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),h=l((0,a.createElement)(mC,{property:n,viewport:u}),u);return(0,a.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,a.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,a.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,a.createElement)(m.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:p,checked:!s,onChange:r,help:f}),(0,a.createElement)("div",{className:c()("block-editor-responsive-block-control__group",{"is-responsive":s})},!s&&h,s&&(i?i(d):d.map((e=>(0,a.createElement)(a.Fragment,{key:e.id},l((0,a.createElement)(mC,{property:n,viewport:e}),e))))))))};function gC(e){let{character:t,type:n,onUse:o}=e;const r=(0,a.useContext)(iC),l=(0,a.useRef)();return l.current=o,(0,a.useEffect)((()=>{function e(e){ku.isKeyboardEvent[n](e,t)&&(l.current(),e.preventDefault())}return r.current.add(e),()=>{r.current.delete(e)}}),[t,n]),null}function hC(e){let t,{name:n,shortcutType:o,shortcutCharacter:r,...l}=e,s="RichText.ToolbarControls";return n&&(s+=`.${n}`),o&&r&&(t=ku.displayShortcut[o](r)),(0,a.createElement)(m.Fill,{name:s},(0,a.createElement)(m.ToolbarButton,i({},l,{shortcut:t})))}function vC(e){let{inputType:t,onInput:n}=e;const o=(0,a.useContext)(aC),r=(0,a.useRef)();return r.current=n,(0,a.useEffect)((()=>{function e(e){e.inputType===t&&(r.current(),e.preventDefault())}return o.current.add(e),()=>{o.current.delete(e)}}),[t]),null}const bC=(0,a.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,a.createElement)(m.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 _C=(0,a.forwardRef)((function(e,t){const n=(0,p.useSelect)((e=>e(so).__unstableGetEditorMode()),[]),{__unstableSetEditorMode:o}=(0,p.useDispatch)(so);return(0,a.createElement)(m.Dropdown,{renderToggle:o=>{let{isOpen:r,onToggle:l}=o;return(0,a.createElement)(m.Button,i({},e,{ref:t,icon:"navigation"===n?bC:sE,"aria-expanded":r,"aria-haspopup":"true",onClick:l,label:(0,g.__)("Tools")}))},position:"bottom right",renderContent:()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.NavigableMenu,{role:"menu","aria-label":(0,g.__)("Tools")},(0,a.createElement)(m.MenuItemsChoice,{value:"navigation"===n?"navigation":"edit",onSelect:o,choices:[{value:"edit",label:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ul,{icon:sE}),(0,g.__)("Edit"))},{value:"navigation",label:(0,a.createElement)(a.Fragment,null,bC,(0,g.__)("Select"))}]})),(0,a.createElement)("div",{className:"block-editor-tool-selector__help"},(0,g.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function kC(e){let{units:t,...n}=e;const o=(0,m.__experimentalUseCustomUnits)({availableUnits:qo("spacing.units")||["%","px","em","rem","vw"],units:t});return(0,a.createElement)(m.__experimentalUnitControl,i({units:o},n))}var yC=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"}));class EC extends a.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,o=e?(0,g.__)("Edit link"):(0,g.__)("Insert link");return(0,a.createElement)("div",{className:"block-editor-url-input__button"},(0,a.createElement)(m.Button,{icon:er,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,a.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,a.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,a.createElement)(m.Button,{className:"block-editor-url-input__back",icon:yC,label:(0,g.__)("Close"),onClick:this.toggle}),(0,a.createElement)(Oy,{value:e||"",onChange:t}),(0,a.createElement)(m.Button,{icon:Ny,label:(0,g.__)("Submit"),type:"submit"}))))}}var CC=EC;var SC=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.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"}));const wC="none",BC="custom",IC="media",xC="attachment",TC=["noreferrer","noopener"],NC=(0,a.createElement)(m.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(m.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,a.createElement)(m.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"}),(0,a.createElement)(m.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),PC=e=>{let{linkDestination:t,onChangeUrl:n,url:o,mediaType:r="image",mediaUrl:l,mediaLink:i,linkTarget:s,linkClass:c,rel:d}=e;const[p,f]=(0,a.useState)(!1),[h,v]=(0,a.useState)(null),b=(0,a.useCallback)((()=>{f(!0)})),[_,k]=(0,a.useState)(!1),[y,E]=(0,a.useState)(null),C=(0,a.useRef)(null),S=(0,a.useCallback)((()=>{t!==IC&&t!==xC||E(""),k(!0)})),w=(0,a.useCallback)((()=>{k(!1)})),B=(0,a.useCallback)((()=>{E(null),w(),f(!1)})),I=(0,a.useCallback)((()=>e=>{const t=C.current;t&&t.contains(e.target)||(f(!1),E(null),w())})),x=(0,a.useCallback)((()=>e=>{if(y){var t;const e=(null===(t=N().find((e=>e.url===y)))||void 0===t?void 0:t.linkDestination)||BC;n({href:y,linkDestination:e})}w(),E(null),e.preventDefault()})),T=(0,a.useCallback)((()=>{n({linkDestination:wC,href:""})})),N=()=>{const e=[{linkDestination:IC,title:(0,g.__)("Media File"),url:"image"===r?l:void 0,icon:NC}];return"image"===r&&i&&e.push({linkDestination:xC,title:(0,g.__)("Attachment Page"),url:"image"===r?i:void 0,icon:(0,a.createElement)(m.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(m.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,a.createElement)(m.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},P=(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.ToggleControl,{label:(0,g.__)("Open in new tab"),onChange:e=>{const t=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(null!=d?d:"").split(" ");TC.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=d?d:"").split(" ").filter((e=>!1===TC.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);n(t)},checked:"_blank"===s}),(0,a.createElement)(m.TextControl,{label:(0,g.__)("Link Rel"),value:null!=d?d:"",onChange:e=>{n({rel:e})}}),(0,a.createElement)(m.TextControl,{label:(0,g.__)("Link CSS Class"),value:c||"",onChange:e=>{n({linkClass:e})}})),M=null!==y?y:o,L=((0,u.find)(N(),["linkDestination",t])||{}).title;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.ToolbarButton,{icon:er,className:"components-toolbar__control",label:o?(0,g.__)("Edit link"):(0,g.__)("Insert link"),"aria-expanded":p,onClick:b,ref:v}),p&&(0,a.createElement)(xE,{anchor:h,onFocusOutside:I(),onClose:B,renderSettings:()=>P,additionalControls:!M&&(0,a.createElement)(m.NavigableMenu,null,(0,u.map)(N(),(e=>(0,a.createElement)(m.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{E(null),(e=>{const t=N();let o;o=e?((0,u.find)(t,(t=>t.url===e))||{linkDestination:BC}).linkDestination:wC,n({linkDestination:o,href:e})})(e.url),w()}},e.title))))},(!o||_)&&(0,a.createElement)(xE.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:M,onChangeInputValue:E,onSubmit:x(),autocompleteRef:C}),o&&!_&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(xE.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:S,urlLabel:L}),(0,a.createElement)(m.Button,{icon:SC,label:(0,g.__)("Remove link"),onClick:T}))))};function MC(e){let{children:t,viewLabel:n,className:o,isEnabled:r=!0,deviceType:l,setDeviceType:i}=e;if((0,d.useViewportMatch)("small","<"))return null;const s={className:c()(o,"block-editor-post-preview__dropdown-content"),position:"bottom left"},u={variant:"tertiary",className:"block-editor-post-preview__button-toggle",disabled:!r,children:n},p={"aria-label":(0,g.__)("View options")};return(0,a.createElement)(m.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:s,toggleProps:u,menuProps:p,icon:null},(()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.MenuGroup,null,(0,a.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>i("Desktop"),icon:"Desktop"===l&&Ef},(0,g.__)("Desktop")),(0,a.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>i("Tablet"),icon:"Tablet"===l&&Ef},(0,g.__)("Tablet")),(0,a.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>i("Mobile"),icon:"Mobile"===l&&Ef},(0,g.__)("Mobile"))),t)))}function LC(e){const[t,n]=(0,a.useState)(window.innerWidth);(0,a.useEffect)((()=>{if("Desktop"===e)return;const t=()=>n(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]);const o=e=>{let n;switch(e){case"Tablet":n=780;break;case"Mobile":n=360;break;default:return null}return n{const t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:o(e),margin:(window.innerHeight<800?36:72)+"px auto",height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}})(e)}var RC=(0,p.withSelect)((e=>({selectedBlockClientId:e(so).getBlockSelectionStart()})))((e=>{let{selectedBlockClientId:t}=e;const n=Mo(t);return t?(0,a.createElement)(m.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{n.current.focus()}},(0,g.__)("Skip to the selected block")):null})),AC=window.wp.wordcount;var DC=(0,p.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(so);return{blocks:t()}}))((function(e){let{blocks:t}=e;const n=(0,AC.count)((0,r.serialize)(t),"words");return(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,a.createElement)(Du,{icon:vf,showColors:!0}),(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,g.sprintf)((0,g._n)("%d block","%d blocks",t.length),t.length)),(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,g.sprintf)((0,g._n)("%d word","%d words",n),n))))}));function OC(e){let{blockName:t}=e;const{preferredStyle:n,onUpdatePreferredStyleVariations:o,styles:l}=(0,p.useSelect)((e=>{var n,o;const l=e(so).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==l||null===(n=l.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(o=null==l?void 0:l.onChange)&&void 0!==o?o:null,styles:e(r.store).getBlockStyles(t)}}),[t]),i=(0,a.useMemo)((()=>[{label:(0,g.__)("Not set"),value:""},...l.map((e=>{let{label:t,name:n}=e;return{label:t,value:n}}))]),[l]),s=(0,a.useMemo)((()=>{var e;return null===(e=Bf(l))||void 0===e?void 0:e.name}),[l]),c=(0,a.useCallback)((e=>{o(t,e)}),[t,o]);return n&&n!==s?o&&(0,a.createElement)("div",{className:"default-style-picker__default-switcher"},(0,a.createElement)(m.SelectControl,{options:i,value:n||"",label:(0,g.__)("Default Style"),onChange:c})):null}function zC(e,t){const n=(0,a.useMemo)((()=>e.reduce(((e,t)=>("core/list-item"!==t.name&&Object.entries(t.attributes).some((e=>{let[,{__experimentalRole:t}]=e;return"content"===t}))&&(e[t.name]=!0),e)),{})),[e]),o=(0,a.useCallback)((e=>!!n[e]),[e]);return(0,a.useMemo)((()=>FC([t],o)),[t,o])}function FC(e,t){const n=[];for(const o of e)t(o.name)&&n.push(o),n.push(...FC(o.innerBlocks,t));return n}function VC(e){let{blockTypes:t,block:n,selectedBlock:o}=e;const{selectBlock:r}=(0,p.useDispatch)(so),l=t.find((e=>{let{name:t}=e;return t===n.name})),i=o&&o.clientId===n.clientId;return(0,a.createElement)(m.Button,{isPressed:i,onClick:()=>r(n.clientId)},(0,a.createElement)(m.__experimentalHStack,{justify:"flex-start"},(0,a.createElement)(Du,{icon:l.icon}),(0,a.createElement)(m.FlexItem,null,l.title)))}function HC(e){let{topLevelLockedBlock:t}=e;const{blockTypes:n,block:o,selectedBlock:l}=(0,p.useSelect)((e=>({blockTypes:e(r.store).getBlockTypes(),block:e(so).getBlock(t),selectedBlock:e(so).getSelectedBlock()})),[t]),i=Um(t),s=zC(n,o);return(0,a.createElement)("div",{className:"block-editor-block-inspector"},(0,a.createElement)(Ou,i),(0,a.createElement)(Lk,{blockClientId:t}),(0,a.createElement)(m.__experimentalVStack,{spacing:1,padding:4,className:"block-editor-block-inspector__block-buttons-container"},(0,a.createElement)("h2",{className:"block-editor-block-card__title"},(0,g.__)("Content")),s.map((e=>(0,a.createElement)(VC,{selectedBlock:l,key:e.clientId,block:e,blockTypes:n})))))}const GC=e=>{let{clientId:t,blockName:n}=e;const o=(0,p.useSelect)((e=>{const{getBlockStyles:t}=e(r.store),o=t(n);return o&&o.length>0}),[n]),l=Um(t);return(0,a.createElement)("div",{className:"block-editor-block-inspector"},(0,a.createElement)(Ou,l),(0,a.createElement)(Lk,{blockClientId:t}),o&&(0,a.createElement)("div",null,(0,a.createElement)(m.PanelBody,{title:(0,g.__)("Styles")},(0,a.createElement)(vk,{scope:"core/block-inspector",clientId:t}),(0,r.hasBlockSupport)(n,"defaultStylePicker",!0)&&(0,a.createElement)(OC,{blockName:n}))),(0,a.createElement)(hr.Slot,null),(0,a.createElement)(hr.Slot,{__experimentalGroup:"color",label:(0,g.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,a.createElement)(hr.Slot,{__experimentalGroup:"typography",label:(0,g.__)("Typography")}),(0,a.createElement)(hr.Slot,{__experimentalGroup:"dimensions",label:(0,g.__)("Dimensions")}),(0,a.createElement)(hr.Slot,{__experimentalGroup:"border",label:(0,g.__)("Border")}),(0,a.createElement)("div",null,(0,a.createElement)(UC,null)),(0,a.createElement)(RC,{key:"back"}))},UC=()=>{const e=(0,m.__experimentalUseSlot)(gr.slotName);return Boolean(e.fills&&e.fills.length)?(0,a.createElement)(m.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,g.__)("Advanced"),initialOpen:!1},(0,a.createElement)(hr.Slot,{__experimentalGroup:"advanced"})):null};var WC=e=>{let{showNoBlockSelectedMessage:t=!0}=e;const{count:n,selectedBlockName:o,selectedBlockClientId:l,blockType:i,topLevelLockedBlock:s}=(0,p.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o,__unstableGetContentLockingParent:l,getTemplateLock:i}=e(so),a=t(),s=a&&o(a),c=s&&(0,r.getBlockType)(s);return{count:n(),selectedBlockClientId:a,selectedBlockName:s,blockType:c,topLevelLockedBlock:l(a)||("contentOnly"===i(a)?a:void 0)}}),[]);if(n>1)return(0,a.createElement)("div",{className:"block-editor-block-inspector"},(0,a.createElement)(DC,null),(0,a.createElement)(hr.Slot,null),(0,a.createElement)(hr.Slot,{__experimentalGroup:"color",label:(0,g.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,a.createElement)(hr.Slot,{__experimentalGroup:"typography",label:(0,g.__)("Typography")}),(0,a.createElement)(hr.Slot,{__experimentalGroup:"dimensions",label:(0,g.__)("Dimensions")}),(0,a.createElement)(hr.Slot,{__experimentalGroup:"border",label:(0,g.__)("Border")}));const c=o===(0,r.getUnregisteredTypeHandlerName)();return i&&l&&!c?s?(0,a.createElement)(HC,{topLevelLockedBlock:s}):(0,a.createElement)(GC,{clientId:l,blockName:i.name}):t?(0,a.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,g.__)("No block selected.")):null};var $C=function(e){let{__unstableContentRef:t}=e;const[n,o]=(0,a.useState)(!1),r=(0,p.useSelect)((e=>e(so).getBlockOrder()),[]);return(0,a.useEffect)((()=>{const e=setTimeout((()=>{o(!0)}),500);return()=>{clearTimeout(e)}}),[]),n?r.map(((e,n)=>n===r.length-1?null:(0,a.createElement)(Dm,{key:e,previousClientId:e,nextClientId:r[n+1],__unstableContentRef:t},(0,a.createElement)("div",{className:"block-editor-block-list__insertion-point-inserter is-with-inserter"},(0,a.createElement)(Tm,{position:"bottom center",clientId:r[n+1],__experimentalIsQuick:!0}))))):null};function jC(e){let{children:t,__unstableContentRef:n,...o}=e;const r=(0,d.useViewportMatch)("medium"),{hasFixedToolbar:l,isZoomOutMode:s}=(0,p.useSelect)((e=>{const{__unstableGetEditorMode:t,getSettings:n}=e(so);return{isZoomOutMode:"zoom-out"===t(),hasFixedToolbar:n().hasFixedToolbar}}),[]),c=(0,Yu.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:u,getBlockRootClientId:f}=(0,p.useSelect)(so),{duplicateBlocks:g,removeBlocks:h,insertAfterBlock:v,insertBeforeBlock:b,clearSelectedBlock:_,moveBlocksUp:k,moveBlocksDown:y}=(0,p.useDispatch)(so);const E=_r(n),C=_r(n);return(0,a.createElement)("div",i({},o,{onKeyDown:function(e){if(!e.defaultPrevented)if(c("core/block-editor/move-up",e)){const t=u();if(t.length){e.preventDefault();const n=f(t[0]);k(t,n)}}else if(c("core/block-editor/move-down",e)){const t=u();if(t.length){e.preventDefault();const n=f(t[0]);y(t,n)}}else if(c("core/block-editor/duplicate",e)){const t=u();t.length&&(e.preventDefault(),g(t))}else if(c("core/block-editor/remove",e)){const t=u();t.length&&(e.preventDefault(),h(t))}else if(c("core/block-editor/insert-after",e)){const t=u();t.length&&(e.preventDefault(),v(t[t.length-1]))}else if(c("core/block-editor/insert-before",e)){const t=u();t.length&&(e.preventDefault(),b(t[0]))}else if(c("core/block-editor/unselect",e)){u().length&&(e.preventDefault(),_(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges(),null==n||n.current.focus())}}}),(0,a.createElement)(Om.Provider,{value:(0,a.useRef)(!1)},!s&&(0,a.createElement)(Fm,{__unstableContentRef:n}),!s&&(l||!r)&&(0,a.createElement)(xg,{isFixed:!0}),(0,a.createElement)(Ag,{__unstableContentRef:n}),(0,a.createElement)(m.Popover.Slot,{name:"block-toolbar",ref:E}),t,(0,a.createElement)(m.Popover.Slot,{name:"__unstable-block-tools-after",ref:C}),s&&(0,a.createElement)($C,{__unstableContentRef:n})))}const KC=()=>{};var qC=(0,a.forwardRef)((function(e,t){let{rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l,showMostUsedBlocks:i=!1,__experimentalInsertionIndex:s,__experimentalFilterValue:c,onSelect:u=KC,shouldFocusBlock:d=!1}=e;const{destinationRootClientId:m,prioritizePatterns:f}=(0,p.useSelect)((e=>{const{getBlockRootClientId:t,getSettings:r}=e(so);return{destinationRootClientId:n||t(o)||void 0,prioritizePatterns:r().__experimentalPreferPatternsOnRoot}}),[o,n]);return(0,a.createElement)(wm,{onSelect:u,rootClientId:m,clientId:o,isAppender:r,showInserterHelpPanel:l,showMostUsedBlocks:i,__experimentalInsertionIndex:s,__experimentalFilterValue:c,shouldFocusBlock:d,prioritizePatterns:f,ref:t})}));function YC(){return null}YC.Register=function(){const{registerShortcut:e}=(0,p.useDispatch)(Yu.store);return(0,a.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,g.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,g.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,g.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,g.__)("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:(0,g.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,g.__)("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:(0,g.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,g.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,g.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,g.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var QC=YC;function ZC(){return V()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const XC=new Set([ku.UP,ku.RIGHT,ku.DOWN,ku.LEFT,ku.ENTER,ku.BACKSPACE]);function JC(){const e=(0,p.useSelect)((e=>e(so).isTyping()),[]),{stopTyping:t}=(0,p.useDispatch)(so);return(0,d.useRefEffect)((n=>{if(!e)return;const{ownerDocument:o}=n;let r,l;function i(e){const{clientX:n,clientY:o}=e;r&&l&&(r!==n||l!==o)&&t(),r=n,l=o}return o.addEventListener("mousemove",i),()=>{o.removeEventListener("mousemove",i)}}),[e,t])}function eS(){const{isTyping:e,hasInlineToolbar:t}=(0,p.useSelect)((e=>{const{isTyping:t,getSettings:n}=e(so);return{isTyping:t(),hasInlineToolbar:n().hasInlineToolbar}}),[]),{startTyping:n,stopTyping:o}=(0,p.useDispatch)(so),r=JC(),l=(0,d.useRefEffect)((r=>{const{ownerDocument:l}=r,{defaultView:i}=l,a=i.getSelection();if(e){let c;function u(e){const{target:t}=e;c=i.setTimeout((()=>{(0,Wl.isTextField)(t)||o()}))}function d(e){const{keyCode:t}=e;t!==ku.ESCAPE&&t!==ku.TAB||o()}function p(){a.isCollapsed||o()}return r.addEventListener("focus",u),r.addEventListener("keydown",d),t||l.addEventListener("selectionchange",p),()=>{i.clearTimeout(c),r.removeEventListener("focus",u),r.removeEventListener("keydown",d),l.removeEventListener("selectionchange",p)}}function s(e){const{type:t,target:o}=e;(0,Wl.isTextField)(o)&&r.contains(o)&&("keydown"!==t||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&XC.has(t)}(e))&&n()}return r.addEventListener("keypress",s),r.addEventListener("keydown",s),()=>{r.removeEventListener("keypress",s),r.removeEventListener("keydown",s)}}),[e,t,n,o]);return(0,d.useMergeRefs)([r,l])}var tS=function(e){let{children:t}=e;return(0,a.createElement)("div",{ref:eS()},t)};const nS=-1!==window.navigator.userAgent.indexOf("Trident"),oS=new Set([ku.UP,ku.DOWN,ku.LEFT,ku.RIGHT]);function rS(){const e=(0,p.useSelect)((e=>e(so).hasSelectedBlock()),[]);return(0,d.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,l,i;function a(){r||(r=o.requestAnimationFrame((()=>{p(),r=null})))}function s(e){l&&o.cancelAnimationFrame(l),l=o.requestAnimationFrame((()=>{c(e),l=null}))}function c(e){let{keyCode:r}=e;if(!m())return;const l=(0,Wl.computeCaretRect)(o);if(!l)return;if(!i)return void(i=l);if(oS.has(r))return void(i=l);const a=l.top-i.top;if(0===a)return;const s=(0,Wl.getScrollContainer)(t);if(!s)return;const c=s===n.body,u=c?o.scrollY:s.scrollTop,d=c?0:s.getBoundingClientRect().top,p=c?i.top/o.innerHeight:(i.top-d)/(o.innerHeight-d);if(0===u&&p<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(i=l);const f=c?o.innerHeight:s.clientHeight;i.top+i.height>d+f||i.top{o.removeEventListener("scroll",a,!0),o.removeEventListener("resize",a,!0),t.removeEventListener("keydown",s),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(l)}}),[e])}var lS=nS?e=>e.children:function(e){let{children:t}=e;return(0,a.createElement)("div",{ref:rS(),className:"block-editor__typewriter"},t)};const iS=(0,a.createContext)({});function aS(e){let{children:t,uniqueId:n,blockName:o=""}=e;const r=(0,a.useContext)(iS),{name:l}=mo();o=o||l;const i=(0,a.useMemo)((()=>function(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}(r,o,n)),[r,o,n]);return(0,a.createElement)(iS.Provider,{value:i},t)}function sS(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const o=(0,a.useContext)(iS),{name:r}=mo();return n=n||r,Boolean(null===(t=o[n])||void 0===t?void 0:t.has(e))}var cS=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));function uS(e){let{title:t,help:n,actions:o=[],onClose:r}=e;return(0,a.createElement)(m.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4},(0,a.createElement)(m.__experimentalHStack,{alignment:"center"},(0,a.createElement)(m.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13},t),(0,a.createElement)(m.__experimentalSpacer,null),o.map((e=>{let{label:t,icon:n,onClick:o}=e;return(0,a.createElement)(m.Button,{key:t,className:"block-editor-inspector-popover-header__action",label:t,icon:n,variant:!n&&"tertiary",onClick:o},!n&&t)})),r&&(0,a.createElement)(m.Button,{className:"block-editor-inspector-popover-header__action",label:(0,g.__)("Close"),icon:cS,onClick:r})),n&&(0,a.createElement)(m.__experimentalText,null,n))}var dS=(0,a.forwardRef)((function(e,t){let{onClose:n,onChange:o,...r}=e;return(0,a.createElement)("div",{ref:t,className:"block-editor-publish-date-time-picker"},(0,a.createElement)(uS,{title:(0,g.__)("Publish"),actions:[{label:(0,g.__)("Now"),onClick:()=>null==o?void 0:o(null)}],onClose:n}),(0,a.createElement)(m.DateTimePicker,i({startOfWeek:(0,Ok.getSettings)().l10n.startOfWeek,__nextRemoveHelpButton:!0,__nextRemoveResetButton:!0,onChange:o},r)))}));const pS={button:"wp-element-button",caption:"wp-element-caption"},mS=e=>pS[e]?pS[e]:"";function fS(e,t){return Object.entries(t).every((t=>{let[n,o]=t;return"object"==typeof o&&"object"==typeof e[n]?fS(e[n],o):e[n]===o}))}const gS=(e,t)=>{if(!t||!e)return;const n=t.filter((t=>{let{attributes:n}=t;return!(!n||!Object.keys(n).length)&&fS(e,n)}));return 1===n.length?n[0]:void 0};function hS(e){const t=null==e?void 0:e.trim().match(/^(0?[-.]?\d*\.?\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/);return isNaN(e)||isNaN(parseFloat(e))?t?{value:parseFloat(t[1])||t[1],unit:t[2]}:{value:e,unit:void 0}:{value:parseFloat(e),unit:"px"}}function vS(e,t){const n=e.split(/[(),]/g).filter(Boolean),o=n.slice(1).map((e=>hS(ES(e,t)).value)).filter(Boolean);switch(n[0]){case"min":return Math.min(...o)+"px";case"max":return Math.max(...o)+"px";case"clamp":return 3!==o.length?null:o[1]o[2]?o[2]+"px":o[1]+"px";case"calc":return o[0]+"px"}}function bS(e){for(;;){const t=e,n=/(max|min|calc|clamp)\(([^()]*)\)/g.exec(e)||[];if(n[0]){const t=vS(n[0]);e=e.replace(n[0],t)}if(e===t||parseFloat(e))break}return hS(e)}function _S(e){for(let t=0;tr.height?r.width:r.height)*o,"%":("font"===r.type?r.fontSize:r.width)*o,ch:8,ex:7.15625,lh:r.lineHeight},i={in:n,cm:37.79527559055118,mm:3.7795275590551185,pt:1.3333333333333333,pc:16,px:1,Q:.9448818897637794};return l[e.unit]?(l[e.unit]*e.value).toFixed(0)+"px":i[e.unit]?(i[e.unit]*e.value).toFixed(0)+"px":null}function ES(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isFinite(e))return e.toFixed(0)+"px";if(void 0===e)return null;let n=hS(e);return n.unit||(n=bS(e)),_S(e)&&!n.unit?kS(e):yS(n,t)}const CS={};function SS(e){let t="";return e.hasOwnProperty("fontSize")&&(t=":"+e.width),e.hasOwnProperty("lineHeight")&&(t=":"+e.lineHeight),e.hasOwnProperty("width")&&(t=":"+e.width),e.hasOwnProperty("height")&&(t=":"+e.height),e.hasOwnProperty("type")&&(t=":"+e.type),t}var wS=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e+SS(t);return CS[n]||(CS[n]=ES(e,t)),CS[n]}}(),(window.wp=window.wp||{}).blockEditor=o}(); \ No newline at end of file + */,e.exports=function(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var l=document.createElement("div");l.setAttribute(n,"return;"),i="function"==typeof l[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},195:function(e,t,n){"use strict";var r=n(3812),o=n(7939);function i(e){var t=0,n=0,r=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,o=10*n,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||o)&&e.deltaMode&&(1==e.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!t&&(t=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:o}}i.getEventType=function(){return r.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},e.exports=i},8383:function(e,t,n){"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,l=n(4418),a=Object.prototype.propertyIsEnumerable,s=!a.call({toString:null},"toString"),c=a.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{p(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===i.call(e),r=l(e),a=t&&"[object String]"===i.call(e),d=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var y=c&&n;if(a&&e.length>0&&!o.call(e,0))for(var m=0;m0)for(var g=0;g=0&&"[object Function]"===t.call(e.callee)),r}},131:function(e){"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5372:function(e,t,n){"use strict";var r=n(9567);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,l){if(l!==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,bigint: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:i,resetWarningCache:o};return n.PropTypes=n,n}},2652:function(e,t,n){e.exports=n(5372)()},9567:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n-1?o(n):n}},9386:function(e,t,n){"use strict";var r=n(5127),o=n(8024),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},6850:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},330:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1489);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1489:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9277:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},1312:function(e,t,n){"use strict";var r=n(2137),o=n(6073),i=r("RegExp.prototype.exec"),l=n(1642);e.exports=function(e){if(!o(e))throw new l("`regex` must be a RegExp");return function(t){return null!==i(e,t)}}},2137:function(e,t,n){"use strict";var r=n(5273),o=n(381),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},381:function(e,t,n){"use strict";var r=n(3331),o=n(5273),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7780:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},6339:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6789);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6789:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6073:function(e,t,n){"use strict";var r,o,i,l,a=n(2137),s=n(4111)();if(s){r=a("Object.prototype.hasOwnProperty"),o=a("RegExp.prototype.exec"),i={};var c=function(){throw i};l={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(l[Symbol.toPrimitive]=c)}var u=a("Object.prototype.toString"),p=Object.getOwnPropertyDescriptor;e.exports=s?function(e){if(!e||"object"!=typeof e)return!1;var t=p(e,"lastIndex");if(!(t&&r(t,"value")))return!1;try{o(e,l)}catch(e){return e===i}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===u(e)}},4521:function(e,t,n){"use strict";var r=n(1757),o=n(2656),i=n(8198)(),l=n(3828),a=n(1642),s=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||s(t)!==t)throw new a("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&l){var u=l(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},5371:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},1207:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(2326);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},2326:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},5467:function(e,t,n){"use strict";var r=n(7998),o=n(6245),i=n(6907)("String.prototype.replace"),l=/^\s$/.test("᠎"),a=l?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,s=l?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;e.exports=function(){var e=o(r(this));return i(i(e,a,""),s,"")}},4113:function(e,t,n){"use strict";var r=n(7618),o=n(5213),i=n(7998),l=n(5467),a=n(5626),s=n(1029),c=r(a()),u=function(e){return i(e),c(e)};o(u,{getPolyfill:a,implementation:l,shim:s}),e.exports=u},6907:function(e,t,n){"use strict";var r=n(5037),o=n(7618),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},7618:function(e,t,n){"use strict";var r=n(1769),o=n(5037),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},5213:function(e,t,n){"use strict";var r=n(806),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,l=Array.prototype.concat,a=n(2656),s=n(8198)(),c=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;s?a(e,t,n,!0):a(e,t,n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=l.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},5570:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(5889);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5889:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},5626:function(e,t,n){"use strict";var r=n(5467),o="᠎";e.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&o.trim()===o&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:r}},1029:function(e,t,n){"use strict";var r=n(5213),o=n(5626);e.exports=function(){var e=o();return r(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}},3124:function(e,t,n){"use strict";var r=n(4010),o=n(1140),i=n(3828);function l(e){return Object.prototype.toString.call(e)}var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function s(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n2?arguments[2]:g,l=i.includeSymbols?d:c,u=!!i.immutable;return function e(c){var p=u?m(c,i):c,d={},g=!0,h={node:p,node_:c,path:[].concat(n),parent:r[r.length-1],parents:r,key:n[n.length-1],isRoot:0===n.length,level:n.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(g=!1)},delete:function(e){delete h.parent.node[h.key],e&&(g=!1)},remove:function(e){a(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(g=!1)},keys:null,before:function(e){d.before=e},after:function(e){d.after=e},pre:function(e){d.pre=e},post:function(e){d.post=e},stop:function(){o=!1},block:function(){g=!1}};if(!o)return h;function b(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=l(h.node)),h.isLeaf=0===h.keys.length;for(var e=0;e1?arguments[1]:g,this.value=e}function v(e){var t=arguments.length>1?arguments[1]:g;return new b(e,t)}b.prototype.get=function(e){for(var t=this.value,n=0;t&&n-1?o(n):n}},8388:function(e,t,n){"use strict";var r=n(7715),o=n(1634),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},9003:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},263:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(9184);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},9184:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7046:function(e,t,n){"use strict";var r=n(4843),o=n(2526),i=n(4343)(),l={},a=n(1856)(),s=n(3828),c=Object.defineProperty;if(s){var u=function(e){return e.byteOffset};r(i,(function(e){if("function"==typeof n.g[e]||"object"==typeof n.g[e]){var t=n.g[e].prototype,r=s(t,"byteOffset");if(!r&&a){var i=t.__proto__;r=s(i,"byteOffset")}if(r&&r.get)l[e]=o(r.get);else if(c){var p=new n.g[e](2);(r=s(p,"byteOffset"))&&r.configurable&&c(p,"length",{value:3}),2===p.length&&(l[e]=u)}}}))}var p=n(2527);e.exports=function(e){return!!p(e)&&function(e){var t;return r(l,(function(n){if("number"!=typeof t)try{var r=n(e);"number"==typeof r&&(t=r)}catch(e){}})),t}(e)}},2526:function(e,t,n){"use strict";var r=n(1530),o=n(3699),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},1609:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},5162:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(3903);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},3903:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},8150:function(e,t,n){"use strict";var r=n(4888),o=n(4843),i=n(3828),l=n(1856)(),a=n(2527),s=n(131),c={__proto__:null},u=Object.defineProperty;if(i){var p=function(e){return e.length};o(s,(function(e){var t=n.g[e];if("function"==typeof t||"object"==typeof t){var o=t.prototype,a=i(o,"length");if(!a&&l){var s=o.__proto__;a=i(s,"length")}if(a&&a.get)c["$"+e]=r(a.get);else if(u){var d=new n.g[e](2);(a=i(d,"length"))&&a.configurable&&u(d,"length",{value:3}),2===d.length&&(c["$"+e]=p)}}}))}e.exports=function(e){return!!a(e)&&function(e){var t;return o(c,(function(n){if("number"!=typeof t)try{var r=n(e);"number"==typeof r&&(t=r)}catch(e){}})),t}(e)}},4888:function(e,t,n){"use strict";var r=n(3576),o=n(8031),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7380:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},307:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1766);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1766:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4073:function(e,t,n){"use strict";var r=n(1642),o=n(3675),i=n(9661),l=n(1320),a=n(1367),s=n(2967),c=n(8055),u=n(3383),p=n(2897),d=n(7249),f=n(9149),y=n(1586),m=n(817),g=n(3842),h=n(6740),b=n(7046);e.exports=function(e,t){var n=this;g(n,"SEQ-CST");var v,_=n.length,k=p(e);v=k===-1/0?0:k<0?a(_+k,0):s(k,_);var S,E=void 0===t?_:p(t);S=E===-1/0?0:E<0?a(_+E,0):s(E,_);var w=a(S-v,0),A=m(n,[w]);if(w>0){if(l(h(n)))throw new r("Cannot use a Typed Array with an underlying ArrayBuffer that is detached");if(y(n)===y(A))for(var C=h(n),I=h(A),x=f(n),B=v*x+b(n),P=b(A),T=P+w*x;P-1?o(n):n}},8374:function(e,t,n){"use strict";var r=n(8474),o=n(682),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},6776:function(e,t,n){"use strict";var r=n(806),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,l=Array.prototype.concat,a=n(2656),s=n(8198)(),c=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;s?a(e,t,n,!0):a(e,t,n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=l.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},5314:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6188);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6188:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6841:function(e){"use strict";var t,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,t)}catch(e){e!==n&&(o=null)}else o=null;var i=/^\s*class\b/,l=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},a=function(e){try{return!l(e)&&(r.call(e),!0)}catch(e){return!1}},s=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),p=function(){return!1};if("object"==typeof document){var d=document.all;s.call(d)===s.call(document.all)&&(p=function(e){if((u||!e)&&(void 0===e||"object"==typeof e))try{var t=s.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==n)return!1}return!l(e)&&a(e)}:function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return a(e);if(l(e))return!1;var t=s.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},5726:function(e,t,n){var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.get:null,l=r&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&s&&"function"==typeof s.get?s.get:null,u=a&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,y=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,h=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,_=String.prototype.toUpperCase,k=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,w=Array.prototype.join,A=Array.prototype.slice,C=Math.floor,I="function"==typeof BigInt?BigInt.prototype.valueOf:null,x=Object.getOwnPropertySymbols,B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,P="function"==typeof Symbol&&"object"==typeof Symbol.iterator,T="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P||"symbol")?Symbol.toStringTag:null,O=Object.prototype.propertyIsEnumerable,R=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function N(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||S.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-C(-e):C(e);if(r!==e){var o=String(r),i=b.call(t,o.length+1);return v.call(o,n,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(t,n,"$&_")}var F=n(5794),M=F.custom,D=V(M)?M:null;function L(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function U(e){return v.call(String(e),/"/g,""")}function j(e){return!("[object Array]"!==W(e)||T&&"object"==typeof e&&T in e)}function z(e){return!("[object RegExp]"!==W(e)||T&&"object"==typeof e&&T in e)}function V(e){if(P)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!B)return!1;try{return B.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,o,a){var s=r||{};if(H(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!H(s,"customInspect")||s.customInspect;if("boolean"!=typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return K(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var S=String(t);return _?N(t,S):S}if("bigint"==typeof t){var C=String(t)+"n";return _?N(t,C):C}var x=void 0===s.depth?5:s.depth;if(void 0===o&&(o=0),o>=x&&x>0&&"object"==typeof t)return j(t)?"[Array]":"[Object]";var M=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=w.call(Array(e.indent+1)," ")}return{base:n,prev:w.call(Array(t+1),n)}}(s,o);if(void 0===a)a=[];else if($(a,t)>=0)return"[Circular]";function G(t,n,r){if(n&&(a=A.call(a)).push(n),r){var i={depth:s.depth};return H(s,"quoteStyle")&&(i.quoteStyle=s.quoteStyle),e(t,i,o+1,a)}return e(t,s,o+1,a)}if("function"==typeof t&&!z(t)){var q=function(e){if(e.name)return e.name;var t=h.call(g.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=X(t,G);return"[Function"+(q?": "+q:" (anonymous)")+"]"+(ee.length>0?" { "+w.call(ee,", ")+" }":"")}if(V(t)){var te=P?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):B.call(t);return"object"!=typeof t||P?te:J(te)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var ne="<"+k.call(String(t.nodeName)),re=t.attributes||[],oe=0;oe"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,G);return M&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+Z(ie,M)+"]":"[ "+w.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==W(e)||T&&"object"==typeof e&&T in e)}(t)){var le=X(t,G);return"cause"in Error.prototype||!("cause"in t)||O.call(t,"cause")?0===le.length?"["+String(t)+"]":"{ ["+String(t)+"] "+w.call(le,", ")+" }":"{ ["+String(t)+"] "+w.call(E.call("[cause]: "+G(t.cause),le),", ")+" }"}if("object"==typeof t&&m){if(D&&"function"==typeof t[D]&&F)return F(t,{depth:x-o});if("symbol"!==m&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return l&&l.call(t,(function(e,n){ae.push(G(n,t,!0)+" => "+G(e,t))})),Q("Map",i.call(t),ae,M)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(G(e,t))})),Q("Set",c.call(t),se,M)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Y("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Y("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(G(Number(t)));if(function(e){if(!e||"object"!=typeof e||!I)return!1;try{return I.call(e),!0}catch(e){}return!1}(t))return J(G(I.call(t)));if(function(e){return!("[object Boolean]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(y.call(t));if(function(e){return!("[object String]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(G(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===n.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==W(e)||T&&"object"==typeof e&&T in e)}(t)&&!z(t)){var ce=X(t,G),ue=R?R(t)===Object.prototype:t instanceof Object||t.constructor===Object,pe=t instanceof Object?"":"null prototype",de=!ue&&T&&Object(t)===t&&T in t?b.call(W(t),8,-1):pe?"Object":"",fe=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(de||pe?"["+w.call(E.call([],de||[],pe||[]),": ")+"] ":"");return 0===ce.length?fe+"{}":M?fe+"{"+Z(ce,M)+"}":fe+"{ "+w.call(ce,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return G.call(e,t)}function W(e){return m.call(e)}function $(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return K(b.call(e,0,t.maxStringLength),t)+r}return L(v.call(v.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,q),"single",t)}function q(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+_.call(t.toString(16))}function J(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function Q(e,t,n,r){return e+" ("+t+") {"+(r?Z(n,r):w.call(n,", "))+"}"}function Z(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+w.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var o=0;o-1?t:"Object"===t&&function(e){var t=!1;return r(m,(function(n,r){if(!t)try{n(e),t=d(r,1)}catch(e){}})),t}(e)}return a?function(e){var t=!1;return r(m,(function(n,r){if(!t)try{"$"+n(e)===r&&(t=d(r,1))}catch(e){}})),t}(e):null}},7120:function(e,t,n){"use strict";var r=n(6883),o=n(4899),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},4899:function(e,t,n){"use strict";var r=n(7961),o=n(6883),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7562:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},8861:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(704);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},704:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9196:function(e){"use strict";e.exports=window.React},5794:function(){},4343:function(e,t,n){"use strict";var r=n(131),o="undefined"==typeof globalThis?n.g:globalThis;e.exports=function(){for(var e=[],t=0;t5&&"boolean"!=typeof arguments[5])throw new i("Assertion failed: `isLittleEndian` must be a boolean, if present");if(c(e))throw new i("Assertion failed: `arrayBuffer` is detached");if(t<0)throw new i("Assertion failed: `byteIndex` must be non-negative");var b,v=y.size["$"+n];if(!v)throw new i('Assertion failed: `type` must be one of "INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT32", or "FLOAT64"');if(h)throw new o("SharedArrayBuffer is not supported by this implementation");b=a(new l(e,t),0,v);var _=arguments.length>5?arguments[5]:"little"===m,k=_?a(f([0,0,0,0,0,0,0,0],b),-v):a(f(b,[0,0,0,0,0,0,0,0]),0,v);return u(n,k,_)}},5584:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i=n(9762),l=n(9655);e.exports=function(e,t){if("Object"!==l(e))throw new r("Assertion failed: `O` must be an Object");if(!i(t))throw new r("Assertion failed: `P` must be a Property Key");return o(e,t)}},2985:function(e,t,n){"use strict";e.exports=n(692)},4734:function(e){"use strict";e.exports=function(e){return"BIGUINT64"===e||"BIGINT64"===e}},3071:function(e,t,n){"use strict";e.exports=n(6841)},7010:function(e,t,n){"use strict";var r=n(4342)("%Reflect.construct%",!0),o=n(9002);try{o({},"",{"[[Get]]":function(){}})}catch(e){o=null}if(o&&r){var i={},l={};o(l,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),e.exports=function(e){try{r(e,l)}catch(e){return e===i}}}else e.exports=function(e){return"function"==typeof e&&!!e.prototype}},4065:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i=n(6862);e.exports=function(e){if(void 0===e)return!1;if(!i(e))throw new r("Assertion failed: `Desc` must be a Property Descriptor");return!(!o(e,"[[Value]]")&&!o(e,"[[Writable]]"))}},1320:function(e,t,n){"use strict";var r=n(1642),o=n(480),i=n(4343)(),l=n(1154),a=n(4602),s=n(5604),c=l("SharedArrayBuffer.prototype.byteLength",!0);e.exports=function(e){var t=s(e);if(!a(e)&&!t)throw new r("Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot");if(0===(t?c:o)(e))try{new n.g[i[0]](e)}catch(e){return!!e&&"TypeError"===e.name}return!1}},9442:function(e,t,n){"use strict";var r=n(1642),o=n(1154),i=o("%ArrayBuffer.prototype.resizable%",!0),l=o("%SharedArrayBuffer.prototype.growable%",!0),a=n(4602),s=n(5604);e.exports=function(e){var t=a(e),n=s(e);if(!t&&!n)throw new r("Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer");return t&&i?!i(e):!n||!l||!l(e)}},9762:function(e){"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},9954:function(e,t,n){"use strict";var r=n(1642),o=n(1320),i=n(9149),l=n(359),a=n(6740),s=n(7046),c=n(8150);e.exports=function(e){if(!l(e))throw new r("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");var t=e["[[Object]]"],n=e["[[CachedBufferByteLength]]"];if(o(a(t))&&"DETACHED"!==n)throw new r("Assertion failed: typed array is detached only if the byte length is ~DETACHED~");if("DETACHED"===n)return!0;var u,p=s(t),d=c(t);"AUTO"===d?u=n:u=p+d*i(t);return p>n||u>n}},7551:function(e){"use strict";e.exports=function(e){return"UINT8"===e||"UINT8C"===e||"UINT16"===e||"UINT32"===e||"BIGUINT64"===e}},6005:function(e,t,n){"use strict";var r=n(1642),o=n(2981),i=n(1320),l=n(2527),a=n(6740);e.exports=function(e,t){if(!l(e))throw new r("Assertion failed: `obj` must be a Typed Array");if("SEQ-CST"!==t&&"UNORDERED"!==t)throw new r("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");var n=a(e);return{"[[Object]]":e,"[[CachedBufferByteLength]]":i(n)?"DETACHED":o(n,t)}}},4604:function(e,t,n){"use strict";var r=n(1642),o=n(5584),i=n(1242),l=n(2947),a=n(3181),s=n(2587),c=n(5562),u=n(5465),p=n(5964),d=n(9496),f=n(6550),y=n(3647),m=n(7511),g=n(1520),h=n(806),b={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8},v={__proto__:null,INT8:c,UINT8:d,UINT8C:f,INT16:a,UINT16:u,INT32:s,UINT32:p,BIGINT64:i,BIGUINT64:l};e.exports=function(e,t,n){if("string"!=typeof e||!o(b,e))throw new r("Assertion failed: `type` must be a TypedArray element type: "+h(b));if("number"!=typeof t&&"bigint"!=typeof t)throw new r("Assertion failed: `value` must be a Number or a BigInt");if("boolean"!=typeof n)throw new r("Assertion failed: `isLittleEndian` must be a Boolean");if("FLOAT32"===e)return y(t,n);if("FLOAT64"===e)return m(t,n);var i=b[e],l=(0,v[e])(t);return g(l,i,n)}},9219:function(e,t,n){"use strict";var r=n(682),o=n(1154),i=n(9204),l=n(6724),a=n(1642),s=r("%BigInt%",!0),c=n(5584),u=n(2985),p=n(4734),d=n(7551),f=n(8727),y=n(7604),m=n(2367),g=n(8172),h=n(1824),b=o("Array.prototype.reverse"),v=o("Array.prototype.slice"),_=n(806),k={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8};e.exports=function(e,t,n){if(!c(k,e))throw new a("Assertion failed: `type` must be a TypedArray element type: "+_(k));if(!u(t)||!g(t,h))throw new a("Assertion failed: `rawBytes` must be an Array of bytes");if("boolean"!=typeof n)throw new a("Assertion failed: `isLittleEndian` must be a Boolean");var r=k[e];if(t.length!==r)throw new i("Assertion failed: `rawBytes` must have a length of "+r+" for type "+e);var o=p(e);if(o&&!s)throw new l("this environment does not support BigInts");return t=v(t,0,r),n||b(t),"FLOAT32"===e?f(t):"FLOAT64"===e?y(t):m(t,r,d(e),o)}},3392:function(e,t,n){"use strict";var r=n(9404);e.exports=function(e,t){return e===t?0!==e||1/e==1/t:r(e)&&r(t)}},8055:function(e,t,n){"use strict";var r=n(1642),o=n(9762),i=n(3392),l=n(9655),a=function(){try{return delete[].length,!0}catch(e){return!1}}();e.exports=function(e,t,n,s){if("Object"!==l(e))throw new r("Assertion failed: `O` must be an Object");if(!o(t))throw new r("Assertion failed: `P` must be a Property Key");if("boolean"!=typeof s)throw new r("Assertion failed: `Throw` must be a Boolean");if(s){if(e[t]=n,a&&!i(e[t],n))throw new r("Attempted to assign to readonly property.");return!0}try{return e[t]=n,!a||i(e[t],n)}catch(e){return!1}}},3383:function(e,t,n){"use strict";var r=n(682),o=n(6724),i=n(1642),l=r("%Uint8Array%",!0),a=n(6156),s=n(4734),c=n(1320),u=n(4604),p=n(4602),d=n(5604),f=n(9429),y=n(2170),m=n(2142),g=n(9065);e.exports=function(e,t,n,r,h,b){var v=d(e);if(!p(e)&&!v)throw new i("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(!a(t)||t<0)throw new i("Assertion failed: `byteIndex` must be a non-negative integer");if("string"!=typeof n||!f(y.size,"$"+n))throw new i("Assertion failed: `type` must be a Typed Array Element Type");if("number"!=typeof r&&"bigint"!=typeof r)throw new i("Assertion failed: `value` must be a Number or a BigInt");if("boolean"!=typeof h)throw new i("Assertion failed: `isTypedArray` must be a boolean");if("SEQ-CST"!==b&&"UNORDERED"!==b&&"INIT"!==b)throw new i('Assertion failed: `order` must be `"SEQ-CST"`, `"UNORDERED"`, or `"INIT"`');if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("Assertion failed: `isLittleEndian` must be a boolean, if present");if(c(e))throw new i("Assertion failed: ArrayBuffer is detached");if(s(n)?"bigint"!=typeof r:"number"!=typeof r)throw new i("Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number");var _=y.size["$"+n],k=arguments.length>6?arguments[6]:"little"===m,S=u(n,r,k);if(v)throw new o("SharedArrayBuffer is not supported by this implementation");var E=new l(e,t,_);g(S,(function(e,t){E[t]=e}))}},5994:function(e,t,n){"use strict";var r=n(682)("%Symbol.species%",!0),o=n(1642),i=n(7010),l=n(9655);e.exports=function(e,t){if("Object"!==l(e))throw new o("Assertion failed: Type(O) is not Object");var n=e.constructor;if(void 0===n)return t;if("Object"!==l(n))throw new o("O.constructor is not an Object");var a=r?n[r]:void 0;if(null==a)return t;if(i(a))return a;throw new o("no constructor found")}},907:function(e,t,n){"use strict";var r=n(682)("%BigInt%",!0),o=n(1642),i=n(6724);e.exports=function(e){if("string"!=typeof e)throw new o("`argument` must be a string");if(!r)throw new i("BigInts are not supported in this environment");try{return r(e)}catch(e){return}}},4967:function(e,t,n){"use strict";var r=n(682),o=r("%Number%"),i=r("%RegExp%"),l=n(1642),a=r("%parseInt%"),s=n(1154),c=n(1312),u=s("String.prototype.slice"),p=c(/^0b[01]+$/i),d=c(/^0o[0-7]+$/i),f=c(/^[-+]0x[0-9a-f]+$/i),y=c(new i("["+["…","​","￾"].join("")+"]","g")),m=n(4113);e.exports=function e(t){if("string"!=typeof t)throw new l("Assertion failed: `argument` is not a String");if(p(t))return o(a(u(t,2),2));if(d(t))return o(a(u(t,2),8));if(y(t)||f(t))return NaN;var n=m(t);return n!==t?e(n):o(t)}},9752:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Number%"),l=n(1642),a=n(6724),s=n(907),c=n(210);e.exports=function(e){if(!o)throw new a("BigInts are not supported in this environment");var t=c(e,i);if(null==t)throw new l("Cannot convert null or undefined to a BigInt");if("boolean"==typeof t)return o(t?1:0);if("number"==typeof t)throw new l("Cannot convert a Number value to a BigInt");if("string"==typeof t){var n=s(t);if(void 0===n)throw new l("Failed to parse String to BigInt");return n}if("symbol"==typeof t)throw new l("Cannot convert a Symbol value to a BigInt");if("bigint"!=typeof t)throw new a("Assertion failed: unknown primitive type");return t}},1242:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Math.pow%"),l=n(9752),a=n(6548),s=n(8626),c=o&&BigInt(i(2,32))*BigInt(i(2,31)),u=o&&BigInt(i(2,32))*BigInt(i(2,32));e.exports=function(e){var t=l(e),n=s(a,t,u);return n>=c?n-u:n}},2947:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Math.pow%"),l=n(9752),a=n(6548),s=n(8626),c=o&&BigInt(i(2,32))*BigInt(i(2,32));e.exports=function(e){var t=l(e);return s(a,t,c)}},6440:function(e){"use strict";e.exports=function(e){return!!e}},3181:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,65536);return a>=32768?a-65536:a}},2587:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991),a=4294967296;e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),s=r(n,a),c=s>=2147483648?s-a:s;return 0===c?0:c}},5562:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,256);return a>=128?a-256:a}},2897:function(e,t,n){"use strict";var r=n(3438),o=n(736),i=n(9404),l=n(7991);e.exports=function(e){var t=r(e);return i(t)||0===t?0:l(t)?o(t):t}},3438:function(e,t,n){"use strict";var r=n(682),o=n(1642),i=r("%Number%"),l=n(4968),a=n(210),s=n(4967);e.exports=function(e){var t=l(e)?e:a(e,i);if("symbol"==typeof t)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?s(t):i(t)}},210:function(e,t,n){"use strict";var r=n(5249);e.exports=function(e){return arguments.length>1?r(e,arguments[1]):r(e)}},8110:function(e,t,n){"use strict";var r=n(9429),o=n(1642),i=n(9655),l=n(6440),a=n(3071);e.exports=function(e){if("Object"!==i(e))throw new o("ToPropertyDescriptor requires an object");var t={};if(r(e,"enumerable")&&(t["[[Enumerable]]"]=l(e.enumerable)),r(e,"configurable")&&(t["[[Configurable]]"]=l(e.configurable)),r(e,"value")&&(t["[[Value]]"]=e.value),r(e,"writable")&&(t["[[Writable]]"]=l(e.writable)),r(e,"get")){var n=e.get;if(void 0!==n&&!a(n))throw new o("getter must be a function");t["[[Get]]"]=n}if(r(e,"set")){var s=e.set;if(void 0!==s&&!a(s))throw new o("setter must be a function");t["[[Set]]"]=s}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},7249:function(e,t,n){"use strict";var r=n(682)("%String%"),o=n(1642);e.exports=function(e){if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a string");return r(e)}},5465:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,65536);return 0===a?0:a}},5964:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,4294967296);return 0===a?0:a}},9496:function(e,t,n){"use strict";var r=n(7991),o=n(8457),i=n(3438),l=n(736);e.exports=function(e){var t=i(e);if(!r(t)||0===t)return 0;var n=l(t);return o(n,256)}},6550:function(e,t,n){"use strict";var r=n(3832),o=n(3438),i=n(3473),l=n(9404);e.exports=function(e){var t=o(e);if(l(t))return 0;var n=r(t,0,255),a=i(n);return na+.5?a+1:a%2==0?a:a+1}},9655:function(e,t,n){"use strict";var r=n(1528);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":r(e)}},7265:function(e,t,n){"use strict";var r=n(6724),o=n(1642),i=n(2985),l=n(7010),a=n(9954),s=n(8921),c=n(3842),u=n(4343)();e.exports=function(e,t){if(!l(e))throw new o("Assertion failed: `constructor` must be a constructor");if(!i(t))throw new o("Assertion failed: `argumentList` must be a List");if(0===u.length)throw new r("Assertion failed: Typed Arrays are not supported in this environment");var n;n=0===t.length?new e:1===t.length?new e(t[0]):2===t.length?new e(t[0],t[1]):new e(t[0],t[1],t[2]);var p=c(n,"SEQ-CST");if(1===t.length&&"number"==typeof t[0]){if(a(p))throw new o("new Typed Array is out of bounds");if(s(p)>7,o=(127&e[2])<<16|e[1]<<8|e[0];return 0===n&&0===o?1===t?0:-0:255===n&&0===o?1===t?1/0:-1/0:255===n&&0!==o?NaN:-127===(n-=127)?t*o*r(2,-149):t*(1+o*r(2,-23))*r(2,n)}},7604:function(e,t,n){"use strict";var r=n(682)("%Math.pow%");e.exports=function(e){var t=128&e[7]?-1:1,n=(127&e[7])<<4|(240&e[6])>>4,o=281474976710656*(15&e[6])+1099511627776*e[5]+4294967296*e[4]+16777216*e[3]+65536*e[2]+256*e[1]+e[0];return 0===n&&0===o?0*t:2047===n&&0!==o?NaN:2047===n&&0===o?t*(1/0):-1023===(n-=1023)?t*o*5e-324:t*(1+o/4503599627370496)*r(2,n)}},2367:function(e,t,n){"use strict";var r=n(682),o=r("%Math.pow%"),i=r("%Number%"),l=r("%BigInt%",!0);e.exports=function(e,t,n,r){for(var a=r?l:i,s=a(0),c=0;c=1?(e=r-1,n+="1",o===t&&(o=i)):(e=r,n+="0"),1===r||i-o>54)return n;return n}},2646:function(e){"use strict";e.exports=function(e){if(void 0===e)return e;var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=!!e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=!!e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=!!e["[[Configurable]]"]),t}},9495:function(e,t,n){"use strict";var r=n(682)("%Object.getPrototypeOf%",!0),o=n(1856)();e.exports=r||(o?function(e){return e.__proto__}:null)},20:function(e,t,n){"use strict";var r=n(682)("%Math.floor%");e.exports=function(e){for(var t,n="";e>0;)n=(t=e/2)===(e=r(t))?"0"+n:"1"+n;return n}},1520:function(e,t,n){"use strict";var r=n(682),o=r("%Number%"),i=r("%BigInt%",!0);e.exports=function(e,t,n){var r="bigint"==typeof e?i:o;e<0&&(e>>>=0);for(var l=[],a=0;a>=r(8);return l}},1824:function(e){"use strict";e.exports=function(e){return"number"==typeof e&&e>=0&&e<=255&&(0|e)===e}},7991:function(e,t,n){"use strict";var r=n(9404);e.exports=function(e){return("number"==typeof e||"bigint"==typeof e)&&!r(e)&&e!==1/0&&e!==-1/0}},6156:function(e,t,n){"use strict";var r=n(682),o=r("%Math.abs%"),i=r("%Math.floor%"),l=n(9404),a=n(7991);e.exports=function(e){if("number"!=typeof e||l(e)||!a(e))return!1;var t=o(e);return i(t)===t}},9404:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},2745:function(e){"use strict";e.exports=function(e){return 0===e&&1/e==-1/0}},4968:function(e){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},2076:function(e){"use strict";var t=Math.floor;e.exports=function(e,n){var r=e%n;return t(r>=0?r:r+n)}},8626:function(e){"use strict";e.exports=function(e,t,n){var r=e(t,n);return r>=0?r:r+n}},6862:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};e.exports=function(e){if(!e||"object"!=typeof e)return!1;for(var t in e)if(o(e,t)&&!i[t])return!1;var n=o(e,"[[Value]]")||o(e,"[[Writable]]"),l=o(e,"[[Get]]")||o(e,"[[Set]]");if(n&&l)throw new r("Property Descriptors may not be both accessor and data descriptors");return!0}},359:function(e,t,n){"use strict";var r=n(9429),o=n(2527),i=n(6156);e.exports=function(e){return!!e&&"object"==typeof e&&r(e,"[[Object]]")&&r(e,"[[CachedBufferByteLength]]")&&(i(e["[[CachedBufferByteLength]]"])&&e["[[CachedBufferByteLength]]"]>=0||"DETACHED"===e["[[CachedBufferByteLength]]"])&&o(e["[[Object]]"])}},9660:function(e,t,n){"use strict";var r=n(682),o={__proto__:null,$Int8Array:r("%Int8Array%",!0),$Uint8Array:r("%Uint8Array%",!0),$Uint8ClampedArray:r("%Uint8ClampedArray%",!0),$Int16Array:r("%Int16Array%",!0),$Uint16Array:r("%Uint16Array%",!0),$Int32Array:r("%Int32Array%",!0),$Uint32Array:r("%Uint32Array%",!0),$BigInt64Array:r("%BigInt64Array%",!0),$BigUint64Array:r("%BigUint64Array%",!0),$Float32Array:r("%Float32Array%",!0),$Float64Array:r("%Float64Array%",!0)};e.exports=function(e){return o["$"+e]}},3647:function(e,t,n){"use strict";var r=n(682),o=r("%Math.abs%"),i=r("%Math.floor%"),l=r("%Math.pow%"),a=n(7991),s=n(9404),c=n(2745);e.exports=function(e,t){if(s(e))return t?[0,0,192,127]:[127,192,0,0];var n;if(0===e)return n=c(e)?128:0,t?[0,0,0,n]:[n,0,0,0];if(o(e)>34028234663852886e22||!a(e))return n=e<0?255:127,t?[0,0,128,n]:[n,128,0,0];var r=e<0?1:0;e=o(e);for(var u=0;e>=2;)u+=1,e/=2;for(;e<1;)u-=1,e*=2;var p=e-1;p*=l(2,23)+.5,u+=127;var d=r<<31|(u<<=23)|(p=i(p)),f=255&d,y=255&(d>>=8),m=255&(d>>=8),g=255&(d>>=8);return t?[f,y,m,g]:[g,m,y,f]}},7511:function(e,t,n){"use strict";var r=n(682),o=r("%parseInt%"),i=r("%Math.abs%"),l=r("%Math.floor%"),a=n(1154),s=a("String.prototype.indexOf"),c=a("String.prototype.slice"),u=n(1211),p=n(20),d=n(2745),f=1023,y="11111111111",m="00000000000",g="000000000000000000000000000000000000000000000000000";e.exports=function(e,t){var n,r,a=e<0||d(e)?"1":"0";if(isNaN(e))n=y,r="1"+g;else if(isFinite(e))if(0===e)n=m,r="0"+g;else{e=i(e);var h,b=l(e),v=p(b),_=u(e-b);if(v)n=v.length-1;else{var k=s(_,"1");k>-1&&(h=k+1),n=-h}r=v+_,n<0?(n<=-1023&&(h=1022),r=c(r,h)):r=c(r,1),n=c(m+p(n+f),-11),r=c(r+g+"0",0,52)}else n=y,r="0"+g;for(var S=a+n+r,E=[],w=0;w<8;w++){E[t?8-w-1:w]=o(c(S,8*w,8*(w+1)),2)}return E}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){"use strict";n.r(r),n.d(r,{AlignmentControl:function(){return uv},AlignmentToolbar:function(){return pv},Autocomplete:function(){return kv},BlockAlignmentControl:function(){return Oi},BlockAlignmentToolbar:function(){return Ri},BlockBreadcrumb:function(){return Iv},BlockColorsStyleSelector:function(){return Tv},BlockContextProvider:function(){return $i},BlockControls:function(){return br},BlockEdit:function(){return Yi},BlockEditorKeyboardShortcuts:function(){return LE},BlockEditorProvider:function(){return Pu},BlockFormatControls:function(){return hr},BlockIcon:function(){return Au},BlockInspector:function(){return OE},BlockList:function(){return Wm},BlockMover:function(){return qf},BlockNavigationDropdown:function(){return t_},BlockPreview:function(){return sd},BlockSelectionClearer:function(){return Ru},BlockSettingsMenu:function(){return am},BlockSettingsMenuControls:function(){return nm},BlockStyles:function(){return l_},BlockTitle:function(){return Ff},BlockToolbar:function(){return gm},BlockTools:function(){return NE},BlockVerticalAlignmentControl:function(){return qo},BlockVerticalAlignmentToolbar:function(){return Jo},ButtonBlockAppender:function(){return Ef},ButtonBlockerAppender:function(){return Sf},ColorPalette:function(){return w_},ColorPaletteControl:function(){return A_},ContrastChecker:function(){return jg},CopyHandler:function(){return Dy},DefaultBlockAppender:function(){return _f},FontSizePicker:function(){return xh},InnerBlocks:function(){return zm},Inserter:function(){return vf},InspectorAdvancedControls:function(){return mo},InspectorControls:function(){return go},JustifyContentControl:function(){return Zo},JustifyToolbar:function(){return Xo},LineHeightControl:function(){return uh},MediaPlaceholder:function(){return vS},MediaReplaceFlow:function(){return fS},MediaUpload:function(){return cS},MediaUploadCheck:function(){return uS},MultiSelectScrollIntoView:function(){return UE},NavigableToolbar:function(){return Zf},ObserveTyping:function(){return GE},PanelColorSettings:function(){return _S},PlainText:function(){return eE},RichText:function(){return QS},RichTextShortcut:function(){return rE},RichTextToolbarButton:function(){return oE},SETTINGS_DEFAULTS:function(){return h},SkipToSelectedBlock:function(){return SE},ToolSelector:function(){return aE},Typewriter:function(){return KE},URLInput:function(){return Ak},URLInputButton:function(){return pE},URLPopover:function(){return gS},Warning:function(){return Zi},WritingFlow:function(){return Ku},__experimentalBlockAlignmentMatrixControl:function(){return Av},__experimentalBlockFullHeightAligmentControl:function(){return Ev},__experimentalBlockPatternSetup:function(){return v_},__experimentalBlockPatternsList:function(){return Pd},__experimentalBlockVariationPicker:function(){return s_},__experimentalBlockVariationTransforms:function(){return S_},__experimentalBorderRadiusControl:function(){return ig},__experimentalColorGradientControl:function(){return Fg},__experimentalColorGradientSettingsDropdown:function(){return Ug},__experimentalDateFormatPicker:function(){return x_},__experimentalDuotoneControl:function(){return Eb},__experimentalFontAppearanceControl:function(){return ah},__experimentalFontFamilyControl:function(){return _h},__experimentalGetBorderClassesAndStyles:function(){return zb},__experimentalGetColorClassesAndStyles:function(){return Gb},__experimentalGetElementClassName:function(){return tw},__experimentalGetGapCSSValue:function(){return Uo},__experimentalGetGradientClass:function(){return wg},__experimentalGetGradientObjectByGradientValue:function(){return Cg},__experimentalGetMatchingVariation:function(){return rw},__experimentalGetSpacingClassesAndStyles:function(){return $b},__experimentalImageEditingProvider:function(){return ok},__experimentalImageEditor:function(){return yk},__experimentalImageSizeControl:function(){return hk},__experimentalImageURLInputUI:function(){return vE},__experimentalInspectorPopoverHeader:function(){return ZE},__experimentalLayoutStyle:function(){return ki},__experimentalLetterSpacingControl:function(){return ib},__experimentalLibrary:function(){return ME},__experimentalLinkControl:function(){return iS},__experimentalLinkControlSearchInput:function(){return qk},__experimentalLinkControlSearchItem:function(){return Nk},__experimentalLinkControlSearchResults:function(){return jk},__experimentalListView:function(){return Xv},__experimentalPanelColorGradientSettings:function(){return N_},__experimentalPreviewOptions:function(){return _E},__experimentalPublishDateTimePicker:function(){return XE},__experimentalRecursionProvider:function(){return JE},__experimentalResponsiveBlockControl:function(){return nE},__experimentalSpacingSizesControl:function(){return no},__experimentalTextDecorationControl:function(){return Kh},__experimentalTextTransformControl:function(){return tb},__experimentalUnitControl:function(){return sE},__experimentalUseBlockOverlayActive:function(){return fu},__experimentalUseBlockPreview:function(){return cd},__experimentalUseBorderProps:function(){return Vb},__experimentalUseColorProps:function(){return Wb},__experimentalUseCustomSides:function(){return Fo},__experimentalUseGradient:function(){return xg},__experimentalUseHasRecursion:function(){return YE},__experimentalUseMultipleOriginColorsAndGradients:function(){return pg},__experimentalUseResizeCanvas:function(){return kE},__experimentaluseLayoutClasses:function(){return Tb},__experimentaluseLayoutStyles:function(){return Ob},__unstableBlockNameContext:function(){return mm},__unstableBlockSettingsMenuFirstItem:function(){return Hy},__unstableBlockToolbarLastItem:function(){return Ty},__unstableDuotoneFilter:function(){return rd},__unstableDuotoneStylesheet:function(){return td},__unstableDuotoneUnsetStylesheet:function(){return nd},__unstableEditorStyles:function(){return Xp},__unstableGetValuesFromColors:function(){return ed},__unstableIframe:function(){return Yu},__unstableInserterMenuExtension:function(){return sf},__unstablePresetDuotoneFilter:function(){return od},__unstableRichTextInputEvent:function(){return iE},__unstableUseBlockSelectionClearer:function(){return Ou},__unstableUseClipboardHandler:function(){return My},__unstableUseMouseMoveTypingReset:function(){return zE},__unstableUseTypewriter:function(){return $E},__unstableUseTypingObserver:function(){return VE},createCustomColorsHOC:function(){return Xb},getColorClassName:function(){return cg},getColorObjectByAttributeValues:function(){return ag},getColorObjectByColorValue:function(){return sg},getComputedFluidTypographyValue:function(){return Nh},getFontSize:function(){return Ah},getFontSizeClass:function(){return Ih},getFontSizeObjectByValue:function(){return Ch},getGradientSlugByValue:function(){return Ig},getGradientValueBySlug:function(){return Ag},getPxFromCssUnit:function(){return fw},getTypographyClassesAndStyles:function(){return Kb},store:function(){return sr},storeConfig:function(){return ar},transformStyles:function(){return Yp},useBlockDisplayInformation:function(){return Rf},useBlockEditContext:function(){return dr},useBlockProps:function(){return yu},useCachedTruthy:function(){return qb},useInnerBlocksProps:function(){return jm},useSetting:function(){return Kr},withColorContext:function(){return E_},withColors:function(){return ev},withFontSizes:function(){return rv}});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:function(){return jt},__experimentalGetAllowedBlocks:function(){return vt},__experimentalGetAllowedPatterns:function(){return Et},__experimentalGetBlockListSettingsForBlocks:function(){return Bt},__experimentalGetDirectInsertBlock:function(){return _t},__experimentalGetGlobalBlocksByName:function(){return ee},__experimentalGetLastBlockAttributeChanges:function(){return Ot},__experimentalGetParsedPattern:function(){return kt},__experimentalGetPatternTransformItems:function(){return At},__experimentalGetPatternsByBlockTypes:function(){return wt},__experimentalGetReusableBlockTitle:function(){return Pt},__unstableGetBlockWithoutInnerBlocks:function(){return K},__unstableGetClientIdWithClientIdsTree:function(){return J},__unstableGetClientIdsTree:function(){return Y},__unstableGetContentLockingParent:function(){return Ht},__unstableGetEditorMode:function(){return Ft},__unstableGetSelectedBlocksWithPartialSelection:function(){return Ne},__unstableGetTemporarilyEditingAsBlocks:function(){return Wt},__unstableGetVisibleBlocks:function(){return Gt},__unstableHasActiveBlockOverlayActive:function(){return $t},__unstableIsFullySelected:function(){return Pe},__unstableIsLastBlockChangeIgnored:function(){return Tt},__unstableIsSelectionCollapsed:function(){return Te},__unstableIsSelectionMergeable:function(){return Re},__unstableIsWithinBlockOverlay:function(){return Kt},__unstableSelectionHasUnmergeableBlock:function(){return Oe},areInnerBlocksControlled:function(){return Ut},canEditBlock:function(){return ct},canInsertBlockType:function(){return rt},canInsertBlocks:function(){return ot},canLockBlockType:function(){return ut},canMoveBlock:function(){return at},canMoveBlocks:function(){return st},canRemoveBlock:function(){return it},canRemoveBlocks:function(){return lt},didAutomaticChange:function(){return Dt},getAdjacentBlockClientId:function(){return ge},getBlock:function(){return $},getBlockAttributes:function(){return W},getBlockCount:function(){return ne},getBlockHierarchyRootClientId:function(){return ye},getBlockIndex:function(){return Me},getBlockInsertionPoint:function(){return Ye},getBlockListSettings:function(){return Ct},getBlockMode:function(){return Ge},getBlockName:function(){return G},getBlockOrder:function(){return Fe},getBlockParents:function(){return de},getBlockParentsByBlockName:function(){return fe},getBlockRootClientId:function(){return pe},getBlockSelectionEnd:function(){return le},getBlockSelectionStart:function(){return ie},getBlockTransformItems:function(){return ht},getBlocks:function(){return q},getBlocksByClientId:function(){return te},getClientIdsOfDescendants:function(){return Q},getClientIdsWithDescendants:function(){return Z},getDraggedBlockClientIds:function(){return $e},getFirstMultiSelectedBlockClientId:function(){return Ee},getGlobalBlockCount:function(){return X},getInserterItems:function(){return gt},getLastMultiSelectedBlockClientId:function(){return we},getLowestCommonAncestorWithSelectedBlock:function(){return me},getMultiSelectedBlockClientIds:function(){return ke},getMultiSelectedBlocks:function(){return Se},getMultiSelectedBlocksEndClientId:function(){return Be},getMultiSelectedBlocksStartClientId:function(){return xe},getNextBlockClientId:function(){return be},getPreviousBlockClientId:function(){return he},getSelectedBlock:function(){return ue},getSelectedBlockClientId:function(){return ce},getSelectedBlockClientIds:function(){return _e},getSelectedBlockCount:function(){return ae},getSelectedBlocksInitialCaretPosition:function(){return ve},getSelectionEnd:function(){return oe},getSelectionStart:function(){return re},getSettings:function(){return It},getTemplate:function(){return Xe},getTemplateLock:function(){return et},hasBlockMovingClientId:function(){return Mt},hasInserterItems:function(){return bt},hasMultiSelection:function(){return je},hasSelectedBlock:function(){return se},hasSelectedInnerBlock:function(){return Le},isAncestorBeingDragged:function(){return qe},isAncestorMultiSelected:function(){return Ie},isBlockBeingDragged:function(){return Ke},isBlockHighlighted:function(){return Lt},isBlockInsertionPointVisible:function(){return Qe},isBlockMultiSelected:function(){return Ce},isBlockSelected:function(){return De},isBlockValid:function(){return H},isBlockVisible:function(){return Vt},isBlockWithinSelection:function(){return Ue},isCaretWithinFormattedText:function(){return Je},isDraggingBlocks:function(){return We},isFirstMultiSelectedBlock:function(){return Ae},isLastBlockChangePersistent:function(){return xt},isMultiSelecting:function(){return ze},isNavigationMode:function(){return Nt},isSelectionEnabled:function(){return Ve},isTyping:function(){return He},isValidTemplate:function(){return Ze},wasBlockJustInserted:function(){return zt}});var t={};n.r(t),n.d(t,{__unstableDeleteSelection:function(){return In},__unstableExpandSelection:function(){return Bn},__unstableMarkAutomaticChange:function(){return qn},__unstableMarkLastChangeAsPersistent:function(){return $n},__unstableMarkNextChangeAsNotPersistent:function(){return Kn},__unstableSaveReusableBlock:function(){return Wn},__unstableSetEditorMode:function(){return Yn},__unstableSetTemporarilyEditingAsBlocks:function(){return ir},__unstableSplitSelection:function(){return xn},clearSelectedBlock:function(){return pn},duplicateBlocks:function(){return Zn},enterFormattedText:function(){return Un},exitFormattedText:function(){return jn},flashBlock:function(){return nr},hideInsertionPoint:function(){return wn},insertAfterBlock:function(){return er},insertBeforeBlock:function(){return Xn},insertBlock:function(){return kn},insertBlocks:function(){return Sn},insertDefaultBlock:function(){return Vn},mergeBlocks:function(){return Pn},moveBlockToPosition:function(){return _n},moveBlocksDown:function(){return hn},moveBlocksToPosition:function(){return vn},moveBlocksUp:function(){return bn},multiSelect:function(){return un},receiveBlocks:function(){return tn},removeBlock:function(){return On},removeBlocks:function(){return Tn},replaceBlock:function(){return mn},replaceBlocks:function(){return yn},replaceInnerBlocks:function(){return Rn},resetBlocks:function(){return Zt},resetSelection:function(){return en},selectBlock:function(){return on},selectNextBlock:function(){return an},selectPreviousBlock:function(){return ln},selectionChange:function(){return zn},setBlockMovingClientId:function(){return Qn},setBlockVisibility:function(){return or},setHasControlledInnerBlocks:function(){return rr},setNavigationMode:function(){return Jn},setTemplateValidity:function(){return An},showInsertionPoint:function(){return En},startDraggingBlocks:function(){return Dn},startMultiSelect:function(){return sn},startTyping:function(){return Fn},stopDraggingBlocks:function(){return Ln},stopMultiSelect:function(){return cn},stopTyping:function(){return Mn},synchronizeTemplate:function(){return Cn},toggleBlockHighlight:function(){return tr},toggleBlockMode:function(){return Nn},toggleSelection:function(){return dn},updateBlock:function(){return rn},updateBlockAttributes:function(){return nn},updateBlockListSettings:function(){return Gn},updateSettings:function(){return Hn},validateBlocksToTemplate:function(){return Xt}});var o=window.wp.blocks,i=window.wp.hooks;function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:1;const o=[...e];return o.splice(t,r),b(o,e.slice(t,t+r),n)}const _=e=>e;function k(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n={[t]:[]};return e.forEach((e=>{const{clientId:r,innerBlocks:o}=e;n[t].push(r),Object.assign(n,k(o,r))})),n}function S(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce(((e,n)=>Object.assign(e,{[n.clientId]:t},S(n.innerBlocks,n.clientId))),{})}function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_;const n={},r=[...e];for(;r.length;){const{innerBlocks:e,...o}=r.shift();r.push(...e),n[o.clientId]=t(o)}return n}function w(e){return E(e,(e=>(0,u.omit)(e,"attributes")))}function A(e){return E(e,(e=>e.attributes))}function C(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&(0,u.isEqual)(e.clientIds,t.clientIds)&&function(e,t){return(0,u.isEqual)(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function I(e,t){const n={},r=[...t],o=[...t];for(;r.length;){const e=r.shift();r.push(...e.innerBlocks),o.push(...e.innerBlocks)}for(const e of o)n[e.clientId]={};for(const t of o)n[t.clientId]=Object.assign(n[t.clientId],{...e.byClientId[t.clientId],attributes:e.attributes[t.clientId],innerBlocks:t.innerBlocks.map((e=>n[e.clientId]))});return n}function x(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=new Set([]),i=new Set;for(const t of n){let n=r?t:e.parents[t];do{if(e.controlledInnerBlocks[n]){i.add(n);break}o.add(n),n=e.parents[n]}while(void 0!==n)}for(const e of o)t[e]={...t[e]};for(const n of o)t[n].innerBlocks=(e.order[n]||[]).map((e=>t[e]));for(const n of i)t["controlled||"+n]={innerBlocks:(e.order[n]||[]).map((e=>t[e]))};return t}const B=(0,u.flow)(d.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:r}=n;if(e===r)return t;(t={...t}).attributes=(0,u.mapValues)(t.attributes,((n,o)=>{const{name:i}=t.byClientId[o];return"core/block"===i&&n.ref===e?{...n,ref:r}:n}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const r=e(t,n);if(r===t)return t;switch(r.tree=t.tree?t.tree:{},n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=I(r,n.blocks);r.tree=x(r,{...r.tree,...e},n.rootClientId?[n.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":r.tree=x(r,{...r.tree,[n.clientId]:{...r.tree[n.clientId],...r.byClientId[n.clientId],attributes:r.attributes[n.clientId]}},[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":{const e=n.clientIds.reduce(((e,t)=>(e[t]={...r.tree[t],attributes:r.attributes[t]},e)),{});r.tree=x(r,{...r.tree,...e},n.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=I(r,n.blocks);r.tree=x(r,{...(0,u.omit)(r.tree,n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e)))),...e},n.blocks.map((e=>e.clientId)),!1);const o=[];for(const e of n.clientIds)void 0===t.parents[e]||""!==t.parents[e]&&!r.byClientId[t.parents[e]]||o.push(t.parents[e]);r.tree=x(r,r.tree,o,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const o of n.clientIds)void 0===t.parents[o]||""!==t.parents[o]&&!r.byClientId[t.parents[o]]||e.push(t.parents[o]);r.tree=x(r,(0,u.omit)(r.tree,n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e)))),e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId?e.push(n.fromRootClientId):e.push(""),n.toRootClientId&&e.push(n.toRootClientId),r.tree=x(r,r.tree,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];r.tree=x(r,r.tree,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=Object.keys((0,u.omitBy)(r.attributes,((e,t)=>"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId)));r.tree=x(r,{...r.tree,...e.reduce(((e,t)=>(e[t]={...r.byClientId[t],attributes:r.attributes[t],innerBlocks:r.tree[t].innerBlocks},e)),{})},e,!1)}}return r}),(e=>(t,n)=>{const r=e=>{let r=e;for(let o=0;o(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const r={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...o}=e.shift();e.push(...n),t.controlledInnerBlocks[o.clientId]&&(r[o.clientId]=!0)}}let o=t;t.order[n.rootClientId]&&(o=e(o,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order[n.rootClientId]}));let i=o;return n.blocks.length&&(i=e(i,{...n,type:"INSERT_BLOCKS",index:0}),i.order={...i.order,...(0,u.reduce)(r,((e,n,r)=>(t.order[r]&&(e[r]=t.order[r]),e)),{})},i.tree={...i.tree,...(0,u.reduce)(r,((e,n,r)=>{const o=`controlled||${r}`;return t.tree[o]&&(e[o]=t.tree[o]),e}),{})}),i}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:w(n.blocks),attributes:A(n.blocks),order:k(n.blocks),parents:S(n.blocks),controlledInnerBlocks:{},visibility:{}},r=I(e,n.blocks);return e.tree={...r,"":{innerBlocks:n.blocks.map((e=>r[e.clientId]))}},e}return e(t,n)}),(function(e){let t,n=!1;return(r,o)=>{let i=e(r,o);const l="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===i&&!l){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;const e=null===(a=null==r?void 0:r.isPersistentChange)||void 0===a||a;return r.isPersistentChange===e?r:{...i,isPersistentChange:e}}return i={...i,isPersistentChange:l?!n:!C(o,t)},t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,i}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,r)=>{const o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const r=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(r,n)}return e(t,n)}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...w(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=(0,u.omit)(t.updates,"attributes");return(0,u.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...w(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...A(t.blocks)};case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?{...e,[t.clientId]:{...e[t.clientId],...t.updates.attributes}}:e;case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e[t])))return e;const n=t.clientIds.reduce(((n,r)=>({...n,[r]:(0,u.reduce)(t.uniqueByBlock?t.attributes[r]:t.attributes,((t,n,o)=>{var i,l;return n!==t[o]&&((t=(i=e[r])===(l=t)?{...i}:l)[o]=n),t}),e[r])})),{});return t.clientIds.every((t=>n[t]===e[t]))?e:{...e,...n}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...A(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=k(t.blocks);return{...e,...(0,u.omit)(n,""),"":((null==e?void 0:e[""])||[]).concat(n[""])}}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,r=e[n]||[],o=k(t.blocks,n),{index:i=r.length}=t;return{...e,...o,[n]:b(r,o[n],i)}}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:r="",clientIds:o}=t,{index:i=e[r].length}=t;if(n===r){const t=e[r].indexOf(o[0]);return{...e,[r]:v(e[r],t,i,o.length)}}return{...e,[n]:(0,u.without)(e[n],...o),[r]:b(e[r],o,i)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:r=""}=t,o=n[0],i=e[r];if(!i.length||o===i[0])return e;const l=i.indexOf(o);return{...e,[r]:v(i,l,l-1,n.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:r=""}=t,o=n[0],i=n[n.length-1],l=e[r];if(!l.length||i===l[l.length-1])return e;const a=l.indexOf(o);return{...e,[r]:v(l,a,a+1,n.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const r=k(t.blocks);return(0,u.flow)([e=>(0,u.omit)(e,t.replacedClientIds),e=>({...e,...(0,u.omit)(r,"")}),e=>(0,u.mapValues)(e,(e=>(0,u.reduce)(e,((e,t)=>t===n[0]?[...e,...r[""]]:(-1===n.indexOf(t)&&e.push(t),e)),[])))])(e)}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.flow)([e=>(0,u.omit)(e,t.removedClientIds),e=>(0,u.mapValues)(e,(e=>(0,u.without)(e,...t.removedClientIds)))])(e)}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":return{...e,...S(t.blocks)};case"INSERT_BLOCKS":return{...e,...S(t.blocks,t.rootClientId||"")};case"MOVE_BLOCKS_TO_POSITION":return{...e,...t.clientIds.reduce(((e,n)=>(e[n]=t.toRootClientId||"",e)),{})};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return{...(0,u.omit)(e,t.replacedClientIds),...S(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:r}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:r}:e},visibility(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e}});function P(){let 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;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}var T=(0,d.combineReducers)({blocks:B,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(){var e,t,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;switch(i.type){case"SELECTION_CHANGE":return i.clientId?{selectionStart:{clientId:i.clientId,attributeKey:i.attributeKey,offset:i.startOffset},selectionEnd:{clientId:i.clientId,attributeKey:i.attributeKey,offset:i.endOffset}}:{selectionStart:i.start||o.selectionStart,selectionEnd:i.end||o.selectionEnd};case"RESET_SELECTION":const{selectionStart:l,selectionEnd:a}=i;return{selectionStart:l,selectionEnd:a};case"MULTI_SELECT":const{start:s,end:c}=i;return s===(null===(e=o.selectionStart)||void 0===e?void 0:e.clientId)&&c===(null===(t=o.selectionEnd)||void 0===t?void 0:t.clientId)?o:{selectionStart:{clientId:s},selectionEnd:{clientId:c}};case"RESET_BLOCKS":const u=null==o||null===(n=o.selectionStart)||void 0===n?void 0:n.clientId,p=null==o||null===(r=o.selectionEnd)||void 0===r?void 0:r.clientId;if(!u&&!p)return o;if(!i.blocks.some((e=>e.clientId===u)))return{selectionStart:{},selectionEnd:{}};if(!i.blocks.some((e=>e.clientId===p)))return{...o,selectionEnd:o.selectionStart}}return{selectionStart:P(o.selectionStart,i),selectionEnd:P(o.selectionEnd,i)}},isMultiSelecting:function(){let 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(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let 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(0,u.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?(0,u.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?(0,u.omit)(e,n):e}}return e},insertionPoint:function(){let 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":const{rootClientId:e,index:n,__unstableWithInserter:r}=t;return{rootClientId:e,index:n,__unstableWithInserter:r};case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,t=arguments.length>1?arguments[1]:void 0;return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:r,name:i}=n,l=(0,d.select)(o.store).getActiveBlockVariation(i,r);let a=null!=l&&l.name?`${i}/${l.name}`:i;const s={name:a};return"core/block"===i&&(s.ref=r.ref,a+="/"+r.ref),{...e,insertUsage:{...e.insertUsage,[a]:{time:t.time,count:e.insertUsage[a]?e.insertUsage[a].count+1:1,insert:s}}}}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return null},editorMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"edit",t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"===t.type&&"navigation"===e?"edit":"SET_EDITOR_MODE"===t.type?t.mode:e},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_EDITOR_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"SET_BLOCK_VISIBILITY":case"START_TYPING":case"STOP_TYPING":case"UPDATE_BLOCK_LIST_SETTINGS":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:r}=t;return r?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":if(!n.blocks.length)return t;return{clientId:n.blocks[0].clientId,source:null===(e=n.meta)||void 0===e?void 0:e.source};case"RESET_BLOCKS":return{}}return t},temporarilyEditingAsBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e}}),O={};function R(e){return[e]}function N(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r{const n=e.blocks.byClientId[t];return n?{...n,attributes:W(e,t)}:null}),((e,t)=>[e.blocks.byClientId[t],e.blocks.attributes[t]]));function q(e,t){var n;const r=t&&Ut(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree[r])||void 0===n?void 0:n.innerBlocks)||V}const J=F(((e,t)=>({clientId:t,innerBlocks:Y(e,t)})),(e=>[e.blocks.order])),Y=F((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(Fe(e,t),(t=>J(e,t)))}),(e=>[e.blocks.order])),Q=F(((e,t)=>{const n=[];for(const r of t)for(const t of Fe(e,r))n.push(t,...Q(e,[t]));return n}),(e=>[e.blocks.order])),Z=F((e=>{const t=[];for(const n of Fe(e))t.push(n,...Q(e,[n]));return t}),(e=>[e.blocks.order])),X=F(((e,t)=>{const n=Z(e);return t?(0,u.reduce)(n,((n,r)=>e.blocks.byClientId[r].name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),ee=F(((e,t)=>{if(!t)return V;const n=Z(e).filter((n=>e.blocks.byClientId[n].name===t));return n.length>0?n:V}),(e=>[e.blocks.order,e.blocks.byClientId])),te=F(((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>$(e,t)))),((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>e.blocks.tree[t]))));function ne(e,t){return Fe(e,t).length}function re(e){return e.selection.selectionStart}function oe(e){return e.selection.selectionEnd}function ie(e){return e.selection.selectionStart.clientId}function le(e){return e.selection.selectionEnd.clientId}function ae(e){const t=ke(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function se(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function ce(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:r}=t;return r&&r===n.clientId?r:null}function ue(e){const t=ce(e);return t?$(e,t):null}function pe(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const de=F((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[];let o=t;for(;e.blocks.parents[o];)o=e.blocks.parents[o],r.push(o);return n?r:r.reverse()}),(e=>[e.blocks.parents])),fe=F((function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=de(e,t,r);return(0,u.map)((0,u.filter)((0,u.map)(o,(t=>({id:t,name:G(e,t)}))),(e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})),(e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function ye(e,t){let n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function me(e,t){const n=ce(e),r=[...de(e,t),t],o=[...de(e,n),n];let i;const l=Math.min(r.length,o.length);for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=ce(e)),void 0===t&&(t=n<0?Ee(e):we(e)),!t)return null;const r=pe(e,t);if(null===r)return null;const{order:o}=e.blocks,i=o[r],l=i.indexOf(t),a=l+1*n;return a<0||a===i.length?null:i[a]}function he(e,t){return ge(e,t,-1)}function be(e,t){return ge(e,t,1)}function ve(e){return e.initialPosition}const _e=F((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return V;if(t.clientId===n.clientId)return[t.clientId];const r=pe(e,t.clientId);if(null===r)return V;const o=Fe(e,r),i=o.indexOf(t.clientId),l=o.indexOf(n.clientId);return i>l?o.slice(l,i+1):o.slice(i,l+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function ke(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?V:_e(e)}const Se=F((e=>{const t=ke(e);return t.length?t.map((t=>$(e,t))):V}),(e=>[..._e.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Ee(e){return ke(e)[0]||null}function we(e){const t=ke(e);return t[t.length-1]||null}function Ae(e,t){return Ee(e)===t}function Ce(e,t){return-1!==ke(e).indexOf(t)}const Ie=F(((e,t)=>{let n=t,r=!1;for(;n&&!r;)n=pe(e,n),r=Ce(e,n);return r}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function xe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Be(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Pe(e){const t=re(e),n=oe(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function Te(e){const t=re(e),n=oe(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function Oe(e){return _e(e).some((t=>{const n=G(e,t);return!(0,o.getBlockType)(n).merge}))}function Re(e,t){const n=re(e),r=oe(e);if(n.clientId===r.clientId)return!1;if(!n.attributeKey||!r.attributeKey||void 0===n.offset||void 0===r.offset)return!1;const i=pe(e,n.clientId);if(i!==pe(e,r.clientId))return!1;const l=Fe(e,i);let a,s;l.indexOf(n.clientId)>l.indexOf(r.clientId)?(a=r,s=n):(a=n,s=r);const c=t?s.clientId:a.clientId,u=t?a.clientId:s.clientId,p=G(e,c);if(!(0,o.getBlockType)(p).merge)return!1;const d=$(e,u);if(d.name===p)return!0;const f=(0,o.switchToBlockType)(d,p);return f&&f.length}const Ne=e=>{const t=re(e),n=oe(e);if(t.clientId===n.clientId)return V;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return V;const r=pe(e,t.clientId);if(r!==pe(e,n.clientId))return V;const i=Fe(e,r),l=i.indexOf(t.clientId),a=i.indexOf(n.clientId),[s,c]=l>a?[n,t]:[t,n],u=$(e,s.clientId),p=(0,o.getBlockType)(u.name),d=$(e,c.clientId),f=(0,o.getBlockType)(d.name),y=u.attributes[s.attributeKey],m=d.attributes[c.attributeKey],g=p.attributes[s.attributeKey],h=f.attributes[c.attributeKey];let b=(0,L.create)({html:y,...z(g)}),v=(0,L.create)({html:m,...z(h)});return b=(0,L.remove)(b,0,s.offset),v=(0,L.remove)(v,c.offset,v.text.length),[{...u,attributes:{...u.attributes,[s.attributeKey]:(0,L.toHTMLString)({value:b,...z(g)})}},{...d,attributes:{...d.attributes,[c.attributeKey]:(0,L.toHTMLString)({value:v,...z(h)})}}]};function Fe(e,t){return e.blocks.order[t||""]||V}function Me(e,t){return Fe(e,pe(e,t)).indexOf(t)}function De(e,t){const{selectionStart:n,selectionEnd:r}=e.selection;return n.clientId===r.clientId&&n.clientId===t}function Le(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,u.some)(Fe(e,t),(t=>De(e,t)||Ce(e,t)||n&&Le(e,t,n)))}function Ue(e,t){if(!t)return!1;const n=ke(e),r=n.indexOf(t);return r>-1&&rKe(e,t)))}function Je(){return j()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}function Ye(e){let t,n;const{insertionPoint:r,selection:{selectionEnd:o}}=e;if(null!==r)return r;const{clientId:i}=o;return i?(t=pe(e,i)||void 0,n=Me(e,o.clientId)+1):n=Fe(e).length,{rootClientId:t,index:n}}function Qe(e){return null!==e.insertionPoint}function Ze(e){return e.template.isValid}function Xe(e){return e.settings.template}function et(e,t){if(!t)return e.settings.templateLock;const n=Ct(e,t);return n?n.templateLock:void 0}const tt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},nt=function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=(0,o.getBlockType)(t),!n)return!1;const{allowedBlockTypes:l}=It(e),a=tt(l,t,!0);if(!a)return!1;const s=!!et(e,r);if(s)return!1;const c=Ct(e,r);if(r&&void 0===c)return!1;const p=null==c?void 0:c.allowedBlocks,d=tt(p,t),f=n.parent,y=G(e,r),m=tt(f,y);let g=!0;const h=n.ancestor;if(h){const t=[r,...de(e,r)];g=(0,u.some)(t,(t=>tt(h,G(e,t))))}const b=g&&(null===d&&null===m||!0===d||!0===m);return b?(0,i.applyFilters)("blockEditor.__unstableCanInsertBlockType",b,n,r,{getBlock:$.bind(null,e),getBlockParentsByBlockName:fe.bind(null,e)}):b},rt=F(nt,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]));function ot(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>rt(e,G(e,t),n)))}function it(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=W(e,t);if(null===r)return!0;const{lock:o}=r,i=!!et(e,n);return void 0===o||void 0===(null==o?void 0:o.remove)?!i:!(null!=o&&o.remove)}function lt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>it(e,t,n)))}function at(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=W(e,t);if(null===r)return;const{lock:o}=r,i="all"===et(e,n);return void 0===o||void 0===(null==o?void 0:o.move)?!i:!(null!=o&&o.move)}function st(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>at(e,t,n)))}function ct(e,t){const n=W(e,t);if(null===n)return!0;const{lock:r}=n;return!(null!=r&&r.edit)}function ut(e,t){var n;return!!(0,o.hasBlockSupport)(t,"lock",!0)&&!(null===(n=e.settings)||void 0===n||!n.canLockBlocks)}function pt(e,t){var n,r;return null!==(n=null===(r=e.preferences.insertUsage)||void 0===r?void 0:r[t])&&void 0!==n?n:null}const dt=(e,t,n)=>!!(0,o.hasBlockSupport)(t,"inserter",!0)&&nt(e,t.name,n),ft=(e,t)=>n=>{const r=`${t.id}/${n.name}`,{time:o,count:i=0}=pt(e,r)||{};return{...t,id:r,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:yt(o,i)}},yt=(e,t)=>{if(!e)return t;const 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}},mt=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const r=t.name;let i=!1;(0,o.hasBlockSupport)(t.name,"multiple",!0)||(i=(0,u.some)(te(e,Z(e)),{name:t.name}));const{time:l,count:a=0}=pt(e,r)||{},s={id:r,name:t.name,title:t.title,icon:t.icon,isDisabled:i,frecency:yt(l,a)};if("transform"===n)return s;const c=(0,o.getBlockVariations)(t.name,"inserter");return{...s,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:c,example:t.example,utility:1}}},gt=F((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=mt(e,{buildScope:"inserter"}),r=/^\s*)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,i=t=>{let n=D;if("web"===a.Platform.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(r);if(e){const[,,t="core/",r]=e,i=(0,o.getBlockType)(t+r);i&&(n=i.icon)}}const i=`core/block/${t.id}`,{time:l,count:s=0}=pt(e,i)||{},c=yt(l,s);return{id:i,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:c}},l=(0,o.getBlockTypes)().filter((n=>dt(e,n,t))).map(n),s=nt(e,"core/block",t)?Rt(e).map(i):[],c=l.reduce(((t,n)=>{const{variations:r=[]}=n;if(r.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),r.length){const o=ft(e,n);t.push(...r.map(o))}return t}),[]),u=(e,t)=>{const{core:n,noncore:r}=e;return(t.name.startsWith("core/")?n:r).push(t),e},{core:p,noncore:d}=c.reduce(u,{core:[],noncore:[]}),f=[...p,...d];return[...f,...s]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Rt(e),(0,o.getBlockTypes)()])),ht=F((function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const i=(0,u.castArray)(t),[l]=i,a=mt(e,{buildScope:"transform"}),s=(0,o.getBlockTypes)().filter((t=>dt(e,t,r))).map(a),c=Object.fromEntries(Object.entries(s).map((e=>{let[,t]=e;return[t.name,t]})));c["*"]={frecency:1/0,id:"*",isDisabled:!1,name:"*",title:(0,m.__)("Unwrap"),icon:null===(n=c[null==l?void 0:l.name])||void 0===n?void 0:n.icon};const p=(0,o.getPossibleBlockTransformations)(i).reduce(((e,t)=>("*"===t?e.push(c["*"]):c[null==t?void 0:t.name]&&e.push(c[t.name]),e)),[]);return(0,u.orderBy)(p,(e=>c[e.name].frecency),"desc")}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,o.getBlockTypes)()])),bt=F((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,u.some)((0,o.getBlockTypes)(),(n=>dt(e,n,t)));if(n)return!0;const r=nt(e,"core/block",t)&&Rt(e).length>0;return r}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Rt(e),(0,o.getBlockTypes)()])),vt=F((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,u.filter)((0,o.getBlockTypes)(),(n=>dt(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,o.getBlockTypes)()])),_t=F((function(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!r)return;const o=null===(t=e.blockListSettings[r])||void 0===t?void 0:t.__experimentalDefaultBlock,i=null===(n=e.blockListSettings[r])||void 0===n?void 0:n.__experimentalDirectInsert;return o&&i?"function"==typeof i?i($(e,r))?o:null:o:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree[t]])),kt=F(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:(0,o.parse)(n.content,{__unstableSkipMigrationLogs:!0})}:null}),(e=>[e.settings.__experimentalBlockPatterns])),St=F((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=It(e),r=t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return kt(e,n)})),o=r.filter((e=>{let{blocks:t}=e;return((e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){var r;const e=n.shift();if(!tt(t,e.name||e.blockName,!0))return!1;null===(r=e.innerBlocks)||void 0===r||r.forEach((e=>{n.push(e)}))}return!0})(t,n)}));return o}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),Et=F((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=St(e),r=(0,u.filter)(n,(n=>{let{blocks:r}=n;return r.every((n=>{let{name:r}=n;return rt(e,r,t)}))}));return r}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]])),wt=F((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return V;const r=Et(e,n),o=Array.isArray(t)?t:[t];return r.filter((e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,(e=>o.includes(e)))}))}),((e,t)=>[...Et.getDependants(e,t)])),At=F((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return V;if(t.some((t=>{let{clientId:n,innerBlocks:r}=t;return r.length||Ut(e,n)})))return V;const r=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return wt(e,r,n)}),((e,t)=>[...wt.getDependants(e,t)]));function Ct(e,t){return e.blockListSettings[t]}function It(e){return e.settings}function xt(e){return e.blocks.isPersistentChange}const Bt=F((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),Pt=F(((e,t)=>{var n;const r=(0,u.find)(Rt(e),(e=>e.id===t));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(e=>[Rt(e)]));function Tt(e){return e.blocks.isIgnoredChange}function Ot(e){return e.lastBlockAttributesChange}function Rt(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:V}function Nt(e){return"navigation"===e.editorMode}function Ft(e){return e.editorMode}function Mt(e){return e.hasBlockMovingClientId}function Dt(e){return!!e.automaticChangeStatus}function Lt(e,t){return e.highlightedBlock===t}function Ut(e,t){return!!e.blocks.controlledInnerBlocks[t]}const jt=F(((e,t)=>{if(!t.length)return null;const n=ce(e);if(t.includes(G(e,n)))return n;const r=ke(e),o=fe(e,n||r[0],t);return o?o[o.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function zt(e,t,n){const{lastBlockInserted:r}=e;return r.clientId===t&&r.source===n}function Vt(e,t){var n,r;return null===(n=null===(r=e.blocks.visibility)||void 0===r?void 0:r[t])||void 0===n||n}const Gt=F((e=>new Set(Object.keys(e.blocks.visibility).filter((t=>e.blocks.visibility[t])))),(e=>[e.blocks.visibility])),Ht=F(((e,t)=>{let n,r=t;for(;e.blocks.parents[r];)r=e.blocks.parents[r],"contentOnly"===et(e,r)&&(n=r);return n}),(e=>[e.blocks.parents,e.blockListSettings]));function Wt(e){return e.temporarilyEditingAsBlocks}function $t(e,t){if(!ct(e,t))return!0;const n=Ft(e);if("zoom-out"===n&&!pe(e,t))return!0;const r=(0,o.hasBlockSupport)(G(e,t),"__experimentalDisableBlockOverlay",!1);return("navigation"===n||!r&&Ut(e,t))&&!De(e,t)&&!Le(e,t,!0)}function Kt(e,t){let n=e.blocks.parents[t];for(;n;){if($t(e,n))return!0;n=e.blocks.parents[n]}return!1}var qt=window.wp.a11y;const Jt="†";function Yt(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return"string"==typeof n&&-1!==n.indexOf(Jt)}))}const Qt=e=>Array.isArray(e)?e:[e],Zt=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(Xt(e))},Xt=e=>t=>{let{select:n,dispatch:r}=t;const i=n.getTemplate(),l=n.getTemplateLock(),a=!i||"all"!==l||(0,o.doBlocksMatchTemplate)(e,i);if(a!==n.isValidTemplate())return r.setTemplateValidity(a),a};function en(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function tn(e){return j()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function nn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Qt(e),attributes:t,uniqueByBlock:n}}function rn(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function on(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const ln=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getPreviousBlockClientId(e);o&&r.selectBlock(o,-1)},an=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getNextBlockClientId(e);o&&r.selectBlock(o)};function sn(){return{type:"START_MULTI_SELECT"}}function cn(){return{type:"STOP_MULTI_SELECT"}}const un=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return r=>{let{select:o,dispatch:i}=r;if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;i({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const l=o.getSelectedBlockCount();(0,qt.speak)((0,m.sprintf)((0,m._n)("%s block selected.","%s blocks selected.",l),l),"assertive")}};function pn(){return{type:"CLEAR_SELECTED_BLOCK"}}function dn(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function fn(e,t){var n,r;const i=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!(0,o.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!i[n])return e;const r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=r&&r.includes("is-style-"))return e;const{attributes:l={}}=e,a=i[n];return{...e,attributes:{...l,className:`${r||""} is-style-${a}`.trim()}}}))}const yn=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0;return i=>{let{select:l,dispatch:a}=i;e=Qt(e),t=fn(Qt(t),l.getSettings());const s=l.getBlockRootClientId(e[0]);for(let e=0;e{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()}))}};function mn(e,t){return yn(e,t)}const gn=e=>(t,n)=>r=>{let{select:o,dispatch:i}=r;o.canMoveBlocks(t,n)&&i({type:e,clientIds:Qt(t),rootClientId:n})},hn=gn("MOVE_BLOCKS_DOWN"),bn=gn("MOVE_BLOCKS_UP"),vn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return o=>{let{select:i,dispatch:l}=o;if(i.canMoveBlocks(e,t)){if(t!==n){if(!i.canRemoveBlocks(e,t))return;if(!i.canInsertBlocks(e,n))return}l({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r})}}};function _n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return vn([e],t,n,r)}function kn(e,t,n,r,o){return Sn([e],t,n,r,0,o)}const Sn=function(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0;return l=>{let{select:a,dispatch:s}=l;null!==o&&"object"==typeof o&&(i=o,o=0,j()("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=fn(Qt(e),a.getSettings());const c=[];for(const t of e){a.canInsertBlockType(t.name,n)&&c.push(t)}c.length&&s({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,initialPosition:r?o:null,meta:i})}};function En(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:r}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:r}}function wn(){return{type:"HIDE_INSERTION_POINT"}}function An(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const Cn=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const r=t.getBlocks(),i=t.getTemplate(),l=(0,o.synchronizeBlocksWithTemplate)(r,i);n.resetBlocks(l)},In=e=>t=>{let{registry:n,select:r,dispatch:i}=t;const l=r.getSelectionStart(),a=r.getSelectionEnd();if(l.clientId===a.clientId)return;if(!l.attributeKey||!a.attributeKey||void 0===l.offset||void 0===a.offset)return!1;const s=r.getBlockRootClientId(l.clientId);if(s!==r.getBlockRootClientId(a.clientId))return;const c=r.getBlockOrder(s);let u,p;c.indexOf(l.clientId)>c.indexOf(a.clientId)?(u=a,p=l):(u=l,p=a);const d=e?p:u,f=r.getBlock(d.clientId),y=(0,o.getBlockType)(f.name);if(!y.merge)return;const m=u,g=p,h=r.getBlock(m.clientId),b=(0,o.getBlockType)(h.name),v=r.getBlock(g.clientId),_=(0,o.getBlockType)(v.name),k=h.attributes[m.attributeKey],S=v.attributes[g.attributeKey],E=b.attributes[m.attributeKey],w=_.attributes[g.attributeKey];let A=(0,L.create)({html:k,...z(E)}),C=(0,L.create)({html:S,...z(w)});A=(0,L.remove)(A,m.offset,A.text.length),C=(0,L.insert)(C,Jt,0,g.offset);const I=(0,o.cloneBlock)(h,{[m.attributeKey]:(0,L.toHTMLString)({value:A,...z(E)})}),x=(0,o.cloneBlock)(v,{[g.attributeKey]:(0,L.toHTMLString)({value:C,...z(w)})}),B=e?I:x,P=h.name===v.name?[B]:(0,o.switchToBlockType)(B,y.name);if(!P||!P.length)return;let T;if(e){const e=P.pop();T=y.merge(e.attributes,x.attributes)}else{const e=P.shift();T=y.merge(I.attributes,e.attributes)}const O=Yt(T),R=T[O],N=(0,L.create)({html:R,...z(y.attributes[O])}),F=N.text.indexOf(Jt),M=(0,L.remove)(N,F,F+1),D=(0,L.toHTMLString)({value:M,...z(y.attributes[O])});T[O]=D;const U=r.getSelectedBlockClientIds(),j=[...e?P:[],{...f,attributes:{...f.attributes,...T}},...e?[]:P];n.batch((()=>{i.selectionChange(f.clientId,O,F,F),i.replaceBlocks(U,j,0,r.getSelectedBlocksInitialCaretPosition())}))},xn=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),i=t.getSelectionEnd();if(r.clientId===i.clientId)return;if(!r.attributeKey||!i.attributeKey||void 0===r.offset||void 0===i.offset)return;const l=t.getBlockRootClientId(r.clientId);if(l!==t.getBlockRootClientId(i.clientId))return;const a=t.getBlockOrder(l);let s,c;a.indexOf(r.clientId)>a.indexOf(i.clientId)?(s=i,c=r):(s=r,c=i);const u=s,p=c,d=t.getBlock(u.clientId),f=(0,o.getBlockType)(d.name),y=t.getBlock(p.clientId),m=(0,o.getBlockType)(y.name),g=d.attributes[u.attributeKey],h=y.attributes[p.attributeKey],b=f.attributes[u.attributeKey],v=m.attributes[p.attributeKey];let _=(0,L.create)({html:g,...z(b)}),k=(0,L.create)({html:h,...z(v)});_=(0,L.remove)(_,u.offset,_.text.length),k=(0,L.remove)(k,0,p.offset),n.replaceBlocks(t.getSelectedBlockClientIds(),[{...d,attributes:{...d.attributes,[u.attributeKey]:(0,L.toHTMLString)({value:_,...z(b)})}},(0,o.createBlock)((0,o.getDefaultBlockName)()),{...y,attributes:{...y.attributes,[p.attributeKey]:(0,L.toHTMLString)({value:k,...z(v)})}}],1,t.getSelectedBlocksInitialCaretPosition())},Bn=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),o=t.getSelectionEnd();n.selectionChange({start:{clientId:r.clientId},end:{clientId:o.clientId}})},Pn=(e,t)=>n=>{let{registry:r,select:i,dispatch:l}=n;const a=[e,t];l({type:"MERGE_BLOCKS",blocks:a});const[s,c]=a,u=i.getBlock(s),p=(0,o.getBlockType)(u.name);if(!p)return;const d=i.getBlock(c);if(p&&!p.merge){const e=(0,o.switchToBlockType)(d,p.name);if(1!==(null==e?void 0:e.length))return void l.selectBlock(u.clientId);const[t]=e;return t.innerBlocks.length<1?void l.selectBlock(u.clientId):void r.batch((()=>{l.insertBlocks(t.innerBlocks,void 0,s),l.removeBlock(c),l.selectBlock(t.innerBlocks[0].clientId)}))}const f=(0,o.getBlockType)(d.name),{clientId:y,attributeKey:m,offset:g}=i.getSelectionStart(),h=(y===s?p:f).attributes[m],b=(y===s||y===c)&&void 0!==m&&void 0!==g&&!!h;h||("number"==typeof m?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 "+typeof m):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const v=(0,o.cloneBlock)(u),_=(0,o.cloneBlock)(d);if(b){const e=y===s?v:_,t=e.attributes[m],n=(0,L.insert)((0,L.create)({html:t,...z(h)}),Jt,g,g);e.attributes[m]=(0,L.toHTMLString)({value:n,...z(h)})}const k=u.name===d.name?[_]:(0,o.switchToBlockType)(_,u.name);if(!k||!k.length)return;const S=p.merge(v.attributes,k[0].attributes);if(b){const e=Yt(S),t=S[e],n=(0,L.create)({html:t,...z(p.attributes[e])}),r=n.text.indexOf(Jt),o=(0,L.remove)(n,r,r+1),i=(0,L.toHTMLString)({value:o,...z(p.attributes[e])});S[e]=i,l.selectionChange(u.clientId,e,r,r)}l.replaceBlocks([u.clientId,d.clientId],[{...u,attributes:{...u.attributes,...S}},...k.slice(1)],0)},Tn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:o}=n;if(!e||!e.length)return;e=Qt(e);const i=r.getBlockRootClientId(e[0]);r.canRemoveBlocks(e,i)&&(t&&o.selectPreviousBlock(e[0]),o({type:"REMOVE_BLOCKS",clientIds:e}),o((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()})))}};function On(e,t){return Tn([e],t)}function Rn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?r:null,time:Date.now()}}function Nn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Fn(){return{type:"START_TYPING"}}function Mn(){return{type:"STOP_TYPING"}}function Dn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Ln(){return{type:"STOP_DRAGGING_BLOCKS"}}function Un(){return j()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function jn(){return j()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function zn(e,t,n,r){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}:{type:"SELECTION_CHANGE",...e}}const Vn=(e,t,n)=>r=>{let{dispatch:i}=r;const l=(0,o.getDefaultBlockName)();if(!l)return;const a=(0,o.createBlock)(l,e);return i.insertBlock(a,n,t)};function Gn(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Hn(e){return{type:"UPDATE_SETTINGS",settings:e}}function Wn(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function $n(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Kn(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const qn=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},Jn=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n.__unstableSetEditorMode(e?"navigation":"edit")}},Yn=e=>t=>{let{dispatch:n,select:r}=t;if("zoom-out"===e){const e=r.getBlockSelectionStart();e&&n.selectBlock(r.getBlockHierarchyRootClientId(e))}n({type:"SET_EDITOR_MODE",mode:e}),"navigation"===e?(0,qt.speak)((0,m.__)("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.")):"edit"===e?(0,qt.speak)((0,m.__)("You are currently in edit mode. To return to the navigation mode, press Escape.")):"zoom-out"===e&&(0,qt.speak)((0,m.__)("You are currently in zoom-out mode."))},Qn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,qt.speak)((0,m.__)("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."))}},Zn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:i}=n;if(!e||!e.length)return;const l=r.getBlocksByClientId(e);if(l.some((e=>!e)))return;const a=l.map((e=>e.name));if(a.some((e=>!(0,o.hasBlockSupport)(e,"multiple",!0))))return;const s=r.getBlockRootClientId(e[0]),c=Qt(e),u=r.getBlockIndex(c[c.length-1]),p=l.map((e=>(0,o.__experimentalCloneSanitizedBlock)(e)));return i.insertBlocks(p,u+1,s,t),p.length>1&&t&&i.multiSelect(p[0].clientId,p[p.length-1].clientId),p.map((e=>e.clientId))}},Xn=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const i=n.getBlockIndex(e);return r.insertDefaultBlock({},o,i)},er=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const i=n.getBlockIndex(e);return r.insertDefaultBlock({},o,i+1)};function tr(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const nr=e=>async t=>{let{dispatch:n}=t;n(tr(e,!0)),await new Promise((e=>setTimeout(e,150))),n(tr(e,!1))};function rr(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function or(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function ir(e){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e}}const lr="core/block-editor",ar={reducer:T,selectors:e,actions:t},sr=(0,d.createReduxStore)(lr,{...ar,persist:["preferences"]});(0,d.registerStore)(lr,{...ar,persist:["preferences"]});const cr={name:"",isSelected:!1},ur=(0,a.createContext)(cr),{Provider:pr}=ur;function dr(){return(0,a.useContext)(ur)}function fr(){const{isSelected:e,clientId:t,name:n}=dr();return(0,d.useSelect)((r=>{if(e)return!0;const{getBlockName:o,isFirstMultiSelectedBlock:i,getMultiSelectedBlockClientIds:l}=r(sr);return!!i(t)&&l().every((e=>o(e)===n))}),[t,e,n])}function yr(e){let{group:t="default",controls:n,children:r,__experimentalShareWithChildBlocks:i=!1}=e;const l=function(e,t){const n=fr(),{clientId:r}=dr(),i=(0,d.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:i}=e(sr),{hasBlockSupport:l}=e(o.store);return t&&l(n(r),"__experimentalExposeControlsToChildren",!1)&&i(r)}),[t,r]);var l;return n?null===(l=y[e])||void 0===l?void 0:l.Fill:i?y.parent.Fill:null}(t,i);return l?(0,a.createElement)(f.__experimentalStyleProvider,{document:document},(0,a.createElement)(l,null,(e=>{const o=(0,u.isEmpty)(e)?null:e;return(0,a.createElement)(f.__experimentalToolbarContext.Provider,{value:o},"default"===t&&(0,a.createElement)(f.ToolbarGroup,{controls:n}),r)}))):null}function mr(e){let{group:t="default",...n}=e;const r=(0,a.useContext)(f.__experimentalToolbarContext),o=y[t].Slot,i=(0,f.__experimentalUseSlot)(o.__unstableName);return Boolean(i.fills&&i.fills.length)?"default"===t?(0,a.createElement)(o,l({},n,{bubblesVirtually:!0,fillProps:r})):(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(o,l({},n,{bubblesVirtually:!0,fillProps:r}))):null}const gr=yr;gr.Slot=mr;const hr=e=>(0,a.createElement)(yr,l({group:"inline"},e));hr.Slot=e=>(0,a.createElement)(mr,l({group:"inline"},e));var br=gr;var vr=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"}));var _r=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"}));var kr=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"}));var Sr=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"}));var Er=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M14.3 6.7l-1.1 1.1 4 4H4v1.5h13.3l-4.1 4.4 1.1 1.1 5.8-6.3z"}));var wr=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M16.2 13.2l-4 4V4h-1.5v13.3l-4.5-4.1-1 1.1 6.2 5.8 5.8-5.8-1-1.1z"}));function Ar(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e}${t?` ${t}`:""}`)).join(",")}function Cr(e,t,n,r){var o,i;let l="";return null!=t&&null!==(o=t[n])&&void 0!==o&&null!==(i=o.spacingStyles)&&void 0!==i&&i.length&&r&&t[n].spacingStyles.forEach((t=>{l+=`${Ar(e,t.selector.trim())} { `,l+=Object.entries(t.rules).map((e=>{let[t,n]=e;return`${t}: ${n||r}`})).join("; "),l+="; }"})),l}function Ir(e){const{contentSize:t,wideSize:n}=e,r={},o=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return o.test(t)&&(r.none=(0,m.sprintf)((0,m.__)("Max %s wide"),t)),o.test(n)&&(r.wide=(0,m.sprintf)((0,m.__)("Max %s wide"),n)),r}const xr=(0,a.createContext)({refs:new Map,callbacks:new Map});function Br(e){let{children:t}=e;const n=(0,a.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,a.createElement)(xr.Provider,{value:n},t)}function Pr(e){const{refs:t,callbacks:n}=(0,a.useContext)(xr),r=(0,a.useRef)();return(0,a.useLayoutEffect)((()=>(t.set(r,e),()=>{t.delete(r)})),[e]),(0,p.useRefEffect)((t=>{r.current=t,n.forEach(((n,r)=>{e===n&&r(t)}))}),[e])}function Tr(e){const{refs:t}=(0,a.useContext)(xr),n=(0,a.useRef)();return n.current=e,(0,a.useMemo)((()=>({get current(){let e=null;for(const[r,o]of t.entries())o===n.current&&r.current&&(e=r.current);return e}})),[])}function Or(e){const{callbacks:t}=(0,a.useContext)(xr),n=Tr(e),[r,o]=(0,a.useState)(null);return(0,a.useLayoutEffect)((()=>{if(e)return t.set(o,e),()=>{t.delete(o)}}),[e]),n.current||r}function Rr(e){return!(null==e||!e.includes)&&("0"===e||e.includes("var:preset|spacing|"))}function Nr(e,t){if(!Rr(e))return e;const n=Mr(e),r=t.find((e=>String(e.slug)===n));return null==r?void 0:r.size}function Fr(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function Mr(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}const Dr={all:(0,m.__)("All sides"),top:(0,m.__)("Top"),bottom:(0,m.__)("Bottom"),left:(0,m.__)("Left"),right:(0,m.__)("Right"),mixed:(0,m.__)("Mixed"),vertical:(0,m.__)("Vertical"),horizontal:(0,m.__)("Horizontal")},Lr={top:void 0,right:void 0,bottom:void 0,left:void 0},Ur=["top","right","bottom","left"];function jr(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function zr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ur;return Object.values(e).length>=1&&Object.values(e).length1}function Vr(e){return null!=e&&!(0,u.isEmpty)(Object.values(e).filter((e=>!!e)))}var Gr=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z"}));const Hr=["color","border","typography","spacing"],Wr={"color.palette":e=>void 0===e.colors?void 0:e.colors,"color.gradients":e=>void 0===e.gradients?void 0:e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>void 0===e.fontSizes?void 0:e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},$r={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"};function Kr(e){const{name:t,clientId:n}=dr(),r=(0,d.useSelect)((r=>{if(Hr.includes(e))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let i;const l=(e=>$r[e]||e)(e);[...r(sr).getBlockParents(n),n].forEach((e=>{const n=r(sr).getBlockName(e);if((0,o.hasBlockSupport)(n,"__experimentalSettings",!1)){var a;const n=r(sr).getBlockAttributes(e),o=null!==(a=(0,u.get)(n,`settings.blocks.${t}.${l}`))&&void 0!==a?a:(0,u.get)(n,`settings.${l}`);void 0!==o&&(i=o)}}));const a=r(sr).getSettings();if(void 0===i){var s;const e=`__experimentalFeatures.${l}`,n=`__experimentalFeatures.blocks.${t}.${l}`;i=null!==(s=(0,u.get)(a,n))&&void 0!==s?s:(0,u.get)(a,e)}var c,p;if(void 0!==i)return o.__EXPERIMENTAL_PATHS_WITH_MERGE[l]?null!==(c=null!==(p=i.custom)&&void 0!==p?p:i.theme)&&void 0!==c?c:i.default:i;const d=Wr[l]?Wr[l](a):void 0;return void 0!==d?d:"typography.dropCap"===l||void 0}),[t,n,e]);return r}function qr(e){var t;let{spacingSizes:n,value:r,side:o,onChange:i,isMixed:l=!1,type:s,minimumCustomValue:u}=e;r=function(e,t){if(Rr(e))return e;const n=t.find((t=>String(t.size)===String(e)));return null!=n&&n.slug?`var:preset|spacing|${n.slug}`:e}(r,n);let p=n;const y=n.length<=8,g=(0,d.useSelect)((e=>{const t=e(sr).getSettings();return null==t?void 0:t.disableCustomSpacingSizes})),[h,b]=(0,a.useState)(!g&&void 0!==r&&!Rr(r)),v=(0,f.__experimentalUseCustomUnits)({availableUnits:Kr("spacing.units")||["px","em","rem"]});let _=null;!y&&!h&&void 0!==r&&(!Rr(r)||Rr(r)&&l)?(p=[...n,{name:l?(0,m.__)("Mixed"):(0,m.sprintf)((0,m.__)("Custom (%s)"),r),slug:"custom",size:r}],_=p.length-1):l||(_=h?Nr(r,n):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":Mr(e),r=t.findIndex((e=>String(e.slug)===n));return-1!==r?r:NaN}(r,n));const k=(0,a.useMemo)((()=>(0,f.__experimentalParseQuantityAndUnitFromRawValue)(_)),[_])[1]||v[0].value,S=e=>{var t;return void 0===r||null===(t=n[e])||void 0===t?void 0:t.name},E=parseInt(_,10),w=(e,t)=>{var r;const o=parseInt(e,10);if("selectList"===t){if(0===o)return;if(1===o)return"0"}else if(0===o)return"0";return`var:preset|spacing|${null===(r=n[e])||void 0===r?void 0:r.slug}`},A=l?(0,m.__)("Mixed"):null,C=l?(0,m.__)("Mixed"):S(_),I=p.map(((e,t)=>({key:t,name:e.name}))),x=n.map(((e,t)=>({value:t,label:void 0}))),B=(0,m.sprintf)((0,m.__)("%1$s %2$s"),Dr[o],null==s?void 0:s.toLowerCase()),P=y&&!h&&void 0!==C;return(0,a.createElement)(a.Fragment,null,"all"!==o&&(0,a.createElement)(f.__experimentalHStack,{className:"components-spacing-sizes-control__side-labels"},(0,a.createElement)(f.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__side-label"},Dr[o]),P&&(0,a.createElement)(f.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-single"},C)),"all"===o&&P&&(0,a.createElement)(f.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-all"},C),!g&&(0,a.createElement)(f.Button,{label:h?(0,m.__)("Use size preset"):(0,m.__)("Set custom size"),icon:Gr,onClick:()=>{b(!h)},isPressed:h,isSmall:!0,className:c()({"components-spacing-sizes-control__custom-toggle-all":"all"===o,"components-spacing-sizes-control__custom-toggle-single":"all"!==o}),iconSize:24}),h&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.__experimentalUnitControl,{onChange:e=>i((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:_,units:v,min:u,placeholder:A,disableUnits:l,label:B,hideLabelFromVision:!0,className:"components-spacing-sizes-control__custom-value-input",style:{gridColumn:"1"},size:"__unstable-large"}),(0,a.createElement)(f.RangeControl,{value:E,min:0,max:100,withInputField:!1,onChange:e=>{i([e,k].join(""))},className:"components-spacing-sizes-control__custom-value-range"})),y&&!h&&(0,a.createElement)(f.RangeControl,{className:"components-spacing-sizes-control__range-control",value:_,onChange:e=>i(w(e)),onMouseDown:e=>{var t;(null==e||null===(t=e.nativeEvent)||void 0===t?void 0:t.offsetX)<35&&void 0===r&&i("0")},withInputField:!1,"aria-valuenow":_,"aria-valuetext":null===(t=n[_])||void 0===t?void 0:t.name,renderTooltipContent:S,min:0,max:n.length-1,marks:x,label:B,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0}),!y&&!h&&(0,a.createElement)(f.CustomSelectControl,{className:"components-spacing-sizes-control__custom-select-control",value:I.find((e=>e.key===_))||"",onChange:e=>{i(w(e.selectedItem.key,"selectList"))},options:I,label:B,hideLabelFromVision:!0,__nextUnconstrainedWidth:!0,size:"__unstable-large"}))}function Jr(e){let{onChange:t,values:n,sides:r,spacingSizes:o,type:i,minimumCustomValue:l}=e;const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return jr(Object.values(e))}(n),c=Vr(n)&&zr(n,r);return(0,a.createElement)(qr,{value:s,onChange:e=>{const o=(0,f.__experimentalApplyValueToSides)(n,e,r);t(o)},side:"all",spacingSizes:o,isMixed:c,type:i,minimumCustomValue:l})}function Yr(e){let{values:t,sides:n,onChange:r,spacingSizes:o,type:i,minimumCustomValue:l}=e;const s=null!=n&&n.length?Ur.filter((e=>n.includes(e))):Ur,c=e=>n=>{const o={...t};o[e]=n,r(o)};return(0,a.createElement)(a.Fragment,null,s.map((e=>(0,a.createElement)(qr,{value:t[e],label:Dr[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,onChange:c(e),spacingSizes:o,type:i,minimumCustomValue:l}))))}const Qr=["vertical","horizontal"];function Zr(e){let{onChange:t,values:n,sides:r,spacingSizes:o,type:i,minimumCustomValue:l}=e;const s=e=>r=>{if(!t)return;const o={...n};"vertical"===e&&(o.top=r,o.bottom=r),"horizontal"===e&&(o.left=r,o.right=r),t(o)},c=null!=r&&r.length?Qr.filter((e=>r.includes(e))):Qr;return(0,a.createElement)(a.Fragment,null,c.map((e=>{const t="vertical"===e?n.top:n.left;return(0,a.createElement)(qr,{value:t,onChange:s(e),label:Dr[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,spacingSizes:o,type:i,minimumCustomValue:l})})))}var Xr=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));var eo=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));function to(e){let{isLinked:t,onClick:n}=e;const r=t?(0,m.__)("Unlink sides"):(0,m.__)("Link sides");return(0,a.createElement)(f.Tooltip,{text:r},(0,a.createElement)("span",{className:"component-spacing-sizes-control__linked-button"},(0,a.createElement)(f.Button,{isSmall:!0,icon:t?Xr:eo,iconSize:24,"aria-label":r,onClick:n})))}function no(e){let{inputProps:t,onChange:n,label:r=(0,m.__)("Spacing Control"),values:o,sides:i,splitOnAxis:s=!1,useSelect:u,minimumCustomValue:p=0}=e;const d=[{name:0,slug:"0",size:0},...Kr("spacing.spacingSizes")||[]];d.length>8&&d.unshift({name:(0,m.__)("Default"),slug:"default",size:void 0});const y=o||Lr,g=Vr(o),h=1===(null==i?void 0:i.length),[b,v]=(0,a.useState)(!g||!zr(y,i)||h),_={...t,onChange:e=>{const t={...o,...e};n(t)},isLinked:b,sides:i,values:y,spacingSizes:d,useSelect:u,type:r,minimumCustomValue:p};return(0,a.createElement)("fieldset",{role:"region",className:c()("component-spacing-sizes-control",{"is-unlinked":!b})},(0,a.createElement)(f.BaseControl.VisualLabel,{as:"legend"},r),!h&&(0,a.createElement)(to,{onClick:()=>{v(!b)},isLinked:b}),b&&(0,a.createElement)(Jr,l({"aria-label":r},_)),!b&&s&&(0,a.createElement)(Zr,_),!b&&!s&&(0,a.createElement)(Yr,_))}window.wp.warning;var ro={default:(0,f.createSlotFill)("InspectorControls"),advanced:(0,f.createSlotFill)("InspectorAdvancedControls"),border:(0,f.createSlotFill)("InspectorControlsBorder"),color:(0,f.createSlotFill)("InspectorControlsColor"),dimensions:(0,f.createSlotFill)("InspectorControlsDimensions"),typography:(0,f.createSlotFill)("InspectorControlsTypography")};function oo(e){var t;let{__experimentalGroup:n="default",children:r}=e;const o=fr(),i=null===(t=ro[n])||void 0===t?void 0:t.Fill;return i?o?(0,a.createElement)(f.__experimentalStyleProvider,{document:document},(0,a.createElement)(i,null,(e=>{const t=(0,u.isEmpty)(e)?null:e;return(0,a.createElement)(f.__experimentalToolsPanelContext.Provider,{value:t},r)}))):null:("undefined"!=typeof process&&process.env,null)}const io=e=>e,lo=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=(0,u.pickBy)((0,u.mapValues)(e,lo),io);return(0,u.isEmpty)(t)?void 0:t};function ao(e,t,n){return(0,u.setWith)(e?(0,u.clone)(e):{},t,n,u.clone)}function so(e,t,n,r,o,i){var l;if((0,u.every)(e,(e=>!e)))return n;if(1===i.length&&n.innerBlocks.length===r.length)return n;let a=null===(l=r[0])||void 0===l?void 0:l.attributes;if(i.length>1&&r.length>1){if(!r[o])return n;var s;a=null===(s=r[o])||void 0===s?void 0:s.attributes}let c=n;return Object.entries(e).forEach((e=>{let[n,r]=e;r&&t[n].forEach((e=>{const t=(0,u.get)(a,e);t&&(c={...c,attributes:ao(c.attributes,e,t)})}))})),c}function co(e,t,n){const r=(0,o.getBlockSupport)(e,t),i=null==r?void 0:r.__experimentalSkipSerialization;return Array.isArray(i)?i.includes(n):i}function uo(e){let{children:t,group:n,label:r}=e;const{updateBlockAttributes:o}=(0,d.useDispatch)(sr),{getBlockAttributes:i,getMultiSelectedBlockClientIds:l,getSelectedBlockClientId:s,hasMultiSelection:c}=(0,d.useSelect)(sr),u=s(),p=(0,a.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},n=c()?l():[u];n.forEach((n=>{const{style:r}=i(n);let o={style:r};e.forEach((e=>{o={...o,...e(o)}})),o={...o,style:lo(o.style)},t[n]=o})),o(n,t,!0)}),[lo,i,l,c,u,o]);return(0,a.createElement)(f.__experimentalToolsPanel,{className:`${n}-block-support-panel`,label:r,resetAll:p,key:u,panelId:u,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},t)}function po(e){let{Slot:t,...n}=e;const r=(0,a.useContext)(f.__experimentalToolsPanelContext);return(0,a.createElement)(t,l({},n,{fillProps:r,bubblesVirtually:!0}))}function fo(e){var t;let{__experimentalGroup:n="default",label:r,...o}=e;const i=null===(t=ro[n])||void 0===t?void 0:t.Slot,s=(0,f.__experimentalUseSlot)(null==i?void 0:i.__unstableName);if(!i||!s)return"undefined"!=typeof process&&process.env,null;return Boolean(s.fills&&s.fills.length)?r?(0,a.createElement)(uo,{group:n,label:r},(0,a.createElement)(po,l({},o,{Slot:i}))):(0,a.createElement)(i,l({},o,{bubblesVirtually:!0})):null}const yo=oo;yo.Slot=fo;const mo=e=>(0,a.createElement)(oo,l({},e,{__experimentalGroup:"advanced"}));mo.Slot=e=>(0,a.createElement)(fo,l({},e,{__experimentalGroup:"advanced"})),mo.slotName="InspectorAdvancedControls";var go=yo,ho=window.wp.isShallowEqual,bo=n.n(ho);var vo=function(e){return(0,p.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:r}=t;e.current.scrollBy(n,r)}const r={passive:!0};return t.addEventListener("wheel",n,r),()=>{t.removeEventListener("wheel",n,r)}}),[e])};const _o=Number.MAX_SAFE_INTEGER;var ko=(0,a.forwardRef)((function(e,t){let{clientId:n,bottomClientId:r,children:o,__unstableRefreshSize:i,__unstableCoverTarget:s=!1,__unstablePopoverSlot:u,__unstableContentRef:d,...y}=e;const m=Or(n),g=Or(null!=r?r:n),h=(0,p.useMergeRefs)([t,vo(d)]),[b,v]=(0,a.useReducer)((e=>(e+1)%_o),0);(0,a.useLayoutEffect)((()=>{if(!m)return;const e=new window.MutationObserver(v);return e.observe(m,{attributes:!0}),()=>{e.disconnect()}}),[m]);const _=(0,a.useMemo)((()=>b<0||!m||g!==m?{}:{position:"absolute",width:m.offsetWidth,height:m.offsetHeight}),[m,g,i,b]),k=(0,a.useMemo)((()=>{if(!(b<0||!m||r&&!g))return{getBoundingClientRect(){var e,t,n,r;const o=m.getBoundingClientRect(),i=null==g?void 0:g.getBoundingClientRect(),l=Math.min(o.left,null!==(e=null==i?void 0:i.left)&&void 0!==e?e:1/0),a=Math.min(o.top,null!==(t=null==i?void 0:i.top)&&void 0!==t?t:1/0),s=Math.max(o.right,null!==(n=i.right)&&void 0!==n?n:-1/0)-l,c=Math.max(o.bottom,null!==(r=i.bottom)&&void 0!==r?r:-1/0)-a;return new window.DOMRect(l,a,s,c)},ownerDocument:m.ownerDocument}}),[r,g,m,b]);return!m||r&&!g?null:(0,a.createElement)(f.Popover,l({ref:h,animate:!1,position:"top right left",focusOnMount:!1,anchor:k,__unstableSlotName:u||null,resize:!1,flip:!1,shift:!0},y,{className:c()("block-editor-block-popover",y.className)}),s&&(0,a.createElement)("div",{style:_},o),!s&&o)}));function So(e){const t=(0,o.getBlockSupport)(e,Po);return!!(!0===t||null!=t&&t.margin)}function Eo(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Kr("spacing.margin"),n=!Mo(e,"margin");return!So(e)||t||n}function wo(e){var t,n;const{name:r,attributes:{style:o},setAttributes:i}=e,l=Kr("spacing.spacingSizes"),s=(0,f.__experimentalUseCustomUnits)({availableUnits:Kr("spacing.units")||["%","px","em","rem","vw"]}),c=Fo(r,"margin"),u=c&&c.some((e=>Oo.includes(e)));if(Eo(e))return null;const p=e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,margin:e}};i({style:lo(t)})};return a.Platform.select({web:(0,a.createElement)(a.Fragment,null,(!l||0===(null==l?void 0:l.length))&&(0,a.createElement)(f.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.margin,onChange:p,label:(0,m.__)("Margin"),sides:c,units:s,allowReset:!1,splitOnAxis:u}),(null==l?void 0:l.length)>0&&(0,a.createElement)(no,{values:null==o||null===(n=o.spacing)||void 0===n?void 0:n.margin,onChange:p,label:(0,m.__)("Margin"),sides:c,units:s,allowReset:!1,splitOnAxis:!1})),native:null})}function Ao(e){var t,n;let{clientId:r,attributes:o}=e;const i=null==o||null===(t=o.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin,l=Kr("spacing.spacingSizes"),s=(0,a.useMemo)((()=>{const e=null!=i&&i.top?Nr(null==i?void 0:i.top,l):0,t=null!=i&&i.right?Nr(null==i?void 0:i.right,l):0,n=null!=i&&i.bottom?Nr(null==i?void 0:i.bottom,l):0,r=null!=i&&i.left?Nr(null==i?void 0:i.left,l):0;return{borderTopWidth:e,borderRightWidth:t,borderBottomWidth:n,borderLeftWidth:r,top:0!==e?`calc(${e} * -1)`:0,right:0!==t?`calc(${t} * -1)`:0,bottom:0!==n?`calc(${n} * -1)`:0,left:0!==r?`calc(${r} * -1)`:0}}),[i]),[c,u]=(0,a.useState)(!1),p=(0,a.useRef)(i),d=(0,a.useRef)(),f=()=>{d.current&&window.clearTimeout(d.current)};return(0,a.useEffect)((()=>(bo()(i,p.current)||(u(!0),p.current=i,f(),d.current=setTimeout((()=>{u(!1)}),400)),()=>f())),[i]),c?(0,a.createElement)(ko,{clientId:r,__unstableCoverTarget:!0,__unstableRefreshSize:i},(0,a.createElement)("div",{className:"block-editor__padding-visualizer",style:s})):null}function Co(e){const t=(0,o.getBlockSupport)(e,Po);return!!(!0===t||null!=t&&t.padding)}function Io(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Kr("spacing.padding"),n=!Mo(e,"padding");return!Co(e)||t||n}function xo(e){var t,n;const{name:r,attributes:{style:o},setAttributes:i}=e,l=Kr("spacing.spacingSizes"),s=(0,f.__experimentalUseCustomUnits)({availableUnits:Kr("spacing.units")||["%","px","em","rem","vw"]}),c=Fo(r,"padding"),u=c&&c.some((e=>Oo.includes(e)));if(Io(e))return null;const p=e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,padding:e}};i({style:lo(t)})};return a.Platform.select({web:(0,a.createElement)(a.Fragment,null,(!l||0===(null==l?void 0:l.length))&&(0,a.createElement)(f.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.padding,onChange:p,label:(0,m.__)("Padding"),sides:c,units:s,allowReset:!1,splitOnAxis:u}),(null==l?void 0:l.length)>0&&(0,a.createElement)(no,{values:null==o||null===(n=o.spacing)||void 0===n?void 0:n.padding,onChange:p,label:(0,m.__)("Padding"),sides:c,units:s,allowReset:!1,splitOnAxis:u})),native:null})}function Bo(e){var t,n;let{clientId:r,attributes:o}=e;const i=null==o||null===(t=o.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding,l=(0,a.useMemo)((()=>({borderTopWidth:Rr(null==i?void 0:i.top)?Fr(null==i?void 0:i.top):null==i?void 0:i.top,borderRightWidth:Rr(null==i?void 0:i.right)?Fr(null==i?void 0:i.right):null==i?void 0:i.right,borderBottomWidth:Rr(null==i?void 0:i.bottom)?Fr(null==i?void 0:i.bottom):null==i?void 0:i.bottom,borderLeftWidth:Rr(null==i?void 0:i.left)?Fr(null==i?void 0:i.left):null==i?void 0:i.left})),[i]),[s,c]=(0,a.useState)(!1),u=(0,a.useRef)(i),p=(0,a.useRef)(),d=()=>{p.current&&window.clearTimeout(p.current)};return(0,a.useEffect)((()=>(bo()(i,u.current)||(c(!0),u.current=i,d(),p.current=setTimeout((()=>{c(!1)}),400)),()=>d())),[i]),s?(0,a.createElement)(ko,{clientId:r,__unstableCoverTarget:!0,__unstableRefreshSize:i},(0,a.createElement)("div",{className:"block-editor__padding-visualizer",style:l})):null}const Po="spacing",To=["top","right","bottom","left"],Oo=["vertical","horizontal"];function Ro(e){const t=jo(e),n=Io(e),r=Eo(e),i=No(e),l=function(e){if("web"!==a.Platform.OS)return!1;return Do(e)||Co(e)||So(e)}(e.name),s=Kr("spacing.spacingSizes");if(i||!l)return null;const u=(0,o.getBlockSupport)(e.name,[Po,"__experimentalDefaultControls"]),p=e=>t=>{var n;return{...t,style:{...t.style,spacing:{...null===(n=t.style)||void 0===n?void 0:n.spacing,[e]:void 0}}}},d=c()({"tools-panel-item-spacing":s&&s.length>0});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(go,{__experimentalGroup:"dimensions"},!n&&(0,a.createElement)(f.__experimentalToolsPanelItem,{className:d,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding)}(e),label:(0,m.__)("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:lo({...r,spacing:{...null==r?void 0:r.spacing,padding:void 0}})})}(e),resetAllFilter:p("padding"),isShownByDefault:null==u?void 0:u.padding,panelId:e.clientId},(0,a.createElement)(xo,e)),!r&&(0,a.createElement)(f.__experimentalToolsPanelItem,{className:d,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin)}(e),label:(0,m.__)("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:lo({...r,spacing:{...null==r?void 0:r.spacing,margin:void 0}})})}(e),resetAllFilter:p("margin"),isShownByDefault:null==u?void 0:u.margin,panelId:e.clientId},(0,a.createElement)(wo,e)),!t&&(0,a.createElement)(f.__experimentalToolsPanelItem,{className:d,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.blockGap)}(e),label:(0,m.__)("Block spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:{...r,spacing:{...null==r?void 0:r.spacing,blockGap:void 0}}})}(e),resetAllFilter:p("blockGap"),isShownByDefault:null==u?void 0:u.blockGap,panelId:e.clientId},(0,a.createElement)(zo,e))),!n&&(0,a.createElement)(Bo,e),!r&&(0,a.createElement)(Ao,e))}const No=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=jo(e),n=Io(e),r=Eo(e);return t&&n&&r};function Fo(e,t){var n;const r=(0,o.getBlockSupport)(e,Po);if(r&&"boolean"!=typeof r[t])return Array.isArray(r[t])?r[t]:null!==(n=r[t])&&void 0!==n&&n.sides?r[t].sides:void 0}function Mo(e,t){const n=Fo(e,t);return!(n&&n.some((e=>To.includes(e)))&&n.some((e=>Oo.includes(e))))||(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),!1)}function Do(e){const t=(0,o.getBlockSupport)(e,Po);return!!(!0===t||null!=t&&t.blockGap)}function Lo(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:null==e?void 0:e.top,left:t?e:null==e?void 0:e.left}}function Uo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";const n=Lo(e);if(!n)return null;const r=Fr(null==n?void 0:n.top)||t,o=Fr(null==n?void 0:n.left)||t;return r===o?r:`${r} ${o}`}function jo(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Kr("spacing.blockGap");return!Do(e)||t}function zo(e){var t;const{clientId:n,attributes:{style:r},name:o,setAttributes:i}=e,l=Kr("spacing.spacingSizes"),s=(0,f.__experimentalUseCustomUnits)({availableUnits:Kr("spacing.units")||["%","px","em","rem","vw"]}),c=Fo(o,"blockGap"),u=Tr(n);if(jo(e))return null;const p=c&&c.some((e=>Oo.includes(e))),d=e=>{var t;let n=e;e&&p?n={...Lo(e)}:null!=e&&e.hasOwnProperty("top")&&(n=e.top);const o={...r,spacing:{...null==r?void 0:r.spacing,blockGap:n}};i({style:lo(o)});const l=(null===(t=window)||void 0===t?void 0:t.navigator.userAgent)&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome ")&&!window.navigator.userAgent.includes("Chromium ");var a;u.current&&l&&(null===(a=u.current.parentNode)||void 0===a||a.replaceChild(u.current,u.current))},y=Lo(null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap),g=p?{...y,right:null==y?void 0:y.left,bottom:null==y?void 0:y.top}:{top:null==y?void 0:y.top};return a.Platform.select({web:(0,a.createElement)(a.Fragment,null,(!l||0===(null==l?void 0:l.length))&&(p?(0,a.createElement)(f.__experimentalBoxControl,{label:(0,m.__)("Block spacing"),min:0,onChange:d,units:s,sides:c,values:g,allowReset:!1,splitOnAxis:p}):(0,a.createElement)(f.__experimentalUnitControl,{label:(0,m.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:d,units:s,value:g})),(null==l?void 0:l.length)>0&&(0,a.createElement)(no,{values:g,onChange:d,label:(0,m.__)("Block spacing"),sides:p?c:["top"],units:s,allowReset:!1,splitOnAxis:p})),native:null})}const Vo=(0,a.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(f.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Go=(0,a.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(f.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),Ho={top:{icon:(0,a.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(f.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:(0,m._x)("Align top","Block vertical alignment setting")},center:{icon:Go,title:(0,m._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Vo,title:(0,m._x)("Align bottom","Block vertical alignment setting")}},Wo=["top","center","bottom"],$o={isAlternate:!0};var Ko=function(e){let{value:t,onChange:n,controls:r=Wo,isCollapsed:o=!0,isToolbar:i}=e;const s=Ho[t],c=Ho.top,u=i?f.ToolbarGroup:f.ToolbarDropdownMenu,p=i?{isCollapsed:o}:{popoverProps:{POPOVER_PROPS:$o}};return(0,a.createElement)(u,l({icon:s?s.icon:c.icon,label:(0,m._x)("Change vertical alignment","Block vertical alignment setting label"),controls:r.map((e=>{return{...Ho[e],isActive:t===e,role:o?"menuitemradio":void 0,onClick:(r=e,()=>n(t===r?void 0:r))};var r}))},p))};const qo=e=>(0,a.createElement)(Ko,l({},e,{isToolbar:!1})),Jo=e=>(0,a.createElement)(Ko,l({},e,{isToolbar:!0})),Yo={left:vr,center:_r,right:kr,"space-between":Sr};var Qo=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:r,value:o,popoverProps:i,isToolbar:s}=e;const c=e=>{r(e===o?void 0:e)},u=o?Yo[o]:Yo.left,p=[{name:"left",icon:vr,title:(0,m.__)("Justify items left"),isActive:"left"===o,onClick:()=>c("left")},{name:"center",icon:_r,title:(0,m.__)("Justify items center"),isActive:"center"===o,onClick:()=>c("center")},{name:"right",icon:kr,title:(0,m.__)("Justify items right"),isActive:"right"===o,onClick:()=>c("right")},{name:"space-between",icon:Sr,title:(0,m.__)("Space between items"),isActive:"space-between"===o,onClick:()=>c("space-between")}],d=s?f.ToolbarGroup:f.ToolbarDropdownMenu,y=s?{isCollapsed:n}:{};return(0,a.createElement)(d,l({icon:u,popoverProps:i,label:(0,m.__)("Change items justification"),controls:p.filter((e=>t.includes(e.name)))},y))};const Zo=e=>(0,a.createElement)(Qo,l({},e,{isToolbar:!1})),Xo=e=>(0,a.createElement)(Qo,l({},e,{isToolbar:!0})),ei={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},ti={left:"flex-start",right:"flex-end",center:"center"},ni={top:"flex-start",center:"center",bottom:"flex-end"},ri=["wrap","nowrap"];var oi={name:"flex",label:(0,m.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r={}}=e;const{allowOrientation:o=!0}=r;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.Flex,null,(0,a.createElement)(f.FlexItem,null,(0,a.createElement)(li,{layout:t,onChange:n})),(0,a.createElement)(f.FlexItem,null,o&&(0,a.createElement)(si,{layout:t,onChange:n}))),(0,a.createElement)(ai,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r}=e;if(null!=r&&r.allowSwitching)return null;const{allowVerticalAlignment:o=!0}=r;return(0,a.createElement)(br,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(li,{layout:t,onChange:n,isToolbar:!0}),o&&"vertical"!==(null==t?void 0:t.orientation)&&(0,a.createElement)(ii,{layout:t,onChange:n,isToolbar:!0}))},getLayoutStyle:function(e){var t,n;let{selector:r,layout:o,style:i,blockName:l,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{orientation:c="horizontal"}=o,u=null!=i&&null!==(t=i.spacing)&&void 0!==t&&t.blockGap&&!co(l,"spacing","blockGap")?Uo(null==i||null===(n=i.spacing)||void 0===n?void 0:n.blockGap,"0.5em"):void 0,p=ei[o.justifyContent],d=ri.includes(o.flexWrap)?o.flexWrap:"wrap",f=ni[o.verticalAlignment],y=ti[o.justifyContent]||ti.left;let m="";const g=[];return d&&"wrap"!==d&&g.push(`flex-wrap: ${d}`),"horizontal"===c?(f&&g.push(`align-items: ${f}`),p&&g.push(`justify-content: ${p}`)):(g.push("flex-direction: column"),g.push(`align-items: ${y}`)),g.length&&(m=`${Ar(r)} {\n\t\t\t\t${g.join("; ")};\n\t\t\t}`),a&&u&&(m+=Cr(r,s,"flex",u)),m},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function ii(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{verticalAlignment:o=ni.center}=t,i=e=>{n({...t,verticalAlignment:e})};if(r)return(0,a.createElement)(qo,{onChange:i,value:o});const l=[{value:"flex-start",label:(0,m.__)("Align items top")},{value:"center",label:(0,m.__)("Align items center")},{value:"flex-end",label:(0,m.__)("Align items bottom")}];return(0,a.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,a.createElement)("legend",null,(0,m.__)("Vertical alignment")),(0,a.createElement)("div",null,l.map(((e,t,n)=>(0,a.createElement)(f.Button,{key:e,label:n,icon:t,isPressed:o===e,onClick:()=>i(e)})))))}function li(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{justifyContent:o="left",orientation:i="horizontal"}=t,l=e=>{n({...t,justifyContent:e})},s=["left","center","right"];if("horizontal"===i&&s.push("space-between"),r)return(0,a.createElement)(Zo,{allowedControls:s,value:o,onChange:l,popoverProps:{position:"bottom right",isAlternate:!0}});const c=[{value:"left",icon:vr,label:(0,m.__)("Justify items left")},{value:"center",icon:_r,label:(0,m.__)("Justify items center")},{value:"right",icon:kr,label:(0,m.__)("Justify items right")}];return"horizontal"===i&&c.push({value:"space-between",icon:Sr,label:(0,m.__)("Space between items")}),(0,a.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-justification-controls"},(0,a.createElement)("legend",null,(0,m.__)("Justification")),(0,a.createElement)("div",null,c.map((e=>{let{value:t,icon:n,label:r}=e;return(0,a.createElement)(f.Button,{key:t,label:r,icon:n,isPressed:o===t,onClick:()=>l(t)})}))))}function ai(e){let{layout:t,onChange:n}=e;const{flexWrap:r="wrap"}=t;return(0,a.createElement)(f.ToggleControl,{label:(0,m.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===r})}function si(e){let{layout:t,onChange:n}=e;const{orientation:r="horizontal"}=t;return(0,a.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-orientation-controls"},(0,a.createElement)("legend",null,(0,m.__)("Orientation")),(0,a.createElement)(f.Button,{label:(0,m.__)("Horizontal"),icon:Er,isPressed:"horizontal"===r,onClick:()=>n({...t,orientation:"horizontal"})}),(0,a.createElement)(f.Button,{label:(0,m.__)("Vertical"),icon:wr,isPressed:"vertical"===r,onClick:()=>n({...t,orientation:"vertical"})}))}var ci={name:"default",label:(0,m.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function(e){var t;let{selector:n,style:r,blockName:o,hasBlockGapSupport:i,layoutDefinitions:l}=e;const a=Uo(null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap);let s="";co(o,"spacing","blockGap")||(null!=a&&a.top?s=Uo(null==a?void 0:a.top):"string"==typeof a&&(s=Uo(a)));let c="";return i&&s&&(c+=Cr(n,l,"default",s)),c},getOrientation(){return"vertical"},getAlignments(e){const t=Ir(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:r}=e,o=[{name:"left"},{name:"center"},{name:"right"}];return n&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:t.wide}),o.unshift({name:"none",info:t.none}),o}};var ui=function(e){let{icon:t,size:n=24,...r}=e;return(0,a.cloneElement)(t,{width:n,height:n,...r})};var pi=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"}));var di=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),fi=window.wp.styleEngine,yi={name:"constrained",label:(0,m.__)("Constrained"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:r,contentSize:o,justifyContent:i="center"}=t,l=[{value:"left",icon:vr,label:(0,m.__)("Justify items left")},{value:"center",icon:_r,label:(0,m.__)("Justify items center")},{value:"right",icon:kr,label:(0,m.__)("Justify items right")}],s=(0,f.__experimentalUseCustomUnits)({availableUnits:Kr("spacing.units")||["%","px","em","rem","vw"]});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,a.createElement)(f.__experimentalUnitControl,{label:(0,m.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:s}),(0,a.createElement)(ui,{icon:pi})),(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,a.createElement)(f.__experimentalUnitControl,{label:(0,m.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:s}),(0,a.createElement)(ui,{icon:di}))),(0,a.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,m.__)("Customize the width for all elements that are assigned to the center or wide columns.")),(0,a.createElement)(f.__experimentalToggleGroupControl,{__experimentalIsBorderless:!0,label:(0,m.__)("Justification"),value:i,onChange:e=>{n({...t,justifyContent:e})}},l.map((e=>{let{value:t,icon:n,label:r}=e;return(0,a.createElement)(f.__experimentalToggleGroupControlOptionIcon,{key:t,value:t,icon:n,label:r})}))))},toolBarControls:function(){return null},getLayoutStyle:function(e){var t,n;let{selector:r,layout:o={},style:i,blockName:l,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{contentSize:c,wideSize:u,justifyContent:p}=o,d=Uo(null==i||null===(t=i.spacing)||void 0===t?void 0:t.blockGap);let f="";co(l,"spacing","blockGap")||(null!=d&&d.top?f=Uo(null==d?void 0:d.top):"string"==typeof d&&(f=Uo(d)));const y="left"===p?"0 !important":"auto !important",m="right"===p?"0 !important":"auto !important";let g=c||u?`\n\t\t\t\t\t${Ar(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=c?c:u};\n\t\t\t\t\t\tmargin-left: ${y};\n\t\t\t\t\t\tmargin-right: ${m};\n\t\t\t\t\t}\n\t\t\t\t\t${Ar(r,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=u?u:c};\n\t\t\t\t\t}\n\t\t\t\t\t${Ar(r,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if("left"===p?g+=`${Ar(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${y}; }`:"right"===p&&(g+=`${Ar(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${m}; }`),null!=i&&null!==(n=i.spacing)&&void 0!==n&&n.padding){(0,fi.getCSSRules)(i).forEach((e=>{"paddingRight"===e.key?g+=`\n\t\t\t\t\t${Ar(r,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`:"paddingLeft"===e.key&&(g+=`\n\t\t\t\t\t${Ar(r,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`)}))}return a&&f&&(g+=Cr(r,s,"constrained",f)),g},getOrientation(){return"vertical"},getAlignments(e){const t=Ir(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:r}=e,o=[{name:"left"},{name:"center"},{name:"right"}];return n&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:t.wide}),o.unshift({name:"none",info:t.none}),o}};const mi=[ci,oi,yi];function gi(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return mi.find((t=>t.name===e))}const hi={type:"default"},bi=(0,a.createContext)(hi),vi=bi.Provider;function _i(){return(0,a.useContext)(bi)}function ki(e){let{layout:t={},css:n,...r}=e;const o=gi(t.type),i=null!==Kr("spacing.blockGap");if(o){var l;if(n)return(0,a.createElement)("style",null,n);const e=null===(l=o.getLayoutStyle)||void 0===l?void 0:l.call(o,{hasBlockGapSupport:i,layout:t,...r});if(e)return(0,a.createElement)("style",null,e)}return null}const Si=["none","left","center","right","wide","full"],Ei=["wide","full"];function wi(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Si;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n}=(0,d.useSelect)((e=>{const{getSettings:t}=e(sr),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout}}),[]),r=_i(),o=gi(null==r?void 0:r.type),i=o.getAlignments(r);if(n){const t=i.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?[]:t}if("default"!==o.name&&"constrained"!==o.name)return[];const{alignments:l=Si}=r,a=e.filter((e=>(r.alignments||t||!Ei.includes(e))&&l.includes(e))).map((e=>({name:e})));return 1===a.length&&"none"===a[0].name?[]:a}var Ai=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"}));var Ci=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"}));var Ii=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"}));var xi=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));const Bi={none:{icon:Ai,title:(0,m._x)("None","Alignment option")},left:{icon:Ci,title:(0,m.__)("Align left")},center:{icon:pi,title:(0,m.__)("Align center")},right:{icon:Ii,title:(0,m.__)("Align right")},wide:{icon:di,title:(0,m.__)("Wide width")},full:{icon:xi,title:(0,m.__)("Full width")}},Pi={isAlternate:!0};var Ti=function(e){let{value:t,onChange:n,controls:r,isToolbar:o,isCollapsed:i=!0}=e;const s=wi(r);if(!!!s.length)return null;function u(e){n([t,"none"].includes(e)?void 0:e)}const p=Bi[t],d=Bi.none,y=o?f.ToolbarGroup:f.ToolbarDropdownMenu,g={icon:p?p.icon:d.icon,label:(0,m.__)("Align")},h=o?{isCollapsed:i,controls:s.map((e=>{let{name:n}=e;return{...Bi[n],isActive:t===n||!t&&"none"===n,role:i?"menuitemradio":void 0,onClick:()=>u(n)}}))}:{toggleProps:{describedBy:(0,m.__)("Change alignment")},popoverProps:Pi,children:e=>{let{onClose:n}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},s.map((e=>{let{name:r,info:o}=e;const{icon:i,title:l}=Bi[r],s=r===t||!t&&"none"===r;return(0,a.createElement)(f.MenuItem,{key:r,icon:i,iconPosition:"left",className:c()("components-dropdown-menu__menu-item",{"is-active":s}),isSelected:s,onClick:()=>{u(r),n()},role:"menuitemradio",info:o},l)}))))}};return(0,a.createElement)(y,l({},g,h))};const Oi=e=>(0,a.createElement)(Ti,l({},e,{isToolbar:!1})),Ri=e=>(0,a.createElement)(Ti,l({},e,{isToolbar:!0})),Ni=["left","center","right","wide","full"],Fi=["wide","full"];function Mi(e){let 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)?Ni.filter((t=>e.includes(t))):!0===e?[...Ni]:[],!r||!0===e&&!n?(0,u.without)(t,...Fi):t}const Di=(0,p.createHigherOrderComponent)((e=>t=>{const n=(0,a.createElement)(e,t),{name:r}=t,i=wi(Mi((0,o.getBlockSupport)(r,"align"),(0,o.hasBlockSupport)(r,"alignWide",!0))).map((e=>{let{name:t}=e;return t})),l=(0,d.useSelect)((e=>e(sr).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);if(!i.length||l)return n;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(br,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(Oi,{value:t.attributes.align,onChange:e=>{if(!e){var n,r;const i=(0,o.getBlockType)(t.name);(null==i||null===(n=i.attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e="")}t.setAttributes({align:e})},controls:i})),n)}),"withToolbarControls"),Li=(0,p.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:r}=t,{align:i}=r,s=wi(Mi((0,o.getBlockSupport)(n,"align"),(0,o.hasBlockSupport)(n,"alignWide",!0)));if(void 0===i)return(0,a.createElement)(e,t);let c=t.wrapperProps;return s.some((e=>e.name===i))&&(c={...c,"data-align":i}),(0,a.createElement)(e,l({},t,{wrapperProps:c}))}));(0,i.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.align)&&void 0!==t?t:{})||(0,o.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...Ni,""]}}),e})),(0,i.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Li),(0,i.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Di),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:r}=n;return Mi((0,o.getBlockSupport)(t,"align"),(0,o.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=c()(`align${r}`,e.className)),e})),(0,i.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const Ui=/[\s#]/g,ji={type:"string",source:"attribute",attribute:"id",selector:"*"};const zi=(0,p.createHigherOrderComponent)((e=>t=>{if((0,o.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===a.Platform.OS,r=(0,a.createElement)(f.TextControl,{className:"html-anchor-control",label:(0,m.__)("HTML anchor"),help:(0,a.createElement)(a.Fragment,null,(0,m.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),n&&(0,a.createElement)(f.ExternalLink,{href:(0,m.__)("https://wordpress.org/support/article/page-jumps/")},(0,m.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,m.__)("Add an anchor"),onChange:e=>{e=e.replace(Ui,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),n&&(0,a.createElement)(go,{__experimentalGroup:"advanced"},r),!n&&"core/heading"===t.name&&(0,a.createElement)(go,null,(0,a.createElement)(f.PanelBody,{title:(0,m.__)("Heading settings")},r)))}return(0,a.createElement)(e,t)}),"withInspectorControl");(0,i.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.anchor)&&void 0!==t?t:{})||(0,o.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:ji}),e})),(0,i.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",zi),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,o.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const Vi={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};(0,i.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.ariaLabel)&&void 0!==n&&n.type||(0,o.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:Vi}),e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/ariaLabel/save-props",(function(e,t,n){return(0,o.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e}));const Gi=(0,p.createHigherOrderComponent)((e=>t=>(0,o.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),(0,a.createElement)(go,{__experimentalGroup:"advanced"},(0,a.createElement)(f.TextControl,{autoComplete:"off",label:(0,m.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,m.__)("Separate multiple classes with spaces.")}))):(0,a.createElement)(e,t)),"withInspectorControl");(0,i.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,o.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,i.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Gi),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,o.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=c()(e.className,n.className)),e})),(0,i.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,r){if(!(0,o.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===r.length&&e.innerBlocks.length===t.length)return e;if(1===r.length&&t.length>1||r.length>1&&1===t.length)return e;if(t[n]){var i;const r=null===(i=t[n])||void 0===i?void 0:i.attributes.className;if(r)return{...e,attributes:{...e.attributes,className:r}}}return e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,o.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,o.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,o.getBlockDefaultClassName)(t.name)),e}));var Hi=window.wp.dom;const Wi=(0,a.createContext)({});function $i(e){let{value:t,children:n}=e;const r=(0,a.useContext)(Wi),o=(0,a.useMemo)((()=>({...r,...t})),[r,t]);return(0,a.createElement)(Wi.Provider,{value:o,children:n})}var Ki=Wi;const qi={};var Ji=(0,f.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,r=(0,o.getBlockType)(n),i=(0,a.useContext)(Ki),s=(0,a.useMemo)((()=>r&&r.usesContext?(0,u.pick)(i,r.usesContext):qi),[r,i]);if(!r)return null;const p=r.edit||r.save;if(r.apiVersion>1)return(0,a.createElement)(p,l({},e,{context:s}));const d=(0,o.hasBlockSupport)(r,"className",!0)?(0,o.getBlockDefaultClassName)(n):null,f=c()(d,t.className,e.className);return(0,a.createElement)(p,l({},e,{context:s,className:f}))}));function Yi(e){const{name:t,isSelected:n,clientId:r}=e,o={name:t,isSelected:n,clientId:r};return(0,a.createElement)(pr,{value:(0,a.useMemo)((()=>o),Object.values(o))},(0,a.createElement)(Ji,e))}var Qi=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));var Zi=function(e){let{className:t,actions:n,children:r,secondaryActions:o}=e;return(0,a.createElement)("div",{style:{display:"contents",all:"initial"}},(0,a.createElement)("div",{className:c()(t,"block-editor-warning")},(0,a.createElement)("div",{className:"block-editor-warning__contents"},(0,a.createElement)("p",{className:"block-editor-warning__message"},r),(a.Children.count(n)>0||o)&&(0,a.createElement)("div",{className:"block-editor-warning__actions"},a.Children.count(n)>0&&a.Children.map(n,((e,t)=>(0,a.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),o&&(0,a.createElement)(f.DropdownMenu,{className:"block-editor-warning__secondary",icon:Qi,label:(0,m.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,a.createElement)(f.MenuGroup,null,o.map(((e,t)=>(0,a.createElement)(f.MenuItem,{onClick:e.onClick,key:t},e.title))))))))))},Xi=n(1973);function el(e){let{title:t,rawContent:n,renderedContent:r,action:o,actionText:i,className:l}=e;return(0,a.createElement)("div",{className:l},(0,a.createElement)("div",{className:"block-editor-block-compare__content"},(0,a.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,a.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,a.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,a.createElement)(a.RawHTML,null,(0,Hi.safeHTML)(r)))),(0,a.createElement)("div",{className:"block-editor-block-compare__action"},(0,a.createElement)(f.Button,{variant:"secondary",tabIndex:"0",onClick:o},i)))}var tl=function(e){let{block:t,onKeep:n,onConvert:r,convertor:i,convertButtonText:l}=e;const s=(p=i(t),(0,u.castArray)(p).map((e=>(0,o.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var p;const d=(f=t.originalContent,y=s,(0,Xi.Kx)(f,y).map(((e,t)=>{const n=c()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,a.createElement)("span",{key:t,className:n},e.value)})));var f,y;return(0,a.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,a.createElement)(el,{title:(0,m.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,m.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,a.createElement)(el,{title:(0,m.__)("After Conversion"),className:"block-editor-block-compare__converted",action:r,actionText:l,rawContent:d,renderedContent:s}))};const nl=e=>(0,o.rawHandler)({HTML:e.originalContent});var rl=(0,p.compose)([(0,d.withSelect)(((e,t)=>{let{clientId:n}=t;return{block:e(sr).getBlock(n)}})),(0,d.withDispatch)(((e,t)=>{let{block:n}=t;const{replaceBlock:r}=e(sr);return{convertToClassic(){r(n.clientId,(e=>(0,o.createBlock)("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){r(n.clientId,(e=>(0,o.createBlock)("core/html",{content:e.originalContent}))(n))},convertToBlocks(){r(n.clientId,nl(n))},attemptBlockRecovery(){r(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:r}=e;return(0,o.createBlock)(t,n,r)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:r,attemptBlockRecovery:i,block:l}=e;const s=!!(0,o.getBlockType)("core/html"),[c,u]=(0,a.useState)(!1),p=(0,a.useCallback)((()=>u(!0)),[]),d=(0,a.useCallback)((()=>u(!1)),[]),y=(0,a.useMemo)((()=>[{title:(0,m._x)("Resolve","imperative verb"),onClick:p},s&&{title:(0,m.__)("Convert to HTML"),onClick:t},{title:(0,m.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)),[p,t,r]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Zi,{actions:[(0,a.createElement)(f.Button,{key:"recover",onClick:i,variant:"primary"},(0,m.__)("Attempt Block Recovery"))],secondaryActions:y},(0,m.__)("This block contains unexpected or invalid content.")),c&&(0,a.createElement)(f.Modal,{title:(0,m.__)("Resolve Block"),onRequestClose:d,className:"block-editor-block-compare"},(0,a.createElement)(tl,{block:l,onKeep:t,onConvert:n,convertor:nl,convertButtonText:(0,m.__)("Convert to Blocks")})))}));const ol=(0,a.createElement)(Zi,{className:"block-editor-block-list__block-crash-warning"},(0,m.__)("This block has encountered an error and cannot be previewed."));var il=()=>ol;class ll extends a.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var al=ll,sl=n(773);var cl=function(e){let{clientId:t}=e;const[n,r]=(0,a.useState)(""),i=(0,d.useSelect)((e=>e(sr).getBlock(t)),[t]),{updateBlock:l}=(0,d.useDispatch)(sr);return(0,a.useEffect)((()=>{r((0,o.getBlockContent)(i))}),[i]),(0,a.createElement)(sl.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=(0,o.getBlockType)(i.name);if(!e)return;const a=(0,o.getBlockAttributes)(e,n,i.attributes),s=n||(0,o.getSaveContent)(e,a),[c]=n?(0,o.validateBlock)({...i,attributes:a,originalContent:s}):[!0];l(t,{attributes:a,originalContent:s,isValid:c}),n||r({content:s})},onChange:e=>r(e.target.value)})},ul=n(9196),pl=n.n(ul),dl=Object.defineProperty,fl={};((e,t)=>{for(var n in t)dl(e,n,{get:t[n],enumerable:!0})})(fl,{assign:()=>$l,colors:()=>Gl,createStringInterpolator:()=>Ul,skipAnimation:()=>Hl,to:()=>jl,willAdvance:()=>Wl});var yl=Pl(),ml=e=>Cl(e,yl),gl=Pl();ml.write=e=>Cl(e,gl);var hl=Pl();ml.onStart=e=>Cl(e,hl);var bl=Pl();ml.onFrame=e=>Cl(e,bl);var vl=Pl();ml.onFinish=e=>Cl(e,vl);var _l=[];ml.setTimeout=(e,t)=>{const n=ml.now()+t,r=()=>{const e=_l.findIndex((e=>e.cancel==r));~e&&_l.splice(e,1),wl-=~e?1:0},o={time:n,handler:e,cancel:r};return _l.splice(kl(n),0,o),wl+=1,Il(),o};var kl=e=>~(~_l.findIndex((t=>t.time>e))||~_l.length);ml.cancel=e=>{hl.delete(e),bl.delete(e),vl.delete(e),yl.delete(e),gl.delete(e)},ml.sync=e=>{Al=!0,ml.batchedUpdates(e),Al=!1},ml.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,ml.onStart(n)}return r.handler=e,r.cancel=()=>{hl.delete(n),t=null},r};var Sl="undefined"!=typeof window?window.requestAnimationFrame:()=>{};ml.use=e=>Sl=e,ml.now="undefined"!=typeof performance?()=>performance.now():Date.now,ml.batchedUpdates=e=>e(),ml.catch=console.error,ml.frameLoop="always",ml.advance=()=>{"demand"!==ml.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Bl()};var El=-1,wl=0,Al=!1;function Cl(e,t){Al?(t.delete(e),e(0)):(t.add(e),Il())}function Il(){El<0&&(El=0,"demand"!==ml.frameLoop&&Sl(xl))}function xl(){~El&&(Sl(xl),ml.batchedUpdates(Bl))}function Bl(){const e=El;El=ml.now();const t=kl(El);t&&(Tl(_l.splice(0,t),(e=>e.handler())),wl-=t),wl?(hl.flush(),yl.flush(e?Math.min(64,El-e):16.667),bl.flush(),gl.flush(),vl.flush()):El=-1}function Pl(){let e=new Set,t=e;return{add(n){wl+=t!=e||e.has(n)?0:1,e.add(n)},delete(n){return wl-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,wl-=t.size,Tl(t,(t=>t(n)&&e.add(t))),wl+=e.size,t=e)}}}function Tl(e,t){e.forEach((e=>{try{t(e)}catch(e){ml.catch(e)}}))}function Ol(){}var Rl={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function Nl(e,t){if(Rl.arr(e)){if(!Rl.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function Ml(e,t,n){if(Rl.arr(e))for(let r=0;rRl.und(e)?[]:Rl.arr(e)?e:[e];function Ll(e,t){if(e.size){const n=Array.from(e);e.clear(),Fl(n,t)}}var Ul,jl,zl=(e,...t)=>Ll(e,(e=>e(...t))),Vl=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Gl=null,Hl=!1,Wl=Ol,$l=e=>{e.to&&(jl=e.to),e.now&&(ml.now=e.now),void 0!==e.colors&&(Gl=e.colors),null!=e.skipAnimation&&(Hl=e.skipAnimation),e.createStringInterpolator&&(Ul=e.createStringInterpolator),e.requestAnimationFrame&&ml.use(e.requestAnimationFrame),e.batchedUpdates&&(ml.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Wl=e.willAdvance),e.frameLoop&&(ml.frameLoop=e.frameLoop)},Kl=new Set,ql=[],Jl=[],Yl=0,Ql={get idle(){return!Kl.size&&!ql.length},start(e){Yl>e.priority?(Kl.add(e),ml.onStart(Zl)):(Xl(e),ml(ta))},advance:ta,sort(e){if(Yl)ml.onFrame((()=>Ql.sort(e)));else{const t=ql.indexOf(e);~t&&(ql.splice(t,1),ea(e))}},clear(){ql=[],Kl.clear()}};function Zl(){Kl.forEach(Xl),Kl.clear(),ml(ta)}function Xl(e){ql.includes(e)||ea(e)}function ea(e){ql.splice(function(e,t){const n=e.findIndex(t);return n<0?e.length:n}(ql,(t=>t.priority>e.priority)),0,e)}function ta(e){const t=Jl;for(let n=0;n0}var na="[-+]?\\d*\\.?\\d+",ra=na+"%";function oa(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var ia=new RegExp("rgb"+oa(na,na,na)),la=new RegExp("rgba"+oa(na,na,na,na)),aa=new RegExp("hsl"+oa(na,ra,ra)),sa=new RegExp("hsla"+oa(na,ra,ra,na)),ca=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ua=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,pa=/^#([0-9a-fA-F]{6})$/,da=/^#([0-9a-fA-F]{8})$/;function fa(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 ya(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=fa(o,r,e+1/3),l=fa(o,r,e),a=fa(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*l)<<16|Math.round(255*a)<<8}function ma(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ga(e){return(parseFloat(e)%360+360)%360/360}function ha(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ba(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function va(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=pa.exec(e))?parseInt(t[1]+"ff",16)>>>0:Gl&&void 0!==Gl[e]?Gl[e]:(t=ia.exec(e))?(ma(t[1])<<24|ma(t[2])<<16|ma(t[3])<<8|255)>>>0:(t=la.exec(e))?(ma(t[1])<<24|ma(t[2])<<16|ma(t[3])<<8|ha(t[4]))>>>0:(t=ca.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=da.exec(e))?parseInt(t[1],16)>>>0:(t=ua.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=aa.exec(e))?(255|ya(ga(t[1]),ba(t[2]),ba(t[3])))>>>0:(t=sa.exec(e))?(ya(ga(t[1]),ba(t[2]),ba(t[3]))|ha(t[4]))>>>0:null}(e);if(null===t)return e;t=t||0;return`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`}var _a=(e,t,n)=>{if(Rl.fun(e))return e;if(Rl.arr(e))return _a({range:e,output:t,extrapolate:n});if(Rl.str(e.output[0]))return Ul(e);const r=e,o=r.output,i=r.range||[0,1],l=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,l,a,s){let c=s?s(e):e;if(cn){if("identity"===a)return c;"clamp"===a&&(c=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],s,l,a,r.map)}};var ka=1.70158,Sa=1.525*ka,Ea=ka+1,wa=2*Math.PI/3,Aa=2*Math.PI/4.5,Ca=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},Ia={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Ea*e*e*e-ka*e*e,easeOutBack:e=>1+Ea*Math.pow(e-1,3)+ka*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-Sa)/2:(Math.pow(2*e-2,2)*((Sa+1)*(2*e-2)+Sa)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*wa),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*wa)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Aa)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Aa)/2+1,easeInBounce:e=>1-Ca(1-e),easeOutBounce:Ca,easeInOutBounce:e=>e<.5?(1-Ca(1-2*e))/2:(1+Ca(2*e-1))/2,steps:(e,t="end")=>n=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(r):Math.ceil(r))/e)}},xa=Symbol.for("FluidValue.get"),Ba=Symbol.for("FluidValue.observers"),Pa=e=>Boolean(e&&e[xa]),Ta=e=>e&&e[xa]?e[xa]():e,Oa=e=>e[Ba]||null;function Ra(e,t){const n=e[Ba];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var Na=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Fa(this,e)}},Fa=(e,t)=>Ua(e,xa,t);function Ma(e,t){if(e[xa]){let n=e[Ba];n||Ua(e,Ba,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Da(e,t){const n=e[Ba];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Ba]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var La,Ua=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ja=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,za=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Va=new RegExp(`(${ja.source})(%|[a-z]+)`,"i"),Ga=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Ha=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Wa=e=>{const[t,n]=$a(e);if(!t||Vl())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}return n&&Ha.test(n)?Wa(n):n||e},$a=e=>{const t=Ha.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Ka=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,qa=e=>{La||(La=Gl?new RegExp(`(${Object.keys(Gl).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Ta(e).replace(Ha,Wa).replace(za,va).replace(La,va))),n=t.map((e=>e.match(ja).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))),o=r.map((t=>_a({...e,output:t})));return e=>{const n=!Va.test(t[0])&&t.find((e=>Va.test(e)))?.replace(ja,"");let r=0;return t[0].replace(ja,(()=>`${o[r++](e)}${n||""}`)).replace(Ga,Ka)}},Ja="react-spring: ",Ya=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Ja}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Qa=Ya(console.warn);var Za=Ya(console.warn);function Xa(e){return Rl.str(e)&&("#"==e[0]||/\d/.test(e)||!Vl()&&Ha.test(e)||e in(Gl||{}))}var es=Vl()?ul.useEffect:ul.useLayoutEffect;function ts(){const e=(0,ul.useState)()[1],t=(()=>{const e=(0,ul.useRef)(!1);return es((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var ns=e=>(0,ul.useEffect)(e,rs),rs=[];function os(e){const t=(0,ul.useRef)();return(0,ul.useEffect)((()=>{t.current=e})),t.current}var is=Symbol.for("Animated:node"),ls=e=>e&&e[is],as=(e,t)=>{return n=e,r=is,o=t,Object.defineProperty(n,r,{value:o,writable:!0,configurable:!0});var n,r,o},ss=e=>e&&e[is]&&e[is].getPayload(),cs=class{constructor(){as(this,this)}getPayload(){return this.payload||[]}},us=class extends cs{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,Rl.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new us(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Rl.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Rl.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},ps=class extends us{constructor(e){super(0),this._string=null,this._toString=_a({output:[e,e]})}static create(e){return new ps(e)}getValue(){const e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(Rl.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=_a({output:[this.getValue(),e]})),this._value=0,super.reset()}},ds={dependencies:null},fs=class extends cs{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Ml(this.source,((n,r)=>{var o;(o=n)&&o[is]===o?t[r]=n.getValue(e):Pa(n)?t[r]=Ta(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Fl(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return Ml(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){ds.dependencies&&Pa(e)&&ds.dependencies.add(e);const t=ss(e);t&&Fl(t,(e=>this.add(e)))}},ys=class extends fs{constructor(e){super(e)}static create(e){return new ys(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(ms)),!0)}};function ms(e){return(Xa(e)?ps:us).create(e)}function gs(e){const t=ls(e);return t?t.constructor:Rl.arr(e)?ys:Xa(e)?ps:us}var hs=(e,t)=>{const n=!Rl.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,ul.forwardRef)(((r,o)=>{const i=(0,ul.useRef)(null),l=n&&(0,ul.useCallback)((e=>{i.current=function(e,t){e&&(Rl.fun(e)?e(t):e.current=t);return t}(o,e)}),[o]),[a,s]=function(e,t){const n=new Set;ds.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)});return e=new fs(e),ds.dependencies=null,[e,n]}(r,t),c=ts(),u=()=>{const e=i.current;if(n&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,a.getValue(!0)))&&c()},p=new bs(u,s),d=(0,ul.useRef)();es((()=>(d.current=p,Fl(s,(e=>Ma(e,p))),()=>{d.current&&(Fl(d.current.deps,(e=>Da(e,d.current))),ml.cancel(d.current.update))}))),(0,ul.useEffect)(u,[]),ns((()=>()=>{const e=d.current;Fl(e.deps,(t=>Da(t,e)))}));const f=t.getComponentProps(a.getValue());return ul.createElement(e,{...f,ref:l})}))},bs=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&ml.write(this.update)}};var vs=Symbol.for("AnimatedComponent"),_s=e=>Rl.str(e)?e:e&&Rl.str(e.displayName)?e.displayName:Rl.fun(e)&&e.name||null;function ks(e,...t){return Rl.fun(e)?e(...t):e}var Ss=(e,t)=>!0===e||!!(t&&e&&(Rl.fun(e)?e(t):Dl(e).includes(t))),Es=(e,t)=>Rl.obj(e)?t&&e[t]:e,ws=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,As=e=>e,Cs=(e,t=As)=>{let n=Is;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const n=t(e[o],o);Rl.und(n)||(r[o]=n)}return r},Is=["config","onProps","onStart","onChange","onPause","onResume","onRest"],xs={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Bs(e){const t=function(e){const t={};let n=0;if(Ml(e,((e,r)=>{xs[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return Ml(e,((e,r)=>r in t||(n[r]=e))),n}return{...e}}function Ps(e){return e=Ta(e),Rl.arr(e)?e.map(Ps):Xa(e)?fl.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Ts(e){for(const t in e)return!0;return!1}function Os(e){return Rl.fun(e)||Rl.arr(e)&&Rl.obj(e[0])}function Rs(e,t){e.ref?.delete(e),t?.delete(e)}function Ns(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var Fs={tension:170,friction:26,mass:1,damping:1,easing:Ia.linear,clamp:!1};function Ms(e,t){if(Rl.und(t.decay)){const n=!Rl.und(t.tension)||!Rl.und(t.friction);!n&&Rl.und(t.frequency)&&Rl.und(t.damping)&&Rl.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Ds=[];function Ls(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise(((l,a)=>{let s,c,u=Ss(n.cancel??r?.cancel,t);if(u)f();else{Rl.und(n.pause)||(o.paused=Ss(n.pause,t));let e=r?.pause;!0!==e&&(e=o.paused||Ss(e,t)),s=ks(n.delay||0,t),e?(o.resumeQueue.add(d),i.pause()):(i.resume(),d())}function p(){o.resumeQueue.add(d),o.timeouts.delete(c),c.cancel(),s=c.time-ml.now()}function d(){s>0&&!fl.skipAnimation?(o.delayed=!0,c=ml.setTimeout(f,s),o.pauseQueue.add(p),o.timeouts.add(c)):f()}function f(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(p),o.timeouts.delete(c),e<=(o.cancelId||0)&&(u=!0);try{i.start({...n,callId:e,cancel:u},l)}catch(e){a(e)}}}))}var Us=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?Vs(e.get()):t.every((e=>e.noop))?js(e.get()):zs(e.get(),t.every((e=>e.finished))),js=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),zs=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Vs=e=>({value:e,cancelled:!0,finished:!1});function Gs(e,t,n,r){const{callId:o,parentId:i,onRest:l}=t,{asyncTo:a,promise:s}=n;return i||e!==a||t.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const c=Cs(t,((e,t)=>"onRest"===t?void 0:e));let u,p;const d=new Promise(((e,t)=>(u=e,p=t))),f=e=>{const t=o<=(n.cancelId||0)&&Vs(r)||o!==n.asyncId&&zs(r,!1);if(t)throw e.result=t,p(e),e},y=(e,t)=>{const i=new Ws,l=new $s;return(async()=>{if(fl.skipAnimation)throw Hs(n),l.result=zs(r,!1),p(l),l;f(i);const a=Rl.obj(e)?{...e}:{...t,to:e};a.parentId=o,Ml(c,((e,t)=>{Rl.und(a[t])&&(a[t]=e)}));const s=await r.start(a);return f(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),s})()};let m;if(fl.skipAnimation)return Hs(n),zs(r,!1);try{let t;t=Rl.arr(e)?(async e=>{for(const t of e)await y(t)})(e):Promise.resolve(e(y,r.stop.bind(r))),await Promise.all([t.then(u),d]),m=zs(r.get(),!0,!1)}catch(e){if(e instanceof Ws)m=e.result;else{if(!(e instanceof $s))throw e;m=e.result}}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?a:void 0,n.promise=i?s:void 0)}return Rl.fun(l)&&ml.batchedUpdates((()=>{l(m,r,r.item)})),m})():s}function Hs(e,t){Ll(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Ws=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},$s=class extends Error{constructor(){super("SkipAnimationSignal")}},Ks=e=>e instanceof Js,qs=1,Js=class extends Na{constructor(){super(...arguments),this.id=qs++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=ls(this);return e&&e.getValue()}to(...e){return fl.to(this,e)}interpolate(...e){return Qa(`${Ja}The "interpolate" function is deprecated in v9 (use "to" instead)`),fl.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Ra(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Ql.sort(this),Ra(this,{type:"priority",parent:this,priority:e})}},Ys=Symbol.for("SpringPhase"),Qs=e=>(1&e[Ys])>0,Zs=e=>(2&e[Ys])>0,Xs=e=>(4&e[Ys])>0,ec=(e,t)=>t?e[Ys]|=3:e[Ys]&=-3,tc=(e,t)=>t?e[Ys]|=4:e[Ys]&=-5,nc=class extends Js{constructor(e,t){if(super(),this.animation=new class{constructor(){this.changed=!1,this.values=Ds,this.toValues=null,this.fromValues=Ds,this.config=new class{constructor(){this.velocity=0,Object.assign(this,Fs)}},this.immediate=!1}},this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Rl.und(e)||!Rl.und(t)){const n=Rl.obj(e)?{...e}:{...t,from:e};Rl.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Zs(this)||this._state.asyncTo)||Xs(this)}get goal(){return Ta(this.animation.to)}get velocity(){const e=ls(this);return e instanceof us?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return Qs(this)}get isAnimating(){return Zs(this)}get isPaused(){return Xs(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,l=ss(r.to);!l&&Pa(r.to)&&(o=Dl(Ta(r.to))),r.values.forEach(((a,s)=>{if(a.done)return;const c=a.constructor==ps?1:l?l[s].lastPosition:o[s];let u=r.immediate,p=c;if(!u){if(p=a.lastPosition,i.tension<=0)return void(a.done=!0);let t=a.elapsedTime+=e;const n=r.fromValues[s],o=null!=a.v0?a.v0:a.v0=Rl.arr(i.velocity)?i.velocity[s]:i.velocity;let l;const d=i.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(Rl.und(i.duration))if(i.decay){const e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*t);p=n+o/(1-e)*(1-r),u=Math.abs(a.lastPosition-p)<=d,l=o*r}else{l=null==a.lastVelocity?o:a.lastVelocity;const t=i.restVelocity||d/10,r=i.clamp?0:i.bounce,s=!Rl.und(r),f=n==c?a.v0>0:nt,y||(u=Math.abs(c-p)<=d,!u));++e){s&&(m=p==c||p>c==f,m&&(l=-l*r,p=c));l+=(1e-6*-i.tension*(p-c)+.001*-i.friction*l)/i.mass*g,p+=l*g}}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,a.durationProgress>0&&(a.elapsedTime=i.duration*a.durationProgress,t=a.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,a.durationProgress=r),p=n+i.easing(r)*(c-n),l=(p-a.lastPosition)/e,u=1==r}a.lastVelocity=l,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),u=!0)}l&&!l[s].done&&(u=!1),u?a.done=!0:t=!1,a.setValue(p,i.round)&&(n=!0)}));const a=ls(this),s=a.getValue();if(t){const e=Ta(r.to);s===e&&!n||i.decay?n&&i.decay&&this._onChange(s):(a.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(s)}set(e){return ml.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Zs(this)){const{to:e,config:t}=this.animation;ml.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Rl.und(e)?(n=this.queue||[],this.queue=[]):n=[Rl.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Us(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Hs(this._state,e&&this._lastCallId),ml.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=Rl.obj(n)?n[t]:n,(null==n||Os(n))&&(n=void 0),r=Rl.obj(r)?r[t]:r,null==r&&(r=void 0);const o={to:n,from:r};return Qs(this)||(e.reverse&&([n,r]=[r,n]),r=Ta(r),Rl.und(r)?ls(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Cs(e,((e,t)=>/^on/.test(t)?Es(e,n):e))),cc(this,e,"onProps"),uc(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return Ls(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Xs(this)||(tc(this,!0),zl(i.pauseQueue),uc(this,"onPause",zs(this,rc(this,this.animation.to)),this))},resume:()=>{Xs(this)&&(tc(this,!1),Zs(this)&&this._resume(),zl(i.resumeQueue),uc(this,"onResume",zs(this,rc(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){const t=oc(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Vs(this));const r=!Rl.und(e.to),o=!Rl.und(e.from);if(r||o){if(!(t.callId>this._lastToId))return n(Vs(this));this._lastToId=t.callId}const{key:i,defaultProps:l,animation:a}=this,{to:s,from:c}=a;let{to:u=s,from:p=c}=e;!o||r||t.default&&!Rl.und(u)||(u=p),t.reverse&&([u,p]=[p,u]);const d=!Nl(p,c);d&&(a.from=p),p=Ta(p);const f=!Nl(u,s);f&&this._focus(u);const y=Os(t.to),{config:m}=a,{decay:g,velocity:h}=m;(r||o)&&(m.velocity=0),t.config&&!y&&function(e,t,n){n&&(Ms(n={...n},t),t={...n,...t}),Ms(e,t),Object.assign(e,t);for(const t in Fs)null==e[t]&&(e[t]=Fs[t]);let{frequency:r,damping:o}=e;const{mass:i}=e;Rl.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r)}(m,ks(t.config,i),t.config!==l.config?ks(l.config,i):void 0);let b=ls(this);if(!b||Rl.und(u))return n(zs(this,!0));const v=Rl.und(t.reset)?o&&!t.default:!Rl.und(p)&&Ss(t.reset,i),_=v?p:this.get(),k=Ps(u),S=Rl.num(k)||Rl.arr(k)||Xa(k),E=!y&&(!S||Ss(l.immediate||t.immediate,i));if(f){const e=gs(u);if(e!==b.constructor){if(!E)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(k)}}const w=b.constructor;let A=Pa(u),C=!1;if(!A){const e=v||!Qs(this)&&d;(f||e)&&(C=Nl(Ps(_),k),A=!C),(Nl(a.immediate,E)||E)&&Nl(m.decay,g)&&Nl(m.velocity,h)||(A=!0)}if(C&&Zs(this)&&(a.changed&&!v?A=!0:A||this._stop(s)),!y&&((A||Pa(s))&&(a.values=b.getPayload(),a.toValues=Pa(u)?null:w==ps?[1]:Dl(k)),a.immediate!=E&&(a.immediate=E,E||v||this._set(s)),A)){const{onRest:e}=a;Fl(sc,(e=>cc(this,t,e)));const r=zs(this,rc(this,s));zl(this._pendingCalls,r),this._pendingCalls.add(n),a.changed&&ml.batchedUpdates((()=>{a.changed=!v,e?.(r,this),v?ks(l.onRest,r):a.onStart?.(r,this)}))}v&&this._set(_),y?n(Gs(t.to,t,this._state,this)):A?this._start():Zs(this)&&!f?this._pendingCalls.add(n):n(js(_))}_focus(e){const t=this.animation;e!==t.to&&(Oa(this)&&this._detach(),t.to=e,Oa(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Pa(t)&&(Ma(t,this),Ks(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Pa(e)&&Da(e,this)}_set(e,t=!0){const n=Ta(e);if(!Rl.und(n)){const e=ls(this);if(!e||!Nl(n,e.getValue())){const r=gs(n);e&&e.constructor==r?e.setValue(n):as(this,r.create(n)),e&&ml.batchedUpdates((()=>{this._onChange(n,t)}))}}return ls(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,uc(this,"onStart",zs(this,rc(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),ks(this.animation.onChange,e,this)),ks(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;ls(this).reset(Ta(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),Zs(this)||(ec(this,!0),Xs(this)||this._resume())}_resume(){fl.skipAnimation?this.finish():Ql.start(this)}_stop(e,t){if(Zs(this)){ec(this,!1);const n=this.animation;Fl(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Ra(this,{type:"idle",parent:this});const r=t?Vs(this.get()):zs(this.get(),rc(this,e??n.to));zl(this._pendingCalls,r),n.changed&&(n.changed=!1,uc(this,"onRest",r,this))}}};function rc(e,t){const n=Ps(t);return Nl(Ps(e.get()),n)}function oc(e,t=e.loop,n=e.to){const r=ks(t);if(r){const o=!0!==r&&Bs(r),i=(o||e).reverse,l=!o||o.reset;return ic({...e,loop:t,default:!1,pause:void 0,to:!i||Os(n)?n:void 0,from:l?e.from:void 0,reset:l,...o})}}function ic(e){const{to:t,from:n}=e=Bs(e),r=new Set;return Rl.obj(t)&&ac(t,r),Rl.obj(n)&&ac(n,r),e.keys=r.size?Array.from(r):null,e}function lc(e){const t=ic(e);return Rl.und(t.default)&&(t.default=Cs(t)),t}function ac(e,t){Ml(e,((e,n)=>null!=e&&t.add(n)))}var sc=["onStart","onRest","onChange","onPause","onResume"];function cc(e,t,n){e.animation[n]=t[n]!==ws(t,n)?Es(t[n],e.key):void 0}function uc(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var pc=["onStart","onChange","onRest"],dc=1,fc=class{constructor(e,t){this.id=dc++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];Rl.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(ic(e)),this}start(e){let{queue:t}=this;return e?t=Dl(e).map(ic):this.queue=[],this._flush?this._flush(this,t):(_c(this,t),yc(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Fl(Dl(t),(t=>n[t].stop(!!e)))}else Hs(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Rl.und(e))this.start({pause:!0});else{const t=this.springs;Fl(Dl(e),(e=>t[e].pause()))}return this}resume(e){if(Rl.und(e))this.start({pause:!1});else{const t=this.springs;Fl(Dl(e),(e=>t[e].resume()))}return this}each(e){Ml(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,Ll(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const i=!r&&this._started,l=o||i&&n.size?this.get():null;o&&t.size&&Ll(t,(([e,t])=>{t.value=l,e(t,this,this._item)})),i&&(this._started=!1,Ll(n,(([e,t])=>{t.value=l,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}ml.onFrame(this._onFrame)}};function yc(e,t){return Promise.all(t.map((t=>mc(e,t)))).then((t=>Us(e,t)))}async function mc(e,t,n){const{keys:r,to:o,from:i,loop:l,onRest:a,onResolve:s}=t,c=Rl.obj(t.default)&&t.default;l&&(t.loop=!1),!1===o&&(t.to=null),!1===i&&(t.from=null);const u=Rl.arr(o)||Rl.fun(o)?o:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Fl(pc,(n=>{const r=t[n];if(Rl.fun(r)){const o=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=o.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):o.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const p=e._state;t.pause===!p.paused?(p.paused=t.pause,zl(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);const d=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),f=!0===t.cancel||!0===ws(t,"cancel");(u||f&&p.asyncId)&&d.push(Ls(++e._lastAsyncId,{props:t,state:p,actions:{pause:Ol,resume:Ol,start(t,n){f?(Hs(p,e._lastAsyncId),n(Vs(e))):(t.onRest=a,n(Gs(u,t,p,e)))}}})),p.paused&&await new Promise((e=>{p.resumeQueue.add(e)}));const y=Us(e,await Promise.all(d));if(l&&y.finished&&(!n||!y.noop)){const n=oc(t,l,o);if(n)return _c(e,[n]),mc(e,n,!0)}return s&&ml.batchedUpdates((()=>s(y,e,e.item))),y}function gc(e,t){const n={...e.springs};return t&&Fl(Dl(t),(e=>{Rl.und(e.keys)&&(e=ic(e)),Rl.obj(e.to)||(e={...e,to:void 0}),vc(n,e,(e=>bc(e)))})),hc(e,n),n}function hc(e,t){Ml(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Ma(t,e))}))}function bc(e,t){const n=new nc;return n.key=e,t&&Ma(n,t),n}function vc(e,t,n){t.keys&&Fl(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function _c(e,t){Fl(t,(t=>{vc(e.springs,t,(t=>bc(t,e)))}))}var kc,Sc,Ec=({children:e,...t})=>{const n=(0,ul.useContext)(wc),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=function(e,t){const[n]=(0,ul.useState)((()=>({inputs:t,result:e()}))),r=(0,ul.useRef)(),o=r.current;let i=o;if(i){const n=Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{r.current=i,o==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:r,immediate:o})),[r,o]);const{Provider:i}=wc;return ul.createElement(i,{value:t},e)},wc=(kc=Ec,Sc={},Object.assign(kc,ul.createContext(Sc)),kc.Provider._context=kc,kc.Consumer._context=kc,kc);Ec.Provider=wc.Provider,Ec.Consumer=wc.Consumer;var Ac=()=>{const e=[],t=function(t){Za(`${Ja}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const r=[];return Fl(e,((e,o)=>{if(Rl.und(t))r.push(e.start());else{const i=n(t,e,o);i&&r.push(e.start(i))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Fl(e,(e=>e.pause(...arguments))),this},t.resume=function(){return Fl(e,(e=>e.resume(...arguments))),this},t.set=function(t){Fl(e,((e,n)=>{const r=Rl.fun(t)?t(n,e):t;r&&e.set(r)}))},t.start=function(t){const n=[];return Fl(e,((e,r)=>{if(Rl.und(t))n.push(e.start());else{const o=this._getProps(t,e,r);o&&n.push(e.start(o))}})),n},t.stop=function(){return Fl(e,(e=>e.stop(...arguments))),this},t.update=function(t){return Fl(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return Rl.fun(e)?e(n,t):e};return t._getProps=n,t};function Cc(e,t,n){const r=Rl.fun(t)&&t;r&&!n&&(n=[]);const o=(0,ul.useMemo)((()=>r||3==arguments.length?Ac():void 0),[]),i=(0,ul.useRef)(0),l=ts(),a=(0,ul.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=gc(e,t);return i.current>0&&!a.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?yc(e,t):new Promise((r=>{hc(e,n),a.queue.push((()=>{r(yc(e,t))})),l()}))}})),[]),s=(0,ul.useRef)([...a.ctrls]),c=[],u=os(e)||0;function p(e,n){for(let o=e;o{Fl(s.current.slice(e,u),(e=>{Rs(e,o),e.stop(!0)})),s.current.length=e,p(u,e)}),[e]),(0,ul.useMemo)((()=>{p(0,Math.min(u,e))}),n);const d=s.current.map(((e,t)=>gc(e,c[t]))),f=(0,ul.useContext)(Ec),y=os(f),m=f!==y&&Ts(f);es((()=>{i.current++,a.ctrls=s.current;const{queue:e}=a;e.length&&(a.queue=[],Fl(e,(e=>e()))),Fl(s.current,((e,t)=>{o?.add(e),m&&e.start({default:f});const n=c[t];n&&(Ns(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),ns((()=>()=>{Fl(a.ctrls,(e=>e.stop(!0)))}));const g=d.map((e=>({...e})));return o?[g,o]:g}function Ic(e,t){const n=Rl.fun(e),[[r],o]=Cc(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,o]:r}var xc=class extends Js{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=_a(...t);const n=this._get(),r=gs(n);as(this,r.create(n))}advance(e){const t=this._get();Nl(t,this.get())||(ls(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Pc(this._active)&&Tc(this)}_get(){const e=Rl.arr(this.source)?this.source.map(Ta):Dl(Ta(this.source));return this.calc(...e)}_start(){this.idle&&!Pc(this._active)&&(this.idle=!1,Fl(ss(this),(e=>{e.done=!1})),fl.skipAnimation?(ml.batchedUpdates((()=>this.advance())),Tc(this)):Ql.start(this))}_attach(){let e=1;Fl(Dl(this.source),(t=>{Pa(t)&&Ma(t,this),Ks(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Fl(Dl(this.source),(e=>{Pa(e)&&Da(e,this)})),this._active.clear(),Tc(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Dl(this.source).reduce(((e,t)=>Math.max(e,(Ks(t)?t.priority:0)+1)),0))}};function Bc(e){return!1!==e.idle}function Pc(e){return!e.size||Array.from(e).every(Bc)}function Tc(e){e.idle||(e.idle=!0,Fl(ss(e),(e=>{e.done=!0})),Ra(e,{type:"idle",parent:e}))}fl.assign({createStringInterpolator:qa,to:(e,t)=>new xc(e,t)});Ql.advance;var Oc=window.ReactDOM,Rc=/^--/;function Nc(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Rc.test(e)||Mc.hasOwnProperty(e)&&Mc[e]?(""+t).trim():t+"px"}var Fc={};var Mc={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},Dc=["Webkit","Ms","Moz","O"];Mc=Object.keys(Mc).reduce(((e,t)=>(Dc.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Mc);var Lc=/^(matrix|translate|scale|rotate|skew)/,Uc=/^(translate)/,jc=/^(rotate|skew)/,zc=(e,t)=>Rl.num(e)&&0!==e?e+t:e,Vc=(e,t)=>Rl.arr(e)?e.every((e=>Vc(e,t))):Rl.num(e)?e===t:parseFloat(e)===t,Gc=class extends fs{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>zc(e,"px"))).join(",")})`,Vc(e,0)]))),Ml(r,((e,t)=>{if("transform"===t)o.push([e||""]),i.push((e=>[e,""===e]));else if(Lc.test(t)){if(delete r[t],Rl.und(e))return;const n=Uc.test(t)?"px":jc.test(t)?"deg":"";o.push(Dl(e)),i.push("rotate3d"===t?([e,t,r,o])=>[`rotate3d(${e},${t},${r},${zc(o,n)})`,Vc(o,0)]:e=>[`${t}(${e.map((e=>zc(e,n))).join(",")})`,Vc(e,t.startsWith("scale")?1:0)])}})),o.length&&(r.transform=new Hc(o,i)),super(r)}},Hc=class extends Na{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Fl(this.inputs,((n,r)=>{const o=Ta(n[0]),[i,l]=this.transforms[r](Rl.arr(o)?o:n.map(Ta));e+=" "+i,t=t&&l})),t?"none":e}observerAdded(e){1==e&&Fl(this.inputs,(e=>Fl(e,(e=>Pa(e)&&Ma(e,this)))))}observerRemoved(e){0==e&&Fl(this.inputs,(e=>Fl(e,(e=>Pa(e)&&Da(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Ra(this,e)}};fl.assign({batchedUpdates:Oc.unstable_batchedUpdates,createStringInterpolator:qa,colors:{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}});var Wc=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new fs(e)),getComponentProps:r=(e=>e)}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=e=>{const t=_s(e)||"Anonymous";return(e=Rl.str(e)?i[e]||(i[e]=hs(e,o)):e[vs]||(e[vs]=hs(e,o))).displayName=`Animated(${t})`,e};return Ml(e,((t,n)=>{Rl.arr(e)&&(n=_s(t)),i[n]=i(t)})),{animated:i}})(["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"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:r,children:o,scrollTop:i,scrollLeft:l,viewBox:a,...s}=t,c=Object.values(s),u=Object.keys(s).map((t=>n||e.hasAttribute(t)?t:Fc[t]||(Fc[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==o&&(e.textContent=o);for(const t in r)if(r.hasOwnProperty(t)){const n=Nc(t,r[t]);Rc.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==l&&(e.scrollLeft=l),void 0!==a&&e.setAttribute("viewBox",a)},createAnimatedStyle:e=>new Gc(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),$c=Wc.animated;const Kc=e=>e+1,qc=e=>({top:e.offsetTop,left:e.offsetLeft});var Jc=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:r,triggerAnimationOnChange:o}=e;const i=(0,a.useRef)(),l=(0,p.useReducedMotion)()||!r,[s,c]=(0,a.useReducer)(Kc,0),[u,d]=(0,a.useReducer)(Kc,0),[f,y]=(0,a.useState)({x:0,y:0}),m=(0,a.useMemo)((()=>i.current?qc(i.current):null),[o]),g=(0,a.useMemo)((()=>{if(!n||!i.current)return()=>{};const e=(0,Hi.getScrollContainer)(i.current);if(!e)return()=>{};const t=i.current.getBoundingClientRect();return()=>{const n=i.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[o,n]);return(0,a.useLayoutEffect)((()=>{s&&d()}),[s]),(0,a.useLayoutEffect)((()=>{if(!m)return;if(l)return void g();i.current.style.transform=void 0;const e=qc(i.current);c(),y({x:Math.round(m.left-e.left),y:Math.round(m.top-e.top)})}),[o]),Ic({from:{x:f.x,y:f.y},to:{x:0,y:0},reset:s!==u,config:{mass:5,tension:2e3,friction:200},immediate:l,onChange:function(e){let{value:n}=e;if(!i.current)return;let{x:r,y:o}=n;r=Math.round(r),o=Math.round(o);const l=0===r&&0===o;i.current.style.transformOrigin="center center",i.current.style.transform=l?void 0:`translate3d(${r}px,${o}px,0)`,i.current.style.zIndex=t?"1":"",g()}}),i};const Yc=".block-editor-block-list__block",Qc=".block-list-appender",Zc=".block-editor-button-block-appender";function Xc(e,t){return t.closest([Yc,Qc,Zc].join(","))===e}function eu(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(Yc);return t?t.id.slice("block-".length):void 0}function tu(e){const t=(0,a.useRef)(),n=function(e){return(0,d.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,__unstableGetEditorMode:r,isBlockSelected:o}=t(sr);if(o(e)&&"edit"===r())return n()}),[e])}(e),{isBlockSelected:r,isMultiSelecting:o}=(0,d.useSelect)(sr);return(0,a.useEffect)((()=>{if(!r(e)||o())return;if(null==n)return;if(!t.current)return;const{ownerDocument:i}=t.current;if(Xc(t.current,i.activeElement))return;const l=Hi.focus.tabbable.find(t.current).filter((e=>(0,Hi.isTextField)(e))),a=-1===n,s=l[a?l.length-1:0]||t.current;if(Xc(t.current,s)){if(!t.current.getAttribute("contenteditable")){const e=Hi.focus.tabbable.findNext(t.current);if(e&&Xc(t.current,e)&&(0,Hi.isFormElement)(e))return void e.focus()}(0,Hi.placeCaretAtHorizontalEdge)(s,a)}else t.current.focus()}),[n,e]),t}function nu(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function ru(){const e=(0,d.useSelect)((e=>{const{getSettings:t}=e(sr);return t().outlineMode}),[]);return(0,p.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",nu),t.addEventListener("mouseover",nu),()=>{t.removeEventListener("mouseout",nu),t.removeEventListener("mouseover",nu),t.classList.remove("is-hovered")}}),[e])}function ou(e){return(0,d.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:r,isBlockSelected:i,isBlockMultiSelected:l,getBlockName:a,getSettings:s,hasSelectedInnerBlock:u,isTyping:p,__unstableIsFullySelected:d,__unstableSelectionHasUnmergeableBlock:f}=t(sr),{outlineMode:y}=s(),m=n(e),g=i(e),h=a(e),b=u(e,!0),v=l(e);return c()({"is-selected":g,"is-highlighted":r(e),"is-multi-selected":v,"is-partially-selected":v&&!d()&&!f(),"is-reusable":(0,o.isReusableBlock)((0,o.getBlockType)(h)),"is-dragging":m,"has-child-selected":b,"remove-outline":g&&y&&p()})}),[e])}function iu(e){return(0,d.useSelect)((t=>{const n=t(sr).getBlockName(e),r=(0,o.getBlockType)(n);if((null==r?void 0:r.apiVersion)>1)return(0,o.getBlockDefaultClassName)(n)}),[e])}function lu(e){return(0,d.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:r}=t(sr),i=r(e);if(null==i||!i.className)return;const l=(0,o.getBlockType)(n(e));return(null==l?void 0:l.apiVersion)>1?i.className:void 0}),[e])}function au(e){return(0,d.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:r,getBlockName:o,getBlockRootClientId:i,isBlockSelected:l}=t(sr);if(!l(e))return;const a=n();return a?c()("is-block-moving-mode",{"can-insert-moving-block":r(o(a),i(e))}):void 0}),[e])}function su(e){const{isBlockSelected:t}=(0,d.useSelect)(sr),{selectBlock:n,selectionChange:r}=(0,d.useDispatch)(sr);return(0,p.useRefEffect)((o=>{function i(i){o.parentElement.closest('[contenteditable="true"]')||(t(e)?i.target.isContentEditable||r(e):Xc(o,i.target)&&n(e))}return o.addEventListener("focusin",i),()=>{o.removeEventListener("focusin",i)}}),[t,n])}var cu=window.wp.keycodes;function uu(e){const t=(0,d.useSelect)((t=>t(sr).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:r}=(0,d.useSelect)(sr),{insertDefaultBlock:o,removeBlock:i}=(0,d.useDispatch)(sr);return(0,p.useRefEffect)((l=>{if(t)return l.addEventListener("keydown",a),l.addEventListener("dragstart",s),()=>{l.removeEventListener("keydown",a),l.removeEventListener("dragstart",s)};function a(t){const{keyCode:a,target:s}=t;a!==cu.ENTER&&a!==cu.BACKSPACE&&a!==cu.DELETE||s!==l||(0,Hi.isTextField)(s)||(t.preventDefault(),a===cu.ENTER?o({},n(e),r(e)+1):i(e))}function s(e){e.preventDefault()}}),[e,t,n,r,o,i])}function pu(e){const{isNavigationMode:t,isBlockSelected:n}=(0,d.useSelect)(sr),{setNavigationMode:r,selectBlock:o}=(0,d.useDispatch)(sr);return(0,p.useRefEffect)((i=>{function l(i){t()&&!i.defaultPrevented&&(i.preventDefault(),n(e)?r(!1):o(e))}return i.addEventListener("mousedown",l),()=>{i.addEventListener("mousedown",l)}}),[e,t,n,r])}function du(){const e=(0,a.useContext)(Gm);return(0,p.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function fu(e){return(0,d.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(sr);return n(e)}),[e])}function yu(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n,className:r,wrapperProps:i={},isAligned:l}=(0,a.useContext)(mu),{index:s,mode:u,name:f,blockApiVersion:y,blockTitle:g,isPartOfSelection:h,adjustScrolling:b,enableAnimation:v}=(0,d.useSelect)((e=>{const{getBlockIndex:t,getBlockMode:r,getBlockName:i,isTyping:l,getGlobalBlockCount:a,isBlockSelected:s,isBlockMultiSelected:c,isAncestorMultiSelected:u,isFirstMultiSelectedBlock:p}=e(sr),d=s(n),f=c(n)||u(n),y=i(n),m=(0,o.getBlockType)(y);return{index:t(n),mode:r(n),name:y,blockApiVersion:(null==m?void 0:m.apiVersion)||1,blockTitle:null==m?void 0:m.title,isPartOfSelection:d||f,adjustScrolling:d||p(n),enableAnimation:!l()&&a()<=200}}),[n]),_=fu(n),k=(0,m.sprintf)((0,m.__)("Block: %s"),g),S="html"!==u||t?"":"-visual",E=(0,p.useMergeRefs)([e.ref,tu(n),Pr(n),su(n),uu(n),pu(n),ru(),du(),Jc({isSelected:h,adjustScrolling:b,enableAnimation:v,triggerAnimationOnChange:s}),(0,p.useDisabled)({isDisabled:!_})]),w=dr();return y<2&&n===w.clientId&&"undefined"!=typeof process&&process.env,{tabIndex:0,...i,...e,ref:E,id:`block-${n}${S}`,role:"document","aria-label":k,"data-block":n,"data-type":f,"data-title":g,className:c()(c()("block-editor-block-list__block",{"wp-block":!l,"has-block-overlay":_}),r,e.className,i.className,ou(n),iu(n),lu(n),au(n)),style:{...i.style,...e.style}}}yu.save=o.__unstableGetBlockProps;const mu=(0,a.createContext)();function gu(e){let{children:t,isHtml:n,...r}=e;return(0,a.createElement)("div",yu(r,{__unstableIsHtml:n}),t)}const hu=(0,d.withSelect)(((e,t)=>{let{clientId:n,rootClientId:r}=t;const{isBlockSelected:o,getBlockMode:i,isSelectionEnabled:l,getTemplateLock:a,__unstableGetBlockWithoutInnerBlocks:s,canRemoveBlock:c,canMoveBlock:u}=e(sr),p=s(n),d=o(n),f=a(r),y=c(n,r),m=u(n,r),{name:g,attributes:h,isValid:b}=p||{};return{mode:i(n),isSelectionEnabled:l(),isLocked:!!f,canRemove:y,canMove:m,block:p,name:g,attributes:h,isValid:b,isSelected:d}})),bu=(0,d.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:r,insertBlocks:i,mergeBlocks:l,replaceBlocks:a,toggleSelection:s,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:p,selectBlock:d}=e(sr);return{setAttributes(e){const{getMultiSelectedBlockClientIds:o}=n.select(sr),i=o(),{clientId:l}=t,a=i.length?i:[l];r(a,e)},onInsertBlocks(e,n){const{rootClientId:r}=t;i(e,n,r)},onInsertBlocksAfter(e){const{clientId:r,rootClientId:o}=t,{getBlockIndex:l}=n.select(sr),a=l(r);i(e,a+1,o)},onMerge(e){const{clientId:r,rootClientId:i}=t,{getPreviousBlockClientId:s,getNextBlockClientId:c,getBlock:f,getBlockAttributes:y,getBlockName:m,getBlockOrder:g}=n.select(sr);if(e){if(i){const e=c(i);if(e){if(m(i)!==m(e))return void l(i,e);{const t=y(i),r=y(e);if(Object.keys(t).every((e=>t[e]===r[e])))return void n.batch((()=>{u(g(e),e,i),p(e,!1)}))}}}const e=c(r);if(!e)return;const t=(0,o.switchToBlockType)(f(e),"*");t&&t.length?a(e,t):l(r,e)}else{const e=s(r);if(e)l(e,r);else if(i){const e=s(i);if(e&&m(i)===m(e)){const t=y(i),r=y(e);if(Object.keys(t).every((e=>t[e]===r[e])))return void n.batch((()=>{u(g(i),i,e),p(i,!1)}))}const t=(0,o.switchToBlockType)(f(i),"*");t&&t.length&&n.batch((()=>{a(i,t),d(t[0].clientId,0)}))}}},onReplace(e,n,r){e.length&&!(0,o.isUnmodifiedDefaultBlock)(e[e.length-1])&&c(),a([t.clientId],e,n,r)},toggleSelection(e){s(e)}}}));var vu=(0,p.compose)(p.pure,hu,bu,(0,p.ifCondition)((e=>{let{block:t}=e;return!!t})),(0,f.withFilters)("editor.BlockListBlock"))((function(e){var t;let{block:{__unstableBlockSource:n},mode:r,isLocked:i,canRemove:l,clientId:s,isSelected:u,isSelectionEnabled:p,className:f,name:y,isValid:m,attributes:g,wrapperProps:h,setAttributes:b,onReplace:v,onInsertBlocksAfter:_,onMerge:k,toggleSelection:S}=e;const{themeSupportsLayout:E,hasContentLockedParent:w,isContentBlock:A,isContentLocking:C,isTemporarilyEditingAsBlocks:I}=(0,d.useSelect)((e=>{const{getSettings:t,__unstableGetContentLockingParent:n,getTemplateLock:r,__unstableGetTemporarilyEditingAsBlocks:i}=e(sr),l=!!n(s);return{themeSupportsLayout:t().supportsLayout,isContentBlock:e(o.store).__experimentalHasContentRoleAttribute(y),hasContentLockedParent:l,isContentLocking:"contentOnly"===r(s)&&!l,isTemporarilyEditingAsBlocks:i()===s}}),[y,s]),{removeBlock:x}=(0,d.useDispatch)(sr),B=(0,a.useCallback)((()=>x(s)),[s]);let P=(0,a.createElement)(Yi,{name:y,isSelected:u,attributes:g,setAttributes:b,insertBlocksAfter:i?void 0:_,onReplace:l?v:void 0,onRemove:l?B:void 0,mergeBlocks:l?k:void 0,clientId:s,isSelectionEnabled:p,toggleSelection:S});const T=(0,o.getBlockType)(y);w&&!A&&(h={...h,tabIndex:-1}),null!=T&&T.getEditWrapperProps&&(h=function(e,t){const n={...e,...t};return null!=e&&e.className&&null!=t&&t.className&&(n.className=c()(e.className,t.className)),null!=e&&e.style&&null!=t&&t.style&&(n.style={...e.style,...t.style}),n}(h,T.getEditWrapperProps(g)));const O=h&&!!h["data-align"]&&!E;let R;if(O&&(P=(0,a.createElement)("div",{className:"wp-block","data-align":h["data-align"]},P)),m)R="html"===r?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{style:{display:"none"}},P),(0,a.createElement)(gu,{isHtml:!0},(0,a.createElement)(cl,{clientId:s}))):(null==T?void 0:T.apiVersion)>1?P:(0,a.createElement)(gu,h,P);else{const e=n?(0,o.serializeRawBlock)(n):(0,o.getSaveContent)(T,g);R=(0,a.createElement)(gu,{className:"has-warning"},(0,a.createElement)(rl,{clientId:s}),(0,a.createElement)(a.RawHTML,null,(0,Hi.safeHTML)(e)))}const{"data-align":N,...F}=null!==(t=h)&&void 0!==t?t:{},M={clientId:s,className:c()({"is-content-locked":C,"is-content-locked-temporarily-editing-as-blocks":I,"is-content-block":w&&A},N&&E&&`align${N}`,f),wrapperProps:F,isAligned:O},D=(0,a.useMemo)((()=>M),Object.values(M));return(0,a.createElement)(mu.Provider,{value:D},(0,a.createElement)(al,{fallback:(0,a.createElement)(gu,{className:"has-warning"},(0,a.createElement)(il,null))},R))})),_u=window.wp.htmlEntities;var ku=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const Su=[(0,a.createInterpolateElement)((0,m.__)("While writing, you can press / to quickly insert new blocks."),{kbd:(0,a.createElement)("kbd",null)}),(0,a.createInterpolateElement)((0,m.__)("Indent a list by pressing space at the beginning of a line."),{kbd:(0,a.createElement)("kbd",null)}),(0,a.createInterpolateElement)((0,m.__)("Outdent a list by pressing backspace at the beginning of a line."),{kbd:(0,a.createElement)("kbd",null)}),(0,m.__)("Drag files into the editor to automatically insert media blocks."),(0,m.__)("Change a block's type by pressing the block icon on the toolbar.")];var Eu=function(){const[e]=(0,a.useState)(Math.floor(Math.random()*Su.length));return(0,a.createElement)(f.Tip,null,Su[e])};var wu=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));var Au=(0,a.memo)((function(e){var t;let{icon:n,showColors:r=!1,className:o}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:wu});const i=(0,a.createElement)(f.Icon,{icon:n&&n.src?n.src:n}),l=r?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,a.createElement)("span",{style:l,className:c()("block-editor-block-icon",o,{"has-colors":r})},i)}));var Cu=function(e){let{title:t,icon:n,description:r,blockType:o}=e;return o&&(j()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:r}=o)),(0,a.createElement)("div",{className:"block-editor-block-card"},(0,a.createElement)(Au,{icon:n,showColors:!0}),(0,a.createElement)("div",{className:"block-editor-block-card__content"},(0,a.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,a.createElement)("span",{className:"block-editor-block-card__description"},r)))};const Iu=(0,p.createHigherOrderComponent)((e=>(0,d.withRegistry)((t=>{let{useSubRegistry:n=!0,registry:r,...o}=t;if(!n)return(0,a.createElement)(e,l({registry:r},o));const[i,s]=(0,a.useState)(null);return(0,a.useEffect)((()=>{const e=(0,d.createRegistry)({},r);e.registerStore(lr,ar),s(e)}),[r]),i?(0,a.createElement)(d.RegistryProvider,{value:i},(0,a.createElement)(e,l({registry:i},o))):null}))),"withRegistryProvider");const xu=()=>{};function Bu(e){let{clientId:t=null,value:n,selection:r,onChange:i=xu,onInput:l=xu}=e;const s=(0,d.useRegistry)(),{resetBlocks:c,resetSelection:u,replaceInnerBlocks:p,setHasControlledInnerBlocks:f,__unstableMarkNextChangeAsNotPersistent:y}=s.dispatch(sr),{getBlockName:m,getBlocks:g}=s.select(sr),h=(0,d.useSelect)((e=>!t||e(sr).areInnerBlocksControlled(t)),[t]),b=(0,a.useRef)({incoming:null,outgoing:[]}),v=(0,a.useRef)(!1),_=()=>{n&&(y(),t?s.batch((()=>{f(t,!0);const e=n.map((e=>(0,o.cloneBlock)(e)));v.current&&(b.current.incoming=e),y(),p(t,e)})):(v.current&&(b.current.incoming=n),c(n)))},k=(0,a.useRef)(l),S=(0,a.useRef)(i);(0,a.useEffect)((()=>{k.current=l,S.current=i}),[l,i]),(0,a.useEffect)((()=>{b.current.outgoing.includes(n)?b.current.outgoing[b.current.outgoing.length-1]===n&&(b.current.outgoing=[]):g(t)!==n&&(b.current.outgoing=[],_(),r&&u(r.selectionStart,r.selectionEnd,r.initialPosition))}),[n,t]),(0,a.useEffect)((()=>{h||(b.current.outgoing=[],_())}),[h]),(0,a.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:r,isLastBlockChangePersistent:o,__unstableIsLastBlockChangeIgnored:i,areInnerBlocksControlled:l}=s.select(sr);let a=g(t),c=o(),u=!1;v.current=!0;const p=s.subscribe((()=>{if(null!==t&&null===m(t))return;if(!(!t||l(t)))return;const s=o(),p=g(t),d=p!==a;if(a=p,d&&(b.current.incoming||i()))return b.current.incoming=null,void(c=s);if(d||u&&!d&&s&&!c){c=s,b.current.outgoing.push(a);(c?S.current:k.current)(a,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:r()}})}u=d}));return()=>p()}),[s,t])}var Pu=Iu((function(e){const{children:t,settings:n}=e,{updateSettings:r}=(0,d.useDispatch)(sr);return(0,a.useEffect)((()=>{r(n)}),[n]),Bu(e),(0,a.createElement)(Br,null,t)}));function Tu(e){let{onClick:t}=e;return(0,a.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},(0,a.createElement)(f.Disabled,null,(0,a.createElement)(Wm,null)))}function Ou(){const{hasSelectedBlock:e,hasMultiSelection:t}=(0,d.useSelect)(sr),{clearSelectedBlock:n}=(0,d.useDispatch)(sr);return(0,p.useRefEffect)((r=>{function o(o){(e()||t())&&o.target===r&&n()}return r.addEventListener("mousedown",o),()=>{r.removeEventListener("mousedown",o)}}),[e,t,n])}function Ru(e){return(0,a.createElement)("div",l({ref:Ou()},e))}function Nu(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:r,getSelectedBlockClientId:o,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:l}=e(sr);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:r(),selectedBlockClientId:o(),initialPosition:i(),isFullSelection:l()}}function Fu(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:r,selectedBlockClientId:o,isFullSelection:i}=(0,d.useSelect)(Nu,[]);return(0,p.useRefEffect)((o=>{const{ownerDocument:l}=o,{defaultView:a}=l;if(null==e)return;if(!r||t)return;const{length:s}=n;s<2||i&&(o.contentEditable=!0,o.focus(),a.getSelection().removeAllRanges())}),[r,t,n,o,e,i])}function Mu(e,t,n,r){let o,i=Hi.focus.focusable.find(n);return t&&i.reverse(),i=i.slice(i.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),i.find((function(e){if(!Hi.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(r){const t=e.getBoundingClientRect();if(t.left>=o.right||t.right<=o.left)return!1}return!0}))}function Du(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:r,__unstableIsFullySelected:o}=(0,d.useSelect)(sr),{selectBlock:i}=(0,d.useDispatch)(sr);return(0,p.useRefEffect)((l=>{let a;function s(){a=null}function c(s){const{keyCode:c,target:u}=s,p=c===cu.UP,d=c===cu.DOWN,f=c===cu.LEFT,y=c===cu.RIGHT,m=p||f,g=f||y,h=p||d,b=g||h,v=s.shiftKey,_=v||s.ctrlKey||s.altKey||s.metaKey,k=h?Hi.isVerticalEdge:Hi.isHorizontalEdge,{ownerDocument:S}=l,{defaultView:E}=S;if(r()){if(!o())return;if(s.defaultPrevented)return;if(!b)return;if(v)return;return s.preventDefault(),void(m?i(e()):i(t(),-1))}if(h?a||(a=(0,Hi.computeCaretRect)(E)):a=null,s.defaultPrevented)return;if(!b)return;if(!function(e,t,n){if((t===cu.UP||t===cu.DOWN)&&!n)return!0;const{tagName:r}=e;if("INPUT"===r)return["button","checkbox","color","file","image","radio","reset","submit"].includes(e.getAttribute("type"));return"TEXTAREA"!==r}(u,c,_))return;const w=(0,Hi.isRTL)(u)?!m:m,{keepCaretInsideBlock:A}=n();if(v)(function(e,t){const n=Mu(e,t,l);return n&&eu(n)})(u,m)&&k(u,m)&&(l.contentEditable=!0,l.focus());else if(h&&(0,Hi.isVerticalEdge)(u,m)&&!A){const e=Mu(u,m,l,!0);e&&((0,Hi.placeCaretAtVerticalEdge)(e,m,a),s.preventDefault())}else if(g&&E.getSelection().isCollapsed&&(0,Hi.isHorizontalEdge)(u,w)&&!A){const e=Mu(u,w,l);(0,Hi.placeCaretAtHorizontalEdge)(e,m),s.preventDefault()}}return l.addEventListener("mousedown",s),l.addEventListener("keydown",c),()=>{l.removeEventListener("mousedown",s),l.removeEventListener("keydown",c)}}),[])}var Lu=window.wp.keyboardShortcuts;function Uu(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,d.useSelect)(sr),{multiSelect:r,selectBlock:o}=(0,d.useDispatch)(sr),i=(0,Lu.__unstableUseShortcutEventMatch)();return(0,p.useRefEffect)((l=>{function a(a){if(!i("core/block-editor/select-all",a))return;const s=t();if(s.length<2&&!(0,Hi.isEntirelySelected)(a.target))return;a.preventDefault();const[c]=s,u=n(c),p=e(u);s.length!==p.length?r(p[0],p[p.length-1]):u&&(l.ownerDocument.defaultView.getSelection().removeAllRanges(),o(u))}return l.addEventListener("keydown",a),()=>{l.removeEventListener("keydown",a)}}),[])}function ju(e,t){e.contentEditable=t,t&&e.focus()}function zu(){const{startMultiSelect:e,stopMultiSelect:t}=(0,d.useDispatch)(sr),{isSelectionEnabled:n,hasMultiSelection:r,isDraggingBlocks:o}=(0,d.useSelect)(sr);return(0,p.useRefEffect)((i=>{const{ownerDocument:l}=i,{defaultView:a}=l;let s,c;function u(){t(),a.removeEventListener("mouseup",u),c=a.requestAnimationFrame((()=>{if(r())return;ju(i,!1);const e=a.getSelection();if(e.rangeCount){const{commonAncestorContainer:t}=e.getRangeAt(0);s.contains(t)&&s.focus()}}))}function p(t){let{buttons:r,target:c}=t;o()||1===r&&c.getAttribute("contenteditable")&&n()&&(s=l.activeElement,e(),a.addEventListener("mouseup",u),ju(i,!0))}return i.addEventListener("mouseout",p),()=>{i.removeEventListener("mouseout",p),a.removeEventListener("mouseup",u),a.cancelAnimationFrame(c)}}),[e,t,n,r])}function Vu(e,t){e.contentEditable=t,t&&e.focus()}function Gu(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,d.useDispatch)(sr),{getBlockParents:r,getBlockSelectionStart:o}=(0,d.useSelect)(sr);return(0,p.useRefEffect)((n=>{const{ownerDocument:i}=n,{defaultView:l}=i;function a(i){const a=l.getSelection();if(!a.rangeCount)return;const s=i.shiftKey&&"mouseup"===i.type;if(a.isCollapsed&&!s)return void Vu(n,!1);let c=eu(function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(a)),u=eu(function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:t.childNodes[n]}(a));if(s){const e=o(),t=eu(i.target),n=t!==u;(c===u&&a.isCollapsed||!u||n)&&(u=t),c!==e&&(c=e)}if(void 0===c&&void 0===u)return void Vu(n,!1);if(c===u)t(c);else{const t=[...r(c),c],n=[...r(u),u],o=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,n);e(t[o],n[o])}}function s(){i.addEventListener("selectionchange",a),l.addEventListener("mouseup",a)}function c(){i.removeEventListener("selectionchange",a),l.removeEventListener("mouseup",a)}function u(){c(),s()}return s(),n.addEventListener("focusin",u),()=>{c(),n.removeEventListener("focusin",u)}}),[e,t,n,r])}function Hu(){const{selectBlock:e}=(0,d.useDispatch)(sr),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:r}=(0,d.useSelect)(sr);return(0,p.useRefEffect)((o=>{function i(i){if(!t()||0!==i.button)return;const l=n(),a=eu(i.target);i.shiftKey?l!==a&&(o.contentEditable=!0,o.focus()):r()&&e(a)}return o.addEventListener("mousedown",i),()=>{o.removeEventListener("mousedown",i)}}),[e,t,n,r])}function Wu(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:r}=(0,d.useSelect)(sr),{replaceBlocks:i,__unstableSplitSelection:l,removeBlocks:a,__unstableDeleteSelection:s,__unstableExpandSelection:c}=(0,d.useDispatch)(sr);return(0,p.useRefEffect)((u=>{function p(e){var t;r()&&null!==(t=e.inputType)&&void 0!==t&&t.startsWith("format")&&e.preventDefault()}function d(p){p.defaultPrevented||r()&&(p.keyCode===cu.ENTER?(u.contentEditable=!1,p.preventDefault(),e()?i(t(),(0,o.createBlock)((0,o.getDefaultBlockName)())):l()):p.keyCode===cu.BACKSPACE||p.keyCode===cu.DELETE?(u.contentEditable=!1,p.preventDefault(),e()?a(t()):n()?s(p.keyCode===cu.DELETE):c()):1!==p.key.length||p.metaKey||p.ctrlKey||(u.contentEditable=!1,n()?s(p.keyCode===cu.DELETE):(p.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges())))}function f(e){r()&&(u.contentEditable=!1,n()?s():(e.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges()))}return u.addEventListener("beforeinput",p),u.addEventListener("keydown",d),u.addEventListener("compositionstart",f),()=>{u.removeEventListener("beforeinput",p),u.removeEventListener("keydown",d),u.removeEventListener("compositionstart",f)}}),[])}function $u(){const[e,t,n]=function(){const e=(0,a.useRef)(),t=(0,a.useRef)(),n=(0,a.useRef)(),r=(0,a.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:i,getBlockCount:l}=(0,d.useSelect)(sr),{setNavigationMode:s}=(0,d.useDispatch)(sr),c=(0,d.useSelect)((e=>e(sr).isNavigationMode()),[])?void 0:"0",u=(0,a.useRef)();function f(t){if(u.current)u.current=null;else if(o())e.current.focus();else if(i())r.current.focus();else{s(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";Hi.focus.tabbable[n](t.target).focus()}}const y=(0,a.createElement)("div",{ref:t,tabIndex:c,onFocus:f}),m=(0,a.createElement)("div",{ref:n,tabIndex:c,onFocus:f}),g=(0,p.useRefEffect)((a=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===cu.ESCAPE)return e.preventDefault(),void s(!0);if(e.keyCode!==cu.TAB)return;const r=e.shiftKey,l=r?"findPrevious":"findNext";if(!o()&&!i())return void(e.target===a&&s(!0));if(((0,Hi.isFormElement)(e.target)||e.target.getAttribute("data-block")===i())&&(0,Hi.isFormElement)(Hi.focus.tabbable[l](e.target)))return;const c=r?t:n;u.current=!0,c.current.focus({preventScroll:!0})}function p(e){r.current=e.target;const{ownerDocument:t}=a;e.relatedTarget||t.activeElement!==t.body||0!==l()||a.focus()}function d(r){var o;if(r.keyCode!==cu.TAB)return;if("region"===(null===(o=r.target)||void 0===o?void 0:o.getAttribute("role")))return;if(e.current===r.target)return;const i=r.shiftKey?"findPrevious":"findNext",l=Hi.focus.tabbable[i](r.target);l!==t.current&&l!==n.current||(r.preventDefault(),l.focus({preventScroll:!0}))}const{ownerDocument:f}=a,{defaultView:y}=f;return y.addEventListener("keydown",d),a.addEventListener("keydown",c),a.addEventListener("focusout",p),()=>{y.removeEventListener("keydown",d),a.removeEventListener("keydown",c),a.removeEventListener("focusout",p)}}),[]);return[y,(0,p.useMergeRefs)([e,g]),m]}(),r=(0,d.useSelect)((e=>e(sr).hasMultiSelection()),[]);return[e,(0,p.useMergeRefs)([t,Wu(),zu(),Gu(),Hu(),Fu(),Uu(),Du(),(0,p.useRefEffect)((e=>{if(e.tabIndex=-1,e.contentEditable=r,r)return e.classList.add("has-multi-selection"),e.setAttribute("aria-label",(0,m.__)("Multiple selected blocks")),()=>{e.classList.remove("has-multi-selection"),e.removeAttribute("aria-label")}}),[r])]),n]}var Ku=(0,a.forwardRef)((function(e,t){let{children:n,...r}=e;const[o,i,s]=$u();return(0,a.createElement)(a.Fragment,null,o,(0,a.createElement)("div",l({},r,{ref:(0,p.useMergeRefs)([i,t]),className:c()(r.className,"block-editor-writing-flow")}),n),s)}));const qu="editor-styles-wrapper";function Ju(e){return(0,a.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}var Yu=(0,a.forwardRef)((function(e,t){let{contentRef:n,children:r,head:o,tabIndex:i=0,assets:s,isZoomedOut:u,...d}=e;const[,y]=(0,a.useReducer)((()=>({}))),[g,h]=(0,a.useState)(),[b,v]=(0,a.useState)([]),_=Ju(null==s?void 0:s.styles),k=Ju(null==s?void 0:s.scripts),S=Ou(),[E,w,A]=$u(),[C,{height:I}]=(0,p.useResizeObserver)(),x=(0,p.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function r(){const{contentDocument:r,ownerDocument:o}=e,{readyState:i,documentElement:l}=r;return t=r,("interactive"===i||"complete"===i)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function r(e){const r=Object.getPrototypeOf(e).constructor.name,o=window[r],i={};for(const t in e)i[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();i.clientX+=e.left,i.clientY+=e.top}const l=new o(e.type,i);!n.dispatchEvent(l)&&e.preventDefault()}const o=["dragover"];for(const t of o)e.addEventListener(t,r)}(r),h(r),S(l),v(Array.from(o.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),r.dir=o.dir,l.removeChild(r.head),l.removeChild(r.body),t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1),!0)}return e.addEventListener("load",r),()=>{var o,i;e.removeEventListener("load",r),null===(o=t)||void 0===o||o.removeEventListener("dragover",n),null===(i=t)||void 0===i||i.removeEventListener("drop",n)}}),[]),B=(0,p.useRefEffect)((e=>{k.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:r}=t;return new Promise(((t,o)=>{const i=e.ownerDocument.createElement("script");i.id=n,r?(i.src=r,i.onload=()=>t(),i.onerror=()=>o()):t(),e.appendChild(i)}))}(e,n)))),Promise.resolve()).finally((()=>{y()}))}),[]),P=(0,p.useMergeRefs)([n,S,w]),T=(0,p.useRefEffect)((e=>{Array.from(document.styleSheets).forEach((t=>{try{t.cssRules}catch(e){return}const{ownerNode:n,cssRules:r}=t;if(r&&"LINK"===n.tagName&&"wp-reset-editor-styles-css"!==n.id&&function e(t){return Array.from(t).find((t=>{let{selectorText:n,conditionText:r,cssRules:o}=t;return r?e(o):n&&(n.includes(`.${qu}`)||n.includes(".wp-block"))}))}(r)&&!e.ownerDocument.getElementById(n.id)){e.appendChild(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),r=document.getElementById(t);r&&e.appendChild(r.cloneNode(!0))}}))}),[]);return o=(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,"html{height:auto!important;}body{margin:0}"),_.map((e=>{let{tagName:t,href:n,id:r,rel:o,media:i,textContent:l}=e;const s=t.toLowerCase();return"style"===s?(0,a.createElement)(s,{id:r,key:r},l):(0,a.createElement)(s,{href:n,id:r,rel:o,media:i,key:r})})),o),(0,a.createElement)(a.Fragment,null,i>=0&&E,(0,a.createElement)("iframe",l({},d,{ref:(0,p.useMergeRefs)([t,x]),tabIndex:i,srcDoc:"",title:(0,m.__)("Editor canvas")}),g&&(0,a.createPortal)((0,a.createElement)(a.Fragment,null,(0,a.createElement)("head",{ref:B},o,(0,a.createElement)("style",null,`html { transition: background 5s; ${u?"background: #2f2f2f; transition: background 0s;":""} }`)),(0,a.createElement)("body",{ref:P,className:c()("block-editor-iframe__body",qu,...b,{"is-zoomed-out":u}),style:u?{marginBottom:`-${.55*I-100}px`}:{}},C,(0,a.createElement)("div",{style:{display:"none"},ref:T}),(0,a.createElement)(f.__experimentalStyleProvider,{document:g},r))),g.documentElement)),i>=0&&A)})),Qu={grad:.9,turn:360,rad:360/(2*Math.PI)},Zu=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Xu=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},ep=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},tp=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},np=function(e){return{r:ep(e.r,0,255),g:ep(e.g,0,255),b:ep(e.b,0,255),a:ep(e.a)}},rp=function(e){return{r:Xu(e.r),g:Xu(e.g),b:Xu(e.b),a:Xu(e.a,3)}},op=/^#([0-9a-f]{3,8})$/i,ip=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},lp=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),l=i-Math.min(t,n,r),a=l?i===t?(n-r)/l:i===n?2+(r-t)/l:4+(t-n)/l:0;return{h:60*(a<0?a+6:a),s:i?l/i*100:0,v:i/255*100,a:o}},ap=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),l=r*(1-n),a=r*(1-(t-i)*n),s=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,a,l,l,s,r][c],g:255*[s,r,r,a,l,l][c],b:255*[l,l,s,r,r,a][c],a:o}},sp=function(e){return{h:tp(e.h),s:ep(e.s,0,100),l:ep(e.l,0,100),a:ep(e.a)}},cp=function(e){return{h:Xu(e.h),s:Xu(e.s),l:Xu(e.l),a:Xu(e.a,3)}},up=function(e){return ap((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},pp=function(e){return{h:(t=lp(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},dp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,yp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,mp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gp={string:[[function(e){var t=op.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Xu(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Xu(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=yp.exec(e)||mp.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:np({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=dp.exec(e)||fp.exec(e);if(!t)return null;var n,r,o=sp({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(Qu[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return up(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=void 0===o?1:o;return Zu(t)&&Zu(n)&&Zu(r)?np({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,i=void 0===o?1:o;if(!Zu(t)||!Zu(n)||!Zu(r))return null;var l=sp({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return up(l)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!Zu(t)||!Zu(n)||!Zu(r))return null;var l=function(e){return{h:tp(e.h),s:ep(e.s,0,100),v:ep(e.v,0,100),a:ep(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return ap(l)},"hsv"]]},hp=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=rp(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?ip(Xu(255*o)):"","#"+ip(t)+ip(n)+ip(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return rp(this.rgba)},e.prototype.toRgbString=function(){return t=(e=rp(this.rgba)).r,n=e.g,r=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+r+", "+o+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,o},e.prototype.toHsl=function(){return cp(pp(this.rgba))},e.prototype.toHslString=function(){return t=(e=cp(pp(this.rgba))).h,n=e.s,r=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+o+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,o},e.prototype.toHsv=function(){return e=lp(this.rgba),{h:Xu(e.h),s:Xu(e.s),v:Xu(e.v),a:Xu(e.a,3)};var e},e.prototype.invert=function(){return Ep({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),Ep(vp(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Ep(vp(this.rgba,-e))},e.prototype.grayscale=function(){return Ep(vp(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Ep(kp(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Ep(kp(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?Ep({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Xu(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=pp(this.rgba);return"number"==typeof e?Ep({h:e,s:t.s,l:t.l,a:t.a}):Xu(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Ep(e).toHex()},e}(),Ep=function(e){return e instanceof Sp?e:new Sp(e)},wp=[],Ap=function(e){e.forEach((function(e){wp.indexOf(e)<0&&(e(Sp,gp),wp.push(e))}))};function Cp(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var o in n)r[n[o]]=o;var i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,l,a=r[this.toHex()];if(a)return a;if(null==t?void 0:t.closest){var s=this.toRgb(),c=1/0,u="black";if(!i.length)for(var p in n)i[p]=new e(n[p]).toRgb();for(var d in n){var f=(o=s,l=i[d],Math.pow(o.r-l.r,2)+Math.pow(o.g-l.g,2)+Math.pow(o.b-l.b,2));f(s=xp(l))?(a+.05)/(s+.05):(s+.05)/(a+.05),void 0===(r=2)&&(r=0),void 0===o&&(o=Math.pow(10,r)),Math.floor(o*n)/o+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(l=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===l?7:"AA"===o&&"large"===l?3:4.5);var n,r,o,i,l}}var Pp=n(3124),Tp=n.n(Pp);const Op=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Rp(e,t){t=t||{};let n=1,r=1;function o(e){const t=e.match(/\n/g);t&&(n+=t.length);const o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){const e={line:n,column:r};return function(t){return t.position=new l(e),f(),t}}function l(e){this.start=e,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;const a=[];function s(o){const i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;a.push(i)}function c(){return d(/^{\s*/)}function u(){return d(/^}/)}function p(){let t;const n=[];for(f(),y(n);e.length&&"}"!==e.charAt(0)&&(t=w()||A());)!1!==t&&(n.push(t),y(n));return n}function d(t){const n=t.exec(e);if(!n)return;const r=n[0];return o(r),e=e.slice(r.length),n}function f(){d(/^\s*/)}function y(e){let t;for(e=e||[];t=m();)!1!==t&&e.push(t);return e}function m(){const t=i();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return s("End of comment missing");const l=e.slice(2,n-2);return r+=2,o(l),e=e.slice(n),r+=2,t({type:"comment",comment:l})}function g(){const e=d(/^([^{]+)/);if(e)return Np(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 h(){const e=i();let t=d(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Np(t[0]),!d(/^:\s*/))return s("property missing ':'");const n=d(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(Op,""),value:n?Np(n[0]).replace(Op,""):""});return d(/^[;\s]*/),r}function b(){const e=[];if(!c())return s("missing '{'");let t;for(y(e);t=h();)!1!==t&&(e.push(t),y(e));return u()?e:s("missing '}'")}function v(){let e;const t=[],n=i();for(;e=d(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),d(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:b()})}const _=E("import"),k=E("charset"),S=E("namespace");function E(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=i(),r=d(t);if(!r)return;const o={type:e};return o[e]=r[1].trim(),n(o)}}function w(){if("@"===e[0])return function(){const e=i();let t=d(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=d(/^([-\w]+)\s*/),!t)return s("@keyframes missing name");const r=t[1];if(!c())return s("@keyframes missing '{'");let o,l=y();for(;o=v();)l.push(o),l=l.concat(y());return u()?e({type:"keyframes",name:r,vendor:n,keyframes:l}):s("@keyframes missing '}'")}()||function(){const e=i(),t=d(/^@media *([^{]+)/);if(!t)return;const n=Np(t[1]);if(!c())return s("@media missing '{'");const r=y().concat(p());return u()?e({type:"media",media:n,rules:r}):s("@media missing '}'")}()||function(){const e=i(),t=d(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Np(t[1]),media:Np(t[2])})}()||function(){const e=i(),t=d(/^@supports *([^{]+)/);if(!t)return;const n=Np(t[1]);if(!c())return s("@supports missing '{'");const r=y().concat(p());return u()?e({type:"supports",supports:n,rules:r}):s("@supports missing '}'")}()||_()||k()||S()||function(){const e=i(),t=d(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Np(t[1]),r=Np(t[2]);if(!c())return s("@document missing '{'");const o=y().concat(p());return u()?e({type:"document",document:r,vendor:n,rules:o}):s("@document missing '}'")}()||function(){const e=i();if(!d(/^@page */))return;const t=g()||[];if(!c())return s("@page missing '{'");let n,r=y();for(;n=h();)r.push(n),r=r.concat(y());return u()?e({type:"page",selectors:t,declarations:r}):s("@page missing '}'")}()||function(){const e=i();if(!d(/^@host\s*/))return;if(!c())return s("@host missing '{'");const t=y().concat(p());return u()?e({type:"host",rules:t}):s("@host missing '}'")}()||function(){const e=i();if(!d(/^@font-face\s*/))return;if(!c())return s("@font-face missing '{'");let t,n=y();for(;t=h();)n.push(t),n=n.concat(y());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}()}function A(){const e=i(),t=g();return t?(y(),e({type:"rule",selectors:t,declarations:b()})):s("selector missing")}return Fp(function(){const e=p();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:a}}}())}function Np(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Fp(e,t){const n=e&&"string"==typeof e.type,r=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){Fp(e,r)})):n&&"object"==typeof n&&Fp(n,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Mp=n(8575),Dp=n.n(Mp),Lp=Up;function Up(e){this.options=e||{}}Up.prototype.emit=function(e){return e},Up.prototype.visit=function(e){return this[e.type](e)},Up.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let r=0,o=e.length;rt=>{if("declaration"===t.type){const i=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const r=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};Wp(e)&&r.push(e)}return r}(t.value).map((o=e,e=>({...e,newUrl:"url("+e.before+e.quote+$p(e.value,o)+e.quote+e.after+")"})));return{...t,value:(n=t.value,r=i,r.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,r,o;return t};const qp=/^(body|html|:root).*$/;var Jp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>{const r=n=>t.includes(n.trim())?n:n.match(qp)?n.replace(/^(body|html|:root)/,e):e+" "+n;return"rule"===n.type?{...n,selectors:n.selectors.map(r)}:n}};var Yp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(e,(e=>{let{css:n,baseURL:r}=e;const o=[];return t&&o.push(Jp(t)),r&&o.push(Kp(r)),o.length?Hp(n,(0,p.compose)(o)):n}))};const Qp=".editor-styles-wrapper";function Zp(e){return(0,a.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:r}=t,o=t.querySelector(Qp);let i;if(o)i=n.getComputedStyle(o,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),r.appendChild(e),i=n.getComputedStyle(e,null).getPropertyValue("background-color"),r.removeChild(e)}const l=Ep(i);l.luminance()>.5||0===l.alpha()?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}),[e])}function Xp(e){let{styles:t}=e;const n=(0,a.useMemo)((()=>Yp(t,Qp)),[t]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",{ref:Zp(t)}),n.map(((e,t)=>(0,a.createElement)("style",{key:t},e))))}function ed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Ep(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}function td(e){let{selector:t,id:n}=e;const r=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,a.createElement)("style",null,r)}function nd(e){let{selector:t}=e;const n=`\n${t} {\n\tfilter: none;\n}\n`;return(0,a.createElement)("style",null,n)}function rd(e){let{id:t,colors:n}=e;const r=ed(n);return(0,a.createElement)(f.SVG,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,a.createElement)("defs",null,(0,a.createElement)("filter",{id:t},(0,a.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,a.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,a.createElement)("feFuncR",{type:"table",tableValues:r.r.join(" ")}),(0,a.createElement)("feFuncG",{type:"table",tableValues:r.g.join(" ")}),(0,a.createElement)("feFuncB",{type:"table",tableValues:r.b.join(" ")}),(0,a.createElement)("feFuncA",{type:"table",tableValues:r.a.join(" ")})),(0,a.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"}))))}function od(e){let{preset:t}=e;return(0,a.createElement)(rd,{id:`wp-duotone-${t.slug}`,colors:t.colors})}let id;Ap([Cp,Bp]);const ld=2e3;var ad=function(e){let{viewportWidth:t,__experimentalPadding:n,__experimentalMinHeight:r}=e;const[o,{width:i}]=(0,p.useResizeObserver)(),[l,{height:s}]=(0,p.useResizeObserver)(),{styles:c,assets:u,duotone:y}=(0,d.useSelect)((e=>{var t,n;const r=e(sr).getSettings();return{styles:r.styles,assets:r.__unstableResolvedAssets,duotone:null===(t=r.__experimentalFeatures)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.duotone}}),[]),m=(0,a.useMemo)((()=>c?[...c,{css:"body{height:auto;overflow:hidden;}",__unstableType:"presets"}]:c),[c]),g=(0,a.useMemo)((()=>{var e,t;return[...null!==(e=null==y?void 0:y.default)&&void 0!==e?e:[],...null!==(t=null==y?void 0:y.theme)&&void 0!==t?t:[]]}),[y]);id=id||(0,p.pure)(Wm);const h=i/t;return(0,a.createElement)("div",{className:"block-editor-block-preview__container"},o,(0,a.createElement)(f.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${h})`,height:s*h,maxHeight:s>ld?ld*h:void 0,minHeight:r}},(0,a.createElement)(Yu,{head:(0,a.createElement)(Xp,{styles:m}),assets:u,contentRef:(0,p.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.padding=n+"px",e.style.boxSizing="border-box",e.style.position="absolute",e.style.width="100%"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:s,pointerEvents:"none",maxHeight:ld,minHeight:0!==h&&h<1&&r?r/h:r}},l,g.map((e=>(0,a.createElement)(od,{preset:e,key:e.slug}))),(0,a.createElement)(id,{renderAppender:!1}))))};var sd=(0,a.memo)((function(e){let{blocks:t,__experimentalPadding:n=0,viewportWidth:r=1200,__experimentalLive:o=!1,__experimentalOnClick:i,__experimentalMinHeight:l}=e;const s=(0,d.useSelect)((e=>e(sr).getSettings()),[]),c=(0,a.useMemo)((()=>{const e={...s};return e.__experimentalBlockPatterns=[],e}),[s]),p=(0,a.useMemo)((()=>(0,u.castArray)(t)),[t]);return t&&0!==t.length?(0,a.createElement)(Pu,{value:p,settings:c},o?(0,a.createElement)(Tu,{onClick:i}):(0,a.createElement)(ad,{viewportWidth:r,__experimentalPadding:n,__experimentalMinHeight:l})):null}));function cd(e){let{blocks:t,props:n={},__experimentalLayout:r}=e;const o=(0,d.useSelect)((e=>e(sr).getSettings()),[]),i=(0,p.useDisabled)(),l=(0,p.useMergeRefs)([n.ref,i]),s=(0,a.useMemo)((()=>({...o,__experimentalBlockPatterns:[]})),[o]),f=(0,a.useMemo)((()=>(0,u.castArray)(t)),[t]),y=(0,a.createElement)(Pu,{value:f,settings:s},(0,a.createElement)(Km,{renderAppender:!1,__experimentalLayout:r}));return{...n,ref:l,className:c()(n.className,"block-editor-block-preview__live-content","components-disabled"),children:null!=t&&t.length?y:null}}var ud=function(e){var t;let{item:n}=e;const{name:r,title:i,icon:l,description:s,initialAttributes:c,example:u}=n,p=(0,o.isReusableBlock)(n);return(0,a.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,a.createElement)("div",{className:"block-editor-inserter__preview"},p||u?(0,a.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,a.createElement)(sd,{__experimentalPadding:16,viewportWidth:null!==(t=null==u?void 0:u.viewportWidth)&&void 0!==t?t:500,blocks:u?(0,o.getBlockFromExample)(r,{attributes:{...u.attributes,...c},innerBlocks:u.innerBlocks}):(0,o.createBlock)(r,c)})):(0,a.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,m.__)("No Preview Available."))),!p&&(0,a.createElement)(Cu,{title:i,icon:l,description:s}))};var pd=(0,a.createContext)();var dd=(0,a.forwardRef)((function(e,t){let{isFirst:n,as:r,children:o,...i}=e;const s=(0,a.useContext)(pd);return(0,a.createElement)(f.__unstableCompositeItem,l({ref:t,state:s,role:"option",focusable:!0},i),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return r?(0,a.createElement)(r,t,o):"function"==typeof o?o(t):(0,a.createElement)(f.Button,t,o)}))}));var fd=(0,a.createElement)(M.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"}));function yd(e){let{count:t,icon:n}=e;return(0,a.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,a.createElement)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip"},(0,a.createElement)(f.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,a.createElement)(f.FlexItem,null,n?(0,a.createElement)(Au,{icon:n}):(0,m.sprintf)((0,m._n)("%d block","%d blocks",t),t)),(0,a.createElement)(f.FlexItem,null,(0,a.createElement)(Au,{icon:fd})))))}var md=e=>{let{isEnabled:t,blocks:n,icon:r,children:o}=e;const i={type:"inserter",blocks:n};return(0,a.createElement)(f.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:i,__experimentalDragComponent:(0,a.createElement)(yd,{count:n.length,icon:r})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return o({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?r:void 0})}))};var gd=(0,a.memo)((function(e){let{className:t,isFirst:n,item:r,onSelect:i,onHover:s,isDraggable:u,...p}=e;const d=(0,a.useRef)(!1),y=r.icon?{backgroundColor:r.icon.background,color:r.icon.foreground}:{},m=(0,a.useMemo)((()=>[(0,o.createBlock)(r.name,r.initialAttributes,(0,o.createBlocksFromInnerBlocksTemplate)(r.innerBlocks))]),[r.name,r.initialAttributes,r.initialAttributes]);return(0,a.createElement)(md,{isEnabled:u&&!r.disabled,blocks:m,icon:r.icon},(e=>{let{draggable:o,onDragStart:u,onDragEnd:m}=e;return(0,a.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:o,onDragStart:e=>{d.current=!0,u&&(s(null),u(e))},onDragEnd:e=>{d.current=!1,m&&m(e)}},(0,a.createElement)(dd,l({isFirst:n,className:c()("block-editor-block-types-list__item",t),disabled:r.isDisabled,onClick:e=>{e.preventDefault(),i(r,(0,cu.isAppleOS)()?e.metaKey:e.ctrlKey),s(null)},onKeyDown:e=>{const{keyCode:t}=e;t===cu.ENTER&&(e.preventDefault(),i(r,(0,cu.isAppleOS)()?e.metaKey:e.ctrlKey),s(null))},onFocus:()=>{d.current||s(r)},onMouseEnter:()=>{d.current||s(r)},onMouseLeave:()=>s(null),onBlur:()=>s(null)},p),(0,a.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:y},(0,a.createElement)(Au,{icon:r.icon,showColors:!0})),(0,a.createElement)("span",{className:"block-editor-block-types-list__item-title"},(0,a.createElement)(f.__experimentalTruncate,{numberOfLines:3},r.title))))}))}));var hd=(0,a.forwardRef)((function(e,t){const[n,r]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{n&&(0,qt.speak)((0,m.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,a.createElement)("div",l({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&r(!1)}},e))}));var bd=(0,a.forwardRef)((function(e,t){const n=(0,a.useContext)(pd);return(0,a.createElement)(f.__unstableCompositeGroup,l({state:n,role:"presentation",ref:t},e))}));var vd=function(e){let{items:t=[],onSelect:n,onHover:r=(()=>{}),children:i,label:l,isDraggable:s=!0}=e;return(0,a.createElement)(hd,{className:"block-editor-block-types-list","aria-label":l},function(e,t){const n=[];for(let r=0,o=e.length;r(0,a.createElement)(bd,{key:t},e.map(((e,i)=>(0,a.createElement)(gd,{key:e.id,item:e,className:(0,o.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:r,isDraggable:s&&!e.isDisabled,isFirst:0===t&&0===i})))))),i)};var _d=function(e){let{title:t,icon:n,children:r}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,a.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,a.createElement)(f.Icon,{icon:n})),(0,a.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};var kd=(e,t)=>{const{categories:n,collections:r,items:i}=(0,d.useSelect)((t=>{const{getInserterItems:n}=t(sr),{getCategories:r,getCollections:i}=t(o.store);return{categories:r(),collections:i(),items:n(e)}}),[e]);return[i,n,r,(0,a.useCallback)(((e,n)=>{let{name:r,initialAttributes:i,innerBlocks:l}=e;const a=(0,o.createBlock)(r,i,(0,o.createBlocksFromInnerBlocksTemplate)(l));t(a,void 0,n)}),[t])]};var Sd=function(e){let{children:t}=e;const n=(0,f.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,a.createElement)(pd.Provider,{value:n},t)};const Ed=[];var wd=function(e){let{rootClientId:t,onInsert:n,onHover:r,showMostUsedBlocks:o}=e;const[i,l,s,c]=kd(t,n),d=(0,a.useMemo)((()=>(0,u.orderBy)(i,["frecency"],["desc"]).slice(0,6)),[i]),f=(0,a.useMemo)((()=>i.filter((e=>!e.category))),[i]),y=(0,a.useMemo)((()=>(0,u.flow)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,u.groupBy)(e,"category")))(i)),[i]),g=(0,a.useMemo)((()=>{const e={...s};return Object.keys(s).forEach((t=>{e[t]=i.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[i,s]);(0,a.useEffect)((()=>()=>r(null)),[]);const h=(0,p.useAsyncList)(l),b=l.length===h.length,v=(0,a.useMemo)((()=>Object.entries(s)),[s]),_=(0,p.useAsyncList)(b?v:Ed);return(0,a.createElement)(Sd,null,(0,a.createElement)("div",null,o&&!!d.length&&(0,a.createElement)(_d,{title:(0,m._x)("Most used","blocks")},(0,a.createElement)(vd,{items:d,onSelect:c,onHover:r,label:(0,m._x)("Most used","blocks")})),(0,u.map)(h,(e=>{const t=y[e.slug];return t&&t.length?(0,a.createElement)(_d,{key:e.slug,title:e.title,icon:e.icon},(0,a.createElement)(vd,{items:t,onSelect:c,onHover:r,label:e.title})):null})),b&&f.length>0&&(0,a.createElement)(_d,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,m.__)("Uncategorized")},(0,a.createElement)(vd,{items:f,onSelect:c,onHover:r,label:(0,m.__)("Uncategorized")})),(0,u.map)(_,(e=>{let[t,n]=e;const o=g[t];return o&&o.length?(0,a.createElement)(_d,{key:t,title:n.title,icon:n.icon},(0,a.createElement)(vd,{items:o,onSelect:c,onHover:r,label:n.title})):null}))))};var Ad=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r,openPatternExplorer:o}=e;const i=(0,p.useViewportMatch)("medium","<"),l=c()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns");return(0,a.createElement)(f.Flex,{justify:"space-between",align:"start",gap:"4",className:l},(0,a.createElement)(f.FlexItem,{isBlock:!0},(0,a.createElement)(f.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:(0,m.__)("Filter patterns"),hideLabelFromVision:!0,value:t.name,onChange:e=>{r(n.find((t=>e===t.name)))},onBlur:e=>{null!=e&&e.relatedTarget||e.stopPropagation()},options:(()=>{const e=[];return n.map((t=>e.push({value:t.name,label:t.label}))),e})()})),!i&&(0,a.createElement)(f.FlexItem,null,(0,a.createElement)(f.Button,{variant:"secondary",className:"block-editor-inserter__patterns-explorer-expand",label:(0,m.__)("Explore all patterns"),onClick:()=>o()},(0,m._x)("Explore","Label for showing all block patterns"))))},Cd=window.wp.notices;var Id=(e,t)=>{const{patternCategories:n,patterns:r}=(0,d.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:r}=e(sr);return{patterns:n(t),patternCategories:r().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:i}=(0,d.useDispatch)(Cd.store),l=(0,a.useCallback)(((t,n)=>{e((0,u.map)(n,(e=>(0,o.cloneBlock)(e))),t.name),i((0,m.sprintf)((0,m.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[]);return[r,n,l]};function xd(e){let{isDraggable:t,pattern:n,onClick:r,composite:o}=e;const{blocks:i,viewportWidth:s}=n,c=`block-editor-block-patterns-list__item-description-${(0,p.useInstanceId)(xd)}`;return(0,a.createElement)(md,{isEnabled:t,blocks:i},(e=>{let{draggable:t,onDragStart:u,onDragEnd:p}=e;return(0,a.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":n.title,"aria-describedby":n.description?c:void 0,draggable:t,onDragStart:u,onDragEnd:p},(0,a.createElement)(f.__unstableCompositeItem,l({role:"option",as:"div"},o,{className:"block-editor-block-patterns-list__item",onClick:()=>r(n,i)}),(0,a.createElement)(sd,{blocks:i,viewportWidth:s}),(0,a.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&(0,a.createElement)(f.VisuallyHidden,{id:c},n.description)))}))}function Bd(){return(0,a.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Pd=function(e){let{isDraggable:t,blockPatterns:n,shownPatterns:r,onClickPattern:o,orientation:i,label:s=(0,m.__)("Block Patterns")}=e;const c=(0,f.__unstableUseCompositeState)({orientation:i});return(0,a.createElement)(f.__unstableComposite,l({},c,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":s}),n.map((e=>r.includes(e)?(0,a.createElement)(xd,{key:e.name,pattern:e,onClick:o,isDraggable:t,composite:c}):(0,a.createElement)(Bd,{key:e.name}))))};function Td(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r}=e;const o="block-editor-block-patterns-explorer__sidebar";return(0,a.createElement)("div",{className:`${o}__categories-list`},n.map((e=>{let{name:n,label:i}=e;return(0,a.createElement)(f.Button,{key:n,label:i,className:`${o}__categories-list__item`,isPressed:t===n,onClick:()=>{r(n)}},i)})))}function Od(e){let{filterValue:t,setFilterValue:n}=e;return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,a.createElement)(f.SearchControl,{onChange:n,value:t,label:(0,m.__)("Search for patterns"),placeholder:(0,m.__)("Search")}))}var Rd=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r,filterValue:o,setFilterValue:i}=e;return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,a.createElement)(Od,{filterValue:o,setFilterValue:i}),!o&&(0,a.createElement)(Td,{selectedCategory:t,patternCategories:n,onClickCategory:r}))};var Nd=function(){return(0,a.createElement)("div",{className:"block-editor-inserter__no-results"},(0,a.createElement)(ui,{className:"block-editor-inserter__no-results-icon",icon:wu}),(0,a.createElement)("p",null,(0,m.__)("No results found.")))};var Fd=function(e){let{rootClientId:t="",insertionIndex:n,clientId:r,isAppender:i,onSelect:l,shouldFocusBlock:s=!0}=e;const{getSelectedBlock:c}=(0,d.useSelect)(sr),{destinationRootClientId:p,destinationIndex:f}=(0,d.useSelect)((e=>{const{getSelectedBlockClientId:o,getBlockRootClientId:l,getBlockIndex:a,getBlockOrder:s}=e(sr),c=o();let u,p=t;return void 0!==n?u=n:r?u=a(r):!i&&c?(p=l(c),u=a(c)+1):u=s(p).length,{destinationRootClientId:p,destinationIndex:u}}),[t,n,r,i]),{replaceBlocks:y,insertBlocks:g,showInsertionPoint:h,hideInsertionPoint:b}=(0,d.useDispatch)(sr),v=(0,a.useCallback)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=c();!i&&r&&(0,o.isUnmodifiedDefaultBlock)(r)?y(r.clientId,e,null,s||n?0:null,t):g(e,f,p,!0,s||n?0:null,t);const a=(0,m.sprintf)((0,m._n)("%d block added.","%d blocks added.",(0,u.castArray)(e).length),(0,u.castArray)(e).length);(0,qt.speak)(a),l&&l()}),[i,c,y,g,p,f,l,s]),_=(0,a.useCallback)((e=>{e?h(p,f):b()}),[h,b,p,f]);return[p,v,_]},Md=n(4793),Dd=n.n(Md);const Ld=e=>e.name||"",Ud=e=>e.title,jd=e=>e.description||"",zd=e=>e.keywords||[],Vd=e=>e.category,Gd=()=>null;function Hd(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=Dd()(e),e=e.replace(/^\//,""),e=e.toLowerCase(),e}const Wd=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,u.words)(Hd(e))},$d=(e,t)=>e.filter((e=>!Wd(t).some((t=>t.includes(e))))),Kd=(e,t,n,r)=>{if(0===Wd(r).length)return e;return qd(e,r,{getCategory:e=>{var n;return null===(n=(0,u.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:e=>{var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}})},qd=function(){let 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]:{};const r=Wd(t);if(0===r.length)return e;const o=e.map((e=>[e,Jd(e,t,n)])).filter((e=>{let[,t]=e;return t>0}));return o.sort(((e,t)=>{let[,n]=e,[,r]=t;return r-n})),o.map((e=>{let[t]=e;return t}))};function Jd(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{getName:r=Ld,getTitle:o=Ud,getDescription:i=jd,getKeywords:l=zd,getCategory:a=Vd,getCollection:s=Gd}=n,c=r(e),p=o(e),d=i(e),f=l(e),y=a(e),m=s(e),g=Hd(t),h=Hd(p);let b=0;if(g===h)b+=30;else if(h.startsWith(g))b+=20;else{const e=[c,p,d,...f,y,m].join(" "),t=(0,u.words)(g);0===$d(t,e).length&&(b+=10)}if(0!==b&&c.startsWith("core/")){b+=c!==e.id?1:2}return b}function Yd(e){let{filterValue:t,filteredBlockPatternsLength:n}=e;return t?(0,a.createElement)(f.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},(0,m.sprintf)((0,m._n)('%1$d pattern found for "%2$s"','%1$d patterns found for "%2$s"',n),n,t)):null}var Qd=function(e){let{filterValue:t,selectedCategory:n,patternCategories:r}=e;const o=(0,p.useDebounce)(qt.speak,500),[i,l]=Fd({shouldFocusBlock:!0}),[s,,c]=Id(l,i),u=(0,a.useMemo)((()=>r.map((e=>e.name))),[r]),d=(0,a.useMemo)((()=>t?qd(s,t):s.filter((e=>{var t,r;return"uncategorized"===n?!(null!==(t=e.categories)&&void 0!==t&&t.length)||e.categories.every((e=>!u.includes(e))):null===(r=e.categories)||void 0===r?void 0:r.includes(n)}))),[t,n,s]);(0,a.useEffect)((()=>{if(!t)return;const e=d.length,n=(0,m.sprintf)((0,m._n)("%d result found.","%d results found.",e),e);o(n)}),[t,o]);const f=(0,p.useAsyncList)(d,{step:2}),y=!(null==d||!d.length);return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer__list"},y&&(0,a.createElement)(Yd,{filterValue:t,filteredBlockPatternsLength:d.length}),(0,a.createElement)(Sd,null,!y&&(0,a.createElement)(Nd,null),y&&(0,a.createElement)(Pd,{shownPatterns:f,blockPatterns:d,onClickPattern:c,isDraggable:!1})))};function Zd(e){let{initialCategory:t,patternCategories:n}=e;const[r,o]=(0,a.useState)(""),[i,l]=(0,a.useState)(null==t?void 0:t.name);return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,a.createElement)(Rd,{selectedCategory:i,patternCategories:n,onClickCategory:l,filterValue:r,setFilterValue:o}),(0,a.createElement)(Qd,{filterValue:r,selectedCategory:i,patternCategories:n}))}var Xd=function(e){let{onModalClose:t,...n}=e;return(0,a.createElement)(f.Modal,{title:(0,m.__)("Patterns"),closeLabel:(0,m.__)("Close"),onRequestClose:t,isFullScreen:!0},(0,a.createElement)(Zd,n))};function ef(e){let{rootClientId:t,onInsert:n,selectedCategory:r,populatedCategories:o}=e;const[i,,l]=Id(n,t),s=(0,a.useCallback)((e=>{var t;if(null===(t=e.categories)||void 0===t||!t.length)return 1/0;const n=o.reduce(((e,t,n)=>{let{name:r}=t;return e[r]=n,e}),{});return Math.min(...e.categories.map((e=>void 0!==n[e]?n[e]:1/0)))}),[o]),c=(0,a.useMemo)((()=>i.filter((e=>{var t;return"uncategorized"===r.name?s(e)===1/0:null===(t=e.categories)||void 0===t?void 0:t.includes(r.name)}))),[i,r]),u=(0,a.useMemo)((()=>c.sort(((e,t)=>s(e)-s(t)))),[c,s]),d=(0,p.useAsyncList)(u);return c.length?(0,a.createElement)("div",{className:"block-editor-inserter__panel-content"},(0,a.createElement)(Pd,{shownPatterns:d,blockPatterns:c,onClickPattern:l,label:r.label,orientation:"vertical",isDraggable:!0})):null}var tf=function(e){let{rootClientId:t,onInsert:n,onClickCategory:r,selectedCategory:o}=e;const[i,l]=(0,a.useState)(!1),[s,c]=Id(),u=(0,a.useCallback)((e=>!(!e.categories||!e.categories.length)&&e.categories.some((e=>c.some((t=>t.name===e))))),[c]),p=(0,a.useMemo)((()=>{const e=c.filter((e=>s.some((t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)})))).sort(((e,t)=>{let{name:n}=e,{name:r}=t;return[n,r].includes("featured")?"featured"===n?-1:1:0}));return s.some((e=>!u(e)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,m._x)("Uncategorized")}),e}),[s,c]),d=o||p[0];return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Ad,{selectedCategory:d,patternCategories:p,onClickCategory:r,openPatternExplorer:()=>l(!0)}),!i&&(0,a.createElement)(ef,{rootClientId:t,onInsert:n,selectedCategory:d,populatedCategories:p}),i&&(0,a.createElement)(Xd,{initialCategory:d,patternCategories:p,onModalClose:()=>l(!1)}))},nf=window.wp.url;function rf(e){let{onHover:t,onInsert:n,rootClientId:r}=e;const[o,,,i]=kd(r,n),l=(0,a.useMemo)((()=>o.filter((e=>{let{category:t}=e;return"reusable"===t}))),[o]);return 0===l.length?(0,a.createElement)(Nd,null):(0,a.createElement)(_d,{title:(0,m.__)("Reusable blocks")},(0,a.createElement)(vd,{items:l,onSelect:i,onHover:t,label:(0,m.__)("Reusable blocks")}))}var of=function(e){let{rootClientId:t,onInsert:n,onHover:r}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(rf,{onHover:r,onInsert:n,rootClientId:t}),(0,a.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,a.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:(0,nf.addQueryArgs)("edit.php",{post_type:"wp_block"})},(0,m.__)("Manage Reusable blocks"))))};const{Fill:lf,Slot:af}=(0,f.createSlotFill)("__unstableInserterMenuExtension");lf.Slot=af;var sf=lf;const cf=[];var uf=function(e){let{filterValue:t,onSelect:n,onHover:r,rootClientId:o,clientId:i,isAppender:l,__experimentalInsertionIndex:s,maxBlockPatterns:c,maxBlockTypes:d,showBlockDirectory:y=!1,isDraggable:g=!0,shouldFocusBlock:h=!0,prioritizePatterns:b}=e;const v=(0,p.useDebounce)(qt.speak,500),[_,k]=Fd({onSelect:n,rootClientId:o,clientId:i,isAppender:l,insertionIndex:s,shouldFocusBlock:h}),[S,E,w,A]=kd(_,k),[C,,I]=Id(k,_),x=(0,a.useMemo)((()=>{if(0===c)return[];const e=qd(C,t);return void 0!==c?e.slice(0,c):e}),[t,C,c]);let B=d;b&&x.length>2&&(B=0);const P=(0,a.useMemo)((()=>{if(0===B)return[];const e=Kd((0,u.orderBy)(S,["frecency"],["desc"]),E,w,t);return void 0!==B?e.slice(0,B):e}),[t,S,E,w,d]);(0,a.useEffect)((()=>{if(!t)return;const e=P.length+x.length,n=(0,m.sprintf)((0,m._n)("%d result found.","%d results found.",e),e);v(n)}),[t,v]);const T=(0,p.useAsyncList)(P,{step:9}),O=(0,p.useAsyncList)(T.length===P.length?x:cf),R=!(0,u.isEmpty)(P)||!(0,u.isEmpty)(x),N=!!P.length&&(0,a.createElement)(_d,{title:(0,a.createElement)(f.VisuallyHidden,null,(0,m.__)("Blocks"))},(0,a.createElement)(vd,{items:T,onSelect:A,onHover:r,label:(0,m.__)("Blocks"),isDraggable:g})),F=!!x.length&&(0,a.createElement)(_d,{title:(0,a.createElement)(f.VisuallyHidden,null,(0,m.__)("Block Patterns"))},(0,a.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,a.createElement)(Pd,{shownPatterns:O,blockPatterns:x,onClickPattern:I,isDraggable:g})));return(0,a.createElement)(Sd,null,!y&&!R&&(0,a.createElement)(Nd,null),b?F:N,!!P.length&&!!x.length&&(0,a.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),b?N:F,y&&(0,a.createElement)(sf.Slot,{fillProps:{onSelect:A,onHover:r,filterValue:t,hasItems:R,rootClientId:_}},(e=>e.length?e:R?null:(0,a.createElement)(Nd,null))))};const pf={name:"blocks",title:(0,m.__)("Blocks")},df={name:"patterns",title:(0,m.__)("Patterns")},ff={name:"reusable",title:(0,m.__)("Reusable")};var yf=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:r=!1,onSelect:o,prioritizePatterns:i}=e;const l=(0,a.useMemo)((()=>{const e=[];return i&&n&&e.push(df),e.push(pf),!i&&n&&e.push(df),r&&e.push(ff),e}),[i,pf,n,df,r,ff]);return(0,a.createElement)(f.TabPanel,{className:"block-editor-inserter__tabs",tabs:l,onSelect:o},t)};var mf=(0,a.forwardRef)((function(e,t){let{rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:i,onSelect:l,showInserterHelpPanel:s,showMostUsedBlocks:u,__experimentalFilterValue:p="",shouldFocusBlock:y=!0,prioritizePatterns:g}=e;const[h,b]=(0,a.useState)(p),[v,_]=(0,a.useState)(null),[k,S]=(0,a.useState)(null),[E,w,A]=Fd({rootClientId:n,clientId:r,isAppender:o,insertionIndex:i,shouldFocusBlock:y}),{showPatterns:C,hasReusableBlocks:I}=(0,d.useSelect)((e=>{var t;const{__experimentalGetAllowedPatterns:n,getSettings:r}=e(sr);return{showPatterns:!!n(E).length,hasReusableBlocks:!(null===(t=r().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[E]),x=(0,a.useCallback)(((e,t,n)=>{w(e,t,n),l()}),[w,l]),B=(0,a.useCallback)(((e,t)=>{w(e,{patternName:t}),l()}),[w,l]),P=(0,a.useCallback)((e=>{A(!!e),_(e)}),[A,_]),T=(0,a.useCallback)((e=>{S(e)}),[S]),O=(0,a.useMemo)((()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"block-editor-inserter__block-list"},(0,a.createElement)(wd,{rootClientId:E,onInsert:x,onHover:P,showMostUsedBlocks:u})),s&&(0,a.createElement)("div",{className:"block-editor-inserter__tips"},(0,a.createElement)(f.VisuallyHidden,{as:"h2"},(0,m.__)("A tip for using the block editor")),(0,a.createElement)(Eu,null)))),[E,x,P,h,u,s]),R=(0,a.useMemo)((()=>(0,a.createElement)(tf,{rootClientId:E,onInsert:B,onClickCategory:T,selectedCategory:k})),[E,B,T,k]),N=(0,a.useMemo)((()=>(0,a.createElement)(of,{rootClientId:E,onInsert:x,onHover:P})),[E,x,P]),F=(0,a.useCallback)((e=>"blocks"===e.name?O:"patterns"===e.name?R:N),[O,R,N]),M=(0,a.useRef)();(0,a.useImperativeHandle)(t,(()=>({focusSearch:()=>{M.current.focus()}})));const D=!h&&(C||I);return(0,a.createElement)("div",{className:"block-editor-inserter__menu"},(0,a.createElement)("div",{className:c()("block-editor-inserter__main-area",{"show-as-tabs":D})},(0,a.createElement)(f.SearchControl,{className:"block-editor-inserter__search",onChange:e=>{v&&_(null),b(e)},value:h,label:(0,m.__)("Search for blocks and patterns"),placeholder:(0,m.__)("Search"),ref:M}),!!h&&(0,a.createElement)("div",{className:"block-editor-inserter__no-tab-container"},(0,a.createElement)(uf,{filterValue:h,onSelect:l,onHover:P,rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:i,showBlockDirectory:!0,shouldFocusBlock:y})),D&&(0,a.createElement)(yf,{showPatterns:C,showReusableBlocks:I,prioritizePatterns:g},F),!h&&!D&&(0,a.createElement)("div",{className:"block-editor-inserter__no-tab-container"},O)),s&&v&&(0,a.createElement)(ud,{item:v}))}));function gf(e){let{onSelect:t,rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:i}=e;const[l,s]=(0,a.useState)(""),[u,p]=Fd({onSelect:t,rootClientId:n,clientId:r,isAppender:o}),[y]=kd(u,p),[g]=Id(p,u),{setInserterIsOpened:h,insertionIndex:b}=(0,d.useSelect)((e=>{const{getSettings:t,getBlockIndex:n,getBlockCount:o}=e(sr),i=t(),l=n(r),a=o();return{setInserterIsOpened:i.__experimentalSetIsInserterOpened,insertionIndex:-1===l?a:l}}),[r]),v=g.length&&(!!l||i),_=v&&g.length>6||y.length>6;(0,a.useEffect)((()=>{h&&h(!1)}),[h]);let k=0;return v&&(k=i?4:2),(0,a.createElement)("div",{className:c()("block-editor-inserter__quick-inserter",{"has-search":_,"has-expand":h})},_&&(0,a.createElement)(f.SearchControl,{className:"block-editor-inserter__search",value:l,onChange:e=>{s(e)},label:(0,m.__)("Search for blocks and patterns"),placeholder:(0,m.__)("Search")}),(0,a.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,a.createElement)(uf,{filterValue:l,onSelect:t,rootClientId:n,clientId:r,isAppender:o,maxBlockPatterns:k,maxBlockTypes:6,isDraggable:!1,prioritizePatterns:i})),h&&(0,a.createElement)(f.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{h({rootClientId:n,insertionIndex:b,filterValue:l})},"aria-label":(0,m.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,m.__)("Browse all")))}const hf=e=>{let t,{onToggle:n,disabled:r,isOpen:o,blockTitle:i,hasSingleBlockType:s,toggleProps:c={},prioritizePatterns:u}=e;t=s?(0,m.sprintf)((0,m._x)("Add %s","directly add the only allowed block"),i):u?(0,m.__)("Add pattern"):(0,m._x)("Add block","Generic label for block inserter button");const{onClick:p,...d}=c;return(0,a.createElement)(f.Button,l({icon:ku,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),p&&p(e)},className:"block-editor-inserter__toggle","aria-haspopup":!s&&"true","aria-expanded":!s&&o,disabled:r},d))};class bf extends a.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle(e){let{onToggle:t,isOpen:n}=e;const{disabled:r,blockTitle:o,hasSingleBlockType:i,directInsertBlock:l,toggleProps:a,hasItems:s,renderToggle:c=hf,prioritizePatterns:u}=this.props;return c({onToggle:t,isOpen:n,disabled:r||!s,blockTitle:o,hasSingleBlockType:i,directInsertBlock:l,toggleProps:a,prioritizePatterns:u})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,__experimentalIsQuick:l,prioritizePatterns:s}=this.props;return l?(0,a.createElement)(gf,{onSelect:()=>{t()},rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:s}):(0,a.createElement)(mf,{onSelect:()=>{t()},rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,prioritizePatterns:s})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:r,__experimentalIsQuick:o,onSelectOrClose:i}=this.props;return t||n?this.renderToggle({onToggle:r}):(0,a.createElement)(f.Dropdown,{className:"block-editor-inserter",contentClassName:c()("block-editor-inserter__popover",{"is-quick":o}),position:e,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,m.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}}var vf=(0,p.compose)([(0,d.withSelect)(((e,t)=>{var n;let{clientId:r,rootClientId:i}=t;const{getBlockRootClientId:l,hasInserterItems:a,__experimentalGetAllowedBlocks:s,__experimentalGetDirectInsertBlock:c,getSettings:u}=e(sr),{getBlockVariations:p}=e(o.store);i=i||l(r)||void 0;const d=s(i),f=c(i),y=u(),m=1===(null==d?void 0:d.length)&&0===(null===(n=p(d[0].name,"inserter"))||void 0===n?void 0:n.length);let g=!1;return m&&(g=d[0]),{hasItems:a(i),hasSingleBlockType:m,blockTitle:g?g.title:"",allowedBlockType:g,directInsertBlock:f,rootClientId:i,prioritizePatterns:y.__experimentalPreferPatternsOnRoot&&!i}})),(0,d.withDispatch)(((e,t,n)=>{let{select:r}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:i,isAppender:l,hasSingleBlockType:a,allowedBlockType:s,directInsertBlock:c,onSelectOrClose:u}=t;if(!a&&!c)return;const{insertBlock:p}=e(sr);let d;if(c){const e=function(e){const{getBlock:t,getPreviousBlockClientId:o}=r(sr);if(!e||!i&&!n)return{};const l={};let a={};if(i){const e=t(i),n=t(o(i));(null==e?void 0:e.name)===(null==n?void 0:n.name)&&(a=(null==n?void 0:n.attributes)||{})}else{var s;const e=t(n);if(null!=e&&null!==(s=e.innerBlocks)&&void 0!==s&&s.length){const t=e.innerBlocks[e.innerBlocks.length-1];c&&(null==c?void 0:c.name)===t.name&&(a=t.attributes)}}return e.forEach((e=>{a.hasOwnProperty(e)&&(l[e]=a[e])})),l}(c.attributesToCopy);d=(0,o.createBlock)(c.name,{...c.attributes||{},...e})}else d=(0,o.createBlock)(s.name);p(d,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:o,getBlockRootClientId:a}=r(sr);if(i)return e(i);const s=t();return!l&&s&&a(s)===n?e(s)+1:o(n).length}(),n),u&&u();const f=(0,m.sprintf)((0,m.__)("%s block added"),s.title);(0,qt.speak)(f)}}})),(0,p.ifCondition)((e=>{let{hasItems:t,isAppender:n,rootClientId:r,clientId:o}=e;return t||!n&&!r&&!o}))])(bf);var _f=(0,p.compose)((0,d.withSelect)(((e,t)=>{const{getBlockCount:n,getSettings:r,getTemplateLock:o}=e(sr),i=!n(t.rootClientId),{bodyPlaceholder:l}=r();return{showPrompt:i,isLocked:!!o(t.rootClientId),placeholder:l}})),(0,d.withDispatch)(((e,t)=>{const{insertDefaultBlock:n,startTyping:r}=e(sr);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),r()}}})))((function(e){let{isLocked:t,onAppend:n,showPrompt:r,placeholder:o,rootClientId:i}=e;if(t)return null;const l=(0,_u.decodeEntities)(o)||(0,m.__)("Type / to choose a block");return(0,a.createElement)("div",{"data-root-client-id":i||"",className:c()("block-editor-default-block-appender",{"has-visible-prompt":r})},(0,a.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,m.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{cu.ENTER!==e.keyCode&&cu.SPACE!==e.keyCode||n()},onClick:()=>n(),onFocus:()=>{r&&n()}},r?l:"\ufeff"),(0,a.createElement)(vf,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function kf(e,t){let{rootClientId:n,className:r,onFocus:o,tabIndex:i}=e;return(0,a.createElement)(vf,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:l,disabled:s,isOpen:u,blockTitle:p,hasSingleBlockType:d}=e;n=d?(0,m.sprintf)((0,m._x)("Add %s","directly add the only allowed block"),p):(0,m._x)("Add block","Generic label for block inserter button");const y=!d;let g=(0,a.createElement)(f.Button,{ref:t,onFocus:o,tabIndex:i,className:c()(r,"block-editor-button-block-appender"),onClick:l,"aria-haspopup":y?"true":void 0,"aria-expanded":y?u:void 0,disabled:s,label:n},!d&&(0,a.createElement)(f.VisuallyHidden,{as:"span"},n),(0,a.createElement)(ui,{icon:ku}));return(y||d)&&(g=(0,a.createElement)(f.Tooltip,{text:n},g)),g},isAppender:!0})}const Sf=(0,a.forwardRef)(((e,t)=>(j()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),kf(e,t))));var Ef=(0,a.forwardRef)(kf);var wf=function(e){let{rootClientId:t,renderAppender:n,className:r,tagName:i="div"}=e;const{hideInserter:l,canInsertDefaultBlock:s,selectedBlockClientId:u}=(0,d.useSelect)((e=>{const{canInsertBlockType:n,getTemplateLock:r,getSelectedBlockClientId:i,__unstableGetEditorMode:l}=e(sr);return{hideInserter:!!r(t)||"zoom-out"===l(),canInsertDefaultBlock:n((0,o.getDefaultBlockName)(),t),selectedBlockClientId:i()}}),[t]);if(l||!1===n)return null;let p;if(n)p=(0,a.createElement)(n,null);else{if(!(u===t||!t&&!u))return null;p=s?(0,a.createElement)(_f,{rootClientId:t}):(0,a.createElement)(Ef,{rootClientId:t,className:"block-list-appender__toggle"})}return(0,a.createElement)(i,{tabIndex:-1,className:c()("block-list-appender wp-block",r),contentEditable:!1,"data-block":!0},p)};const Af=Number.MAX_SAFE_INTEGER;(0,a.createContext)();var Cf=function(e){let{previousClientId:t,nextClientId:n,children:r,__unstablePopoverSlot:o,__unstableContentRef:i,...s}=e;const[u,p]=(0,a.useReducer)((e=>(e+1)%Af),0),{orientation:y,rootClientId:g,isVisible:h}=(0,d.useSelect)((e=>{var r;const{getBlockListSettings:o,getBlockRootClientId:i,isBlockVisible:l}=e(sr),a=i(null!=t?t:n);return{orientation:(null===(r=o(a))||void 0===r?void 0:r.orientation)||"vertical",rootClientId:a,isVisible:l(t)&&l(n)}}),[t,n]),b=Or(t),v=Or(n),_="vertical"===y,k=(0,a.useMemo)((()=>{if(u<0||!b&&!v||!h)return{};const e=b?b.getBoundingClientRect():null,t=v?v.getBoundingClientRect():null;if(_)return{width:e?e.width:t.width,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=(0,m.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:e?e.height:t.height}}),[b,v,_,u,h]),S=(0,a.useMemo)((()=>{if(u<0||!b&&!v||!h)return;const{ownerDocument:e}=b||v;return{ownerDocument:e,getBoundingClientRect(){const e=b?b.getBoundingClientRect():null,t=v?v.getBoundingClientRect():null;let n=0,r=0;return _?(r=e?e.bottom:t.top,n=(0,m.isRTL)()?e?e.right:t.right:e?e.left:t.left):(r=e?e.top:t.top,n=(0,m.isRTL)()?e?e.left:t.right:e?e.right:t.left),new window.DOMRect(n,r,0,0)}}}),[b,v,u,_,h]),E=vo(i);return(0,a.useLayoutEffect)((()=>{if(!b)return;const e=new window.MutationObserver(p);return e.observe(b,{attributes:!0}),()=>{e.disconnect()}}),[b]),(0,a.useLayoutEffect)((()=>{if(!v)return;const e=new window.MutationObserver(p);return e.observe(v,{attributes:!0}),()=>{e.disconnect()}}),[v]),(0,a.useLayoutEffect)((()=>{if(b)return b.ownerDocument.defaultView.addEventListener("resize",p),()=>{var e;null===(e=b.ownerDocument.defaultView)||void 0===e||e.removeEventListener("resize",p)}}),[b]),(b||v)&&h?(0,a.createElement)(f.Popover,l({ref:E,animate:!1,anchor:S,focusOnMount:!1,__unstableSlotName:o||null,key:n+"--"+g},s,{className:c()("block-editor-block-popover","block-editor-block-popover__inbetween",s.className),resize:!1,flip:!1,placement:"bottom-start"}),(0,a.createElement)("div",{className:"block-editor-block-popover__inbetween-container",style:k},r)):null};const If=(0,a.createContext)();function xf(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:r,hideInsertionPoint:o}=(0,d.useDispatch)(sr),i=(0,a.useContext)(If),l=(0,a.useRef)(),{orientation:s,previousClientId:u,nextClientId:y,rootClientId:m,isInserterShown:g}=(0,d.useSelect)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:r,getBlockInsertionPoint:o,isBlockBeingDragged:i,getPreviousBlockClientId:l,getNextBlockClientId:a}=e(sr),s=o(),c=n(s.rootClientId);if(!c.length)return{};let u=c[s.index-1],p=c[s.index];for(;i(u);)u=l(u);for(;i(p);)p=a(p);return{previousClientId:u,nextClientId:p,orientation:(null===(t=r(s.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:s.rootClientId,isInserterShown:null==s?void 0:s.__unstableWithInserter}}),[]),h="vertical"===s,b=(0,p.useReducedMotion)();const v={start:{...h?{height:0,left:"50%",right:"50%",y:0}:{width:0,top:"50%",bottom:"50%",x:0},opacity:0},rest:{...h?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:g?.4:0}},hover:{...h?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:.4}}},_={start:{scale:b?1:0},rest:{scale:1,transition:{delay:.2}}},k=c()("block-editor-block-list__insertion-point","is-"+s);return(0,a.createElement)(Cf,{previousClientId:u,nextClientId:y,__unstablePopoverSlot:t,__unstableContentRef:n},(0,a.createElement)(f.__unstableMotion.div,{layout:!b,initial:b?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:l,tabIndex:-1,onClick:function(e){e.target===l.current&&y&&r(y,-1)},onFocus:function(e){e.target!==l.current&&(i.current=!0)},className:c()(k,{"is-with-inserter":g}),onHoverEnd:function(e){e.target!==l.current||i.current||o()}},(0,a.createElement)(f.__unstableMotion.div,{variants:v,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),g&&(0,a.createElement)(f.__unstableMotion.div,{variants:_,className:c()("block-editor-block-list__insertion-point-inserter")},(0,a.createElement)(vf,{position:"bottom center",clientId:y,rootClientId:m,__experimentalIsQuick:!0,onToggle:e=>{i.current=e},onSelectOrClose:()=>{i.current=!1}}))))}function Bf(e){return(0,d.useSelect)((e=>e(sr).isBlockInsertionPointVisible()),[])&&(0,a.createElement)(xf,e)}function Pf(){const e=(0,a.useContext)(If),t=(0,d.useSelect)((e=>e(sr).getSettings().hasReducedUI||"zoom-out"===e(sr).__unstableGetEditorMode()),[]),{getBlockListSettings:n,getBlockRootClientId:r,getBlockIndex:o,isBlockInsertionPointVisible:i,isMultiSelecting:l,getSelectedBlockClientIds:s,getTemplateLock:c,__unstableIsWithinBlockOverlay:u}=(0,d.useSelect)(sr),{showInsertionPoint:f,hideInsertionPoint:y}=(0,d.useDispatch)(sr);return(0,p.useRefEffect)((r=>{if(!t)return r.addEventListener("mousemove",a),()=>{r.removeEventListener("mousemove",a)};function a(t){var r;if(e.current)return;if(l())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void(i()&&y());let a;if(!t.target.classList.contains("is-root-container")){a=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")}if(c(a))return;const p=(null===(r=n(a))||void 0===r?void 0:r.orientation)||"vertical",d=t.target.getBoundingClientRect(),m=t.clientY-d.top,g=t.clientX-d.left;let h=Array.from(t.target.children).find((e=>e.classList.contains("wp-block")&&"vertical"===p&&e.offsetTop>m||e.classList.contains("wp-block")&&"horizontal"===p&&e.offsetLeft>g));if(!h)return;if(!h.id&&(h=h.firstElementChild,!h))return;const b=h.id.slice("block-".length);if(!b||u(b))return;if(s().includes(b))return;const v=h.getBoundingClientRect();if("horizontal"===p&&(t.clientY>v.bottom||t.clientYv.right||t.clientX{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,Of="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function Rf(e){return(0,d.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:r}=t(sr),{getBlockType:i,getActiveBlockVariation:l}=t(o.store),a=n(e),s=i(a);if(!s)return null;const c=r(e),u=l(a,c),p={title:s.title,icon:s.icon,description:s.description,anchor:null==c?void 0:c.anchor};return u?{title:u.title||s.title,icon:u.icon||s.icon,description:u.description||s.description,anchor:null==c?void 0:c.anchor}:p}),[e])}function Nf(e){let{clientId:t,maximumLength:n,context:r}=e;const{attributes:i,name:l,reusableBlockTitle:a}=(0,d.useSelect)((e=>{if(!t)return{};const{getBlockName:n,getBlockAttributes:r,__experimentalGetReusableBlockTitle:i}=e(sr),l=n(t);if(!l)return{};const a=(0,o.isReusableBlock)((0,o.getBlockType)(l));return{attributes:r(t),name:l,reusableBlockTitle:a&&i(r(t).ref)}}),[t]),s=Rf(t);if(!l||!s)return null;const c=(0,o.getBlockType)(l),u=c?(0,o.__experimentalGetBlockLabel)(c,i,r):null,p=a||u,f=p&&p!==c.title?p:s.title;if(n&&n>0&&f.length>n){const e="...";return f.slice(0,n-e.length)+e}return f}function Ff(e){let{clientId:t,maximumLength:n,context:r}=e;return Nf({clientId:t,maximumLength:n,context:r})}var Mf=e=>{let{children:t,clientIds:n,cloneClassname:r,onDragStart:i,onDragEnd:l}=e;const{srcRootClientId:s,isDraggable:c,icon:u}=(0,d.useSelect)((e=>{var t;const{canMoveBlocks:r,getBlockRootClientId:i,getBlockName:l}=e(sr),a=i(n[0]),s=l(n[0]);return{srcRootClientId:a,isDraggable:r(n,a),icon:null===(t=(0,o.getBlockType)(s))||void 0===t?void 0:t.icon}}),[n]),p=(0,a.useRef)(!1),[y,m,g]=function(){const e=(0,a.useRef)(null),t=(0,a.useRef)(null),n=(0,a.useRef)(null),r=(0,a.useRef)(null);return(0,a.useEffect)((()=>()=>{r.current&&(clearInterval(r.current),r.current=null)}),[]),[(0,a.useCallback)((o=>{e.current=o.clientY,n.current=(0,Hi.getScrollContainer)(o.target),r.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,a.useCallback)((r=>{if(!n.current)return;const o=n.current.offsetHeight,i=e.current-n.current.offsetTop,l=r.clientY-n.current.offsetTop;if(r.clientY>i){const e=Math.max(o-i-50,0),n=Math.max(l-i-50,0)/e;t.current=25*n}else if(r.clientY{e.current=null,n.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}(),{startDraggingBlocks:h,stopDraggingBlocks:b}=(0,d.useDispatch)(sr);if((0,a.useEffect)((()=>()=>{p.current&&b()}),[]),!c)return t({isDraggable:!1});const v={type:"block",srcClientIds:n,srcRootClientId:s};return(0,a.createElement)(f.Draggable,{cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:v,onDragStart:e=>{h(n),p.current=!0,y(e),i&&i()},onDragOver:m,onDragEnd:()=>{b(),p.current=!1,g(),l&&l()},__experimentalDragComponent:(0,a.createElement)(yd,{count:n.length,icon:u})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return t({draggable:!0,onDragStart:n,onDragEnd:r})}))};var Df=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var Lf=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));var Uf=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));var jf=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const zf=(e,t)=>"up"===e?"horizontal"===t?(0,m.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===t?(0,m.isRTL)()?"left":"right":"down":null;function Vf(e,t,n,r,o,i,l){const a=n+1;if(e>1)return function(e,t,n,r,o,i){const l=t+1;if(n&&r)return(0,m.__)("All blocks are selected, and cannot be moved");if(o>0&&!r){const t=zf("down",i);if("down"===t)return(0,m.sprintf)((0,m.__)("Move %1$d blocks from position %2$d down by one place"),e,l);if("left"===t)return(0,m.sprintf)((0,m.__)("Move %1$d blocks from position %2$d left by one place"),e,l);if("right"===t)return(0,m.sprintf)((0,m.__)("Move %1$d blocks from position %2$d right by one place"),e,l)}if(o>0&&r){const e=zf("down",i);if("down"===e)return(0,m.__)("Blocks cannot be moved down as they are already at the bottom");if("left"===e)return(0,m.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,m.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(o<0&&!n){const t=zf("up",i);if("up"===t)return(0,m.sprintf)((0,m.__)("Move %1$d blocks from position %2$d up by one place"),e,l);if("left"===t)return(0,m.sprintf)((0,m.__)("Move %1$d blocks from position %2$d left by one place"),e,l);if("right"===t)return(0,m.sprintf)((0,m.__)("Move %1$d blocks from position %2$d right by one place"),e,l)}if(o<0&&n){const e=zf("up",i);if("up"===e)return(0,m.__)("Blocks cannot be moved up as they are already at the top");if("left"===e)return(0,m.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,m.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}(e,n,r,o,i,l);if(r&&o)return(0,m.sprintf)((0,m.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!o){const e=zf("down",l);if("down"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if("left"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if("right"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&o){const e=zf("down",l);if("down"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(i<0&&!r){const e=zf("up",l);if("up"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if("left"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if("right"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){const e=zf("up",l);if("up"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const Gf=(e,t)=>"up"===e?"horizontal"===t?(0,m.isRTL)()?Df:Lf:Uf:"down"===e?"horizontal"===t?(0,m.isRTL)()?Lf:Df:jf:null,Hf=(e,t)=>"up"===e?"horizontal"===t?(0,m.isRTL)()?(0,m.__)("Move right"):(0,m.__)("Move left"):(0,m.__)("Move up"):"down"===e?"horizontal"===t?(0,m.isRTL)()?(0,m.__)("Move left"):(0,m.__)("Move right"):(0,m.__)("Move down"):null,Wf=(0,a.forwardRef)(((e,t)=>{let{clientIds:n,direction:r,orientation:i,...s}=e;const u=(0,p.useInstanceId)(Wf),y=Array.isArray(n)?n:[n],m=y.length,{blockType:g,isDisabled:h,rootClientId:b,isFirst:v,isLast:_,firstIndex:k,orientation:S="vertical"}=(0,d.useSelect)((e=>{const{getBlockIndex:t,getBlockRootClientId:n,getBlockOrder:l,getBlock:a,getBlockListSettings:s}=e(sr),c=y[0],u=n(c),p=t(c),d=t(y[y.length-1]),f=l(u),m=a(c),g=0===p,h=d===f.length-1,{orientation:b}=s(u)||{};return{blockType:m?(0,o.getBlockType)(m.name):null,isDisabled:"up"===r?g:h,rootClientId:u,firstIndex:p,isFirst:g,isLast:h,orientation:i||b}}),[n,r]),{moveBlocksDown:E,moveBlocksUp:w}=(0,d.useDispatch)(sr),A="up"===r?w:E,C=`block-editor-block-mover-button__description-${u}`;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.Button,l({ref:t,className:c()("block-editor-block-mover-button",`is-${r}-button`),icon:Gf(r,S),label:Hf(r,S),"aria-describedby":C},s,{onClick:h?null:e=>{A(n,b),s.onClick&&s.onClick(e)},disabled:h,__experimentalIsFocusable:!0})),(0,a.createElement)(f.VisuallyHidden,{id:C},Vf(m,g&&g.title,k,v,_,"up"===r?-1:1,S)))})),$f=(0,a.forwardRef)(((e,t)=>(0,a.createElement)(Wf,l({direction:"up",ref:t},e)))),Kf=(0,a.forwardRef)(((e,t)=>(0,a.createElement)(Wf,l({direction:"down",ref:t},e))));var qf=function(e){let{clientIds:t,hideDragHandle:n}=e;const{canMove:r,rootClientId:o,isFirst:i,isLast:s,orientation:u}=(0,d.useSelect)((e=>{var n;const{getBlockIndex:r,getBlockListSettings:o,canMoveBlocks:i,getBlockOrder:l,getBlockRootClientId:a}=e(sr),s=Array.isArray(t)?t:[t],c=s[0],u=a(c),p=r(c),d=r(s[s.length-1]),f=l(u);return{canMove:i(t,u),rootClientId:u,isFirst:0===p,isLast:d===f.length-1,orientation:null===(n=o(u))||void 0===n?void 0:n.orientation}}),[t]);if(!r||i&&s&&!o)return null;const p=(0,m.__)("Drag");return(0,a.createElement)(f.ToolbarGroup,{className:c()("block-editor-block-mover",{"is-horizontal":"horizontal"===u})},!n&&(0,a.createElement)(Mf,{clientIds:t},(e=>(0,a.createElement)(f.Button,l({icon:fd,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:p,tabIndex:"-1"},e)))),(0,a.createElement)("div",{className:"block-editor-block-mover__move-button-container"},(0,a.createElement)(f.ToolbarItem,null,(e=>(0,a.createElement)($f,l({clientIds:t},e)))),(0,a.createElement)(f.ToolbarItem,null,(e=>(0,a.createElement)(Kf,l({clientIds:t},e))))))};var Jf=function(e){let{clientId:t,rootClientId:n}=e;const r=Rf(t),i=(0,d.useSelect)((e=>{var r;const{getBlock:o,getBlockIndex:i,hasBlockMovingClientId:l,getBlockListSettings:a,__unstableGetEditorMode:s}=e(sr),c=i(t),{name:u,attributes:p}=o(t);return{index:c,name:u,attributes:p,blockMovingMode:l(),orientation:null===(r=a(n))||void 0===r?void 0:r.orientation,editorMode:s()}}),[t,n]),{index:s,name:u,attributes:p,blockMovingMode:y,orientation:g,editorMode:h}=i,{setNavigationMode:b,removeBlock:v}=(0,d.useDispatch)(sr),_=(0,a.useRef)(),k=(0,o.getBlockType)(u),S=(0,o.__experimentalGetAccessibleBlockLabel)(k,p,s+1,g);(0,a.useEffect)((()=>{_.current.focus(),(0,qt.speak)(S)}),[S]);const E=Or(t),{hasBlockMovingClientId:w,getBlockIndex:A,getBlockRootClientId:C,getClientIdsOfDescendants:I,getSelectedBlockClientId:x,getMultiSelectedBlocksEndClientId:B,getPreviousBlockClientId:P,getNextBlockClientId:T}=(0,d.useSelect)(sr),{selectBlock:O,clearSelectedBlock:R,setBlockMovingClientId:N,moveBlockToPosition:F}=(0,d.useDispatch)(sr),M=c()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!y}),D=(0,m.__)("Drag");return(0,a.createElement)("div",{className:M},(0,a.createElement)(f.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,a.createElement)(f.FlexItem,null,(0,a.createElement)(Au,{icon:null==r?void 0:r.icon,showColors:!0})),(0,a.createElement)(f.FlexItem,null,"zoom-out"===h&&(0,a.createElement)(qf,{clientIds:[t],hideDragHandle:!0}),"navigation"===h&&(0,a.createElement)(Mf,{clientIds:[t]},(e=>(0,a.createElement)(f.Button,l({icon:fd,className:"block-selection-button_drag-handle","aria-hidden":"true",label:D,tabIndex:"-1"},e))))),(0,a.createElement)(f.FlexItem,null,(0,a.createElement)(f.Button,{ref:_,onClick:"navigation"===h?()=>b(!1):void 0,onKeyDown:function(e){const{keyCode:n}=e,r=n===cu.UP,o=n===cu.DOWN,i=n===cu.LEFT,l=n===cu.RIGHT,a=n===cu.TAB,s=n===cu.ESCAPE,c=n===cu.ENTER,u=n===cu.SPACE,p=e.shiftKey;if(n===cu.BACKSPACE||n===cu.DELETE)return v(t),void e.preventDefault();const d=x(),f=B(),y=P(f||d),m=T(f||d),g=a&&p||r,h=a&&!p||o,b=i,_=l;let k;if(g)k=y;else if(h)k=m;else if(b){var S;k=null!==(S=C(d))&&void 0!==S?S:d}else if(_){var M;k=null!==(M=I([d])[0])&&void 0!==M?M:d}const D=w();if(s&&D&&!e.defaultPrevented&&(N(null),e.preventDefault()),(c||u)&&D){const e=C(D),t=C(d),n=A(D);let r=A(d);n{!function(e){const[t]=Hi.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[]);(0,Lu.useShortcut)("core/block-editor/focus-toolbar",s),(0,a.useEffect)((()=>{i&&s()}),[n,i,s]),(0,a.useEffect)((()=>{let t=0;return l&&!i&&(t=window.requestAnimationFrame((()=>{const t=Yf(e.current),n=l||0;var r;t[n]&&(r=e.current).contains(r.ownerDocument.activeElement)&&t[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(t),!o||!e.current)return;const n=Yf(e.current).findIndex((e=>0===e.tabIndex));o(n)}}),[l,i])}var Zf=function(e){let{children:t,focusOnMount:n,__experimentalInitialIndex:r,__experimentalOnIndexChange:o,...i}=e;const s=(0,a.useRef)(),c=function(e){const[t,n]=(0,a.useState)(!0),r=(0,a.useCallback)((()=>{const t=!Hi.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||j()("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)}),[]);return(0,a.useLayoutEffect)((()=>{const t=new window.MutationObserver(r);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(s);return Qf(s,n,c,r,o),c?(0,a.createElement)(f.Toolbar,l({label:i["aria-label"],ref:s},i),t):(0,a.createElement)(f.NavigableMenu,l({orientation:"horizontal",role:"toolbar",ref:s},i),t)};const{clearTimeout:Xf,setTimeout:ey}=window,ty=()=>{},ny=200;function ry(e){let{ref:t,isFocused:n,debounceTimeout:r=ny,onChange:o=ty}=e;const[i,l]=(0,a.useState)(!1),s=(0,a.useRef)(),c=e=>{null!=t&&t.current&&l(e),o(e)},u=()=>{const e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e},p=()=>{const e=s.current;e&&Xf&&Xf(e)};return(0,a.useEffect)((()=>()=>{c(!1),p()}),[]),{showMovers:i,debouncedShowMovers:e=>{e&&e.stopPropagation(),p(),i||c(!0)},debouncedHideMovers:e=>{e&&e.stopPropagation(),p(),s.current=ey((()=>{u()&&c(!1)}),r)}}}function oy(e){let{ref:t,debounceTimeout:n=ny,onChange:r=ty}=e;const[o,i]=(0,a.useState)(!1),{showMovers:l,debouncedShowMovers:s,debouncedHideMovers:c}=ry({ref:t,debounceTimeout:n,isFocused:o,onChange:r}),u=(0,a.useRef)(!1),p=()=>(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement);return(0,a.useEffect)((()=>{const e=t.current,n=()=>{p()&&(i(!0),s())},r=()=>{p()||(i(!1),c())};return e&&!u.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),u.current=!0),()=>{e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,u,i,s,c]),{showMovers:l,gestures:{onMouseMove:s,onMouseLeave:c}}}function iy(){const{selectBlock:e,toggleBlockHighlight:t}=(0,d.useDispatch)(sr),{firstParentClientId:n,shouldHide:r,hasReducedUI:i}=(0,d.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:r,getSettings:i}=e(sr),{hasBlockSupport:l}=e(o.store),a=n(r()),s=a[a.length-1],c=t(s),u=(0,o.getBlockType)(c),p=i();return{firstParentClientId:s,shouldHide:!l(u,"__experimentalParentSelector",!0),hasReducedUI:p.hasReducedUI}}),[]),s=Rf(n),c=(0,a.useRef)(),{gestures:u}=oy({ref:c,onChange(e){e&&i||t(n,e)}});return r||void 0===n?null:(0,a.createElement)("div",l({className:"block-editor-block-parent-selector",key:n,ref:c},u),(0,a.createElement)(f.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:(0,m.sprintf)((0,m.__)("Select %s"),null==s?void 0:s.title),showTooltip:!0,icon:(0,a.createElement)(Au,{icon:null==s?void 0:s.icon})}))}var ly=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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 ay(e){let{blocks:t}=e;return(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,a.createElement)(f.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,m.__)("Preview")),(0,a.createElement)(sd,{viewportWidth:500,blocks:t})))))}function sy(e){let{restTransformations:t,onSelect:n,setHoveredTransformItemName:r}=e;return t.map((e=>(0,a.createElement)(cy,{key:e.name,item:e,onSelect:n,setHoveredTransformItemName:r})))}function cy(e){let{item:t,onSelect:n,setHoveredTransformItemName:r}=e;const{name:i,icon:l,title:s,isDisabled:c}=t;return(0,a.createElement)(f.MenuItem,{className:(0,o.getBlockMenuDefaultClassName)(i),onClick:e=>{e.preventDefault(),n(i)},disabled:c,onMouseLeave:()=>r(null),onMouseEnter:()=>r(i)},(0,a.createElement)(Au,{icon:l,showColors:!0}),s)}var uy=e=>{let{className:t,possibleBlockTransformations:n,onSelect:r,blocks:i}=e;const[l,s]=(0,a.useState)(),{priorityTextTransformations:c,restTransformations:u}=function(e){const t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},n=(0,a.useMemo)((()=>{const n=Object.keys(t);return e.reduce(((e,t)=>{const{name:r}=t;return n.includes(r)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]})}),[e]);return n.priorityTextTransformations.sort(((e,n)=>{let{name:r}=e,{name:o}=n;return t[r](0,a.createElement)(cy,{key:e.name,item:e,onSelect:r,setHoveredTransformItemName:s}))),!p&&d),!!p&&(0,a.createElement)(f.MenuGroup,{className:t},d))};var py=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),dy=window.wp.tokenList,fy=n.n(dy);function yy(e,t,n){const r=new(fy())(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}function my(e){return(0,u.find)(e,"isDefault")}function gy(e){let{clientId:t,onSwitch:n}=e;const{styles:r,block:i,blockType:l,className:s}=(0,d.useSelect)((e=>{const{getBlock:n}=e(sr),r=n(t);if(!r)return{};const i=(0,o.getBlockType)(r.name),{getBlockStyles:l}=e(o.store);return{block:r,blockType:i,styles:l(r.name),className:r.attributes.className||""}}),[t]),{updateBlockAttributes:c}=(0,d.useDispatch)(sr),p=function(e){return e&&0!==e.length?my(e)?e:[{name:"default",label:(0,m._x)("Default","block style"),isDefault:!0},...e]:[]}(r),f=function(e,t){for(const n of new(fy())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,u.find)(e,{name:t});if(r)return r}return(0,u.find)(e,"isDefault")}(p,s),y=function(e,t){return(0,a.useMemo)((()=>{const n=null==t?void 0:t.example,r=null==t?void 0:t.name;return n&&r?(0,o.getBlockFromExample)(r,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,o.cloneBlock)(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(i,l);return{onSelect:e=>{const r=yy(s,f,e);c(t,{className:r}),n()},stylesToRender:p,activeStyle:f,genericPreviewBlock:y,className:s}}const hy=()=>{};function by(e){let{clientId:t,onSwitch:n=hy}=e;const{onSelect:r,stylesToRender:o,activeStyle:i}=gy({clientId:t,onSwitch:n});return o&&0!==o.length?(0,a.createElement)(a.Fragment,null,o.map((e=>{const t=e.label||e.name;return(0,a.createElement)(f.MenuItem,{key:e.name,icon:i.name===e.name?py:null,onClick:()=>r(e)},(0,a.createElement)(f.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function vy(e){let{hoveredBlock:t,onSwitch:n}=e;const{clientId:r}=t;return(0,a.createElement)(f.MenuGroup,{label:(0,m.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,a.createElement)(by,{clientId:r,onSwitch:n}))}const _y=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const{clientId:r,name:o,innerBlocks:i=[]}=e;if(!n.has(r)){if(o===t)return e;for(const e of i){const r=_y(e,t,n);if(r)return r}}},ky=(e,t)=>{const n=((e,t)=>{const n=(0,o.__experimentalGetBlockAttributesNamesByRole)(e,"content");return null!=n&&n.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}};var Sy=(e,t)=>(0,a.useMemo)((()=>e.reduce(((e,n)=>{const r=((e,t)=>{const n=t.map((e=>(0,o.cloneBlock)(e))),r=new Set;for(const t of e){let e=!1;for(const o of n){const n=_y(o,t.name,r);if(n){e=!0,r.add(n.clientId),ky(n,t);break}}if(!e)return}return n})(t,n.blocks);return r&&e.push({...n,transformedBlocks:r}),e}),[])),[e,t]);function Ey(e){let{patterns:t,onSelect:n}=e;return(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,a.createElement)(f.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,m.__)("Preview")),(0,a.createElement)(wy,{patterns:t,onSelect:n})))))}function wy(e){let{patterns:t,onSelect:n}=e;const r=(0,f.__unstableUseCompositeState)();return(0,a.createElement)(f.__unstableComposite,l({},r,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,m.__)("Patterns list")}),t.map((e=>(0,a.createElement)(Ay,{key:e.name,pattern:e,onSelect:n,composite:r}))))}function Ay(e){let{pattern:t,onSelect:n,composite:r}=e;const o="block-editor-block-switcher__preview-patterns-container",i=(0,p.useInstanceId)(Ay,`${o}-list__item-description`);return(0,a.createElement)("div",{className:`${o}-list__list-item`,"aria-label":t.title,"aria-describedby":t.description?i:void 0},(0,a.createElement)(f.__unstableCompositeItem,l({role:"option",as:"div"},r,{className:`${o}-list__item`,onClick:()=>n(t.transformedBlocks)}),(0,a.createElement)(sd,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),(0,a.createElement)("div",{className:`${o}-list__item-title`},t.title)),!!t.description&&(0,a.createElement)(f.VisuallyHidden,{id:i},t.description))}var Cy=function(e){let{blocks:t,patterns:n,onSelect:r}=e;const[o,i]=(0,a.useState)(!1),l=Sy(n,t);return l.length?(0,a.createElement)(f.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&(0,a.createElement)(Ey,{patterns:l,onSelect:r}),(0,a.createElement)(f.MenuItem,{onClick:e=>{e.preventDefault(),i(!o)},icon:Df},(0,m.__)("Patterns"))):null};const Iy=e=>{let{clientIds:t,blocks:n}=e;const{replaceBlocks:r}=(0,d.useDispatch)(sr),i=Rf(n[0].clientId),{possibleBlockTransformations:l,canRemove:s,hasBlockStyles:c,icon:p,patterns:y}=(0,d.useSelect)((e=>{const{getBlockRootClientId:r,getBlockTransformItems:l,__experimentalGetPatternTransformItems:a}=e(sr),{getBlockStyles:s,getBlockType:c}=e(o.store),{canRemoveBlocks:p}=e(sr),d=r((0,u.castArray)(t)[0]),[{name:f}]=n,y=1===n.length,m=y&&s(f);let g;if(y)g=null==i?void 0:i.icon;else{var h;g=1===new Set(n.map((e=>{let{name:t}=e;return t}))).size?null===(h=c(f))||void 0===h?void 0:h.icon:ly}return{possibleBlockTransformations:l(n,d),canRemove:p(t,d),hasBlockStyles:!(null==m||!m.length),icon:g,patterns:a(n,d)}}),[t,n,null==i?void 0:i.icon]),g=Nf({clientId:Array.isArray(t)?t[0]:t,maximumLength:35}),h=1===n.length&&(0,o.isReusableBlock)(n[0]),b=1===n.length&&(0,o.isTemplatePart)(n[0]),v=!!l.length&&s&&!b,_=!(null==y||!y.length)&&s;if(!c&&!v)return(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(f.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:g,icon:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Au,{icon:p,showColors:!0}),(h||b)&&(0,a.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},g))}));const k=g,S=1===n.length?(0,m.sprintf)((0,m.__)("%s: Change block type or style"),g):(0,m.sprintf)((0,m._n)("Change type of %d block","Change type of %d blocks",n.length),n.length),E=c||v||_;return(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(f.ToolbarItem,null,(e=>(0,a.createElement)(f.DropdownMenu,{className:"block-editor-block-switcher",label:k,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Au,{icon:p,className:"block-editor-block-switcher__toggle",showColors:!0}),(h||b)&&(0,a.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},g)),toggleProps:{describedBy:S,...e},menuProps:{orientation:"both"}},(e=>{let{onClose:i}=e;return E&&(0,a.createElement)("div",{className:"block-editor-block-switcher__container"},_&&(0,a.createElement)(Cy,{blocks:n,patterns:y,onSelect:e=>{(e=>{r(t,e)})(e),i()}}),v&&(0,a.createElement)(uy,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:l,blocks:n,onSelect:e=>{(e=>{r(t,(0,o.switchToBlockType)(n,e))})(e),i()}}),c&&(0,a.createElement)(vy,{hoveredBlock:n[0],onSwitch:i}))})))))};var xy=e=>{let{clientIds:t}=e;const n=(0,d.useSelect)((e=>e(sr).getBlocksByClientId(t)),[t]);return!n.length||n.some((e=>!e))?null:(0,a.createElement)(Iy,{clientIds:t,blocks:n})};const{Fill:By,Slot:Py}=(0,f.createSlotFill)("__unstableBlockToolbarLastItem");By.Slot=Py;var Ty=By;var Oy=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),Ry=window.wp.blob;function Ny(e,t){if(t&&1===(null==e?void 0:e.length)&&0===e[0].type.indexOf("image/")){var n;const e=/<\s*img\b/gi;if(1!==(null===(n=t.match(e))||void 0===n?void 0:n.length))return!0;const r=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(r))return!0}return!1}function Fy(){const{getBlockName:e}=(0,d.useSelect)(sr),{getBlockType:t}=(0,d.useSelect)(o.store),{createSuccessNotice:n}=(0,d.useDispatch)(Cd.store);return(0,a.useCallback)(((r,o)=>{let i="";if(1===o.length){var l;const n=o[0],a=null===(l=t(e(n)))||void 0===l?void 0:l.title;i="copy"===r?(0,m.sprintf)((0,m.__)('Copied "%s" to clipboard.'),a):(0,m.sprintf)((0,m.__)('Moved "%s" to clipboard.'),a)}else i="copy"===r?(0,m.sprintf)((0,m._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):(0,m.sprintf)((0,m._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(i,{type:"snackbar"})}),[])}function My(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:r,__unstableIsFullySelected:i,__unstableIsSelectionCollapsed:l,__unstableIsSelectionMergeable:a,__unstableGetSelectedBlocksWithPartialSelection:s}=(0,d.useSelect)(sr),{flashBlock:c,removeBlocks:u,replaceBlocks:f,__unstableDeleteSelection:y,__unstableExpandSelection:m}=(0,d.useDispatch)(sr),g=Fy();return(0,p.useRefEffect)((p=>{function d(d){const h=t();if(0===h.length)return;if(!n()){const{target:e}=d,{ownerDocument:t}=e;if("copy"===d.type||"cut"===d.type?(0,Hi.documentHasUncollapsedSelection)(t):(0,Hi.documentHasSelection)(t))return}if(!p.contains(d.target.ownerDocument.activeElement))return;const b=d.defaultPrevented;d.preventDefault();const v=a(),_=l()||i(),k=!_&&!v;if("copy"===d.type||"cut"===d.type)if(1===h.length&&c(h[0]),k)m();else{let t;if(g(d.type,h),_)t=e(h);else{const[n,r]=s();t=[n,...e(h.slice(1,h.length-1)),r]}const n=d.clipboardData.getData("__unstableWrapperBlockName");n&&(t=(0,o.createBlock)(n,JSON.parse(d.clipboardData.getData("__unstableWrapperBlockAttributes")),t));const r=(0,o.serialize)(t);d.clipboardData.setData("text/plain",function(e){e=e.replace(/
/g,"\n");return(0,Hi.__unstableStripHTML)(e).trim().replace(/\n\n+/g,"\n\n")}(r)),d.clipboardData.setData("text/html",r)}if("cut"===d.type)_&&!k?u(h):y();else if("paste"===d.type){if(b)return;const{__experimentalCanUserUseUnfilteredHTML:e}=r(),{plainText:t,html:n}=function(e){let{clipboardData:t}=e,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}const o=(0,Hi.getFilesFromDataTransfer)(t).filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)}));return o.length&&!Ny(o,r)&&(r=o.map((e=>``)).join(""),n=""),{html:r,plainText:n}}(d),i=(0,o.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});f(h,i,i.length-1,-1)}}return p.ownerDocument.addEventListener("copy",d),p.ownerDocument.addEventListener("cut",d),p.ownerDocument.addEventListener("paste",d),()=>{p.ownerDocument.removeEventListener("copy",d),p.ownerDocument.removeEventListener("cut",d),p.ownerDocument.removeEventListener("paste",d)}}),[])}var Dy=function(e){let{children:t}=e;return(0,a.createElement)("div",{ref:My()},t)};function Ly(e){let{clientIds:t,children:n,__experimentalUpdateSelection:r}=e;const{canInsertBlockType:i,getBlockRootClientId:l,getBlocksByClientId:a,canMoveBlocks:s,canRemoveBlocks:c}=(0,d.useSelect)(sr),{getDefaultBlockName:u,getGroupingBlockName:p}=(0,d.useSelect)(o.store),f=a(t),y=l(t[0]),m=f.every((e=>!!e&&(0,o.hasBlockSupport)(e.name,"multiple",!0)&&i(e.name,y))),g=i(u(),y),h=s(t,y),b=c(t,y),{removeBlocks:v,replaceBlocks:_,duplicateBlocks:k,insertAfterBlock:S,insertBeforeBlock:E,flashBlock:w,setBlockMovingClientId:A,setNavigationMode:C,selectBlock:I}=(0,d.useDispatch)(sr),x=Fy();return n({canDuplicate:m,canInsertDefaultBlock:g,canMove:h,canRemove:b,rootClientId:y,blocks:f,onDuplicate(){return k(t,r)},onRemove(){return v(t,r)},onInsertBefore(){const e=Array.isArray(t)?t[0]:e;E(e)},onInsertAfter(){const e=Array.isArray(t)?t[t.length-1]:e;S(e)},onMoveTo(){C(!0),I(t[0]),A(t[0])},onGroup(){if(!f.length)return;const e=p(),n=(0,o.switchToBlockType)(f,e);n&&_(t,n)},onUngroup(){if(!f.length)return;const e=f[0].innerBlocks;e.length&&_(t,e)},onCopy(){const e=f.map((e=>{let{clientId:t}=e;return t}));1===f.length&&w(e[0]),x("copy",e)}})}const Uy=()=>{};var jy=(0,p.compose)([(0,d.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlock:r,getBlockMode:i,getSettings:l}=e(sr),a=r(n),s=l().codeEditingEnabled;return{mode:i(n),blockType:a?(0,o.getBlockType)(a.name):null,isCodeEditingEnabled:s}})),(0,d.withDispatch)(((e,t)=>{let{onToggle:n=Uy,clientId:r}=t;return{onToggleMode(){e(sr).toggleBlockMode(r),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:r,small:i=!1,isCodeEditingEnabled:l=!0}=e;if(!t||!(0,o.hasBlockSupport)(t,"html",!0)||!l)return null;const s="visual"===n?(0,m.__)("Edit as HTML"):(0,m.__)("Edit visually");return(0,a.createElement)(f.MenuItem,{onClick:r},!i&&s)}));var zy=(0,p.compose)((0,d.withSelect)(((e,t)=>{let{clientId:n}=t;const r=e(sr).getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),(0,d.withDispatch)(((e,t)=>{let{block:n}=t;return{onClick:()=>e(sr).replaceBlocks(n.clientId,(0,o.rawHandler)({HTML:(0,o.getBlockContent)(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:r}=e;if(!t)return null;const o=(0,m.__)("Convert to Blocks");return(0,a.createElement)(f.MenuItem,{onClick:n},!r&&o)}));const{Fill:Vy,Slot:Gy}=(0,f.createSlotFill)("__unstableBlockSettingsMenuFirstItem");Vy.Slot=Gy;var Hy=Vy;function Wy(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:i}=(0,d.useSelect)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:r,canInsertBlockType:i,getSelectedBlockClientIds:l}=e(sr),{getGroupingBlockName:a}=e(o.store),s=l(),c=a(),u=i(c,null!=s&&s.length?n(s[0]):void 0),p=r(s),d=1===p.length&&(null===(t=p[0])||void 0===t?void 0:t.name)===c;return{clientIds:s,isGroupable:u&&p.length,isUngroupable:d&&!!p[0].innerBlocks.length,blocksSelection:p,groupingBlockName:c}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:i}}function $y(e){let{clientIds:t,isGroupable:n,isUngroupable:r,blocksSelection:i,groupingBlockName:l,onClose:s=(()=>{})}=e;const{replaceBlocks:c}=(0,d.useDispatch)(sr);return n||r?(0,a.createElement)(a.Fragment,null,n&&(0,a.createElement)(f.MenuItem,{onClick:()=>{(()=>{const e=(0,o.switchToBlockType)(i,l);e&&c(t,e)})(),s()}},(0,m._x)("Group","verb")),r&&(0,a.createElement)(f.MenuItem,{onClick:()=>{(()=>{const e=i[0].innerBlocks;e.length&&c(t,e)})(),s()}},(0,m._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function Ky(e){return(0,d.useSelect)((t=>{const{canEditBlock:n,canMoveBlock:r,canRemoveBlock:o,canLockBlockType:i,getBlockName:l,getBlockRootClientId:a,getTemplateLock:s}=t(sr),c=a(e),u=n(e),p=r(e,c),d=o(e,c);return{canEdit:u,canMove:p,canRemove:d,canLock:i(l(e)),isContentLocked:"contentOnly"===s(e),isLocked:!u||!p||!d}}),[e])}var qy=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"}));var Jy=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"}));function Yy(e){return e.remove&&e.move?"all":!(!e.remove||e.move)&&"insert"}function Qy(e){let{clientId:t,onClose:n}=e;const[r,i]=(0,a.useState)({move:!1,remove:!1}),{canEdit:l,canMove:s,canRemove:c}=Ky(t),{isReusable:u,templateLock:y,hasTemplateLock:g}=(0,d.useSelect)((e=>{var n,r;const{getBlockName:i,getBlockAttributes:l}=e(sr),a=i(t),s=(0,o.getBlockType)(a);return{isReusable:(0,o.isReusableBlock)(s),templateLock:null===(n=l(t))||void 0===n?void 0:n.templateLock,hasTemplateLock:!(null==s||null===(r=s.attributes)||void 0===r||!r.templateLock)}}),[t]),[h,b]=(0,a.useState)(!!y),{updateBlockAttributes:v}=(0,d.useDispatch)(sr),_=Rf(t),k=(0,p.useInstanceId)(Qy,"block-editor-block-lock-modal__options-title");(0,a.useEffect)((()=>{i({move:!s,remove:!c,...u?{edit:!l}:{}})}),[l,s,c,u]);const S=Object.values(r).every(Boolean),E=Object.values(r).some(Boolean)&&!S;return(0,a.createElement)(f.Modal,{title:(0,m.sprintf)((0,m.__)("Lock %s"),_.title),overlayClassName:"block-editor-block-lock-modal",closeLabel:(0,m.__)("Close"),onRequestClose:n},(0,a.createElement)("p",null,(0,m.__)("Choose specific attributes to restrict or lock all available options.")),(0,a.createElement)("form",{onSubmit:e=>{e.preventDefault(),v([t],{lock:r,templateLock:h?Yy(r):void 0}),n()}},(0,a.createElement)("div",{role:"group","aria-labelledby":k,className:"block-editor-block-lock-modal__options"},(0,a.createElement)(f.CheckboxControl,{className:"block-editor-block-lock-modal__options-title",label:(0,a.createElement)("span",{id:k},(0,m.__)("Lock all")),checked:S,indeterminate:E,onChange:e=>i({move:e,remove:e,...u?{edit:e}:{}})}),(0,a.createElement)("ul",{className:"block-editor-block-lock-modal__checklist"},u&&(0,a.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,a.createElement)(f.CheckboxControl,{label:(0,a.createElement)(a.Fragment,null,(0,m.__)("Restrict editing"),(0,a.createElement)(f.Icon,{icon:r.edit?Jy:qy})),checked:!!r.edit,onChange:e=>i((t=>({...t,edit:e})))})),(0,a.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,a.createElement)(f.CheckboxControl,{label:(0,a.createElement)(a.Fragment,null,(0,m.__)("Disable movement"),(0,a.createElement)(f.Icon,{icon:r.move?Jy:qy})),checked:r.move,onChange:e=>i((t=>({...t,move:e})))})),(0,a.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,a.createElement)(f.CheckboxControl,{label:(0,a.createElement)(a.Fragment,null,(0,m.__)("Prevent removal"),(0,a.createElement)(f.Icon,{icon:r.remove?Jy:qy})),checked:r.remove,onChange:e=>i((t=>({...t,remove:e})))}))),g&&(0,a.createElement)(f.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,m.__)("Apply to all blocks inside"),checked:h,disabled:r.move&&!r.remove,onChange:()=>b(!h)})),(0,a.createElement)(f.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,a.createElement)(f.FlexItem,null,(0,a.createElement)(f.Button,{variant:"tertiary",onClick:n},(0,m.__)("Cancel"))),(0,a.createElement)(f.FlexItem,null,(0,a.createElement)(f.Button,{variant:"primary",type:"submit"},(0,m.__)("Apply"))))))}function Zy(e){let{clientId:t}=e;const{canLock:n,isLocked:r}=Ky(t),[o,i]=(0,a.useReducer)((e=>!e),!1);if(!n)return null;const l=r?(0,m.__)("Unlock"):(0,m.__)("Lock");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.MenuItem,{icon:r?qy:Jy,onClick:i},l),o&&(0,a.createElement)(Qy,{clientId:t,onClose:i}))}const{Fill:Xy,Slot:em}=(0,f.createSlotFill)("BlockSettingsMenuControls");function tm(e){let{...t}=e;return(0,a.createElement)(f.__experimentalStyleProvider,{document:document},(0,a.createElement)(Xy,t))}tm.Slot=e=>{let{fillProps:t,clientIds:n=null,__unstableDisplayLocation:r}=e;const{selectedBlocks:o,selectedClientIds:i,canRemove:s}=(0,d.useSelect)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:r,canRemoveBlocks:o}=e(sr),i=null!==n?n:r();return{selectedBlocks:(0,u.map)(t(i).filter(Boolean),(e=>e.name)),selectedClientIds:i,canRemove:o(i)}}),[n]),{canLock:c}=Ky(i[0]),p=1===i.length&&c,y=Wy(),{isGroupable:m,isUngroupable:g}=y,h=(m||g)&&s;return(0,a.createElement)(em,{fillProps:{...t,__unstableDisplayLocation:r,selectedBlocks:o,selectedClientIds:i}},(e=>!(null!=e&&e.length)>0&&!h&&!p?null:(0,a.createElement)(f.MenuGroup,null,p&&(0,a.createElement)(Zy,{clientId:i[0]}),e,h&&(0,a.createElement)($y,l({},y,{onClose:null==t?void 0:t.onClose})))))};var nm=tm;const rm=()=>{},om={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function im(e){let{blocks:t,onCopy:n}=e;const r=(0,p.useCopyToClipboard)((()=>(0,o.serialize)(t)),n),i=t.length>1?(0,m.__)("Copy blocks"):(0,m.__)("Copy block");return(0,a.createElement)(f.MenuItem,{ref:r},i)}var lm=function(e){let{clientIds:t,__experimentalSelectBlock:n,children:r,__unstableDisplayLocation:i,...s}=e;const c=(0,u.castArray)(t),p=c.length,y=c[0],{firstParentClientId:g,hasReducedUI:h,onlyBlock:b,parentBlockType:v,previousBlockClientId:_,nextBlockClientId:k,selectedBlockClientIds:S}=(0,d.useSelect)((e=>{const{getBlockCount:t,getBlockName:n,getBlockParents:r,getPreviousBlockClientId:i,getNextBlockClientId:l,getSelectedBlockClientIds:a,getSettings:s}=e(sr),c=r(y),u=c[c.length-1],p=n(u);return{firstParentClientId:u,hasReducedUI:s().hasReducedUI,onlyBlock:1===t(),parentBlockType:(0,o.getBlockType)(p),previousBlockClientId:i(y),nextBlockClientId:l(y),selectedBlockClientIds:a()}}),[y]),E=(0,d.useSelect)((e=>{const{getShortcutRepresentation:t}=e(Lu.store);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")}}),[]),{selectBlock:w,toggleBlockHighlight:A}=(0,d.useDispatch)(sr),C=(0,a.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:rm,[n]),I=Nf({clientId:y,maximumLength:25}),x=(0,a.useCallback)(n?()=>{const e=_||k;e&&S.includes(y)&&!S.includes(e)&&n(e)}:rm,[n,_,k,S]),B=(0,m.sprintf)((0,m.__)("Remove %s"),I),P=1===p?B:(0,m.__)("Remove blocks"),T=(0,a.useRef)(),{gestures:O}=oy({ref:T,onChange(e){e&&h||A(g,e)}});return(0,a.createElement)(Ly,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:o,canMove:c,canRemove:d,onDuplicate:h,onInsertAfter:_,onInsertBefore:k,onRemove:S,onCopy:A,onMoveTo:I,blocks:B}=e;return(0,a.createElement)(f.DropdownMenu,l({icon:Oy,label:(0,m.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:om,noIcons:!0},s),(e=>{let{onClose:s}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.MenuGroup,null,(0,a.createElement)(Hy.Slot,{fillProps:{onClose:s}}),void 0!==g&&(0,a.createElement)(f.MenuItem,l({},O,{ref:T,icon:(0,a.createElement)(Au,{icon:v.icon}),onClick:()=>w(g)}),(0,m.sprintf)((0,m.__)("Select parent block (%s)"),v.title)),1===p&&(0,a.createElement)(zy,{clientId:y}),(0,a.createElement)(im,{blocks:B,onCopy:A}),n&&(0,a.createElement)(f.MenuItem,{onClick:(0,u.flow)(s,h,C),shortcut:E.duplicate},(0,m.__)("Duplicate")),o&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.MenuItem,{onClick:(0,u.flow)(s,k),shortcut:E.insertBefore},(0,m.__)("Insert before")),(0,a.createElement)(f.MenuItem,{onClick:(0,u.flow)(s,_),shortcut:E.insertAfter},(0,m.__)("Insert after"))),c&&!b&&(0,a.createElement)(f.MenuItem,{onClick:(0,u.flow)(s,I)},(0,m.__)("Move to")),1===p&&(0,a.createElement)(jy,{clientId:y,onToggle:s})),(0,a.createElement)(nm.Slot,{fillProps:{onClose:s},clientIds:t,__unstableDisplayLocation:i}),"function"==typeof r?r({onClose:s}):a.Children.map((e=>(0,a.cloneElement)(e,{onClose:s}))),d&&(0,a.createElement)(f.MenuGroup,null,(0,a.createElement)(f.MenuItem,{onClick:(0,u.flow)(s,S,x),shortcut:E.remove},P)))}))}))};var am=function(e){let{clientIds:t,...n}=e;return(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(f.ToolbarItem,null,(e=>(0,a.createElement)(lm,l({clientIds:t,toggleProps:e},n)))))};function sm(e){let{clientId:t}=e;const n=Rf(t),{canEdit:r,canMove:o,canRemove:i,canLock:l}=Ky(t),[s,c]=(0,a.useReducer)((e=>!e),!1);return l?r&&o&&i?null:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.ToolbarGroup,{className:"block-editor-block-lock-toolbar"},(0,a.createElement)(f.ToolbarButton,{icon:Jy,label:(0,m.sprintf)((0,m.__)("Unlock %s"),n.title),onClick:c})),s&&(0,a.createElement)(Qy,{clientId:t,onClose:c})):null}var cm=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"}));var um=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M9.2 6.5H4V8h5.2c.3 0 .5.2.5.5v7c0 .3-.2.5-.5.5H4v1.5h5.2c1.1 0 2-.9 2-2v-7c0-1.1-.8-2-2-2zM14.8 8H20V6.5h-5.2c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2H20V16h-5.2c-.3 0-.5-.2-.5-.5v-7c-.1-.3.2-.5.5-.5z"}));var pm=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M16 4v5.2c0 .3-.2.5-.5.5h-7c-.3.1-.5-.2-.5-.5V4H6.5v5.2c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V4H16zm-.5 8.8h-7c-1.1 0-2 .9-2 2V20H8v-5.2c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5V20h1.5v-5.2c0-1.2-.9-2-2-2z"}));const dm={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}};var fm=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:r}=Wy(),{replaceBlocks:i}=(0,d.useDispatch)(sr),{canRemove:l,variations:s}=(0,d.useSelect)((e=>{const{canRemoveBlocks:r}=e(sr),{getBlockVariations:i}=e(o.store);return{canRemove:r(t),variations:i(n,"transform")}}),[t,n]),c=r=>{const l=(0,o.switchToBlockType)(e,n);"string"!=typeof r&&(r="group"),l&&l.length>0&&(l[0].attributes.layout=dm[r],i(t,l))};if(!r||!l)return null;const u=!!s.find((e=>{let{name:t}=e;return"group-row"===t})),p=!!s.find((e=>{let{name:t}=e;return"group-stack"===t}));return(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(f.ToolbarButton,{icon:cm,label:(0,m._x)("Group","verb"),onClick:c}),u&&(0,a.createElement)(f.ToolbarButton,{icon:um,label:(0,m._x)("Row","single horizontal line"),onClick:()=>c("row")}),p&&(0,a.createElement)(f.ToolbarButton,{icon:pm,label:(0,m._x)("Stack","verb"),onClick:()=>c("stack")}))};function ym(e){let{clientIds:t}=e;const n=1===t.length?t[0]:void 0,r=(0,d.useSelect)((e=>!!n&&"html"===e(sr).getBlockMode(n)),[n]),{toggleBlockMode:o}=(0,d.useDispatch)(sr);return r?(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(f.ToolbarButton,{onClick:()=>{o(n)}},(0,m.__)("Edit visually"))):null}var mm=(0,a.createContext)("");var gm=e=>{let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:r,blockType:i,hasFixedToolbar:s,hasReducedUI:u,isValid:y,isVisual:m,isContentLocked:g}=(0,d.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:r,isBlockValid:i,getBlockRootClientId:l,getSettings:a,__unstableGetContentLockingParent:s}=e(sr),c=r(),u=c[0],p=l(u),d=a();return{blockClientIds:c,blockClientId:u,blockType:u&&(0,o.getBlockType)(t(u)),hasFixedToolbar:d.hasFixedToolbar,hasReducedUI:d.hasReducedUI,rootClientId:p,isValid:c.every((e=>i(e))),isVisual:c.every((e=>"visual"===n(e))),isContentLocked:!!s(u)}}),[]),{toggleBlockHighlight:h}=(0,d.useDispatch)(sr),b=(0,a.useRef)(),{showMovers:v,gestures:_}=oy({ref:b,onChange(e){e&&u||h(r,e)}}),k=(0,p.useViewportMatch)("medium","<")||s;if(i&&!(0,o.hasBlockSupport)(i,"__experimentalToolbar",!0))return null;const S=k||v;if(0===n.length)return null;const E=y&&m,w=n.length>1,A=c()("block-editor-block-toolbar",S&&"is-showing-movers");return(0,a.createElement)("div",{className:A},!w&&!k&&!g&&(0,a.createElement)(iy,null),(0,a.createElement)("div",l({ref:b},_),(E||w)&&!g&&(0,a.createElement)(f.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,a.createElement)(xy,{clientIds:n}),!w&&(0,a.createElement)(sm,{clientId:n[0]}),(0,a.createElement)(qf,{clientIds:n,hideDragHandle:t||u}))),E&&w&&(0,a.createElement)(fm,null),E&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(br.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(br.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(br.Slot,{className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(br.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(br.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(mm.Provider,{value:null==i?void 0:i.name},(0,a.createElement)(Ty.Slot,null))),(0,a.createElement)(ym,{clientIds:n}),!g&&(0,a.createElement)(am,{clientIds:n}))};var hm=function(e){let{focusOnMount:t,isFixed:n,...r}=e;const{blockType:i,hasParents:s,showParentSelector:u}=(0,d.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:r,__unstableGetContentLockingParent:i}=e(sr),{getBlockType:l}=e(o.store),a=r(),s=a[0],c=n(s),u=l(t(c[c.length-1]));return{blockType:s&&l(t(s)),hasParents:c.length,showParentSelector:u&&(0,o.hasBlockSupport)(u,"__experimentalParentSelector",!0)&&a.length<=1&&!i(s)}}),[]);if(i&&!(0,o.hasBlockSupport)(i,"__experimentalToolbar",!0))return null;const p=c()("block-editor-block-contextual-toolbar",{"has-parent":s&&u,"is-fixed":n});return(0,a.createElement)(Zf,l({focusOnMount:t,className:p,"aria-label":(0,m.__)("Block tools")},r),(0,a.createElement)(gm,{hideDragHandle:n}))};const bm={flip:!1,shift:!0},vm={flip:!0,shift:!1};function _m(e,t,n){if(!e||!t)return bm;const r=t.getBoundingClientRect(),o=e.getBoundingClientRect(),i=e.ownerDocument.documentElement.clientHeight,l=r.top-o.top>n,a=r.height>i-n;return l||a?bm:vm}function km(e){const{__unstableGetEditorMode:t,isMultiSelecting:n,hasMultiSelection:r,isTyping:o,getSettings:i,getLastMultiSelectedBlockClientId:l}=e(sr);return{editorMode:t(),isMultiSelecting:n(),isTyping:o(),hasFixedToolbar:i().hasFixedToolbar,lastClientId:r()?l():null}}function Sm(e){let{clientId:t,rootClientId:n,isEmptyDefaultBlock:r,capturingClientId:o,__unstablePopoverSlot:i,__unstableContentRef:s}=e;const{editorMode:u,isMultiSelecting:f,isTyping:y,hasFixedToolbar:m,lastClientId:g}=(0,d.useSelect)(km,[]),h=(0,d.useSelect)((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:r,getBlockOrder:o}=e(sr);if(!n())return!1;const i=r();return o(i.rootClientId)[i.index]===t}),[t]),b=(0,p.useViewportMatch)("medium"),v=(0,a.useRef)(!1),{stopTyping:_}=(0,d.useDispatch)(sr),k=!y&&"edit"===u&&r,S="navigation"===u||"zoom-out"===u,E="edit"===u&&!m&&b&&!f&&!k&&!y,w="edit"===u&&!E&&!m&&!r;(0,Lu.useShortcut)("core/block-editor/focus-toolbar",(()=>{v.current=!0,_(!0)}),{isDisabled:!w}),(0,a.useEffect)((()=>{v.current=!1}));const A=(0,a.useRef)(),C=function(e){let{contentElement:t,clientId:n}=e;const r=Or(n),[o,i]=(0,a.useState)(0),[l,s]=(0,a.useState)((()=>_m(t,r,o))),c=(0,d.useSelect)((e=>e(sr).getBlockIndex(n)),[n]),u=(0,p.useRefEffect)((e=>{i(e.offsetHeight)}),[]),f=(0,a.useCallback)((()=>s(_m(t,r,o))),[t,r,o]);return(0,a.useLayoutEffect)(f,[c,f]),(0,a.useLayoutEffect)((()=>{var e,n,o;if(!t||!r)return;const i=null==t||null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView;let l;null==i||null===(n=i.addEventHandler)||void 0===n||n.call(i,"resize",f);const a=null==r||null===(o=r.ownerDocument)||void 0===o?void 0:o.defaultView;return a.ResizeObserver&&(l=new a.ResizeObserver(f),l.observe(r)),()=>{var e;null==i||null===(e=i.removeEventHandler)||void 0===e||e.call(i,"resize",f),l&&l.disconnect()}}),[f,t,r]),{...l,ref:u}}({contentElement:null==s?void 0:s.current,clientId:t});return S||E||k?(0,a.createElement)(a.Fragment,null,k&&(0,a.createElement)(ko,l({clientId:o||t,__unstableCoverTarget:!0,bottomClientId:g,className:c()("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":h}),__unstablePopoverSlot:i,__unstableContentRef:s,resize:!1,shift:!1},C),(0,a.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,a.createElement)(vf,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0}))),(S||E)&&(0,a.createElement)(ko,l({clientId:o||t,bottomClientId:g,className:c()("block-editor-block-list__block-popover",{"is-insertion-point-visible":h}),__unstablePopoverSlot:i,__unstableContentRef:s,resize:!1},C),E&&(0,a.createElement)(hm,{focusOnMount:v.current,__experimentalInitialIndex:A.current,__experimentalOnIndexChange:e=>{A.current=e},key:t}),S&&(0,a.createElement)(Jf,{clientId:t,rootClientId:n}))):null}function Em(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:r,getBlock:i,getBlockParents:l,__experimentalGetBlockListSettingsForBlocks:a}=e(sr),s=t()||n();if(!s)return;const{name:c,attributes:p={}}=i(s)||{},d=l(s),f=a(d),y=(0,u.find)(d,(e=>{var t;return null===(t=f[e])||void 0===t?void 0:t.__experimentalCaptureToolbars}));return{clientId:s,rootClientId:r(s),name:c,isEmptyDefaultBlock:c&&(0,o.isUnmodifiedDefaultBlock)({name:c,attributes:p}),capturingClientId:y}}function wm(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const r=(0,d.useSelect)(Em,[]);if(!r)return null;const{clientId:o,rootClientId:i,name:l,isEmptyDefaultBlock:s,capturingClientId:c}=r;return l?(0,a.createElement)(Sm,{clientId:o,rootClientId:i,isEmptyDefaultBlock:s,capturingClientId:c,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function Am(e){let{children:t}=e;const n=(0,a.useContext)(If),r=(0,a.useContext)(f.Disabled.Context);return n||r?t:(j()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools",since:"5.8"}),(0,a.createElement)(Bf,{__unstablePopoverSlot:"block-toolbar"},(0,a.createElement)(wm,{__unstablePopoverSlot:"block-toolbar"}),t))}var Cm=(0,p.createHigherOrderComponent)((e=>t=>{const{clientId:n}=dr();return(0,a.createElement)(e,l({},t,{clientId:n}))}),"withClientId");var Im=Cm((e=>{let{clientId:t,showSeparator:n,isFloating:r,onAddBlock:o,isToggle:i}=e;return(0,a.createElement)(Ef,{className:c()({"block-list-appender__toggle":i}),rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})}));var xm=(0,p.compose)([Cm,(0,d.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:r}=e(sr),o=r(n);return{lastBlockClientId:o[o.length-1]}}))])((e=>{let{clientId:t}=e;return(0,a.createElement)(_f,{rootClientId:t})}));const Bm=new WeakMap;const Pm=new WeakMap;function Tm(e,t,n,r,i,l,a){return s=>{const{srcRootClientId:c,srcClientIds:u,type:p,blocks:d}=function(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(s);if("inserter"===p){a();const n=d.map((e=>(0,o.cloneBlock)(e)));l(n,t,e,!0,null)}if("block"===p){const o=n(u[0]);if(c===e&&o===t)return;if(u.includes(e)||r(u).some((t=>t===e)))return;const l=c===e,a=u.length;i(u,c,e,l&&oe(sr).getSettings().mediaUpload),[]),{canInsertBlockType:r,getBlockIndex:i,getClientIdsOfDescendants:l}=(0,d.useSelect)(sr),{insertBlocks:a,moveBlocksToPosition:s,updateBlockAttributes:c,clearSelectedBlock:u}=(0,d.useDispatch)(sr),p=Tm(e,t,i,l,s,a,u),f=function(e,t,n,r,i,l){return a=>{if(!n)return;const s=(0,o.findTransform)((0,o.getBlockTransforms)("from"),(t=>"files"===t.type&&i(t.blockName,e)&&t.isMatch(a)));if(s){const n=s.transform(a,r);l(n,t,e)}}}(e,t,n,c,r,a),y=function(e,t,n){return r=>{const i=(0,o.pasteHandler)({HTML:r,mode:"BLOCKS"});i.length&&n(i,t,e)}}(e,t,a);return e=>{const t=(0,Hi.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?y(n):t.length?f(t):p(e)}}function Rm(e,t,n){const r="top"===n||"bottom"===n,{x:o,y:i}=e,l=r?o:i,a=r?i:o,s=r?t.left:t.top,c=r?t.right:t.bottom,u=t[n];let p;return p=l>=s&&l<=c?l:l2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((o=>{const i=Rm(e,t,o);(void 0===n||i{const a=e.getBoundingClientRect(),[s,c]=Nm(t,a,r);if(void 0===l||s0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,a.useState)(null),r=(0,d.useSelect)((t=>{const{getTemplateLock:n,__unstableIsWithinBlockOverlay:r,__unstableHasActiveBlockOverlayActive:o}=t(sr),i=n(e);return["all","contentOnly"].some((e=>e===i))||o(e)||r(e)}),[e]),{getBlockListSettings:o}=(0,d.useSelect)(sr),{showInsertionPoint:i,hideInsertionPoint:l}=(0,d.useDispatch)(sr),s=Om(e,t),c=(0,p.useThrottle)((0,a.useCallback)(((t,r)=>{var l;const a=Fm(Array.from(r.children).filter((e=>e.classList.contains("wp-block"))),{x:t.clientX,y:t.clientY},null===(l=o(e))||void 0===l?void 0:l.orientation);n(void 0===a?0:a),null!==a&&i(e,a)}),[]),200);return(0,p.__experimentalUseDropZone)({isDisabled:r,onDrop:s,onDragOver(e){c(e,e.currentTarget)},onDragLeave(){c.cancel(),l(),n(null)},onDragEnd(){c.cancel(),l(),n(null)}})}function Dm(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:r,__experimentalDirectInsert:i,template:l,templateLock:s,wrapperRef:c,templateInsertUpdatesSelection:p,__experimentalCaptureToolbars:f,__experimentalAppenderTagName:y,renderAppender:m,orientation:g,placeholder:h,__experimentalLayout:b}=e;!function(e,t,n,r,o,i,l,s){const{updateBlockListSettings:c}=(0,d.useDispatch)(sr),u=(0,d.useRegistry)(),{blockListSettings:p,parentLock:f}=(0,d.useSelect)((t=>{const n=t(sr).getBlockRootClientId(e);return{blockListSettings:t(sr).getBlockListSettings(e),parentLock:t(sr).getTemplateLock(n)}}),[e]),y=(0,a.useMemo)((()=>t),t);(0,a.useLayoutEffect)((()=>{const t={allowedBlocks:y,templateLock:void 0===o||"contentOnly"===f?f:o};if(void 0!==i&&(t.__experimentalCaptureToolbars=i),void 0!==l)t.orientation=l;else{const e=gi(null==s?void 0:s.type);t.orientation=e.getOrientation(s)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==r&&(t.__experimentalDirectInsert=r),bo()(p,t)||(Bm.get(u)||Bm.set(u,[]),Bm.get(u).push([e,t]),window.queueMicrotask((()=>{var e;null!==(e=Bm.get(u))&&void 0!==e&&e.length&&u.batch((()=>{Bm.get(u).forEach((e=>{c(...e)})),Bm.set(u,[])}))})))}),[e,p,y,n,r,o,f,i,l,c,s,u])}(t,n,r,i,s,f,g,b),function(e,t,n,r){const{getSelectedBlocksInitialCaretPosition:i,isBlockSelected:l}=(0,d.useSelect)(sr),{replaceInnerBlocks:s}=(0,d.useDispatch)(sr),c=(0,d.useSelect)((t=>t(sr).getBlocks(e)),[e]),{getBlocks:p}=(0,d.useSelect)(sr),f=(0,a.useRef)(null);(0,a.useLayoutEffect)((()=>{window.queueMicrotask((()=>{const a=p(e),c=0===a.length||"all"===n||"contentOnly"===n,d=!(0,u.isEqual)(t,f.current);if(!c||!d)return;f.current=t;const y=(0,o.synchronizeBlocksWithTemplate)(a,t);(0,u.isEqual)(y,a)||s(e,y,0===a.length&&r&&0!==y.length&&l(e),i())}))}),[c,t,n,e])}(t,l,s,p);const v=(0,d.useSelect)((e=>{const n=e(sr).getBlock(t);if(!n)return;const r=(0,o.getBlockType)(n.name);return r&&r.providesContext?function(e,t){Pm.has(t)||Pm.set(t,new WeakMap);const n=Pm.get(t);if(!n.has(e)){const r=(0,u.mapValues)(t.providesContext,(t=>e[t]));n.set(e,r)}return n.get(e)}(n.attributes,r):void 0}),[t]);return(0,a.createElement)($i,{value:v},(0,a.createElement)(Km,{rootClientId:t,renderAppender:m,__experimentalAppenderTagName:y,__experimentalLayout:b,wrapperRef:c,placeholder:h}))}function Lm(e){return Bu(e),(0,a.createElement)(Dm,e)}const Um=(0,a.forwardRef)(((e,t)=>{const n=jm({ref:t},e);return(0,a.createElement)("div",{className:"block-editor-inner-blocks"},(0,a.createElement)("div",n))}));function jm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{__unstableDisableDropZone:n}=t,{clientId:r}=dr(),i=(0,p.useViewportMatch)("medium","<"),{__experimentalCaptureToolbars:s,hasOverlay:u}=(0,d.useSelect)((e=>{if(!r)return{};const{getBlockName:t,isBlockSelected:n,hasSelectedInnerBlock:l,__unstableGetEditorMode:a}=e(sr),s=t(r),c="navigation"===a()||i;return{__experimentalCaptureToolbars:e(o.store).hasBlockSupport(s,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==s&&!n(r)&&!l(r,!0)&&c}}),[r,i]),f=Mm({rootClientId:r}),y=(0,p.useMergeRefs)([e.ref,n?null:f]),m={__experimentalCaptureToolbars:s,...t},g=m.value&&m.onChange?Lm:Dm;return{...e,ref:y,className:c()(e.className,"block-editor-block-list__layout",{"has-overlay":u}),children:r?(0,a.createElement)(g,l({},m,{clientId:r})):(0,a.createElement)(Km,t)}}jm.save=o.__unstableGetInnerBlocksProps,Um.DefaultBlockAppender=xm,Um.ButtonBlockAppender=Im,Um.Content=()=>jm.save().children;var zm=Um;const Vm=(0,a.createContext)(),Gm=(0,a.createContext)();function Hm(e){let{className:t,...n}=e;const[r,o]=(0,a.useState)(),i=(0,p.useViewportMatch)("medium"),{isOutlineMode:l,isFocusMode:s,editorMode:u}=(0,d.useSelect)((e=>{const{getSettings:t,__unstableGetEditorMode:n}=e(sr),{outlineMode:r,focusMode:o}=t();return{isOutlineMode:r,isFocusMode:o,editorMode:n()}}),[]),{setBlockVisibility:f}=(0,d.useDispatch)(sr),y=(0,a.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{const t={};for(const n of e){t[n.target.getAttribute("data-block")]=n.isIntersecting}f(t)}))}),[]),m=jm({ref:(0,p.useMergeRefs)([Ou(),Pf(),o]),className:c()("is-root-container",t,{"is-outline-mode":l,"is-focus-mode":s&&i,"is-navigate-mode":"navigation"===u})},n);return(0,a.createElement)(Vm.Provider,{value:r},(0,a.createElement)(Gm.Provider,{value:y},(0,a.createElement)("div",m)))}function Wm(e){return function(){const e=(0,d.useSelect)((e=>e(sr).getSettings().__experimentalBlockPatterns),[]);(0,a.useEffect)((()=>{if(null==e||!e.length)return;let t,n=-1;const r=()=>{n++,n>=e.length||((0,d.select)(sr).__experimentalGetParsedPattern(e[n].name),t=Tf(r))};return t=Tf(r),()=>Of(t)}),[e])}(),(0,a.createElement)(Am,null,(0,a.createElement)(pr,{value:cr},(0,a.createElement)(Hm,e)))}function $m(e){let{placeholder:t,rootClientId:n,renderAppender:r,__experimentalAppenderTagName:o,__experimentalLayout:i=hi}=e;const{order:l,selectedBlocks:s,visibleBlocks:c}=(0,d.useSelect)((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:r,__unstableGetVisibleBlocks:o}=e(sr);return{order:t(n),selectedBlocks:r(),visibleBlocks:o()}}),[n]);return(0,a.createElement)(vi,{value:i},l.map((e=>(0,a.createElement)(d.AsyncModeProvider,{key:e,value:!c.has(e)&&!s.includes(e)},(0,a.createElement)(vu,{rootClientId:n,clientId:e})))),l.length<1&&t,(0,a.createElement)(wf,{tagName:o,rootClientId:n,renderAppender:r}))}function Km(e){return(0,a.createElement)(d.AsyncModeProvider,{value:!1},(0,a.createElement)($m,e))}function qm(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Jm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{flat:t,...n}=e;return t||qm(Object.values(n).filter(Boolean))||"px"}function Ym(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,f.__experimentalParseQuantityAndUnitFromRawValue)(e))),n=t.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),r=t.map((e=>e[1])),o=n.every((e=>e===n[0]))?n[0]:"",i=qm(r),l=0===o||o?`${o}${i}`:void 0;return l}function Qm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Ym(e),n="string"!=typeof e&&isNaN(parseFloat(t));return n}function Zm(e){if(!e)return!1;if("string"==typeof e)return!0;return!!Object.values(e).filter((e=>!!e||0===e)).length}function Xm(e){let{onChange:t,selectedUnits:n,setSelectedUnits:r,values:o,...i}=e,s=Ym(o);void 0===s&&(s=Jm(n));const c=Zm(o)&&Qm(o),u=c?(0,m.__)("Mixed"):null;return(0,a.createElement)(f.__experimentalUnitControl,l({},i,{"aria-label":(0,m.__)("Border radius"),disableUnits:c,isOnly:!0,value:s,onChange:e=>{const n=!isNaN(parseFloat(e));t(n?e:void 0)},onUnitChange:e=>{r({topLeft:e,topRight:e,bottomLeft:e,bottomRight:e})},placeholder:u}))}Wm.__unstableElementContext=Vm;const eg={topLeft:(0,m.__)("Top left"),topRight:(0,m.__)("Top right"),bottomLeft:(0,m.__)("Bottom left"),bottomRight:(0,m.__)("Bottom right")};function tg(e){let{onChange:t,selectedUnits:n,setSelectedUnits:r,values:o,...i}=e;const s=e=>n=>{if(!t)return;const r=!isNaN(parseFloat(n))?n:void 0;t({...c,[e]:r})},c="string"!=typeof o?o:{topLeft:o,topRight:o,bottomLeft:o,bottomRight:o};return(0,a.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(eg).map((e=>{let[t,o]=e;const[u,p]=(0,f.__experimentalParseQuantityAndUnitFromRawValue)(c[t]),d=c[t]?p:n[t]||n.flat;return(0,a.createElement)(f.Tooltip,{text:o,position:"top",key:t},(0,a.createElement)("div",{className:"components-border-radius-control__tooltip-wrapper"},(0,a.createElement)(f.__experimentalUnitControl,l({},i,{"aria-label":o,value:[u,d].join(""),onChange:s(t),onUnitChange:(y=t,e=>{const t={...n};t[y]=e,r(t)})}))));var y})))}function ng(e){let{isLinked:t,...n}=e;const r=t?(0,m.__)("Unlink radii"):(0,m.__)("Link radii");return(0,a.createElement)(f.Tooltip,{text:r},(0,a.createElement)("span",null,(0,a.createElement)(f.Button,l({},n,{className:"component-border-radius-control__linked-button",isSmall:!0,icon:t?Xr:eo,iconSize:24,"aria-label":r}))))}const rg={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},og={px:100,em:20,rem:20};function ig(e){let{onChange:t,values:n}=e;const[r,o]=(0,a.useState)(!Zm(n)||!Qm(n)),[i,l]=(0,a.useState)({flat:"string"==typeof n?(0,f.__experimentalParseQuantityAndUnitFromRawValue)(n)[1]:void 0,topLeft:(0,f.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.topLeft)[1],topRight:(0,f.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.topRight)[1],bottomLeft:(0,f.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.bottomLeft)[1],bottomRight:(0,f.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.bottomRight)[1]}),s=(0,f.__experimentalUseCustomUnits)({availableUnits:Kr("spacing.units")||["px","em","rem"]}),c=Jm(i),u=s&&s.find((e=>e.value===c)),p=(null==u?void 0:u.step)||1,[d]=(0,f.__experimentalParseQuantityAndUnitFromRawValue)(Ym(n));return(0,a.createElement)("fieldset",{className:"components-border-radius-control"},(0,a.createElement)(f.BaseControl.VisualLabel,{as:"legend"},(0,m.__)("Radius")),(0,a.createElement)("div",{className:"components-border-radius-control__wrapper"},r?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Xm,{className:"components-border-radius-control__unit-control",values:n,min:0,onChange:t,selectedUnits:i,setSelectedUnits:l,units:s}),(0,a.createElement)(f.RangeControl,{label:(0,m.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:null!=d?d:"",min:0,max:og[c],initialPosition:0,withInputField:!1,onChange:e=>{t(void 0!==e?`${e}${c}`:void 0)},step:p})):(0,a.createElement)(tg,{min:0,onChange:t,selectedUnits:i,setSelectedUnits:l,values:n||rg,units:s}),(0,a.createElement)(ng,{onClick:()=>o(!r),isLinked:r})))}function lg(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,a.createElement)(ig,{values:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,onChange:e=>{const t=lo({...n,border:{...null==n?void 0:n.border,radius:e}});r({style:t})}})}Ap([Cp,Bp]);const ag=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{color:n}},sg=(e,t)=>(0,u.find)(e,{color:t});function cg(e,t){if(e&&t)return`has-${(0,u.kebabCase)(t)}-${e}`}function ug(){return{disableCustomColors:!Kr("color.custom"),disableCustomGradients:!Kr("color.customGradient")}}function pg(){const e=ug(),t=Kr("color.palette.custom"),n=Kr("color.palette.theme"),r=Kr("color.palette.default"),o=Kr("color.defaultPalette");e.colors=(0,a.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,m._x)("Theme","Indicates this palette comes from the theme."),colors:n}),o&&r&&r.length&&e.push({name:(0,m._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&e.push({name:(0,m._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[r,n,t]);const i=Kr("color.gradients.custom"),l=Kr("color.gradients.theme"),s=Kr("color.gradients.default"),c=Kr("color.defaultGradients");return e.gradients=(0,a.useMemo)((()=>{const e=[];return l&&l.length&&e.push({name:(0,m._x)("Theme","Indicates this palette comes from the theme."),gradients:l}),c&&s&&s.length&&e.push({name:(0,m._x)("Default","Indicates this palette comes from WordPress."),gradients:s}),i&&i.length&&e.push({name:(0,m._x)("Custom","Indicates this palette is created by the user."),gradients:i}),e}),[i,l,s]),e}const dg="__experimentalBorder",fg=["top","right","bottom","left"],yg=e=>{var t,n;return{...e,borderColor:void 0,style:{...e.style,border:{radius:null===(t=e.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius}}}},mg=(e,t,n)=>{let r;return e.some((e=>e.colors.some((e=>e[t]===n&&(r=e,!0))))),r},gg=e=>{let{colors:t,namedColor:n,customColor:r}=e;if(n){const e=mg(t,"slug",n);if(e)return e}if(!r)return{color:void 0};const o=mg(t,"color",r);return o||{color:r}};function hg(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function bg(e){const{attributes:t,clientId:n,setAttributes:r}=e,{style:i}=t,{colors:l}=pg(),s=vg(e.name),c=Kr("border.color")&&vg(e.name,"color"),u=Kr("border.radius")&&vg(e.name,"radius"),p=Kr("border.style")&&vg(e.name,"style"),d=Kr("border.width")&&vg(e.name,"width");if([!c,!u,!p,!d].every(Boolean)||!s)return null;const y=(0,o.getBlockSupport)(e.name,[dg,"__experimentalDefaultControls"]),g=(null==y?void 0:y.color)||(null==y?void 0:y.width),h=((e,t)=>{const{borderColor:n,style:r}=e,{border:o}=r||{};if(n){const{color:e}=gg({colors:t,namedColor:n});return e?{...o,color:e}:o}if(!o)return o;const i={...o};return fg.forEach((e=>{var n;const r=hg(null===(n=i[e])||void 0===n?void 0:n.color);if(r){const{color:n}=gg({colors:t,namedColor:r});i[e]={...i[e],color:n}}})),i})(t,l);return(0,a.createElement)(go,{__experimentalGroup:"border"},(d||c)&&(0,a.createElement)(f.__experimentalToolsPanelItem,{hasValue:()=>(e=>{const{borderColor:t,style:n}=e.attributes;return(0,f.__experimentalIsDefinedBorder)(null==n?void 0:n.border)||!!t})(e),label:(0,m.__)("Border"),onDeselect:()=>(e=>{var t;let{attributes:n={},setAttributes:r}=e;const{style:o}=n;r({borderColor:void 0,style:{...o,border:lo({radius:null==o||null===(t=o.border)||void 0===t?void 0:t.radius})}})})(e),isShownByDefault:g,resetAllFilter:yg,panelId:n},(0,a.createElement)(f.__experimentalBorderBoxControl,{colors:l,enableAlpha:!0,enableStyle:p,onChange:e=>{var t;let n,o={...e};if((0,f.__experimentalHasSplitBorders)(e))o={top:{...e.top},right:{...e.right},bottom:{...e.bottom},left:{...e.left}},fg.forEach((t=>{var n;if(null!==(n=e[t])&&void 0!==n&&n.color){var r;const n=gg({colors:l,customColor:null===(r=e[t])||void 0===r?void 0:r.color});n.slug&&(o[t].color=`var:preset|color|${n.slug}`)}}));else if(null!=e&&e.color){const t=null==e?void 0:e.color,r=gg({colors:l,customColor:t});r.slug&&(n=r.slug,o.color=void 0)}const a=lo({...i,border:{radius:null==i||null===(t=i.border)||void 0===t?void 0:t.radius,...o}});r({style:a,borderColor:n})},popoverOffset:40,popoverPlacement:"left-start",value:h,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0})),u&&(0,a.createElement)(f.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;const r=null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius;return"object"==typeof r?Object.entries(r).some(Boolean):!!r}(e),label:(0,m.__)("Radius"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:_g(r,"radius")})}(e),isShownByDefault:null==y?void 0:y.radius,resetAllFilter:e=>{var t;return{...e,style:{...e.style,border:{...null===(t=e.style)||void 0===t?void 0:t.border,radius:void 0}}}},panelId:n},(0,a.createElement)(lg,e)))}function vg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==a.Platform.OS)return!1;const n=(0,o.getBlockSupport)(e,dg);return!0===n||("any"===t?!!(null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style):!(null==n||!n[t]))}function _g(e,t){return lo({...e,border:{...null==e?void 0:e.border,[t]:void 0}})}function kg(e,t,n){if(!vg(t,"color")||co(t,dg,"color"))return e;const r=Sg(n),o=c()(e.className,r);return e.className=o||void 0,e}function Sg(e){var t;const{borderColor:n,style:r}=e,o=cg("border-color",n);return c()({"has-border-color":n||(null==r||null===(t=r.border)||void 0===t?void 0:t.color),[o]:!!o})}const Eg=(0,p.createHigherOrderComponent)((e=>t=>{var n,r,o,i,s,c,u,p,d;const{name:f,attributes:y}=t,{borderColor:m,style:g}=y,{colors:h}=pg();if(!vg(f,"color")||co(f,dg,"color"))return(0,a.createElement)(e,t);const{color:b}=gg({colors:h,namedColor:m}),{color:v}=gg({colors:h,namedColor:hg(null==g||null===(n=g.border)||void 0===n||null===(r=n.top)||void 0===r?void 0:r.color)}),{color:_}=gg({colors:h,namedColor:hg(null==g||null===(o=g.border)||void 0===o||null===(i=o.right)||void 0===i?void 0:i.color)}),{color:k}=gg({colors:h,namedColor:hg(null==g||null===(s=g.border)||void 0===s||null===(c=s.bottom)||void 0===c?void 0:c.color)}),{color:S}=gg({colors:h,namedColor:hg(null==g||null===(u=g.border)||void 0===u||null===(p=u.left)||void 0===p?void 0:p.color)}),E={borderTopColor:v||b,borderRightColor:_||b,borderBottomColor:k||b,borderLeftColor:S||b};let w=t.wrapperProps;return w={...t.wrapperProps,style:{...null===(d=t.wrapperProps)||void 0===d?void 0:d.style,...E}},(0,a.createElement)(e,l({},t,{wrapperProps:w}))}));function wg(e){if(e)return`has-${e}-gradient-background`}function Ag(e,t){const n=(0,u.find)(e,["slug",t]);return n&&n.gradient}function Cg(e,t){return(0,u.find)(e,["gradient",t])}function Ig(e,t){const n=Cg(e,t);return n&&n.slug}function xg(){let{gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clientId:n}=dr(),r=Kr("color.gradients.custom"),o=Kr("color.gradients.theme"),i=Kr("color.gradients.default"),l=(0,a.useMemo)((()=>[...r||[],...o||[],...i||[]]),[r,o,i]),{gradient:s,customGradient:c}=(0,d.useSelect)((r=>{const{getBlockAttributes:o}=r(sr),i=o(n)||{};return{customGradient:i[t],gradient:i[e]}}),[n,e,t]),{updateBlockAttributes:u}=(0,d.useDispatch)(sr),p=(0,a.useCallback)((r=>{const o=Ig(l,r);u(n,o?{[e]:o,[t]:void 0}:{[e]:void 0,[t]:r})}),[l,n,u]),f=wg(s);let y;return y=s?Ag(l,s):c,{gradientClass:f,gradientValue:y,setGradient:p}}(0,i.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return vg(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",kg),(0,i.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!vg(e,"color")||co(e,dg,"color"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),kg(r,e,n)},e})),(0,i.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",Eg);const Bg=["colors","disableCustomColors","gradients","disableCustomGradients"],Pg={name:"color",title:"Solid",value:"color"},Tg={name:"gradient",title:"Gradient",value:"gradient"},Og=[Pg,Tg];function Rg(e){let{colors:t,gradients:n,disableCustomColors:r,disableCustomGradients:o,__experimentalHasMultipleOrigins:i,__experimentalIsRenderedInSidebar:l,className:s,label:p,onColorChange:d,onGradientChange:y,colorValue:m,gradientValue:g,clearable:h,showTitle:b=!0,enableAlpha:v}=e;const _=d&&(!(0,u.isEmpty)(t)||!r),k=y&&(!(0,u.isEmpty)(n)||!o);if(!_&&!k)return null;const S={[Pg.value]:(0,a.createElement)(f.ColorPalette,{value:m,onChange:k?e=>{d(e),y()}:d,colors:t,disableCustomColors:r,__experimentalHasMultipleOrigins:i,__experimentalIsRenderedInSidebar:l,clearable:h,enableAlpha:v}),[Tg.value]:(0,a.createElement)(f.GradientPicker,{__nextHasNoMargin:!0,value:g,onChange:_?e=>{y(e),d()}:y,gradients:n,disableCustomGradients:o,__experimentalHasMultipleOrigins:i,__experimentalIsRenderedInSidebar:l,clearable:h})},E=e=>(0,a.createElement)("div",{className:"block-editor-color-gradient-control__panel"},S[e]);return(0,a.createElement)(f.BaseControl,{__nextHasNoMarginBottom:!0,className:c()("block-editor-color-gradient-control",s)},(0,a.createElement)("fieldset",{className:"block-editor-color-gradient-control__fieldset"},(0,a.createElement)(f.__experimentalVStack,{spacing:1},b&&(0,a.createElement)("legend",null,(0,a.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,a.createElement)(f.BaseControl.VisualLabel,null,p))),_&&k&&(0,a.createElement)(f.TabPanel,{className:"block-editor-color-gradient-control__tabs",tabs:Og,initialTabName:g?Tg.value:!!_&&Pg.value},(e=>E(e.value))),!k&&E(Pg.value),!_&&E(Tg.value))))}function Ng(e){const t={};return t.colors=Kr("color.palette"),t.gradients=Kr("color.gradients"),t.disableCustomColors=!Kr("color.custom"),t.disableCustomGradients=!Kr("color.customGradient"),(0,a.createElement)(Rg,l({},t,e))}var Fg=function(e){return(0,u.every)(Bg,(t=>e.hasOwnProperty(t)))?(0,a.createElement)(Rg,e):(0,a.createElement)(Ng,e)};const Mg=e=>{let{setting:t,children:n,panelId:r,...o}=e;return(0,a.createElement)(f.__experimentalToolsPanelItem,l({hasValue:()=>!!t.colorValue||!!t.gradientValue,label:t.label,onDeselect:()=>{t.colorValue?t.onColorChange():t.gradientValue&&t.onGradientChange()},isShownByDefault:void 0===t.isShownByDefault||t.isShownByDefault},o,{className:"block-editor-tools-panel-color-gradient-settings__item",panelId:r,resetAllFilter:t.resetAllFilter}),n)},Dg=e=>{let{colorValue:t,label:n}=e;return(0,a.createElement)(f.__experimentalHStack,{justify:"flex-start"},(0,a.createElement)(f.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:t}),(0,a.createElement)(f.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:n},n))},Lg=e=>t=>{let{onToggle:n,isOpen:r}=t;const{colorValue:o,label:i}=e,l={onClick:n,className:c()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":r}),"aria-expanded":r};return(0,a.createElement)(f.Button,l,(0,a.createElement)(Dg,{colorValue:o,label:i}))};function Ug(e){let t,{colors:n,disableCustomColors:r,disableCustomGradients:o,enableAlpha:i,gradients:s,settings:c,__experimentalHasMultipleOrigins:u,__experimentalIsRenderedInSidebar:p,...d}=e;return p&&(t={placement:"left-start",offset:36,shift:!0}),(0,a.createElement)(a.Fragment,null,c.map(((e,c)=>{var y;const m={clearable:!1,colorValue:e.colorValue,colors:n,disableCustomColors:r,disableCustomGradients:o,enableAlpha:i,gradientValue:e.gradientValue,gradients:s,label:e.label,onColorChange:e.onColorChange,onGradientChange:e.onGradientChange,showTitle:!1,__experimentalHasMultipleOrigins:u,__experimentalIsRenderedInSidebar:p,...e},g={colorValue:null!==(y=e.gradientValue)&&void 0!==y?y:e.colorValue,label:e.label};return e&&(0,a.createElement)(Mg,l({key:c,setting:e},d),(0,a.createElement)(f.Dropdown,{popoverProps:t,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:Lg(g),renderContent:()=>(0,a.createElement)(f.__experimentalDropdownContentWrapper,{paddingSize:"none"},(0,a.createElement)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content"},(0,a.createElement)(Fg,m)))}))})))}Ap([Cp,Bp]);var jg=function(e){let{backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:r,fallbackLinkColor:o,fontSize:i,isLargeText:l,textColor:s,linkColor:c,enableAlphaChecker:u=!1}=e;const p=t||n;if(!p)return null;const d=s||r,y=c||o;if(!d&&!y)return null;const g=[{color:d,description:(0,m.__)("text color")},{color:y,description:(0,m.__)("link color")}],h=Ep(p),b=h.alpha()<1,v=h.brightness(),_={level:"AA",size:l||!1!==l&&i>=24?"large":"small"};let k="",S="";for(const e of g){if(!e.color)continue;const t=Ep(e.color),n=t.isReadable(h,_),r=t.alpha()<1;if(!n){if(b||r)continue;k=vnull==e?void 0:e.colorValue));(0,a.useEffect)((()=>{var e;if(!o||!y.length)return;if(!f.current)return;u(zg(f.current).color);const t=null===(e=f.current)||void 0===e?void 0:e.querySelector("a");t&&t.innerText&&d(zg(t).color);let n=f.current,r=zg(n).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,r=zg(n).backgroundColor;s(r)}));const m=pg();return(0,a.createElement)(go,{__experimentalGroup:"color"},(0,a.createElement)(Ug,l({enableAlpha:t,panelId:r,settings:n,__experimentalIsItemGroup:!1,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0},m)),o&&(0,a.createElement)(jg,{backgroundColor:i,textColor:c,enableAlphaChecker:t,linkColor:p}))}const Gg="color",Hg=e=>{const t=(0,o.getBlockSupport)(e,Gg);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},Wg=e=>{if("web"!==a.Platform.OS)return!1;const t=(0,o.getBlockSupport)(e,Gg);return null!==t&&"object"==typeof t&&!!t.link},$g=e=>{const t=(0,o.getBlockSupport)(e,Gg);return null!==t&&"object"==typeof t&&!!t.gradients},Kg=e=>{const t=(0,o.getBlockSupport)(e,Gg);return t&&!1!==t.background},qg=e=>{const t=(0,o.getBlockSupport)(e,Gg);return t&&!1!==t.text},Jg=(e,t)=>lo(ao(t,e,void 0)),Yg=e=>({textColor:void 0,style:Jg(["color","text"],e.style)}),Qg=e=>({style:Jg(["elements","link","color","text"],e.style)}),Zg=e=>{var t;return{backgroundColor:void 0,gradient:void 0,style:{...e.style,color:{...null===(t=e.style)||void 0===t?void 0:t.color,background:void 0,gradient:void 0}}}};function Xg(e,t,n){var r,o,i,l,a,s;if(!Hg(t)||co(t,Gg))return e;const u=$g(t),{backgroundColor:p,textColor:d,gradient:f,style:y}=n,m=e=>!co(t,Gg,e),g=m("text")?cg("color",d):void 0,h=m("gradients")?wg(f):void 0,b=m("background")?cg("background-color",p):void 0,v=m("background")||m("gradients"),_=p||(null==y||null===(r=y.color)||void 0===r?void 0:r.background)||u&&(f||(null==y||null===(o=y.color)||void 0===o?void 0:o.gradient)),k=c()(e.className,g,h,{[b]:!(u&&null!=y&&null!==(i=y.color)&&void 0!==i&&i.gradient||!b),"has-text-color":m("text")&&(d||(null==y||null===(l=y.color)||void 0===l?void 0:l.text)),"has-background":v&&_,"has-link-color":m("link")&&(null==y||null===(a=y.elements)||void 0===a||null===(s=a.link)||void 0===s?void 0:s.color)});return e.className=k||void 0,e}const eh=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?ag(e,n[1]).color:t};function th(e){var t,n,r,i,l,s,c,u,p;const{name:d,attributes:f}=e,y=Kr("color.palette.custom"),g=Kr("color.palette.theme"),h=Kr("color.palette.default"),b=(0,a.useMemo)((()=>[...y||[],...g||[],...h||[]]),[y,g,h]),v=Kr("color.gradients.custom"),_=Kr("color.gradients.theme"),k=Kr("color.gradients.default"),S=(0,a.useMemo)((()=>[...v||[],..._||[],...k||[]]),[v,_,k]),E=Kr("color.custom"),w=Kr("color.customGradient"),A=Kr("color.background"),C=Kr("color.link"),I=Kr("color.text"),x=E||!g||(null==g?void 0:g.length)>0,B=w||!_||(null==_?void 0:_.length)>0,P=(0,a.useRef)(f);if((0,a.useEffect)((()=>{P.current=f}),[f]),!Hg(d))return null;const T=Wg(d)&&C&&x,O=qg(d)&&I&&x,R=Kg(d)&&A&&x,N=$g(d)&&B;if(!(T||O||R||N))return null;const{style:F,textColor:M,backgroundColor:D,gradient:L}=f;let U;if(N&&L)U=Ag(S,L);else if(N){var j;U=null==F||null===(j=F.color)||void 0===j?void 0:j.gradient}const z=t=>n=>{var r,o;const i=sg(b,n),l=t+"Color",a={...P.current.style,color:{...null===(r=P.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color,[t]:null!=i&&i.slug?void 0:n}},s=null!=i&&i.slug?i.slug:void 0,c={style:lo(a),[l]:s};e.setAttributes(c),P.current={...P.current,...c}},V=(0,o.getBlockSupport)(e.name,[Gg,"__experimentalDefaultControls"]),G=!("web"!==a.Platform.OS||L||null!=F&&null!==(t=F.color)&&void 0!==t&&t.gradient||!1===(0,o.getBlockSupport)(e.name,[Gg,"enableContrastChecker"]));return(0,a.createElement)(Vg,{enableContrastChecking:G,clientId:e.clientId,enableAlpha:!0,settings:[...O?[{label:(0,m.__)("Text"),onColorChange:z("text"),colorValue:ag(b,M,null==F||null===(n=F.color)||void 0===n?void 0:n.text).color,isShownByDefault:null==V?void 0:V.text,resetAllFilter:Yg}]:[],...R||N?[{label:(0,m.__)("Background"),onColorChange:R?z("background"):void 0,colorValue:ag(b,D,null==F||null===(r=F.color)||void 0===r?void 0:r.background).color,gradientValue:U,onGradientChange:N?t=>{const n=Ig(S,t);let r;if(n){var o,i,l;const e={...null===(o=P.current)||void 0===o?void 0:o.style,color:{...null===(i=P.current)||void 0===i||null===(l=i.style)||void 0===l?void 0:l.color,gradient:void 0}};r={style:lo(e),gradient:n}}else{var a,s,c;const e={...null===(a=P.current)||void 0===a?void 0:a.style,color:{...null===(s=P.current)||void 0===s||null===(c=s.style)||void 0===c?void 0:c.color,gradient:t}};r={style:lo(e),gradient:void 0}}e.setAttributes(r),P.current={...P.current,...r}}:void 0,isShownByDefault:null==V?void 0:V.background,resetAllFilter:Zg}]:[],...T?[{label:(0,m.__)("Link"),onColorChange:t=>{var n;const r=sg(b,t),o=null!=r&&r.slug?`var:preset|color|${r.slug}`:t,i=lo(ao(null===(n=P.current)||void 0===n?void 0:n.style,["elements","link","color","text"],o));e.setAttributes({style:i}),P.current={...P.current,style:i}},colorValue:eh(b,null==F||null===(i=F.elements)||void 0===i||null===(l=i.link)||void 0===l||null===(s=l.color)||void 0===s?void 0:s.text),clearable:!(null==F||null===(c=F.elements)||void 0===c||null===(u=c.link)||void 0===u||null===(p=u.color)||void 0===p||!p.text),isShownByDefault:null==V?void 0:V.link,resetAllFilter:Qg}]:[]]})}const nh=(0,p.createHigherOrderComponent)((e=>t=>{var n;const{name:r,attributes:o}=t,{backgroundColor:i,textColor:s}=o,c=Kr("color.palette.custom")||[],u=Kr("color.palette.theme")||[],p=Kr("color.palette.default")||[],d=(0,a.useMemo)((()=>[...c||[],...u||[],...p||[]]),[c,u,p]);if(!Hg(r)||co(r,Gg))return(0,a.createElement)(e,t);const f={};var y,m;s&&!co(r,Gg,"text")&&(f.color=null===(y=ag(d,s))||void 0===y?void 0:y.color);i&&!co(r,Gg,"background")&&(f.backgroundColor=null===(m=ag(d,i))||void 0===m?void 0:m.color);let g=t.wrapperProps;return g={...t.wrapperProps,style:{...f,...null===(n=t.wrapperProps)||void 0===n?void 0:n.style}},(0,a.createElement)(e,l({},t,{wrapperProps:g}))})),rh={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};(0,i.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return Hg(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),$g(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",Xg),(0,i.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!Hg(e)||co(e,Gg))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),Xg(r,e,n)},e})),(0,i.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",nh),(0,i.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,r){const o=e.name;return so({linkColor:Wg(o),textColor:qg(o),backgroundColor:Kg(o),gradient:$g(o)},rh,e,t,n,r)}));const oh=[{name:(0,m._x)("Regular","font style"),value:"normal"},{name:(0,m._x)("Italic","font style"),value:"italic"}],ih=[{name:(0,m._x)("Thin","font weight"),value:"100"},{name:(0,m._x)("Extra Light","font weight"),value:"200"},{name:(0,m._x)("Light","font weight"),value:"300"},{name:(0,m._x)("Regular","font weight"),value:"400"},{name:(0,m._x)("Medium","font weight"),value:"500"},{name:(0,m._x)("Semi Bold","font weight"),value:"600"},{name:(0,m._x)("Bold","font weight"),value:"700"},{name:(0,m._x)("Extra Bold","font weight"),value:"800"},{name:(0,m._x)("Black","font weight"),value:"900"}],lh=(e,t)=>e?t?(0,m.__)("Appearance"):(0,m.__)("Font style"):(0,m.__)("Font weight");function ah(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:r=!0,value:{fontStyle:o,fontWeight:i},...s}=e,c=n||r,u=lh(n,r),p={key:"default",name:(0,m.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},d=(0,a.useMemo)((()=>n&&r?(()=>{const e=[p];return oh.forEach((t=>{let{name:n,value:r}=t;ih.forEach((t=>{let{name:o,value:i}=t;const l="normal"===r?o:(0,m.sprintf)((0,m.__)("%1$s %2$s"),o,n);e.push({key:`${r}-${i}`,name:l,style:{fontStyle:r,fontWeight:i}})}))})),e})():n?(()=>{const e=[p];return oh.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:r,fontWeight:void 0}})})),e})():(()=>{const e=[p];return ih.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:void 0,fontWeight:r}})})),e})()),[e.options]),y=d.find((e=>e.style.fontStyle===o&&e.style.fontWeight===i))||d[0];return c&&(0,a.createElement)(f.CustomSelectControl,l({},s,{className:"components-font-appearance-control",label:u,describedBy:y?n?r?(0,m.sprintf)((0,m.__)("Currently selected font appearance: %s"),y.name):(0,m.sprintf)((0,m.__)("Currently selected font style: %s"),y.name):(0,m.sprintf)((0,m.__)("Currently selected font weight: %s"),y.name):(0,m.__)("No selected font appearance"),options:d,value:y,onChange:e=>{let{selectedItem:n}=e;return t(n.style)},__nextUnconstrainedWidth:!0}))}const sh=1.5,ch=.1;var uh=e=>{let{value:t,onChange:n,__nextHasNoMarginBottom:r=!1,__unstableInputWidth:o="60px",...i}=e;const s=function(e){return void 0!==e&&""!==e}(t),c=s?t:"";r||j()("Bottom margin styles for wp.blockEditor.LineHeightControl",{since:"6.0",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"});const u=r?void 0:{marginBottom:24};return(0,a.createElement)("div",{className:"block-editor-line-height-control",style:u},(0,a.createElement)(f.__experimentalNumberControl,l({},i,{__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{var n;const r=["insertText","insertFromPaste"].includes(null===(n=t.payload.event.nativeEvent)||void 0===n?void 0:n.inputType),o=((e,t)=>{if(s)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return sh;default:return e}})(e.value,r);return{...e,value:o}},onChange:n,label:(0,m.__)("Line height"),placeholder:sh,step:ch,value:c,min:0})))};const ph="typography.lineHeight";function dh(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,a.createElement)(uh,{__unstableInputWidth:"100%",__nextHasNoMarginBottom:!0,value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:e=>{const t={...n,typography:{...null==n?void 0:n.typography,lineHeight:e}};r({style:lo(t)})},size:"__unstable-large"})}function fh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Kr("typography.lineHeight");return!(0,o.hasBlockSupport)(e,ph)||t}const yh="typography.__experimentalFontStyle",mh="typography.__experimentalFontWeight";function gh(e){var t,n;const{attributes:{style:r},setAttributes:o}=e,i=!hh(e),l=!bh(e),s=null==r||null===(t=r.typography)||void 0===t?void 0:t.fontStyle,c=null==r||null===(n=r.typography)||void 0===n?void 0:n.fontWeight;return(0,a.createElement)(ah,{onChange:e=>{o({style:lo({...r,typography:{...null==r?void 0:r.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:i,hasFontWeights:l,value:{fontStyle:s,fontWeight:c},size:"__unstable-large"})}function hh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,o.hasBlockSupport)(e,yh),n=Kr("typography.fontStyle");return!t||!n}function bh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,o.hasBlockSupport)(e,mh),n=Kr("typography.fontWeight");return!t||!n}function vh(e){const t=hh(e),n=bh(e);return t&&n}function _h(e){let{value:t="",onChange:n,fontFamilies:r,...o}=e;const i=Kr("typography.fontFamilies");if(r||(r=i),(0,u.isEmpty)(r))return null;const s=[{value:"",label:(0,m.__)("Default")},...r.map((e=>{let{fontFamily:t,name:n}=e;return{value:t,label:n||t}}))];return(0,a.createElement)(f.SelectControl,l({label:(0,m.__)("Font"),options:s,value:t,onChange:n,labelPosition:"top"},o))}const kh="typography.__experimentalFontFamily";function Sh(e,t,n){if(!(0,o.hasBlockSupport)(t,kh))return e;if(co(t,cb,"fontFamily"))return e;if(null==n||!n.fontFamily)return e;const r=new(fy())(e.className);r.add(`has-${(0,u.kebabCase)(null==n?void 0:n.fontFamily)}-font-family`);const i=r.value;return e.className=i||void 0,e}function Eh(e){var t;let{setAttributes:n,attributes:{fontFamily:r}}=e;const o=Kr("typography.fontFamilies"),i=null===(t=(0,u.find)(o,(e=>{let{slug:t}=e;return r===t})))||void 0===t?void 0:t.fontFamily;return(0,a.createElement)(_h,{className:"block-editor-hooks-font-family-control",fontFamilies:o,value:i,onChange:function(e){const t=(0,u.find)(o,(t=>{let{fontFamily:n}=t;return n===e}));n({fontFamily:null==t?void 0:t.slug})},size:"__unstable-large",__nextHasNoMarginBottom:!0})}function wh(e){let{name:t}=e;const n=Kr("typography.fontFamilies");return!n||0===n.length||!(0,o.hasBlockSupport)(t,kh)}(0,i.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,o.hasBlockSupport)(e,kh)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",Sh),(0,i.addFilter)("blocks.registerBlockType","core/fontFamily/addEditProps",(function(e){if(!(0,o.hasBlockSupport)(e,kh))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),Sh(r,e,n)},e}));const Ah=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{size:n}};function Ch(e,t){const n=(0,u.find)(e,{size:t});return n||{size:t}}function Ih(e){if(e)return`has-${(0,u.kebabCase)(e)}-font-size`}var xh=function(e){const t=Kr("typography.fontSizes"),n=!Kr("typography.customFontSize");return(0,a.createElement)(f.FontSizePicker,l({},e,{fontSizes:t,disableCustomFontSizes:n}))};const Bh="1600px",Ph="768px",Th=1,Oh=.75,Rh="14px";function Nh(e){let{minimumFontSize:t,maximumFontSize:n,fontSize:r,minimumViewPortWidth:o=Ph,maximumViewPortWidth:i=Bh,scaleFactor:l=Th,minimumFontSizeFactor:a=Oh,minimumFontSizeLimit:s=Rh}=e;if(r){const e=Fh(r);if(null==e||!e.unit)return null;const o=Fh(s,{coerceTo:e.unit});if(null!=o&&o.value&&!t&&!n&&(null==e?void 0:e.value)<=(null==o?void 0:o.value))return null;if(n||(n=`${e.value}${e.unit}`),!t){const n=Mh(e.value*a,3);t=null!=o&&o.value&&n<(null==o?void 0:o.value)?`${o.value}${o.unit}`:`${n}${e.unit}`}}const c=Fh(t),u=(null==c?void 0:c.unit)||"rem",p=Fh(n,{coerceTo:u});if(!c||!p)return null;const d=Fh(t,{coerceTo:"rem"}),f=Fh(i,{coerceTo:u}),y=Fh(o,{coerceTo:u});if(!f||!y||!d)return null;const m=Mh(y.value/100,3),g=Mh(m,3)+u,h=Mh(((p.value-c.value)/(f.value-y.value)*100||1)*l,3);return`clamp(${t}, ${`${d.value}${d.unit} + ((1vw - ${g}) * ${h})`}, ${n})`}function Fh(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e&&"number"!=typeof e)return null;isFinite(e)&&(e=`${e}px`);const{coerceTo:n,rootSizeValue:r,acceptableUnits:o}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=null==o?void 0:o.join("|"),l=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),a=e.match(l);if(!a||a.length<3)return null;let[,s,c]=a,u=parseFloat(s);return"px"!==n||"em"!==c&&"rem"!==c||(u*=r,c=n),"px"!==c||"em"!==n&&"rem"!==n||(u/=r,c=n),"em"!==n&&"rem"!==n||"em"!==c&&"rem"!==c||(c=n),{value:Mh(u,3),unit:c}}function Mh(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;const n=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*n)/n):void 0}const Dh="typography.fontSize";function Lh(e,t,n){if(!(0,o.hasBlockSupport)(t,Dh))return e;if(co(t,cb,"fontSize"))return e;const r=new(fy())(e.className);r.add(Ih(n.fontSize));const i=r.value;return e.className=i||void 0,e}function Uh(e){var t,n;const{attributes:{fontSize:r,style:o},setAttributes:i}=e,l=Kr("typography.fontSizes"),s=Ah(l,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize),c=(null==s?void 0:s.size)||(null==o||null===(n=o.typography)||void 0===n?void 0:n.fontSize)||r;return(0,a.createElement)(xh,{onChange:e=>{const t=Ch(l,e).slug;i({style:lo({...o,typography:{...null==o?void 0:o.typography,fontSize:t?void 0:e}}),fontSize:t})},value:c,withReset:!1,size:"__unstable-large",__nextHasNoMarginBottom:!0})}function jh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Kr("typography.fontSizes"),n=!(null==t||!t.length);return!(0,o.hasBlockSupport)(e,Dh)||!n}const zh=(0,p.createHigherOrderComponent)((e=>t=>{var n,r;const i=Kr("typography.fontSizes"),{name:l,attributes:{fontSize:s,style:c},wrapperProps:u}=t;if(!(0,o.hasBlockSupport)(l,Dh)||co(l,cb,"fontSize")||!s||null!=c&&null!==(n=c.typography)&&void 0!==n&&n.fontSize)return(0,a.createElement)(e,t);const p=Ah(i,s,null==c||null===(r=c.typography)||void 0===r?void 0:r.fontSize).size,d={...t,wrapperProps:{...u,style:{fontSize:p,...null==u?void 0:u.style}}};return(0,a.createElement)(e,d)}),"withFontSizeInlineStyles"),Vh={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,i.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,o.hasBlockSupport)(e,Dh)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",Lh),(0,i.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!(0,o.hasBlockSupport)(e,Dh))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),Lh(r,e,n)},e})),(0,i.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",zh),(0,i.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,r){const i=e.name;return so({fontSize:(0,o.hasBlockSupport)(i,Dh)},Vh,e,t,n,r)})),(0,i.addFilter)("blocks.registerBlockType","core/font-size/addEditPropsForFluidCustomFontSizes",(function(e){if(!(0,o.hasBlockSupport)(e,Dh)||co(e,cb,"fontSize"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=e=>{var n,r,o;const i=t?t(e):{},l=null==i||null===(n=i.style)||void 0===n?void 0:n.fontSize,a=!(null===(r=(0,d.select)(sr).getSettings().__experimentalFeatures)||void 0===r||null===(o=r.typography)||void 0===o||!o.fluid),s=l&&a?Nh({fontSize:l}):null;return null===s?i:{...i,style:{...null==i?void 0:i.style,fontSize:s}}},e}),11);var Gh=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M7 11.5h10V13H7z"}));var Hh=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"}));var Wh=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));const $h=[{name:(0,m.__)("None"),value:"none",icon:Gh},{name:(0,m.__)("Underline"),value:"underline",icon:Hh},{name:(0,m.__)("Strikethrough"),value:"line-through",icon:Wh}];function Kh(e){let{value:t,onChange:n,className:r}=e;return(0,a.createElement)("fieldset",{className:c()("block-editor-text-decoration-control",r)},(0,a.createElement)(f.BaseControl.VisualLabel,{as:"legend"},(0,m.__)("Decoration")),(0,a.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},$h.map((e=>(0,a.createElement)(f.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===t,onClick:()=>{n(e.value===t?void 0:e.value)}})))))}const qh="typography.__experimentalTextDecoration";function Jh(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,a.createElement)(Kh,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){r({style:lo({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})},size:"__unstable-large"})}function Yh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,o.hasBlockSupport)(e,qh),n=Kr("typography.textDecoration");return t||!n}var Qh=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"}));var Zh=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"}));var Xh=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"}));const eb=[{name:(0,m.__)("None"),value:"none",icon:Gh},{name:(0,m.__)("Uppercase"),value:"uppercase",icon:Qh},{name:(0,m.__)("Lowercase"),value:"lowercase",icon:Zh},{name:(0,m.__)("Capitalize"),value:"capitalize",icon:Xh}];function tb(e){let{className:t,value:n,onChange:r}=e;return(0,a.createElement)("fieldset",{className:c()("block-editor-text-transform-control",t)},(0,a.createElement)(f.BaseControl.VisualLabel,{as:"legend"},(0,m.__)("Letter case")),(0,a.createElement)("div",{className:"block-editor-text-transform-control__buttons"},eb.map((e=>(0,a.createElement)(f.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===n,onClick:()=>{r(e.value===n?void 0:e.value)}})))))}const nb="typography.__experimentalTextTransform";function rb(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,a.createElement)(tb,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){r({style:lo({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})},size:"__unstable-large"})}function ob(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,o.hasBlockSupport)(e,nb),n=Kr("typography.textTransform");return t||!n}function ib(e){let{value:t,onChange:n,__unstableInputWidth:r="60px",...o}=e;const i=(0,f.__experimentalUseCustomUnits)({availableUnits:Kr("spacing.units")||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,a.createElement)(f.__experimentalUnitControl,l({},o,{label:(0,m.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:i,onChange:n}))}const lb="typography.__experimentalLetterSpacing";function ab(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,a.createElement)(ib,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){r({style:lo({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})},__unstableInputWidth:"100%",size:"__unstable-large"})}function sb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,o.hasBlockSupport)(e,lb),n=Kr("typography.letterSpacing");return t||!n}const cb="typography",ub=[ph,Dh,yh,mh,kh,qh,nb,lb];function pb(e){const{clientId:t}=e,n=wh(e),r=jh(e),i=vh(e),l=fh(e),s=Yh(e),c=ob(e),u=sb(e),p=!hh(e),d=!bh(e),y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[vh(e),jh(e),fh(e),wh(e),Yh(e),ob(e),sb(e)];return t.filter(Boolean).length===t.length}(e),g=db(e.name);if(y||!g)return null;const h=(0,o.getBlockSupport)(e.name,[cb,"__experimentalDefaultControls"]),b=e=>t=>{var n;return{...t,style:{...t.style,typography:{...null===(n=t.style)||void 0===n?void 0:n.typography,[e]:void 0}}}};return(0,a.createElement)(go,{__experimentalGroup:"typography"},!n&&(0,a.createElement)(f.__experimentalToolsPanelItem,{hasValue:()=>function(e){return!!e.attributes.fontFamily}(e),label:(0,m.__)("Font family"),onDeselect:()=>function(e){let{setAttributes:t}=e;t({fontFamily:void 0})}(e),isShownByDefault:null==h?void 0:h.fontFamily,resetAllFilter:e=>({...e,fontFamily:void 0}),panelId:t},(0,a.createElement)(Eh,e)),!r&&(0,a.createElement)(f.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{fontSize:n,style:r}=e.attributes;return!!n||!(null==r||null===(t=r.typography)||void 0===t||!t.fontSize)}(e),label:(0,m.__)("Font size"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({fontSize:void 0,style:lo({...r,typography:{...null==r?void 0:r.typography,fontSize:void 0}})})}(e),isShownByDefault:null==h?void 0:h.fontSize,resetAllFilter:e=>{var t;return{...e,fontSize:void 0,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontSize:void 0}}}},panelId:t},(0,a.createElement)(Uh,e)),!i&&(0,a.createElement)(f.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t;const{fontStyle:n,fontWeight:r}=(null===(t=e.attributes.style)||void 0===t?void 0:t.typography)||{};return!!n||!!r}(e),label:lh(p,d),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:lo({...r,typography:{...null==r?void 0:r.typography,fontStyle:void 0,fontWeight:void 0}})})}(e),isShownByDefault:null==h?void 0:h.fontAppearance,resetAllFilter:e=>{var t;return{...e,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontStyle:void 0,fontWeight:void 0}}}},panelId:t},(0,a.createElement)(gh,e)),!l&&(0,a.createElement)(f.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.lineHeight)}(e),label:(0,m.__)("Line height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:lo({...r,typography:{...null==r?void 0:r.typography,lineHeight:void 0}})})}(e),isShownByDefault:null==h?void 0:h.lineHeight,resetAllFilter:b("lineHeight"),panelId:t},(0,a.createElement)(dh,e)),!u&&(0,a.createElement)(f.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.letterSpacing)}(e),label:(0,m.__)("Letter spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:lo({...r,typography:{...null==r?void 0:r.typography,letterSpacing:void 0}})})}(e),isShownByDefault:null==h?void 0:h.letterSpacing,resetAllFilter:b("letterSpacing"),panelId:t},(0,a.createElement)(ab,e)),!s&&(0,a.createElement)(f.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textDecoration)}(e),label:(0,m.__)("Decoration"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:lo({...r,typography:{...null==r?void 0:r.typography,textDecoration:void 0}})})}(e),isShownByDefault:null==h?void 0:h.textDecoration,resetAllFilter:b("textDecoration"),panelId:t},(0,a.createElement)(Jh,e)),!c&&(0,a.createElement)(f.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textTransform)}(e),label:(0,m.__)("Letter case"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:lo({...r,typography:{...null==r?void 0:r.typography,textTransform:void 0}})})}(e),isShownByDefault:null==h?void 0:h.textTransform,resetAllFilter:b("textTransform"),panelId:t},(0,a.createElement)(rb,e)))}const db=e=>ub.some((t=>(0,o.hasBlockSupport)(e,t)));const fb=[...ub,dg,Gg,Po],yb=e=>fb.some((t=>(0,o.hasBlockSupport)(e,t)));function mb(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};return(0,fi.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const gb={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[Gg],[`${cb}.__experimentalSkipSerialization`]:[cb],[`${Po}.__experimentalSkipSerialization`]:["spacing"]},hb={...gb,[`${Po}`]:["spacing.blockGap"]},bb={gradients:"gradient"};function vb(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:hb;if(!yb(t))return e;let{style:i}=n;return Object.entries(r).forEach((e=>{let[n,r]=e;const l=(0,o.getBlockSupport)(t,n);!0===l&&(i=(0,u.omit)(i,r)),Array.isArray(l)&&l.forEach((e=>{const t=bb[e]||e;i=(0,u.omit)(i,[[...r,t]])}))})),e.style={...mb(i),...e.style},e}const _b=(0,p.createHigherOrderComponent)((e=>t=>{const n=fr();return(0,a.createElement)(a.Fragment,null,n&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(th,t),(0,a.createElement)(pb,t),(0,a.createElement)(bg,t),(0,a.createElement)(Ro,t)),(0,a.createElement)(e,t))}),"withToolbarControls"),kb=(0,p.createHigherOrderComponent)((e=>t=>{var n,r;const i=`wp-elements-${(0,p.useInstanceId)(e)}`,s=co(t.name,Gg,"link"),u=(0,a.useMemo)((()=>{var e;const n=null===(e=t.attributes.style)||void 0===e?void 0:e.elements,r=[];if(n&&Object.keys(n).length>0){var l;const e={...n,link:{...n.link,color:s||null===(l=n.link)||void 0===l?void 0:l.color}};for(const[t,n]of Object.entries(e)){const e=(0,fi.compileCSS)(n,{selector:`.editor-styles-wrapper .${i} ${o.__EXPERIMENTAL_ELEMENTS[t]}`});e&&r.push(e)}}return r.length>0?r:void 0}),[null===(n=t.attributes.style)||void 0===n?void 0:n.elements]),d=(0,a.useContext)(Wm.__unstableElementContext);return(0,a.createElement)(a.Fragment,null,u&&d&&(0,a.createPortal)((0,a.createElement)("style",{dangerouslySetInnerHTML:{__html:u}}),d),(0,a.createElement)(e,l({},t,{className:null!==(r=t.attributes.style)&&void 0!==r&&r.elements?c()(t.className,i):t.className})))}));(0,i.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return yb(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",vb),(0,i.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!yb(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),vb(r,e,n,gb)},e})),(0,i.addFilter)("editor.BlockEdit","core/style/with-block-controls",_b),(0,i.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",kb);(0,i.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){var t,n;return n=e,(0,o.hasBlockSupport)(n,"__experimentalSettings",!1)?(null!=e&&null!==(t=e.attributes)&&void 0!==t&&t.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e}));var Sb=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"}));var Eb=function(e){let t,{colorPalette:n,duotonePalette:r,disableCustomColors:o,disableCustomDuotone:i,value:l,onChange:s}=e;return t="unset"===l?(0,a.createElement)(f.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):l?(0,a.createElement)(f.DuotoneSwatch,{values:l}):(0,a.createElement)(ui,{icon:Sb}),(0,a.createElement)(f.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,m.__)("Duotone"),isAlternate:!0},renderToggle:e=>{let{isOpen:n,onToggle:r}=e;return(0,a.createElement)(f.ToolbarButton,{showTooltip:!0,onClick:r,"aria-haspopup":"true","aria-expanded":n,onKeyDown:e=>{n||e.keyCode!==cu.DOWN||(e.preventDefault(),r())},label:(0,m.__)("Apply duotone filter"),icon:t})},renderContent:()=>(0,a.createElement)(f.MenuGroup,{label:(0,m.__)("Duotone")},(0,a.createElement)("div",{className:"block-editor-duotone-control__description"},(0,m.__)("Create a two-tone color effect without losing your original image.")),(0,a.createElement)(f.DuotonePicker,{colorPalette:n,duotonePalette:r,disableCustomColors:o,disableCustomDuotone:i,value:l,onChange:s}))})};const wb=[];function Ab(e){let{selector:t,id:n,colors:r}=e;return"unset"===r?(0,a.createElement)(nd,{selector:t}):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(rd,{id:n,colors:r}),(0,a.createElement)(td,{id:n,selector:t}))}function Cb(e){let{presetSetting:t,defaultSetting:n}=e;const r=!Kr(n),o=Kr(`${t}.custom`)||wb,i=Kr(`${t}.theme`)||wb,l=Kr(`${t}.default`)||wb;return(0,a.useMemo)((()=>[...o,...i,...r?wb:l]),[r,o,i,l])}function Ib(e){var t;let{attributes:n,setAttributes:r}=e;const o=null==n?void 0:n.style,i=null==o||null===(t=o.color)||void 0===t?void 0:t.duotone,l=Cb({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),s=Cb({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),c=!Kr("color.custom"),u=!Kr("color.customDuotone")||0===(null==s?void 0:s.length)&&c;return 0===(null==l?void 0:l.length)&&u?null:(0,a.createElement)(br,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(Eb,{duotonePalette:l,colorPalette:s,disableCustomDuotone:u,disableCustomColors:c,value:i,onChange:e=>{const t={...o,color:{...null==o?void 0:o.color,duotone:e}};r({style:t})}}))}Ap([Cp]);const xb=(0,p.createHigherOrderComponent)((e=>t=>{const n=(0,o.hasBlockSupport)(t.name,"color.__experimentalDuotone"),r=(0,d.useSelect)((e=>e(sr).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),n&&!r&&(0,a.createElement)(Ib,t))}),"withDuotoneControls");const Bb=(0,p.createHigherOrderComponent)((e=>t=>{var n,r,i;const s=(0,o.getBlockSupport)(t.name,"color.__experimentalDuotone"),u=null==t||null===(n=t.attributes)||void 0===n||null===(r=n.style)||void 0===r||null===(i=r.color)||void 0===i?void 0:i.duotone;if(!s||!u)return(0,a.createElement)(e,t);const d=`wp-duotone-${(0,p.useInstanceId)(e)}`,f=function(e,t){const n=e.split(","),r=t.split(","),o=[];return n.forEach((e=>{r.forEach((t=>{o.push(`${e.trim()} ${t.trim()}`)}))})),o.join(", ")}(`.editor-styles-wrapper .${d}`,s),y=c()(null==t?void 0:t.className,d),m=(0,a.useContext)(Wm.__unstableElementContext);return(0,a.createElement)(a.Fragment,null,m&&(0,a.createPortal)((0,a.createElement)(Ab,{selector:f,id:d,colors:u}),m),(0,a.createElement)(e,l({},t,{className:y})))}),"withDuotoneStyles");(0,i.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,o.hasBlockSupport)(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,i.addFilter)("editor.BlockEdit","core/editor/duotone/with-editor-controls",xb),(0,i.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",Bb);const Pb="__experimentalLayout";function Tb(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=(0,d.useSelect)((e=>{var t;const{getSettings:n}=e(sr);return null===(t=n().__experimentalFeatures)||void 0===t?void 0:t.useRootPaddingAwareAlignments}),[]),i=Kr("layout")||{},{attributes:l={},name:a}=n,{layout:s}=l,{default:c}=(0,o.getBlockSupport)(a,Pb)||{},p=null!=s&&s.inherit||null!=s&&s.contentSize||null!=s&&s.wideSize?{...s,type:"constrained"}:s||c||{},f=[];var y,m;null!=i&&null!==(e=i.definitions)&&void 0!==e&&null!==(t=e[(null==p?void 0:p.type)||"default"])&&void 0!==t&&t.className&&f.push(null==i||null===(y=i.definitions)||void 0===y||null===(m=y[(null==p?void 0:p.type)||"default"])||void 0===m?void 0:m.className);return(null!=p&&p.inherit||null!=p&&p.contentSize||"constrained"===(null==p?void 0:p.type))&&r&&f.push("has-global-padding"),null!=p&&p.orientation&&f.push(`is-${(0,u.kebabCase)(p.orientation)}`),null!=p&&p.justifyContent&&f.push(`is-content-justification-${(0,u.kebabCase)(p.justifyContent)}`),null!=p&&p.flexWrap&&"nowrap"===p.flexWrap&&f.push("is-nowrap"),f}function Ob(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const{attributes:r={},name:o}=t,{layout:i={},style:l={}}=r,a=null!=i&&i.inherit||null!=i&&i.contentSize||null!=i&&i.wideSize?{...i,type:"constrained"}:i||{},s=gi((null==a?void 0:a.type)||"default"),c=Kr("layout")||{},u=Kr("spacing.blockGap"),p=null!==u,d=null==s||null===(e=s.getLayoutStyle)||void 0===e?void 0:e.call(s,{blockName:o,selector:n,layout:i,layoutDefinitions:null==c?void 0:c.definitions,style:l,hasBlockGapSupport:p});return d}function Rb(e){let{setAttributes:t,attributes:n,name:r}=e;const{layout:i}=n,l=Kr("layout"),s=(0,d.useSelect)((e=>{const{getSettings:t}=e(sr);return t().supportsLayout}),[]),c=(0,o.getBlockSupport)(r,Pb,{}),{allowSwitching:u,allowEditing:p=!0,allowInheriting:y=!0,default:g}=c;if(!p)return null;const h=!(!y||!l||null!=i&&i.type&&"default"!==(null==i?void 0:i.type)&&"constrained"!==(null==i?void 0:i.type)&&(null==i||!i.inherit)),b=i||g||{},{inherit:v=!1,type:_="default",contentSize:k=null}=b;if(("default"===_||"constrained"===_)&&!s)return null;const S=gi(_),E=gi("constrained"),w=!b.type&&(k||v),A=!!v||!!k,C=e=>t({layout:e});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(go,null,(0,a.createElement)(f.PanelBody,{title:(0,m.__)("Layout")},h&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.ToggleControl,{className:"block-editor-hooks__toggle-control",label:(0,m.__)("Inner blocks use content width"),checked:"constrained"===(null==S?void 0:S.name)||A,onChange:()=>t({layout:{type:"constrained"===(null==S?void 0:S.name)||A?"default":"constrained"}}),help:"constrained"===(null==S?void 0:S.name)||A?(0,m.__)("Nested blocks use content width with options for full and wide widths."):(0,m.__)("Nested blocks will fill the width of this container. Toggle to constrain.")})),!v&&u&&(0,a.createElement)(Nb,{type:_,onChange:e=>t({layout:{type:e}})}),S&&"default"!==S.name&&(0,a.createElement)(S.inspectorControls,{layout:b,onChange:C,layoutBlockSupport:c}),E&&w&&(0,a.createElement)(E.inspectorControls,{layout:b,onChange:C,layoutBlockSupport:c}))),!v&&S&&(0,a.createElement)(S.toolBarControls,{layout:b,onChange:C,layoutBlockSupport:c}))}function Nb(e){let{type:t,onChange:n}=e;return(0,a.createElement)(f.ButtonGroup,null,mi.map((e=>{let{name:r,label:o}=e;return(0,a.createElement)(f.Button,{key:r,isPressed:t===r,onClick:()=>n(r)},o)})))}const Fb=(0,p.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,o.hasBlockSupport)(n,Pb)&&(0,a.createElement)(Rb,l({key:"layout"},t)),(0,a.createElement)(e,l({key:"edit"},t))]}),"withInspectorControls"),Mb=(0,p.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:r,block:i}=t,s=(0,o.hasBlockSupport)(n,Pb),u=(0,d.useSelect)((e=>{const{getSettings:t}=e(sr);return!!t().disableLayoutStyles})),f=s&&!u,y=(0,p.useInstanceId)(e),m=Kr("layout")||{},g=(0,a.useContext)(Wm.__unstableElementContext),{layout:h}=r,{default:b}=(0,o.getBlockSupport)(n,Pb)||{},v=null!=h&&h.inherit||null!=h&&h.contentSize||null!=h&&h.wideSize?{...h,type:"constrained"}:h||b||{},_=s?Tb(i):null,k=`.${(0,o.getBlockDefaultClassName)(n)}.wp-container-${y}`,S=null!==Kr("spacing.blockGap");let E;if(f){var w;const e=gi((null==v?void 0:v.type)||"default");E=null==e||null===(w=e.getLayoutStyle)||void 0===w?void 0:w.call(e,{blockName:n,selector:k,layout:v,layoutDefinitions:null==m?void 0:m.definitions,style:null==r?void 0:r.style,hasBlockGapSupport:S})}const A=c()(null==t?void 0:t.className,{[`wp-container-${y}`]:f&&!!E},_);return(0,a.createElement)(a.Fragment,null,f&&g&&!!E&&(0,a.createPortal)((0,a.createElement)(ki,{blockName:n,selector:k,css:E,layout:v,style:null==r?void 0:r.style}),g),(0,a.createElement)(e,l({},t,{className:A})))}));function Db(e){let{clientId:t,stopEditingAsBlock:n}=e;const r=(0,d.useSelect)((e=>{const{isBlockSelected:n,hasSelectedInnerBlock:r}=e(sr);return n(t)||r(t,!0)}),[t]);return(0,a.useEffect)((()=>{r||n()}),[r]),null}(0,i.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.layout)&&void 0!==t?t:{})||(0,o.hasBlockSupport)(e,Pb)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,i.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",Mb),(0,i.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",Fb);const Lb=(0,p.createHigherOrderComponent)((e=>t=>{const{getBlockListSettings:n,getSettings:r}=(0,d.useSelect)(sr),o=(0,a.useRef)(),{templateLock:i,isLockedByParent:s,isEditingAsBlocks:u}=(0,d.useSelect)((e=>{const{__unstableGetContentLockingParent:n,getTemplateLock:r,__unstableGetTemporarilyEditingAsBlocks:o}=e(sr);return{templateLock:r(t.clientId),isLockedByParent:!!n(t.clientId),isEditingAsBlocks:o()===t.clientId}}),[t.clientId]),{updateSettings:p,updateBlockListSettings:y,__unstableSetTemporarilyEditingAsBlocks:g}=(0,d.useDispatch)(sr),h=!s&&"contentOnly"===i,{__unstableMarkNextChangeAsNotPersistent:b,updateBlockAttributes:v}=(0,d.useDispatch)(sr),_=(0,a.useCallback)((()=>{b(),v(t.clientId,{templateLock:"contentOnly"}),y(t.clientId,{...n(t.clientId),templateLock:"contentOnly"}),p({focusMode:o.current}),g()}),[t.clientId,o,p,y,n,b,v,g]);return h||u?(0,a.createElement)(a.Fragment,null,u&&!h&&(0,a.createElement)(Db,{clientId:t.clientId,stopEditingAsBlock:_}),(0,a.createElement)(br,{group:"other"},(0,a.createElement)(f.ToolbarButton,{onClick:()=>{u&&!h?_():(b(),v(t.clientId,{templateLock:void 0}),y(t.clientId,{...n(t.clientId),templateLock:!1}),o.current=r().focusMode,p({focusMode:!0}),g(t.clientId))}},u&&!h?(0,m.__)("Done"):(0,m.__)("Modify"))),(0,a.createElement)(e,l({},t,{className:c()(t.className,u&&"is-content-locked-editing-as-blocks")}))):(0,a.createElement)(e,t)}),"withToolbarControls");(0,i.addFilter)("editor.BlockEdit","core/style/with-block-controls",Lb);const Ub="metadata";function jb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=(0,o.getBlockSupport)(e,"__experimentalMetadata");return!!(!0===n||null!=n&&n[t])}function zb(e){var t;const n=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:Sg(e)||void 0,style:mb({border:n})}}function Vb(e){const{colors:t}=pg(),n=zb(e),{borderColor:r}=e;if(r){const e=gg({colors:t,namedColor:r});n.style.borderColor=e.color}return n}function Gb(e){var t,n,r,o,i,l;const{backgroundColor:a,textColor:s,gradient:u,style:p}=e,d=cg("background-color",a),f=cg("color",s),y=wg(u),m=y||(null==p||null===(t=p.color)||void 0===t?void 0:t.gradient);return{className:c()(f,y,{[d]:!m&&!!d,"has-text-color":s||(null==p||null===(n=p.color)||void 0===n?void 0:n.text),"has-background":a||(null==p||null===(r=p.color)||void 0===r?void 0:r.background)||u||(null==p||null===(o=p.color)||void 0===o?void 0:o.gradient),"has-link-color":null==p||null===(i=p.elements)||void 0===i||null===(l=i.link)||void 0===l?void 0:l.color})||void 0,style:mb({color:(null==p?void 0:p.color)||{}})}}(0,i.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.metadata)&&void 0!==n&&n.type||jb(e,"name",!1)&&(e.attributes={...e.attributes,[Ub]:{type:"object"}}),e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/metadata/save-props",(function(e,t,n){return jb(t)&&(e.metadata=n.metadata),e})),(0,i.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",(function(e){return e.__experimentalLabel||jb(e,"name",!1)&&(e.__experimentalLabel=(e,t)=>{let{context:n}=t;const{metadata:r}=e;if("list-view"===n&&null!=r&&r.name)return r.name}),e}));const Hb={};function Wb(e){const{backgroundColor:t,textColor:n,gradient:r}=e,o=Kr("color.palette.custom")||[],i=Kr("color.palette.theme")||[],l=Kr("color.palette.default")||[],s=Kr("color.gradients")||Hb,c=(0,a.useMemo)((()=>[...o||[],...i||[],...l||[]]),[o,i,l]),u=(0,a.useMemo)((()=>[...(null==s?void 0:s.custom)||[],...(null==s?void 0:s.theme)||[],...(null==s?void 0:s.default)||[]]),[s]),p=Gb(e);if(t){const e=ag(c,t);p.style.backgroundColor=e.color}if(r&&(p.style.background=Ag(u,r)),n){const e=ag(c,n);p.style.color=e.color}return p}function $b(e){const{style:t}=e;return{style:mb({spacing:(null==t?void 0:t.spacing)||{}})}}function Kb(e,t){var n;let r=(null==e||null===(n=e.style)||void 0===n?void 0:n.typography)||{};var o,i;t&&(r={...r,fontSize:Nh({fontSize:null==e||null===(o=e.style)||void 0===o||null===(i=o.typography)||void 0===i?void 0:i.fontSize})});const l=mb({typography:r}),a=null!=e&&e.fontFamily?`has-${(0,u.kebabCase)(e.fontFamily)}-font-family`:"";return{className:c()(a,Ih(null==e?void 0:e.fontSize)),style:l}}function qb(e){const[t,n]=(0,a.useState)(e);return(0,a.useEffect)((()=>{e&&n(e)}),[e]),t}const Jb=e=>{let[t,...n]=e;return t.toUpperCase()+n.join("")},Yb=e=>(0,p.createHigherOrderComponent)((t=>n=>(0,a.createElement)(t,l({},n,{colors:e}))),"withCustomColorPalette"),Qb=()=>(0,p.createHigherOrderComponent)((e=>t=>{const n=Kr("color.palette.custom"),r=Kr("color.palette.theme"),o=Kr("color.palette.default"),i=(0,a.useMemo)((()=>[...n||[],...r||[],...o||[]]),[n,r,o]);return(0,a.createElement)(e,l({},t,{colors:i}))}),"withEditorColorPalette");function Zb(e,t){const n=(0,u.reduce)(e,((e,t)=>({...e,..."string"==typeof t?{[t]:(0,u.kebabCase)(t)}:t})),{});return(0,p.compose)([t,e=>class extends a.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=Ep(t),r=e=>{let{color:t}=e;return n.contrast(t)},o=Math.max(...e.map(r));return e.find((e=>r(e)===o)).color}(t,e)}createSetters(){return(0,u.reduce)(n,((e,t,n)=>{const r=Jb(n),o=`custom${r}`;return e[`set${r}`]=this.createSetColor(n,o),e}),{})}createSetColor(e,t){return n=>{const r=sg(this.props.colors,n);this.props.setAttributes({[e]:r&&r.slug?r.slug:void 0,[t]:r&&r.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:r,colors:o}=e;return(0,u.reduce)(n,((e,n,i)=>{const l=ag(o,r[i],r[`custom${Jb(i)}`]),a=t[i];return(null==a?void 0:a.color)===l.color&&a?e[i]=a:e[i]={...l,class:cg(n,l.slug)},e}),{})}render(){return(0,a.createElement)(e,l({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function Xb(e){return function(){const t=Yb(e);for(var n=arguments.length,r=new Array(n),o=0;o{let[t,...n]=e;return t.toUpperCase()+n.join("")};var rv=function(){for(var e=arguments.length,t=new Array(e),n=0;n(e[t]=`custom${nv(t)}`,e)),{});return(0,p.createHigherOrderComponent)((0,p.compose)([(0,p.createHigherOrderComponent)((e=>t=>{const n=Kr("typography.fontSizes")||tv;return(0,a.createElement)(e,l({},t,{fontSizes:n}))}),"withFontSizes"),e=>class extends a.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return(0,u.reduce)(r,((e,t,n)=>(e[`set${nv(n)}`]=this.createSetFontSize(n,t),e)),{})}createSetFontSize(e,t){return n=>{const r=(0,u.find)(this.props.fontSizes,{size:Number(n)});this.props.setAttributes({[e]:r&&r.slug?r.slug:void 0,[t]:r&&r.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:n,fontSizes:o}=e;const i=(e,r)=>!t[r]||(n[r]?n[r]!==t[r].slug:t[r].size!==n[e]);if(!(0,u.some)(r,i))return null;const l=(0,u.reduce)((0,u.pickBy)(r,i),((e,t,r)=>{const i=n[r],l=Ah(o,i,n[t]);return e[r]={...l,class:Ih(i)},e}),{});return{...t,...l}}render(){return(0,a.createElement)(e,l({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")};var ov=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));var iv=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));var lv=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const av=[{icon:ov,title:(0,m.__)("Align text left"),align:"left"},{icon:iv,title:(0,m.__)("Align text center"),align:"center"},{icon:lv,title:(0,m.__)("Align text right"),align:"right"}],sv={position:"bottom right",isAlternate:!0};var cv=function(e){let{value:t,onChange:n,alignmentControls:r=av,label:o=(0,m.__)("Align"),describedBy:i=(0,m.__)("Change text alignment"),isCollapsed:s=!0,isToolbar:c}=e;function p(e){return()=>n(t===e?void 0:e)}const d=(0,u.find)(r,(e=>e.align===t)),y=c?f.ToolbarGroup:f.ToolbarDropdownMenu,g=c?{isCollapsed:s}:{toggleProps:{describedBy:i},popoverProps:sv};return(0,a.createElement)(y,l({icon:d?d.icon:(0,m.isRTL)()?lv:ov,label:o,controls:r.map((e=>{const{align:n}=e,r=t===n;return{...e,isActive:r,role:s?"menuitemradio":void 0,onClick:p(n)}}))},g))};const uv=e=>(0,a.createElement)(cv,l({},e,{isToolbar:!1})),pv=e=>(0,a.createElement)(cv,l({},e,{isToolbar:!0})),dv=()=>{};var fv={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,d.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:r}=e(sr),o=t();return{selectedBlockName:o?n(o):null,rootClientId:r().rootClientId}}),[]),[r,o,i]=kd(t,dv),l=(0,a.useMemo)((()=>(e.trim()?Kd(r,o,i,e):(0,u.orderBy)(r,["frecency"],["desc"])).filter((e=>e.name!==n)).slice(0,9)),[e,n,r,o,i]),s=(0,a.useMemo)((()=>l.map((e=>{const{title:t,icon:n,isDisabled:r}=e;return{key:`block-${e.id}`,value:e,label:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Au,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))),[l]);return[s]},allowContext(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:r}=e;return{action:"replace",value:(0,o.createBlock)(t,n,(0,o.createBlocksFromInnerBlocksTemplate)(r))}}},yv=window.wp.apiFetch,mv=n.n(yv);var gv=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));var hv=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}));var bv={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await mv()({path:(0,nf.addQueryArgs)("/wp/v2/search",{per_page:10,search:e,type:"post",order_by:"menu_order"})});return t=t.filter((e=>""!==e.title)),t},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ui,{key:"icon",icon:"page"===e.subtype?gv:hv}),e.title)},getOptionCompletion(e){return(0,a.createElement)("a",{href:e.url},e.title)}};const vv=[];function _v(e){let{completers:t=vv}=e;const{name:n}=dr();return(0,a.useMemo)((()=>{let e=[...t,bv];return(n===(0,o.getDefaultBlockName)()||(0,o.getBlockSupport)(n,"__experimentalSlashInserter",!1))&&(e=[...e,fv]),(0,i.hasFilter)("editor.Autocomplete.completers")&&(e===t&&(e=e.map(u.clone)),e=(0,i.applyFilters)("editor.Autocomplete.completers",e,n)),e}),[t,n])}var kv=function(e){return(0,a.createElement)(f.Autocomplete,l({},e,{completers:_v(e)}))};var Sv=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"}));var Ev=function(e){let{isActive:t,label:n=(0,m.__)("Toggle full height"),onToggle:r,isDisabled:o}=e;return(0,a.createElement)(f.ToolbarButton,{isActive:t,icon:Sv,label:n,onClick:()=>r(!t),disabled:o})};const wv=()=>{};var Av=function(e){const{label:t=(0,m.__)("Change matrix alignment"),onChange:n=wv,value:r="center",isDisabled:o}=e,i=(0,a.createElement)(f.__experimentalAlignmentMatrixControl.Icon,{value:r});return(0,a.createElement)(f.Dropdown,{position:"bottom right",popoverProps:{isAlternate:!0},renderToggle:e=>{let{onToggle:n,isOpen:r}=e;return(0,a.createElement)(f.ToolbarButton,{onClick:n,"aria-haspopup":"true","aria-expanded":r,onKeyDown:e=>{r||e.keyCode!==cu.DOWN||(e.preventDefault(),n())},label:t,icon:i,showTooltip:!0,disabled:o})},renderContent:()=>(0,a.createElement)(f.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:r})})};var Cv=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));var Iv=function(e){let{rootLabelText:t}=e;const{selectBlock:n,clearSelectedBlock:r}=(0,d.useDispatch)(sr),{clientId:o,parents:i,hasSelection:l}=(0,d.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:r}=e(sr),o=n();return{parents:r(o),clientId:o,hasSelection:!!t().clientId}}),[]),s=t||(0,m.__)("Document");return(0,a.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,m.__)("Block breadcrumb")},(0,a.createElement)("li",{className:l?void 0:"block-editor-block-breadcrumb__current","aria-current":l?void 0:"true"},l&&(0,a.createElement)(f.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:r},s),!l&&s,!!o&&(0,a.createElement)(ui,{icon:Cv,className:"block-editor-block-breadcrumb__separator"})),i.map((e=>(0,a.createElement)("li",{key:e},(0,a.createElement)(f.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>n(e)},(0,a.createElement)(Ff,{clientId:e,maximumLength:35})),(0,a.createElement)(ui,{icon:Cv,className:"block-editor-block-breadcrumb__separator"})))),!!o&&(0,a.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,a.createElement)(Ff,{clientId:o,maximumLength:35})))};const xv=()=>(0,a.createElement)(f.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,a.createElement)(f.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"})),Bv=e=>{let{style:t,className:n}=e;return(0,a.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,a.createElement)("div",{className:`${n} block-library-colors-selector__state-selection`,style:t},(0,a.createElement)(xv,null)))},Pv=e=>{let{TextColor:t,BackgroundColor:n}=e;return e=>{let{onToggle:r,isOpen:o}=e;return(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(f.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,m.__)("Open Colors Selector"),onClick:r,onKeyDown:e=>{o||e.keyCode!==cu.DOWN||(e.preventDefault(),r())},icon:(0,a.createElement)(n,null,(0,a.createElement)(t,null,(0,a.createElement)(Bv,null)))}))}};var Tv=e=>{let{children:t,...n}=e;return j()("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,a.createElement)(f.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:Pv(n),renderContent:()=>t})};var Ov=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));const Rv=$c(f.__experimentalTreeGridRow);function Nv(e){let{isSelected:t,position:n,level:r,rowCount:o,children:i,className:s,path:u,...p}=e;const d=Jc({isSelected:t,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:u});return(0,a.createElement)(Rv,l({ref:d,className:c()("block-editor-list-view-leaf",s),level:r,positionInSet:n,setSize:o},p),i)}var Fv=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"}));function Mv(e){let{onClick:t}=e;return(0,a.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true"},(0,a.createElement)(ui,{icon:(0,m.isRTL)()?Fv:Cv}))}var Dv=(0,a.forwardRef)((function(e,t){let{className:n,block:{clientId:r},onClick:o,onToggleExpanded:i,tabIndex:l,onFocus:s,onDragStart:u,onDragEnd:p,draggable:d}=e;const y=Rf(r),m=Nf({clientId:r,context:"list-view"}),{isLocked:g}=Ky(r);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.Button,{className:c()("block-editor-list-view-block-select-button",n),onClick:o,onKeyDown:function(e){e.keyCode!==cu.ENTER&&e.keyCode!==cu.SPACE||o(e)},ref:t,tabIndex:l,onFocus:s,onDragStart:e=>{e.dataTransfer.clearData(),null==u||u(e)},onDragEnd:p,draggable:d,href:`#block-${r}`,"aria-hidden":!0},(0,a.createElement)(Mv,{onClick:i}),(0,a.createElement)(Au,{icon:null==y?void 0:y.icon,showColors:!0}),(0,a.createElement)(f.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1},(0,a.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,a.createElement)(f.__experimentalTruncate,{ellipsizeMode:"auto"},m)),(null==y?void 0:y.anchor)&&(0,a.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper"},(0,a.createElement)(f.__experimentalTruncate,{className:"block-editor-list-view-block-select-button__anchor",ellipsizeMode:"auto"},y.anchor)),g&&(0,a.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,a.createElement)(ui,{icon:Jy})))))}));const Lv=(0,a.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:r,block:o,isSelected:i,position:s,siblingBlockCount:u,level:p,isExpanded:f,selectedClientIds:y,...m}=e;const{clientId:g}=o,{blockMovingClientId:h,selectedBlockInBlockEditor:b}=(0,d.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n}=e(sr);return{blockMovingClientId:t(),selectedBlockInBlockEditor:n()}}),[g]),v=h&&b===g,_=c()("block-editor-list-view-block-contents",{"is-dropping-before":v}),k=y.includes(g)?y:[g];return(0,a.createElement)(Mf,{clientIds:k},(e=>{let{draggable:c,onDragStart:d,onDragEnd:y}=e;return(0,a.createElement)(Dv,l({ref:t,className:_,block:o,onClick:n,onToggleExpanded:r,isSelected:i,position:s,siblingBlockCount:u,level:p,draggable:c,onDragStart:d,onDragEnd:y,isExpanded:f},m))}))}));var Uv=Lv;const jv=(0,a.createContext)({}),zv=()=>(0,a.useContext)(jv);var Vv=(0,a.memo)((function e(t){let{block:n,isDragged:r,isSelected:i,isBranchSelected:l,selectBlock:s,position:u,level:y,rowCount:g,siblingBlockCount:h,showBlockMovers:b,path:v,isExpanded:_,selectedClientIds:k,preventAnnouncement:S}=t;const E=(0,a.useRef)(null),[w,A]=(0,a.useState)(!1),{clientId:C}=n,{isLocked:I,isContentLocked:x}=Ky(C),B=(0,d.useSelect)((e=>!i&&(!!x&&e(sr).hasSelectedInnerBlock(C,!0))),[x,C,i]),P=B||i&&k[0]===C,T=B||i&&k[k.length-1]===C,{toggleBlockHighlight:O}=(0,d.useDispatch)(sr),R=Rf(C),N=(0,d.useSelect)((e=>e(sr).getBlockName(C)),[C]),F=(0,o.hasBlockSupport)(N,"__experimentalToolbar",!0),M=`list-view-block-select-button__${(0,p.useInstanceId)(e)}`,D=((e,t,n)=>(0,m.sprintf)((0,m.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(u,h,y);let L=(0,m.__)("Link");R&&(L=I?(0,m.sprintf)((0,m.__)("%s link (locked)"),R.title):(0,m.sprintf)((0,m.__)("%s link"),R.title));const U=R?(0,m.sprintf)((0,m.__)("Options for %s block"),R.title):(0,m.__)("Options"),{isTreeGridMounted:j,expand:z,collapse:V}=zv(),G=b&&h>0,H=c()("block-editor-list-view-block__mover-cell",{"is-visible":w||i}),W=c()("block-editor-list-view-block__menu-cell",{"is-visible":w||P});(0,a.useEffect)((()=>{!j&&i&&E.current.focus()}),[]);const $=(0,a.useCallback)((()=>{A(!0),O(C,!0)}),[C,A,O]),K=(0,a.useCallback)((()=>{A(!1),O(C,!1)}),[C,A,O]),q=(0,a.useCallback)((e=>{s(e,C),e.preventDefault()}),[C,s]),J=(0,a.useCallback)((e=>{s(void 0,e)}),[s]),Y=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===_?V(C):!1===_&&z(C)}),[C,z,V,_]);let Q;G?Q=2:F||(Q=3);const Z=c()({"is-selected":i||B,"is-first-selected":P,"is-last-selected":T,"is-branch-selected":l,"is-dragging":r,"has-single-cell":!F}),X=k.includes(C)?k:[C];return(0,a.createElement)(Nv,{className:Z,onMouseEnter:$,onMouseLeave:K,onFocus:$,onBlur:K,level:y,position:u,rowCount:g,path:v,id:`list-view-block-${C}`,"data-block":C,isExpanded:x?void 0:_,"aria-selected":!!i||B},(0,a.createElement)(f.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:Q,ref:E,"aria-label":L,"aria-selected":!!i||B,"aria-expanded":x?void 0:_,"aria-describedby":M},(e=>{let{ref:t,tabIndex:r,onFocus:o}=e;return(0,a.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,a.createElement)(Uv,{block:n,onClick:q,onToggleExpanded:Y,isSelected:i,position:u,siblingBlockCount:h,level:y,ref:t,tabIndex:r,onFocus:o,isExpanded:_,selectedClientIds:k,preventAnnouncement:S}),(0,a.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:M},D))})),G&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.__experimentalTreeGridCell,{className:H,withoutGridItem:!0},(0,a.createElement)(f.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,a.createElement)($f,{orientation:"vertical",clientIds:[C],ref:t,tabIndex:n,onFocus:r})})),(0,a.createElement)(f.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,a.createElement)(Kf,{orientation:"vertical",clientIds:[C],ref:t,tabIndex:n,onFocus:r})})))),F&&(0,a.createElement)(f.__experimentalTreeGridCell,{className:W,"aria-selected":!!i||B},(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,a.createElement)(lm,{clientIds:X,icon:Oy,label:U,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:n,onFocus:r},disableOpenOnArrowDown:!0,__experimentalSelectBlock:J})})))}));function Gv(e,t,n,r){var o;if(null==n?void 0:n.includes(e.clientId))return 0;return(null!==(o=t[e.clientId])&&void 0!==o?o:r)?1+e.innerBlocks.reduce(Hv(t,n,r),0):1}const Hv=(e,t,n)=>(r,o)=>{var i;if(null==t?void 0:t.includes(o.clientId))return r;return(null!==(i=e[o.clientId])&&void 0!==i?i:n)&&o.innerBlocks.length>0?r+Gv(o,e,t,n):r+1};function Wv(e){const{blocks:t,selectBlock:n,showBlockMovers:r,selectedClientIds:o,level:i=1,path:l="",isBranchSelected:s=!1,listPosition:c=0,fixedListWindow:u,isExpanded:p,parentId:f,shouldShowInnerBlocks:y=!0}=e,m=(0,d.useSelect)((e=>!(!f||"contentOnly"!==e(sr).getTemplateLock(f))),[f]),{expandedState:g,draggedClientIds:h}=zv();if(m)return null;const b=t.filter(Boolean),v=b.length;let _=c;return(0,a.createElement)(a.Fragment,null,b.map(((e,t)=>{var c;const{clientId:f,innerBlocks:m}=e;t>0&&(_+=Gv(b[t-1],g,h,p));const{itemInView:k}=u,S=k(_),E=t+1,w=l.length>0?`${l}_${E}`:`${E}`,A=!(null==m||!m.length),C=A&&y?null!==(c=g[f])&&void 0!==c?c:p:void 0,I=!(null==h||!h.includes(f)),x=I||S,B=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(f,o),P=s||B&&A;return(0,a.createElement)(d.AsyncModeProvider,{key:f,value:!B},x&&(0,a.createElement)(Vv,{block:e,selectBlock:n,isSelected:B,isBranchSelected:P,isDragged:I,level:i,position:E,rowCount:v,siblingBlockCount:v,showBlockMovers:r,path:w,isExpanded:C,listPosition:_,selectedClientIds:o}),!x&&(0,a.createElement)("tr",null,(0,a.createElement)("td",{className:"block-editor-list-view-placeholder"})),A&&C&&!I&&(0,a.createElement)(Wv,{parentId:f,blocks:m,selectBlock:n,showBlockMovers:r,level:i+1,path:w,listPosition:_+1,fixedListWindow:u,isBranchSelected:P,selectedClientIds:o,isExpanded:p}))})))}Wv.defaultProps={selectBlock:()=>{}};var $v=(0,a.memo)(Wv);function Kv(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:r,clientId:o,dropPosition:i}=n||{},[l,s]=(0,a.useMemo)((()=>{if(!t.current)return[];return[r?t.current.querySelector(`[data-block="${r}"]`):void 0,o?t.current.querySelector(`[data-block="${o}"]`):void 0]}),[r,o]),c=s||l,u=(0,a.useCallback)((()=>{if(!l)return 0;const e=c.getBoundingClientRect();return l.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[l,c]),p=(0,a.useMemo)((()=>{if(!c)return{};const e=u();return{width:c.offsetWidth-e}}),[u,c]),d=(0,a.useMemo)((()=>{if(c&&("top"===i||"bottom"===i||"inside"===i))return{ownerDocument:c.ownerDocument,getBoundingClientRect(){const e=c.getBoundingClientRect(),t=u(),n=e.left+t,r=e.right;let o=0,l=0;"top"===i?(o=e.top,l=e.top):(o=e.bottom,l=e.bottom);const a=r-n,s=l-o;return new window.DOMRect(n,o,a,s)}}}),[c,i,u]);return c?(0,a.createElement)(f.Popover,{animate:!1,anchor:d,focusOnMount:!1,className:"block-editor-list-view-drop-indicator"},(0,a.createElement)("div",{style:p,className:"block-editor-list-view-drop-indicator__line"})):null}function qv(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,d.useDispatch)(sr),{getBlockName:r,getBlockParents:i,getBlockSelectionStart:l,getBlockSelectionEnd:s,getSelectedBlockClientIds:c,hasMultiSelection:u,hasSelectedBlock:p}=(0,d.useSelect)(sr),{getBlockType:f}=(0,d.useSelect)(o.store),y=(0,a.useCallback)((async(o,a,s)=>{if(null==o||!o.shiftKey)return void n(a);o.preventDefault();const d="keydown"===o.type&&(o.keyCode===cu.UP||o.keyCode===cu.DOWN||o.keyCode===cu.HOME||o.keyCode===cu.END);if(!d&&!p()&&!u())return void n(a,null);const y=c(),g=[...i(a),a];d&&!y.some((e=>g.includes(e)))&&await e();let h=l(),b=a;d&&(p()||u()||(h=a),s&&(b=s));const v=i(h),_=i(b),{start:k,end:S}=function(e,t,n,r){const o=[...n,e],i=[...r,t],l=Math.min(o.length,i.length)-1;return{start:o[l],end:i[l]}}(h,b,v,_);await t(k,S,null);const E=c();if((o.keyCode===cu.HOME||o.keyCode===cu.END)&&E.length>1)return;const w=y.filter((e=>!E.includes(e)));let A;if(1===w.length){var C;const e=null===(C=f(r(w[0])))||void 0===C?void 0:C.title;e&&(A=(0,m.sprintf)((0,m.__)("%s deselected."),e))}else w.length>1&&(A=(0,m.sprintf)((0,m.__)("%s blocks deselected."),w.length));A&&(0,qt.speak)(A)}),[e,r,f,i,l,s,c,u,p,t,n]);return{updateBlockSelection:y}}function Jv(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}const Yv=["top","bottom"];function Qv(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:r,canInsertBlocks:o}=(0,d.useSelect)(sr),[i,l]=(0,a.useState)(),{rootClientId:s,blockIndex:c}=i||{},u=Om(s,c),f=r(),y=(0,p.useThrottle)((0,a.useCallback)(((r,i)=>{const a={x:r.clientX,y:r.clientY},s=!(null==f||!f.length),c=function(e,t){let n,r,o,i;for(const l of e){if(l.isDraggedBlock)continue;const a=l.element.getBoundingClientRect(),[s,c]=Nm(t,a,Yv),u=Jv(t,a);if(void 0===o||s0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,i)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(!r.canInsertDraggedBlocksAsSibling)return;const a=l?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+a,dropPosition:n}}(Array.from(i.querySelectorAll("[data-block]")).map((r=>{const i=r.dataset.block,l=e(i);return{clientId:i,rootClientId:l,blockIndex:t(i),element:r,isDraggedBlock:!!s&&f.includes(i),innerBlockCount:n(i),canInsertDraggedBlocksAsSibling:!s||o(f,l),canInsertDraggedBlocksAsChild:!s||o(f,i)}})),a);c&&l(c)}),[f]),200);return{ref:(0,p.__experimentalUseDropZone)({onDrop:u,onDragOver(e){y(e,e.currentTarget)},onDragEnd(){y.cancel(),l(null)}}),target:i}}const Zv=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;var Xv=(0,a.forwardRef)((function(e,t){let{id:n,blocks:r,showBlockMovers:o=!1,isExpanded:i=!1}=e;const{clientIdsTree:l,draggedClientIds:s,selectedClientIds:c}=function(e){return(0,d.useSelect)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:r,__unstableGetClientIdsTree:o}=t(sr);return{selectedClientIds:r(),draggedClientIds:n(),clientIdsTree:e||o()}}),[e])}(r),{visibleBlockCount:u,shouldShowInnerBlocks:y}=(0,d.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n,__unstableGetEditorMode:r}=e(sr),o=(null==s?void 0:s.length)>0?n(s).length+1:0;return{visibleBlockCount:t()-o,shouldShowInnerBlocks:"zoom-out"!==r()}}),[s]),{updateBlockSelection:g}=qv(),[h,b]=(0,a.useReducer)(Zv,{}),{ref:v,target:_}=Qv(),k=(0,a.useRef)(),S=(0,p.useMergeRefs)([k,v,t]),E=(0,a.useRef)(!1),{setSelectedTreeId:w}=function(e){let{firstSelectedBlockClientId:t,setExpandedState:n}=e;const[r,o]=(0,a.useState)(null),{selectedBlockParentClientIds:i}=(0,d.useSelect)((e=>{const{getBlockParents:n}=e(sr);return{selectedBlockParentClientIds:n(t,!1)}}),[t]),l=Array.isArray(i)&&i.length?i:null;return(0,a.useEffect)((()=>{r!==t&&l&&n({type:"expand",clientIds:i})}),[t]),{setSelectedTreeId:o}}({firstSelectedBlockClientId:c[0],setExpandedState:b}),A=(0,a.useCallback)(((e,t)=>{g(e,t),w(t)}),[w,g]);(0,a.useEffect)((()=>{E.current=!0}),[]);const[C]=(0,p.__experimentalUseFixedWindowList)(k,36,u,{useWindowing:!0,windowOverscan:40}),I=(0,a.useCallback)((e=>{e&&b({type:"expand",clientIds:[e]})}),[b]),x=(0,a.useCallback)((e=>{e&&b({type:"collapse",clientIds:[e]})}),[b]),B=(0,a.useCallback)((e=>{var t;I(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[I]),P=(0,a.useCallback)((e=>{var t;x(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[x]),T=(0,a.useCallback)(((e,t,n)=>{var r,o;e.shiftKey&&g(e,null==t||null===(r=t.dataset)||void 0===r?void 0:r.block,null==n||null===(o=n.dataset)||void 0===o?void 0:o.block)}),[g]),O=(0,a.useMemo)((()=>({isTreeGridMounted:E.current,draggedClientIds:s,expandedState:h,expand:I,collapse:x})),[E.current,s,h,I,x]);return(0,a.createElement)(d.AsyncModeProvider,{value:!0},(0,a.createElement)(Kv,{listViewRef:k,blockDropTarget:_}),(0,a.createElement)(f.__experimentalTreeGrid,{id:n,className:"block-editor-list-view-tree","aria-label":(0,m.__)("Block navigation structure"),ref:S,onCollapseRow:P,onExpandRow:B,onFocusRow:T,applicationAriaLabel:(0,m.__)("Block navigation structure")},(0,a.createElement)(jv.Provider,{value:O},(0,a.createElement)($v,{blocks:l,selectBlock:A,showBlockMovers:o,fixedListWindow:C,selectedClientIds:c,isExpanded:i,shouldShowInnerBlocks:y}))))}));function e_(e){let{isEnabled:t,onToggle:n,isOpen:r,innerRef:o,...i}=e;return(0,a.createElement)(f.Button,l({},i,{ref:o,icon:Ov,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0,label:(0,m.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!t}))}var t_=(0,a.forwardRef)((function(e,t){let{isDisabled:n,...r}=e;j()("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});const o=(0,d.useSelect)((e=>!!e(sr).getBlockCount()),[])&&!n;return(0,a.createElement)(f.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:e=>{let{isOpen:n,onToggle:i}=e;return(0,a.createElement)(e_,l({},r,{innerRef:t,isOpen:n,onToggle:i,isEnabled:o}))},renderContent:()=>(0,a.createElement)("div",{className:"block-editor-block-navigation__container"},(0,a.createElement)("p",{className:"block-editor-block-navigation__label"},(0,m.__)("List view")),(0,a.createElement)(Xv,null))})}));function n_(e){var t;let{genericPreviewBlock:n,style:r,className:i,activeStyle:l}=e;const s=null===(t=(0,o.getBlockType)(n.name))||void 0===t?void 0:t.example,c=yy(i,l,r),u=(0,a.useMemo)((()=>({...n,title:r.label||r.name,description:r.description,initialAttributes:{...n.attributes,className:c+" block-editor-block-styles__block-preview-container"},example:s})),[n,c]);return(0,a.createElement)(ud,{item:u,isStylePreview:!0})}function r_(e){let{children:t,scope:n,...r}=e;return(0,a.createElement)(f.Fill,{name:`BlockStylesPreviewPanel/${n}`},(0,a.createElement)("div",r,t))}const o_=()=>{};function i_(e){let{clientId:t,onSwitch:n=o_,onHoverClassName:r=o_,scope:o}=e;const{onSelect:i,stylesToRender:l,activeStyle:s,genericPreviewBlock:d,className:y}=gy({clientId:t,onSwitch:n}),[m,g]=(0,a.useState)(null),[h,b]=(0,a.useState)(0),v=(0,p.useViewportMatch)("medium","<");if((0,a.useLayoutEffect)((()=>{const e=document.querySelector(".interface-interface-skeleton__content"),t=(null==e?void 0:e.scrollTop)||0;b(t+16)}),[m]),!l||0===l.length)return null;const _=(0,u.debounce)(g,250),k=e=>{var t;m!==e?(_(e),r(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null)):_.cancel()};return(0,a.createElement)("div",{className:"block-editor-block-styles"},(0,a.createElement)("div",{className:"block-editor-block-styles__variants"},l.map((e=>{const t=e.label||e.name;return(0,a.createElement)(f.Button,{className:c()("block-editor-block-styles__item",{"is-active":s.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>k(e),onFocus:()=>k(e),onMouseLeave:()=>k(null),onBlur:()=>k(null),onClick:()=>(e=>{i(e),r(null),g(null),_.cancel()})(e),"aria-current":s.name===e.name},(0,a.createElement)(f.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text"},t))}))),m&&!v&&(0,a.createElement)(r_,{scope:o,className:"block-editor-block-styles__preview-panel",style:{top:h},onMouseLeave:()=>k(null)},(0,a.createElement)(n_,{activeStyle:s,className:y,genericPreviewBlock:d,style:m})))}i_.Slot=function(e){let{scope:t}=e;return(0,a.createElement)(f.Slot,{name:`BlockStylesPreviewPanel/${t}`})};var l_=i_;var a_=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));var s_=function(e){let{icon:t=a_,label:n=(0,m.__)("Choose variation"),instructions:r=(0,m.__)("Select a variation to start with."),variations:o,onSelect:i,allowSkip:l}=e;const s=c()("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return(0,a.createElement)(f.Placeholder,{icon:t,label:n,instructions:r,className:s},(0,a.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,m.__)("Block variations")},o.map((e=>(0,a.createElement)("li",{key:e.name},(0,a.createElement)(f.Button,{variant:"secondary",icon:e.icon,iconSize:48,onClick:()=>i(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,a.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))))),l&&(0,a.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,a.createElement)(f.Button,{variant:"link",onClick:()=>i()},(0,m.__)("Skip"))))};var c_=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"}));const u_="carousel",p_="grid",d_=e=>{let{onBlockPatternSelect:t}=e;return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},(0,a.createElement)(f.Button,{variant:"primary",onClick:t},(0,m.__)("Choose")))},f_=e=>{let{handlePrevious:t,handleNext:n,activeSlide:r,totalSlides:o}=e;return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,a.createElement)(f.Button,{icon:Lf,label:(0,m.__)("Previous pattern"),onClick:t,disabled:0===r}),(0,a.createElement)(f.Button,{icon:Df,label:(0,m.__)("Next pattern"),onClick:n,disabled:r===o-1}))};var y_=e=>{let{viewMode:t,setViewMode:n,handlePrevious:r,handleNext:o,activeSlide:i,totalSlides:l,onBlockPatternSelect:s}=e;const c=t===u_,u=(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,a.createElement)(f.Button,{icon:xi,label:(0,m.__)("Carousel view"),onClick:()=>n(u_),isPressed:c}),(0,a.createElement)(f.Button,{icon:c_,label:(0,m.__)("Grid view"),onClick:()=>n(p_),isPressed:t===p_}));return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},c&&(0,a.createElement)(f_,{handlePrevious:r,handleNext:o,activeSlide:i,totalSlides:l}),u,c&&(0,a.createElement)(d_,{onBlockPatternSelect:s}))};var m_=function(e,t,n){return(0,d.useSelect)((r=>{const{getBlockRootClientId:o,__experimentalGetPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:l}=r(sr),a=o(e);return n?l(a).filter(n):i(t,a)}),[e,t,n])};const g_=e=>{let{viewMode:t,activeSlide:n,patterns:r,onBlockPatternSelect:o}=e;const i=(0,f.__unstableUseCompositeState)(),s="block-editor-block-pattern-setup__container";if(t===u_){const e=new Map([[n,"active-slide"],[n-1,"previous-slide"],[n+1,"next-slide"]]);return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__carousel"},(0,a.createElement)("div",{className:s},(0,a.createElement)("ul",{className:"carousel-container"},r.map(((t,n)=>(0,a.createElement)(b_,{className:e.get(n)||"",key:t.name,pattern:t}))))))}return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__grid"},(0,a.createElement)(f.__unstableComposite,l({},i,{role:"listbox",className:s,"aria-label":(0,m.__)("Patterns list")}),r.map((e=>(0,a.createElement)(h_,{key:e.name,pattern:e,onSelect:o,composite:i})))))};function h_(e){let{pattern:t,onSelect:n,composite:r}=e;const o="block-editor-block-pattern-setup-list",{blocks:i,description:s,viewportWidth:c=700}=t,u=(0,p.useInstanceId)(h_,`${o}__item-description`);return(0,a.createElement)("div",{className:`${o}__list-item`,"aria-label":t.title,"aria-describedby":t.description?u:void 0},(0,a.createElement)(f.__unstableCompositeItem,l({role:"option",as:"div"},r,{className:`${o}__item`,onClick:()=>n(i)}),(0,a.createElement)(sd,{blocks:i,viewportWidth:c})),!!s&&(0,a.createElement)(f.VisuallyHidden,{id:u},s))}function b_(e){let{className:t,pattern:n,minHeight:r}=e;const{blocks:o,title:i,description:l}=n,s=(0,p.useInstanceId)(b_,"block-editor-block-pattern-setup-list__item-description");return(0,a.createElement)("li",{className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":l?s:void 0},(0,a.createElement)(sd,{blocks:o,__experimentalMinHeight:r}),!!l&&(0,a.createElement)(f.VisuallyHidden,{id:s},l))}var v_=e=>{let{clientId:t,blockName:n,filterPatternsFn:r,onBlockPatternSelect:i}=e;const[l,s]=(0,a.useState)(u_),[c,u]=(0,a.useState)(0),{replaceBlock:p}=(0,d.useDispatch)(sr),f=m_(t,n,r);if(null==f||!f.length)return null;const y=i||(e=>{const n=e.map((e=>(0,o.cloneBlock)(e)));p(t,n)});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${l}`},(0,a.createElement)(g_,{viewMode:l,activeSlide:c,patterns:f,onBlockPatternSelect:y}),(0,a.createElement)(y_,{viewMode:l,setViewMode:s,activeSlide:c,totalSlides:f.length,handleNext:()=>{u((e=>e+1))},handlePrevious:()=>{u((e=>e-1))},onBlockPatternSelect:()=>{y(f[c].blocks)}})))};function __(e){let{className:t,onSelectVariation:n,selectedValue:r,variations:o}=e;return(0,a.createElement)("fieldset",{className:t},(0,a.createElement)(f.VisuallyHidden,{as:"legend"},(0,m.__)("Transform to variation")),o.map((e=>(0,a.createElement)(f.Button,{key:e.name,icon:(0,a.createElement)(Au,{icon:e.icon,showColors:!0}),isPressed:r===e.name,label:r===e.name?e.title:(0,m.sprintf)((0,m.__)("Transform to %s"),e.title),onClick:()=>n(e.name),"aria-label":e.title,showTooltip:!0}))))}function k_(e){let{className:t,onSelectVariation:n,selectedValue:r,variations:o}=e;const i=o.map((e=>{let{name:t,title:n,description:r}=e;return{value:t,label:n,info:r}}));return(0,a.createElement)(f.DropdownMenu,{className:t,label:(0,m.__)("Transform to variation"),text:(0,m.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${t}__popover`},icon:jf,toggleProps:{iconPosition:"right"}},(()=>(0,a.createElement)("div",{className:`${t}__container`},(0,a.createElement)(f.MenuGroup,null,(0,a.createElement)(f.MenuItemsChoice,{choices:i,value:r,onSelect:n})))))}var S_=function(e){let{blockClientId:t}=e;const{updateBlockAttributes:n}=(0,d.useDispatch)(sr),{activeBlockVariation:r,variations:i}=(0,d.useSelect)((e=>{const{getActiveBlockVariation:n,getBlockVariations:r}=e(o.store),{getBlockName:i,getBlockAttributes:l}=e(sr),a=t&&i(t);return{activeBlockVariation:n(a,l(t)),variations:a&&r(a,"transform")}}),[t]),l=null==r?void 0:r.name,s=(0,a.useMemo)((()=>{const e=new Set;return!!i&&(i.forEach((t=>{var n;t.icon&&e.add((null===(n=t.icon)||void 0===n?void 0:n.src)||t.icon)})),e.size===i.length)}),[i]);if(null==i||!i.length)return null;const c=s?__:k_;return(0,a.createElement)(c,{className:"block-editor-block-variation-transforms",onSelectVariation:e=>{n(t,{...i.find((t=>{let{name:n}=t;return n===e})).attributes})},selectedValue:l,variations:i})},E_=(0,p.createHigherOrderComponent)((e=>t=>{const n=Kr("color.palette"),r=!Kr("color.custom"),o=void 0===t.colors?n:t.colors,i=void 0===t.disableCustomColors?r:t.disableCustomColors,s=!(0,u.isEmpty)(o)||!i;return(0,a.createElement)(e,l({},t,{colors:o,disableCustomColors:i,hasColorsToChoose:s}))}),"withColorContext"),w_=E_(f.ColorPalette);function A_(e){let{onChange:t,value:n,...r}=e;return(0,a.createElement)(Fg,l({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var C_=window.wp.date;const I_=new Date(2022,0,25);function x_(e){let{format:t,defaultFormat:n,onChange:r}=e;return(0,a.createElement)("fieldset",{className:"block-editor-date-format-picker"},(0,a.createElement)(f.VisuallyHidden,{as:"legend"},(0,m.__)("Date format")),(0,a.createElement)(f.ToggleControl,{label:(0,a.createElement)(a.Fragment,null,(0,m.__)("Default format"),(0,a.createElement)("span",{className:"block-editor-date-format-picker__default-format-toggle-control__hint"},(0,C_.dateI18n)(n,I_))),checked:!t,onChange:e=>r(e?null:n)}),t&&(0,a.createElement)(B_,{format:t,onChange:r}))}function B_(e){var t;let{format:n,onChange:r}=e;const o=[...new Set(["Y-m-d",(0,m._x)("n/j/Y","short date format"),(0,m._x)("n/j/Y g:i A","short date format with time"),(0,m._x)("M j, Y","medium date format"),(0,m._x)("M j, Y g:i A","medium date format with time"),(0,m._x)("F j, Y","long date format"),(0,m._x)("M j","short date format without the year")])],i=o.map(((e,t)=>({key:`suggested-${t}`,name:(0,C_.dateI18n)(e,I_),format:e}))),l={key:"custom",name:(0,m.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",__experimentalHint:(0,m.__)("Enter your own date format")},[s,c]=(0,a.useState)((()=>!!n&&!o.includes(n)));return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.BaseControl,{className:"block-editor-date-format-picker__custom-format-select-control"},(0,a.createElement)(f.CustomSelectControl,{__nextUnconstrainedWidth:!0,label:(0,m.__)("Choose a format"),options:[...i,l],value:s?l:null!==(t=i.find((e=>e.format===n)))&&void 0!==t?t:l,onChange:e=>{let{selectedItem:t}=e;t===l?c(!0):(c(!1),r(t.format))}})),s&&(0,a.createElement)(f.TextControl,{label:(0,m.__)("Custom format"),hideLabelFromVision:!0,help:(0,a.createInterpolateElement)((0,m.__)("Enter a date or time format string."),{Link:(0,a.createElement)(f.ExternalLink,{href:(0,m.__)("https://wordpress.org/support/article/formatting-date-and-time/")})}),value:n,onChange:e=>r(e)}))}const P_=["colors","disableCustomColors","gradients","disableCustomGradients"],T_=e=>{let{className:t,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,children:l,settings:s,title:y,showTitle:m=!0,__experimentalHasMultipleOrigins:g,__experimentalIsRenderedInSidebar:h,enableAlpha:b}=e;const v=(0,p.useInstanceId)(T_),{batch:_}=(0,d.useRegistry)();return(0,u.isEmpty)(n)&&(0,u.isEmpty)(r)&&o&&i&&(0,u.every)(s,(e=>(0,u.isEmpty)(e.colors)&&(0,u.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)))?null:(0,a.createElement)(f.__experimentalToolsPanel,{className:c()("block-editor-panel-color-gradient-settings",t),label:m?y:void 0,resetAll:()=>{_((()=>{s.forEach((e=>{let{colorValue:t,gradientValue:n,onColorChange:r,onGradientChange:o}=e;t?r():n&&o()}))}))},panelId:v,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},(0,a.createElement)(Ug,{settings:s,panelId:v,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,__experimentalHasMultipleOrigins:g,__experimentalIsRenderedInSidebar:h,enableAlpha:b}),!!l&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.__experimentalSpacer,{marginY:4})," ",l))},O_=e=>{const t=ug();return t.colors=Kr("color.palette"),t.gradients=Kr("color.gradients"),(0,a.createElement)(T_,l({},t,e))},R_=e=>{const t=pg();return(0,a.createElement)(T_,l({},t,e))};var N_=e=>(0,u.every)(P_,(t=>e.hasOwnProperty(t)))?(0,a.createElement)(T_,e):e.__experimentalHasMultipleOrigins?(0,a.createElement)(R_,e):(0,a.createElement)(O_,e),F_=function(e,t){return F_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},F_(e,t)};var M_=function(){return M_=Object.assign||function(e){for(var t,n=1,r=arguments.length;nu*o?{width:u*o,height:u}:{width:c,height:c/o}}function j_(e,t,n,r,o){void 0===o&&(o=0);var i=Y_(t.width,t.height,o),l=i.width,a=i.height;return{x:z_(e.x,l,n.width,r),y:z_(e.y,a,n.height,r)}}function z_(e,t,n,r){var o=t*r/2-n/2;return Q_(e,-o,o)}function V_(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function G_(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function H_(e,t,n,r,o,i,l){void 0===i&&(i=0),void 0===l&&(l=!0);var a=l?W_:$_,s=Y_(t.width,t.height,i),c=Y_(t.naturalWidth,t.naturalHeight,i),u={x:a(100,((s.width-n.width/o)/2-e.x/o)/s.width*100),y:a(100,((s.height-n.height/o)/2-e.y/o)/s.height*100),width:a(100,n.width/s.width*100/o),height:a(100,n.height/s.height*100/o)},p=Math.round(a(c.width,u.width*c.width/100)),d=Math.round(a(c.height,u.height*c.height/100)),f=c.width>=c.height*r?{width:Math.round(d*r),height:d}:{width:p,height:Math.round(p/r)};return{croppedAreaPercentages:u,croppedAreaPixels:M_(M_({},f),{x:Math.round(a(c.width-f.width,u.x*c.width/100)),y:Math.round(a(c.height-f.height,u.y*c.height/100))})}}function W_(e,t){return Math.min(e,Math.max(0,t))}function $_(e,t){return t}function K_(e,t,n,r,o,i){var l=Y_(t.width,t.height,n),a=Q_(r.width/l.width*(100/e.width),o,i);return{crop:{x:a*l.width/2-r.width/2-l.width*a*(e.x/100),y:a*l.height/2-r.height/2-l.height*a*(e.y/100)},zoom:a}}function q_(e,t,n,r,o,i){void 0===n&&(n=0);var l=Y_(t.naturalWidth,t.naturalHeight,n),a=Q_(function(e,t,n){var r=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}(e,t,r),o,i),s=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((l.width-e.width)/2-e.x)*s,y:((l.height-e.height)/2-e.y)*s},zoom:a}}function J_(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function Y_(e,t,n){var r=n*Math.PI/180;return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function Q_(e,t,n){return Math.min(Math.max(e,t),n)}function Z_(){for(var e=[],t=0;t0})).join(" ").trim()}var X_=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=pl().createRef(),n.videoRef=pl().createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc="undefined"!=typeof document?document:null,n.currentWindow="undefined"!=typeof window?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&n.containerRef){var e=!0;n.resizeObserver=new window.ResizeObserver((function(t){e?e=!1:n.computeSizes()})),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=K_(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,o=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}else if(n.props.initialCroppedAreaPixels){var i=q_(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);r=i.crop,o=i.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}},n.computeSizes=function(){var e,t,r,o,i,l,a=n.imageRef.current||n.videoRef.current;if(a&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var s=n.containerRect.width/n.containerRect.height,c=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(r=n.imageRef.current)||void 0===r?void 0:r.naturalHeight)||(null===(o=n.videoRef.current)||void 0===o?void 0:o.videoHeight)||0,p=c/u,d=void 0;if(a.offsetWidthp?{width:n.containerRect.height*p,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/p};break;case"horizontal-cover":d={width:n.containerRect.width,height:n.containerRect.width/p};break;case"vertical-cover":d={width:n.containerRect.height*p,height:n.containerRect.height};break;case"auto-cover":d=c>u?{width:n.containerRect.width,height:n.containerRect.width/p}:{width:n.containerRect.height*p,height:n.containerRect.height}}else d={width:a.offsetWidth,height:a.offsetHeight};n.mediaSize=M_(M_({},d),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var f=n.props.cropSize?n.props.cropSize:U_(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(i=n.state.cropSize)||void 0===i?void 0:i.height)===f.height&&(null===(l=n.state.cropSize)||void 0===l?void 0:l.width)===f.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(f),n.setState({cropSize:f},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(f),f}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),o=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var i=n.gestureRotationStart+e.rotation;n.props.onRotationChange(i)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,r,o=e.x,i=e.y;n.dragStartPosition={x:o,y:i},n.dragStartCrop=M_({},n.props.crop),null===(r=(t=n.props).onInteractionStart)||void 0===r||r.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==r){var e=t-n.dragStartPosition.x,o=r-n.dragStartPosition.y,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+o},l=n.props.restrictPosition?j_(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(l)}})))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&(!n.props.onWheelRequest||n.props.onWheelRequest(e))){e.preventDefault();var r=t.getMousePoint(e),o=L_()(e).pixelY,i=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(i,r,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e){var t=e.x,r=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(r-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,o=n.props,i=o.crop,l=o.zoom;return{x:(t+i.x)/l,y:(r+i.y)/l}},n.setNewZoom=function(e,t,r){var o=(void 0===r?{}:r).shouldUpdatePosition,i=void 0===o||o;if(n.state.cropSize&&n.props.onZoomChange){var l=Q_(e,n.props.minZoom,n.props.maxZoom);if(i){var a=n.getPointOnContainer(t),s=n.getPointOnMedia(a),c={x:s.x*l-a.x,y:s.y*l-a.y},u=n.props.restrictPosition?j_(c,n.mediaSize,n.state.cropSize,l,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(l)}},n.getCropData=function(){return n.state.cropSize?H_(n.props.restrictPosition?j_(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?j_(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function n(){this.constructor=e}F_(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t,n,r,o,i,l,a,s,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.width)?this.computeSizes():(null===(i=e.crop)||void 0===i?void 0:i.x)===(null===(l=this.props.crop)||void 0===l?void 0:l.x)&&(null===(a=e.crop)||void 0===a?void 0:a.y)===(null===(s=this.props.crop)||void 0===s?void 0:s.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef.current)||void 0===c||c.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=V_(n,r),this.lastPinchRotation=G_(n,r),this.onDragStart(J_(n,r))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),i=J_(r,o);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=V_(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var l=G_(r,o),a=n.props.rotation+(l-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(a),n.lastPinchRotation=l}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.image,r=t.video,o=t.mediaProps,i=t.transform,l=t.crop,a=l.x,s=l.y,c=t.rotation,u=t.zoom,p=t.cropShape,d=t.showGrid,f=t.style,y=f.containerStyle,m=f.cropAreaStyle,g=f.mediaStyle,h=t.classes,b=h.containerClassName,v=h.cropAreaClassName,_=h.mediaClassName,k=t.objectFit;return pl().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:y,className:Z_("reactEasyCrop_Container",b)},n?pl().createElement("img",M_({alt:"",className:Z_("reactEasyCrop_Image","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical","auto-cover"===k&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),_)},o,{src:n,ref:this.imageRef,style:M_(M_({},g),{transform:i||"translate(".concat(a,"px, ").concat(s,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),onLoad:this.onMediaLoad})):r&&pl().createElement("video",M_({autoPlay:!0,loop:!0,muted:!0,className:Z_("reactEasyCrop_Video","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical","auto-cover"===k&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),_)},o,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:M_(M_({},g),{transform:i||"translate(".concat(a,"px, ").concat(s,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),controls:!1}),(Array.isArray(r)?r:[{src:r}]).map((function(e){return pl().createElement("source",M_({key:e.src},e))}))),this.state.cropSize&&pl().createElement("div",{style:M_(M_({},m),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Z_("reactEasyCrop_CropArea","round"===p&&"reactEasyCrop_CropAreaRound",d&&"reactEasyCrop_CropAreaGrid",v)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(pl().Component);const ek={position:"bottom right",isAlternate:!0};function tk(e,t){const n=function(e){let{url:t,naturalWidth:n,naturalHeight:r}=e;const[o,l]=(0,a.useState)(),[s,c]=(0,a.useState)(),[u,p]=(0,a.useState)({x:0,y:0}),[d,f]=(0,a.useState)(),[y,m]=(0,a.useState)(),[g,h]=(0,a.useState)(),[b,v]=(0,a.useState)(),_=(0,a.useCallback)((()=>{p({x:0,y:0}),f(100),m(0),h(n/r),v(n/r)}),[n,r,p,f,m,h,v]),k=(0,a.useCallback)((()=>{const e=(y+90)%360;let o=n/r;if(y%180==90&&(o=r/n),0===e)return l(),m(e),h(n/r),void p({x:-u.y*o,y:u.x*o});const a=new window.Image;a.src=t,a.onload=function(t){const n=document.createElement("canvas");let r=0,i=0;e%180?(n.width=t.target.height,n.height=t.target.width):(n.width=t.target.width,n.height=t.target.height),90!==e&&180!==e||(r=n.width),270!==e&&180!==e||(i=n.height);const a=n.getContext("2d");a.translate(r,i),a.rotate(e*Math.PI/180),a.drawImage(t.target,0,0),n.toBlob((t=>{l(URL.createObjectURL(t)),m(e),h(n.width/n.height),p({x:-u.y*o,y:u.x*o})}))};const s=(0,i.applyFilters)("media.crossOrigin",void 0,t);"string"==typeof s&&(a.crossOrigin=s)}),[y,n,r,l,m,h,p]);return(0,a.useMemo)((()=>({editedUrl:o,setEditedUrl:l,crop:s,setCrop:c,position:u,setPosition:p,zoom:d,setZoom:f,rotation:y,setRotation:m,rotateClockwise:k,aspect:g,setAspect:h,defaultAspect:b,initializeTransformValues:_})),[o,l,s,c,u,p,d,f,y,m,k,g,h,b,_])}(e),{initializeTransformValues:r}=n;return(0,a.useEffect)((()=>{t&&r()}),[t,r]),n}const nk=(0,a.createContext)({}),rk=()=>(0,a.useContext)(nk);function ok(e){let{id:t,url:n,naturalWidth:r,naturalHeight:o,isEditing:i,onFinishEditing:l,onSaveImage:s,children:c}=e;const u=tk({url:n,naturalWidth:r,naturalHeight:o},i),p=function(e){let{crop:t,rotation:n,height:r,width:o,aspect:i,url:l,id:s,onSaveImage:c,onFinishEditing:u}=e;const{createErrorNotice:p}=(0,d.useDispatch)(Cd.store),[f,y]=(0,a.useState)(!1),g=(0,a.useCallback)((()=>{y(!1),u()}),[y,u]),h=(0,a.useCallback)((()=>{y(!0);let e={};(t.width<99.9||t.height<99.9)&&(e=t),n>0&&(e.rotation=n),e.src=l,mv()({path:`/wp/v2/media/${s}/edit`,method:"POST",data:e}).then((e=>{c({id:e.id,url:e.source_url,height:r&&o?o/i:void 0})})).catch((e=>{p((0,m.sprintf)((0,m.__)("Could not edit image. %s"),(0,Hi.__unstableStripHTML)(e.message)),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{y(!1),u()}))}),[y,t,n,r,o,i,l,c,p,y,u]);return(0,a.useMemo)((()=>({isInProgress:f,apply:h,cancel:g})),[f,h,g])}({id:t,url:n,onSaveImage:s,onFinishEditing:l,...u}),f=(0,a.useMemo)((()=>({...u,...p})),[u,p]);return(0,a.createElement)(nk.Provider,{value:f},c)}function ik(e){let{url:t,width:n,height:r,clientWidth:o,naturalHeight:i,naturalWidth:l,borderProps:s}=e;const{isInProgress:u,editedUrl:p,position:d,zoom:y,aspect:m,setPosition:g,setCrop:h,setZoom:b,rotation:v}=rk();let _=r||o*i/l;return v%180==90&&(_=o*l/i),(0,a.createElement)("div",{className:c()("wp-block-image__crop-area",null==s?void 0:s.className,{"is-applying":u}),style:{...null==s?void 0:s.style,width:n||o,height:_}},(0,a.createElement)(X_,{image:p||t,disabled:u,minZoom:1,maxZoom:3,crop:d,zoom:y/100,aspect:m,onCropChange:g,onCropComplete:e=>{h(e)},onZoomChange:e=>{b(100*e)}}),u&&(0,a.createElement)(f.Spinner,null))}var lk=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));function ak(){const{isInProgress:e,zoom:t,setZoom:n}=rk();return(0,a.createElement)(f.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:ek,renderToggle:t=>{let{isOpen:n,onToggle:r}=t;return(0,a.createElement)(f.ToolbarButton,{icon:lk,label:(0,m.__)("Zoom"),onClick:r,"aria-expanded":n,disabled:e})},renderContent:()=>(0,a.createElement)(f.RangeControl,{label:(0,m.__)("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}var sk=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}));function ck(e){let{aspectRatios:t,isDisabled:n,label:r,onClick:o,value:i}=e;return(0,a.createElement)(f.MenuGroup,{label:r},t.map((e=>{let{title:t,aspect:r}=e;return(0,a.createElement)(f.MenuItem,{key:r,disabled:n,onClick:()=>{o(r)},role:"menuitemradio",isSelected:r===i,icon:r===i?py:void 0},t)})))}function uk(e){let{toggleProps:t}=e;const{isInProgress:n,aspect:r,setAspect:o,defaultAspect:i}=rk();return(0,a.createElement)(f.DropdownMenu,{icon:sk,label:(0,m.__)("Aspect Ratio"),popoverProps:ek,toggleProps:t,className:"wp-block-image__aspect-ratio"},(e=>{let{onClose:t}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ck,{isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,m.__)("Original"),aspect:i},{title:(0,m.__)("Square"),aspect:1}]}),(0,a.createElement)(ck,{label:(0,m.__)("Landscape"),isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,m.__)("16:10"),aspect:1.6},{title:(0,m.__)("16:9"),aspect:16/9},{title:(0,m.__)("4:3"),aspect:4/3},{title:(0,m.__)("3:2"),aspect:1.5}]}),(0,a.createElement)(ck,{label:(0,m.__)("Portrait"),isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,m.__)("10:16"),aspect:.625},{title:(0,m.__)("9:16"),aspect:9/16},{title:(0,m.__)("3:4"),aspect:3/4},{title:(0,m.__)("2:3"),aspect:2/3}]}))}))}var pk=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));function dk(){const{isInProgress:e,rotateClockwise:t}=rk();return(0,a.createElement)(f.ToolbarButton,{icon:pk,label:(0,m.__)("Rotate"),onClick:t,disabled:e})}function fk(){const{isInProgress:e,apply:t,cancel:n}=rk();return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.ToolbarButton,{onClick:t,disabled:e},(0,m.__)("Apply")),(0,a.createElement)(f.ToolbarButton,{onClick:n},(0,m.__)("Cancel")))}function yk(e){let{url:t,width:n,height:r,clientWidth:o,naturalHeight:i,naturalWidth:l,borderProps:s}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ik,{borderProps:s,url:t,width:n,height:r,clientWidth:o,naturalHeight:i,naturalWidth:l}),(0,a.createElement)(br,null,(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(ak,null),(0,a.createElement)(f.ToolbarItem,null,(e=>(0,a.createElement)(uk,{toggleProps:e}))),(0,a.createElement)(dk,null)),(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(fk,null))))}const mk=[25,50,75,100],gk=()=>{};function hk(e){let{imageSizeHelp:t,imageWidth:n,imageHeight:r,imageSizeOptions:o=[],isResizable:i=!0,slug:l,width:s,height:c,onChange:p,onChangeImage:d=gk}=e;const{currentHeight:y,currentWidth:g,updateDimension:h,updateDimensions:b}=function(e,t,n,r,o){var i,l;const[s,c]=(0,a.useState)(null!==(i=null!=t?t:r)&&void 0!==i?i:""),[u,p]=(0,a.useState)(null!==(l=null!=e?e:n)&&void 0!==l?l:"");return(0,a.useEffect)((()=>{void 0===t&&void 0!==r&&c(r),void 0===e&&void 0!==n&&p(n)}),[r,n]),(0,a.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(s)&&c(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(u)&&p(e)}),[t,e]),{currentHeight:u,currentWidth:s,updateDimension:(e,t)=>{"width"===e?c(t):p(t),o({[e]:""===t?void 0:parseInt(t,10)})},updateDimensions:(e,t)=>{p(null!=e?e:n),c(null!=t?t:r),o({height:e,width:t})}}}(c,s,r,n,p);return(0,a.createElement)(a.Fragment,null,!(0,u.isEmpty)(o)&&(0,a.createElement)(f.SelectControl,{label:(0,m.__)("Image size"),value:l,options:o,onChange:d,help:t}),i&&(0,a.createElement)("div",{className:"block-editor-image-size-control"},(0,a.createElement)("p",{className:"block-editor-image-size-control__row"},(0,m.__)("Image dimensions")),(0,a.createElement)("div",{className:"block-editor-image-size-control__row"},(0,a.createElement)(f.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:(0,m.__)("Width"),value:g,min:1,onChange:e=>h("width",e)}),(0,a.createElement)(f.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:(0,m.__)("Height"),value:y,min:1,onChange:e=>h("height",e)})),(0,a.createElement)("div",{className:"block-editor-image-size-control__row"},(0,a.createElement)(f.ButtonGroup,{"aria-label":(0,m.__)("Image size presets")},mk.map((e=>{const t=Math.round(n*(e/100)),o=Math.round(r*(e/100)),i=g===t&&y===o;return(0,a.createElement)(f.Button,{key:e,isSmall:!0,variant:i?"primary":void 0,isPressed:i,onClick:()=>b(o,t)},e,"%")}))),(0,a.createElement)(f.Button,{isSmall:!0,onClick:()=>b()},(0,m.__)("Reset")))))}var bk=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(M.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));const vk=()=>{};var _k=e=>{let{value:t,onChange:n=vk,settings:r}=e;if(!r||!r.length)return null;const o=e=>r=>{n({...t,[e.id]:r})},i=r.map((e=>(0,a.createElement)(f.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:o(e),checked:!!t&&!!t[e.id]})));return(0,a.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,a.createElement)(f.VisuallyHidden,{as:"legend"},(0,m.__)("Currently selected link settings")),i)},kk=n(5425),Sk=n.n(kk);function Ek(e){return"function"==typeof e}class wk extends a.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||(0,a.createRef)(),this.inputRef=(0,a.createRef)(),this.updateSuggestions=(0,u.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.isUpdatingSuggestions=!1,this.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:r,__experimentalShowInitialSuggestions:o=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,Sk()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===r||this.props.disableSuggestions||this.isUpdatingSuggestions||(null!=r&&r.length?this.updateSuggestions(r):o&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),delete this.suggestionsRequest}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{suggestions:e}=this.state,{__experimentalShowInitialSuggestions:t=!1,value:n}=this.props;return!this.isUpdatingSuggestions&&t&&!(n&&n.length)&&!(e&&e.length)}updateSuggestions(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{__experimentalFetchLinkSuggestions:n,__experimentalHandleURLSuggestions:r}=this.props;if(!n)return;const o=!(null!==(e=t)&&void 0!==e&&e.length);if(t=t.trim(),!o&&(t.length<2||!r&&(0,nf.isURL)(t)))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});const i=n(t,{isInitialSuggestions:o});i.then((e=>{this.suggestionsRequest===i&&(this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak((0,m.sprintf)((0,m._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):this.props.debouncedSpeak((0,m.__)("No results."),"assertive"),this.isUpdatingSuggestions=!1)})).catch((()=>{this.suggestionsRequest===i&&(this.setState({loading:!1}),this.isUpdatingSuggestions=!1)})),this.suggestionsRequest=i}onChange(e){const t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n)}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:r,loading:o}=this.state;if(!t||!r.length||o){switch(e.keyCode){case cu.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case cu.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case cu.ENTER:e.preventDefault(),this.props.onSubmit&&this.props.onSubmit(null,e)}return}const i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case cu.UP:{e.preventDefault();const t=n?n-1:r.length-1;this.setState({selectedSuggestion:t});break}case cu.DOWN:{e.preventDefault();const t=null===n||n===r.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case cu.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak((0,m.__)("Link selected.")));break;case cu.ENTER:e.preventDefault(),null!==this.state.selectedSuggestion?(this.selectLink(i),this.props.onSubmit&&this.props.onSubmit(i,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps(e,t){let{value:n,instanceId:r,disableSuggestions:o,__experimentalShowInitialSuggestions:i=!1}=e,{showSuggestions:l}=t,a=l;const s=n&&n.length;return i||s||(a=!1),!0===o&&(a=!1),{showSuggestions:a,suggestionsListboxId:`block-editor-url-input-suggestions-${r}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${r}`}}render(){return(0,a.createElement)(a.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{label:e=null,className:t,isFullWidth:n,instanceId:r,placeholder:o=(0,m.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:l=""}=this.props,{loading:s,showSuggestions:u,selectedSuggestion:p,suggestionsListboxId:d,suggestionOptionIdPrefix:y}=this.state,g=`url-input-control-${r}`,h={id:g,label:e,className:c()("block-editor-url-input",t,{"is-full-width":n})},b={id:g,value:l,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:o,onKeyDown:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,m.__)("URL"),"aria-expanded":u,"aria-autocomplete":"list","aria-controls":d,"aria-activedescendant":null!==p?`${y}-${p}`:void 0,ref:this.inputRef};return i?i(h,b,s):(0,a.createElement)(f.BaseControl,h,(0,a.createElement)("input",b),s&&(0,a.createElement)(f.Spinner,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:r=!1}=this.props,{showSuggestions:o,suggestions:i,selectedSuggestion:s,suggestionsListboxId:u,suggestionOptionIdPrefix:p,loading:d}=this.state,y={id:u,ref:this.autocompleteRef,role:"listbox"},m=(e,t)=>({role:"option",tabIndex:"-1",id:`${p}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===s});return Ek(t)&&o&&i.length?t({suggestions:i,selectedSuggestion:s,suggestionsListProps:y,buildSuggestionItemProps:m,isLoading:d,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:r&&!(n&&n.length)}):!Ek(t)&&o&&i.length?(0,a.createElement)(f.Popover,{position:"bottom",focusOnMount:!1},(0,a.createElement)("div",l({},y,{className:c()("block-editor-url-input__suggestions",`${e}__suggestions`)}),i.map(((e,t)=>(0,a.createElement)(f.Button,l({},m(0,t),{key:e.id,className:c()("block-editor-url-input__suggestion",{"is-selected":t===s}),onClick:()=>this.handleOnClick(e)}),e.title))))):null}}var Ak=(0,p.compose)(p.withSafeTimeout,f.withSpokenMessages,p.withInstanceId,(0,d.withSelect)(((e,t)=>{if(Ek(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(sr);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(wk);var Ck=e=>{let t,{searchTerm:n,onClick:r,itemProps:o,isSelected:i,buttonText:s}=e;return n?(t=s?"function"==typeof s?s(n):s:(0,a.createInterpolateElement)((0,m.sprintf)((0,m.__)("Create: %s"),n),{mark:(0,a.createElement)("mark",null)}),(0,a.createElement)(f.Button,l({},o,{className:c()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":i}),onClick:r}),(0,a.createElement)(ui,{className:"block-editor-link-control__search-item-icon",icon:ku}),(0,a.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,a.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null};var Ik=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 11h2V9H7v2zm0 4h2v-2H7v2zm3-4h7V9h-7v2zm0 4h7v-2h-7v2z"}));var xk=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z"}));var Bk=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"}));var Pk=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.Path,{d:"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5z"}));var Tk=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"}));const Ok={post:Ik,page:gv,post_tag:xk,category:Bk,attachment:Pk};function Rk(e){let{isURL:t,suggestion:n}=e,r=null;return t?r=Tk:n.type in Ok&&(r=Ok[n.type]),r?(0,a.createElement)(ui,{className:"block-editor-link-control__search-item-icon",icon:r}):null}var Nk=e=>{let{itemProps:t,suggestion:n,isSelected:r=!1,onClick:o,isURL:i=!1,searchTerm:s="",shouldShowType:u=!1}=e;return(0,a.createElement)(f.Button,l({},t,{onClick:o,className:c()("block-editor-link-control__search-item",{"is-selected":r,"is-url":i,"is-entity":!i})}),(0,a.createElement)(Rk,{suggestion:n,isURL:i}),(0,a.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,a.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,a.createElement)(f.TextHighlight,{text:n.title,highlight:s})),(0,a.createElement)("span",{"aria-hidden":!i,className:"block-editor-link-control__search-item-info"},!i&&((0,nf.filterURLForDisplay)((0,nf.safeDecodeURI)(n.url))||""),i&&(0,m.__)("Press ENTER to add this link"))),u&&n.type&&(0,a.createElement)("span",{className:"block-editor-link-control__search-item-type"},function(e){if(e.isFrontPage)return"front page";return"post_tag"===e.type?"tag":e.type}(n)))};const Fk="__CREATE__",Mk="mailto",Dk="internal",Lk=["URL",Mk,"tel",Dk],Uk=[{id:"opensInNewTab",title:(0,m.__)("Open in new tab")}];function jk(e){let{instanceId:t,withCreateSuggestion:n,currentInputValue:r,handleSuggestionClick:o,suggestionsListProps:i,buildSuggestionItemProps:s,suggestions:u,selectedSuggestion:p,isLoading:d,isInitialSuggestions:y,createSuggestionButtonText:g,suggestionsQuery:h}=e;const b=c()("block-editor-link-control__search-results",{"is-loading":d}),v=1===u.length&&Lk.includes(u[0].type),_=n&&!v&&!y,k=!(null!=h&&h.type),S=`block-editor-link-control-search-results-label-${t}`,E=y?(0,m.__)("Recently updated"):(0,m.sprintf)((0,m.__)('Search results for "%s"'),r),w=(0,a.createElement)(y?a.Fragment:f.VisuallyHidden,{},(0,a.createElement)("span",{className:"block-editor-link-control__search-results-label",id:S},E));return(0,a.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},w,(0,a.createElement)("div",l({},i,{className:b,"aria-labelledby":S}),u.map(((e,t)=>_&&Fk===e.type?(0,a.createElement)(Ck,{searchTerm:r,buttonText:g,onClick:()=>o(e),key:e.type,itemProps:s(e,t),isSelected:t===p}):Fk===e.type?null:(0,a.createElement)(Nk,{key:`${e.id}-${e.type}`,itemProps:s(e,t),suggestion:e,index:t,onClick:()=>{o(e)},isSelected:t===p,isURL:Lk.includes(e.type),searchTerm:r,shouldShowType:k,isFrontPage:null==e?void 0:e.isFrontPage})))))}function zk(e){const t=null==e?void 0:e.startsWith("#");return(0,nf.isURL)(e)||e&&e.includes("www.")||t}const Vk=()=>Promise.resolve([]),Gk=e=>{let t="URL";const n=(0,nf.getProtocol)(e)||"";return n.includes("mailto")&&(t=Mk),n.includes("tel")&&(t="tel"),null!=e&&e.startsWith("#")&&(t=Dk),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,nf.prependHTTP)(e):e,type:t}])};function Hk(e,t,n,r){const{fetchSearchSuggestions:o,pageOnFront:i}=(0,d.useSelect)((e=>{const{getSettings:t}=e(sr);return{pageOnFront:t().pageOnFront,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),l=t?Gk:Vk;return(0,a.useCallback)(((t,a)=>{let{isInitialSuggestions:s}=a;return zk(t)?l(t,{isInitialSuggestions:s}):(async(e,t,n,r,o,i,l)=>{const{isInitialSuggestions:a}=t;let s=!1,c=await Promise.all([n(e,t),r(e)]);c[0]=c[0].map((e=>Number(e.id)===l?(s=!0,e.isFrontPage=!0,e):e));const u=!e.includes(" ");return c=!s&&u&&i&&!a?c[0].concat(c[1]):c[0],a||zk(e)||!o?c:c.concat({title:e,url:e,type:Fk})})(t,{...e,isInitialSuggestions:s},o,l,n,r,i)}),[l,o,n])}const Wk=()=>Promise.resolve([]),$k=()=>{},Kk=(0,a.forwardRef)(((e,t)=>{let{value:n,children:r,currentLink:o={},className:i=null,placeholder:l=null,withCreateSuggestion:s=!1,onCreateSuggestion:u=$k,onChange:d=$k,onSelect:f=$k,showSuggestions:y=!0,renderSuggestions:g=(e=>(0,a.createElement)(jk,e)),fetchSuggestions:h=null,allowDirectEntry:b=!0,showInitialSuggestions:v=!1,suggestionsQuery:_={},withURLSuggestion:k=!0,createSuggestionButtonText:S,useLabel:E=!1}=e;const w=Hk(_,b,s,k),A=y?h||w:Wk,C=(0,p.useInstanceId)(Kk),[I,x]=(0,a.useState)(),B=async e=>{let t=e;if(Fk!==e.type){if(b||t&&Object.keys(t).length>=1){const{id:e,url:n,...r}=o;f({...r,...t},t)}}else try{var n;t=await u(e.title),null!==(n=t)&&void 0!==n&&n.url&&f(t)}catch(e){}},P=c()(i,{"has-no-label":!E});return(0,a.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,a.createElement)(Ak,{label:E?"URL":void 0,className:P,value:n,onChange:(e,t)=>{d(e),x(t)},placeholder:null!=l?l:(0,m.__)("Search or type url"),__experimentalRenderSuggestions:y?e=>g({...e,instanceId:C,withCreateSuggestion:s,currentInputValue:n,createSuggestionButtonText:S,suggestionsQuery:_,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),B(t)}}):null,__experimentalFetchLinkSuggestions:A,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:v,onSubmit:(e,t)=>{var r;const o=e||I;o||null!=n&&null!==(r=n.trim())&&void 0!==r&&r.length?B(o||{url:n}):t.preventDefault()},ref:t}),r)}));var qk=Kk;var Jk=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));var Yk=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));const{Slot:Qk,Fill:Zk}=(0,f.createSlotFill)("BlockEditorLinkControlViewer");function Xk(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}var eS=function(e){const[t,n]=(0,a.useReducer)(Xk,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,d.useSelect)((e=>{const{getSettings:t}=e(sr);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,a.useEffect)((()=>{if(null!=e&&e.length&&r&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,o=t.signal;return r(e,{signal:o}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{o.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t};function tS(e){var t;let{value:n,onEditClick:r,hasRichPreviews:o=!1,hasUnlinkControl:i=!1,onRemove:l}=e;const s=o?null==n?void 0:n.url:null,{richData:u,isFetching:p}=eS(s),d=u&&Object.keys(u).length,y=n&&(0,nf.filterURLForDisplay)((0,nf.safeDecodeURI)(n.url),16)||"",g=(null==u?void 0:u.title)||(null==n?void 0:n.title)||y,h=!(null!=n&&null!==(t=n.url)&&void 0!==t&&t.length);let b;return b=null!=u&&u.icon?(0,a.createElement)("img",{src:null==u?void 0:u.icon,alt:""}):h?(0,a.createElement)(ui,{icon:Jk,size:32}):(0,a.createElement)(ui,{icon:Tk}),(0,a.createElement)("div",{"aria-label":(0,m.__)("Currently selected"),className:c()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":d,"is-fetching":!!p,"is-preview":!0,"is-error":h})},(0,a.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,a.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,a.createElement)("span",{className:c()("block-editor-link-control__search-item-icon",{"is-image":null==u?void 0:u.icon})},b),(0,a.createElement)("span",{className:"block-editor-link-control__search-item-details"},h?(0,a.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},(0,m.__)("Link is empty")):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.ExternalLink,{className:"block-editor-link-control__search-item-title",href:n.url},(0,Hi.__unstableStripHTML)(g)),(null==n?void 0:n.url)&&(0,a.createElement)("span",{className:"block-editor-link-control__search-item-info"},y)))),(0,a.createElement)(f.Button,{icon:Yk,label:(0,m.__)("Edit"),className:"block-editor-link-control__search-item-action",onClick:r,iconSize:24}),i&&(0,a.createElement)(f.Button,{icon:eo,label:(0,m.__)("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:l,iconSize:24}),(0,a.createElement)(Qk,{fillProps:n})),!!(d&&(null!=u&&u.image||null!=u&&u.description)||p)&&(0,a.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==u?void 0:u.image)||p)&&(0,a.createElement)("div",{"aria-hidden":!(null!=u&&u.image),className:c()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=u&&u.image)})},(null==u?void 0:u.image)&&(0,a.createElement)("img",{src:null==u?void 0:u.image,alt:""})),((null==u?void 0:u.description)||p)&&(0,a.createElement)("div",{"aria-hidden":!(null!=u&&u.description),className:c()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=u&&u.description)})},(null==u?void 0:u.description)&&(0,a.createElement)(f.__experimentalText,{truncate:!0,numberOfLines:"2"},u.description))))}const nS=e=>{let t=!1;return{promise:new Promise(((n,r)=>{e.then((e=>t?r({isCanceled:!0}):n(e)),(e=>r(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}},rS=()=>{};function oS(e){var t,n,r;let{searchInputPlaceholder:o,value:i,settings:l=Uk,onChange:s=rS,onRemove:u,noDirectEntry:p=!1,showSuggestions:d=!0,showInitialSuggestions:y,forceIsEditingLink:g,createSuggestion:h,withCreateSuggestion:b,inputValue:v="",suggestionsQuery:_={},noURLSuggestion:k=!1,createSuggestionButtonText:S,hasRichPreviews:E=!1,hasTextControl:w=!1,renderControlBottom:A=null}=e;void 0===b&&h&&(b=!0);const C=(0,a.useRef)(!0),I=(0,a.useRef)(),x=(0,a.useRef)(),[B,P]=(0,a.useState)((null==i?void 0:i.url)||""),[T,O]=(0,a.useState)((null==i?void 0:i.title)||""),R=v||B,[N,F]=(0,a.useState)(void 0!==g?g:!i||!i.url),M=(0,a.useRef)(!1),D=!(null!=R&&null!==(t=R.trim())&&void 0!==t&&t.length),{createPage:L,isCreatingPage:U,errorMessage:j}=function(e){const t=(0,a.useRef)(),[n,r]=(0,a.useState)(!1),[o,i]=(0,a.useState)(null);return(0,a.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){r(!0),i(null);try{return t.current=nS(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw i(e.message||(0,m.__)("An unknown error occurred during creation. Please try again.")),e}finally{r(!1)}},isCreatingPage:n,errorMessage:o}}(h);function z(){var e;M.current=!(null===(e=I.current)||void 0===e||!e.contains(I.current.ownerDocument.activeElement)),F(!1)}(0,a.useEffect)((()=>{void 0!==g&&g!==N&&F(g)}),[g]),(0,a.useEffect)((()=>{if(C.current)return void(C.current=!1);const e=null!=x&&x.current?1:0;(Hi.focus.focusable.find(I.current)[e]||I.current).focus(),M.current=!1}),[N,U]),(0,a.useEffect)((()=>{null!=i&&i.title&&i.title!==T&&O(i.title),null!=i&&i.url&&P(i.url)}),[i]);const V=()=>{R===(null==i?void 0:i.url)&&T===(null==i?void 0:i.title)||s({...i,url:R,title:T}),z()},G=u&&i&&!N&&!U,H=!(null==l||!l.length),W=(null==i||null===(n=i.url)||void 0===n||null===(r=n.trim())||void 0===r?void 0:r.length)>0&&w;return(0,a.createElement)("div",{tabIndex:-1,ref:I,className:"block-editor-link-control"},U&&(0,a.createElement)("div",{className:"block-editor-link-control__loading"},(0,a.createElement)(f.Spinner,null)," ",(0,m.__)("Creating"),"…"),(N||!i)&&!U&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:c()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":W})},W&&(0,a.createElement)(f.TextControl,{ref:x,className:"block-editor-link-control__field block-editor-link-control__text-content",label:"Text",value:T,onChange:O,onKeyDown:e=>{const{keyCode:t}=e;t!==cu.ENTER||D||(e.preventDefault(),V())}}),(0,a.createElement)(qk,{currentLink:i,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:o,value:R,withCreateSuggestion:b,onCreateSuggestion:L,onChange:P,onSelect:e=>{s({...e,title:T||(null==e?void 0:e.title)}),z()},showInitialSuggestions:y,allowDirectEntry:!p,showSuggestions:d,suggestionsQuery:_,withURLSuggestion:!k,createSuggestionButtonText:S,useLabel:W},(0,a.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,a.createElement)(f.Button,{onClick:V,label:(0,m.__)("Submit"),icon:bk,className:"block-editor-link-control__search-submit",disabled:D})))),j&&(0,a.createElement)(f.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},j)),i&&!N&&!U&&(0,a.createElement)(tS,{key:null==i?void 0:i.url,value:i,onEditClick:()=>F(!0),hasRichPreviews:E,hasUnlinkControl:G,onRemove:u}),H&&(0,a.createElement)("div",{className:"block-editor-link-control__tools"},(0,a.createElement)(_k,{value:i,settings:l,onChange:s})),A&&A())}oS.ViewerFill=Zk;var iS=oS;var lS=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));var aS=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));var sS=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"}));var cS=(0,f.withFilters)("editor.MediaUpload")((()=>null));var uS=function(e){let{fallback:t=null,children:n}=e;const r=(0,d.useSelect)((e=>{const{getSettings:t}=e(sr);return!!t().mediaUpload}),[]);return r?n:t};const pS=()=>{};let dS=0;var fS=(0,p.compose)([(0,d.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(Cd.store);return{createNotice:t,removeNotice:n}})),(0,f.withFilters)("editor.MediaReplaceFlow")])((e=>{let{mediaURL:t,mediaId:n,mediaIds:r,allowedTypes:o,accept:i,onError:l,onSelect:s,onSelectURL:c,onToggleFeaturedImage:u,useFeaturedImage:p,onFilesUpload:y=pS,name:g=(0,m.__)("Replace"),createNotice:h,removeNotice:b,children:v,multiple:_=!1,addToGallery:k,handleUpload:S=!0}=e;const E=(0,d.useSelect)((e=>e(sr).getSettings().mediaUpload),[]),w=(0,a.useRef)(),A="block-editor/media-replace-flow/error-notice/"+ ++dS,C=e=>{const t=(0,Hi.__unstableStripHTML)(e);l?l(t):setTimeout((()=>{h("error",t,{speak:!0,id:A,isDismissible:!0})}),1e3)},I=(e,t)=>{p&&u&&u(),t(),s(e),(0,qt.speak)((0,m.__)("The media file has been replaced")),b(A)},x=e=>{e.keyCode===cu.DOWN&&(e.preventDefault(),e.target.click())},B=_&&!(!o||0===o.length)&&o.every((e=>"image"===e||e.startsWith("image/")));return(0,a.createElement)(f.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,a.createElement)(f.ToolbarButton,{ref:w,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:x},g)},renderContent:e=>{let{onClose:l}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,a.createElement)(a.Fragment,null,(0,a.createElement)(cS,{gallery:B,addToGallery:k,multiple:_,value:_?r:n,onSelect:e=>I(e,l),allowedTypes:o,render:e=>{let{open:t}=e;return(0,a.createElement)(f.MenuItem,{icon:lS,onClick:t},(0,m.__)("Open Media Library"))}}),(0,a.createElement)(uS,null,(0,a.createElement)(f.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!S)return t(),s(n);y(n),E({allowedTypes:o,filesList:n,onFileChange:e=>{let[n]=e;I(n,t)},onError:C})})(e,l)},accept:i,multiple:_,render:e=>{let{openFileDialog:t}=e;return(0,a.createElement)(f.MenuItem,{icon:aS,onClick:()=>{t()}},(0,m.__)("Upload"))}}))),u&&(0,a.createElement)(f.MenuItem,{icon:sS,onClick:u,isPressed:p},(0,m.__)("Use featured image")),v),c&&(0,a.createElement)("form",{className:"block-editor-media-flow__url-input"},(0,a.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},(0,m.__)("Current media URL:")),(0,a.createElement)(f.Tooltip,{text:t,position:"bottom"},(0,a.createElement)("div",null,(0,a.createElement)(iS,{value:{url:t},settings:[],showSuggestions:!1,onChange:e=>{let{url:t}=e;c(t),w.current.focus()}})))))}})}));function yS(e){let{url:t,urlLabel:n,className:r}=e;const o=c()(r,"block-editor-url-popover__link-viewer-url");return t?(0,a.createElement)(f.ExternalLink,{className:o,href:t},n||(0,nf.filterURLForDisplay)((0,nf.safeDecodeURI)(t))):(0,a.createElement)("span",{className:o})}function mS(e){let{additionalControls:t,children:n,renderSettings:r,position:o="bottom center",focusOnMount:i="firstElement",...s}=e;const[c,u]=(0,a.useState)(!1),p=!!r&&c;return(0,a.createElement)(f.Popover,l({className:"block-editor-url-popover",focusOnMount:i,position:o,shift:!0},s),(0,a.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,a.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&(0,a.createElement)(f.Button,{className:"block-editor-url-popover__settings-toggle",icon:jf,label:(0,m.__)("Link settings"),onClick:()=>{u(!c)},"aria-expanded":c})),p&&(0,a.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!p&&(0,a.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}mS.LinkEditor=function(e){let{autocompleteRef:t,className:n,onChangeInputValue:r,value:o,...i}=e;return(0,a.createElement)("form",l({className:c()("block-editor-url-popover__link-editor",n)},i),(0,a.createElement)(Ak,{value:o,onChange:r,autocompleteRef:t}),(0,a.createElement)(f.Button,{icon:bk,label:(0,m.__)("Apply"),type:"submit"}))},mS.LinkViewer=function(e){let{className:t,linkClassName:n,onEditLinkClick:r,url:o,urlLabel:i,...s}=e;return(0,a.createElement)("div",l({className:c()("block-editor-url-popover__link-viewer",t)},s),(0,a.createElement)(yS,{url:o,urlLabel:i,className:n}),r&&(0,a.createElement)(f.Button,{icon:Yk,label:(0,m.__)("Edit"),onClick:r}))};var gS=mS;const hS=()=>{},bS=e=>{let{src:t,onChange:n,onSubmit:r,onClose:o}=e;return(0,a.createElement)(gS,{onClose:o},(0,a.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},(0,a.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,m.__)("URL"),placeholder:(0,m.__)("Paste or type URL"),onChange:n,value:t}),(0,a.createElement)(f.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:bk,label:(0,m.__)("Apply"),type:"submit"})))};var vS=(0,f.withFilters)("editor.MediaPlaceholder")((function(e){let{value:t={},allowedTypes:n,className:r,icon:o,labels:i={},mediaPreview:l,notices:s,isAppender:u,accept:p,addToGallery:y,multiple:g=!1,handleUpload:h=!0,disableDropZone:b,disableMediaButtons:v,onError:_,onSelect:k,onCancel:S,onSelectURL:E,onToggleFeaturedImage:w,onDoubleClick:A,onFilesPreUpload:C=hS,onHTMLDrop:I=hS,children:x,mediaLibraryButton:B,placeholder:P,style:T}=e;const O=(0,d.useSelect)((e=>{const{getSettings:t}=e(sr);return t().mediaUpload}),[]),[R,N]=(0,a.useState)(""),[F,M]=(0,a.useState)(!1);(0,a.useEffect)((()=>{var e;N(null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"")}),[null==t?void 0:t.src]);const D=e=>{N(e.target.value)},L=()=>{M(!0)},U=()=>{M(!1)},j=e=>{e.preventDefault(),R&&E&&(E(R),U())},z=e=>{if(!h)return k(e);let r;if(C(e),g)if(y){let e=[];r=n=>{const r=(null!=t?t:[]).filter((t=>t.id?!e.some((e=>{let{id:n}=e;return Number(n)===Number(t.id)})):!e.some((e=>{let{urlSlug:n}=e;return t.url.includes(n)}))));k(r.concat(n)),e=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else r=k;else r=e=>{let[t]=e;return k(t)};O({allowedTypes:n,filesList:e,onFileChange:r,onError:_})},V=e=>{z(e.target.files)},G=null!=P?P:e=>{let{instructions:t,title:p}=i;if(O||E||(t=(0,m.__)("To edit this block, you need permission to upload media.")),void 0===t||void 0===p){const e=null!=n?n:[],[r]=e,o=1===e.length,i=o&&"audio"===r,l=o&&"image"===r,a=o&&"video"===r;void 0===t&&O&&(t=(0,m.__)("Upload a media file or pick one from your media library."),i?t=(0,m.__)("Upload an audio file, pick one from your media library, or add one with a URL."):l?t=(0,m.__)("Upload an image file, pick one from your media library, or add one with a URL."):a&&(t=(0,m.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===p&&(p=(0,m.__)("Media"),i?p=(0,m.__)("Audio"):l?p=(0,m.__)("Image"):a&&(p=(0,m.__)("Video")))}const d=c()("block-editor-media-placeholder",r,{"is-appender":u});return(0,a.createElement)(f.Placeholder,{icon:o,label:p,instructions:t,className:d,notices:s,onDoubleClick:A,preview:l,style:T},e,x)},H=()=>b?null:(0,a.createElement)(f.DropZone,{onFilesDrop:z,onHTMLDrop:I}),W=()=>S&&(0,a.createElement)(f.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,m.__)("Cancel"),variant:"link",onClick:S},(0,m.__)("Cancel")),$=()=>E&&(0,a.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,a.createElement)(f.Button,{className:"block-editor-media-placeholder__button",onClick:L,isPressed:F,variant:"tertiary"},(0,m.__)("Insert from URL")),F&&(0,a.createElement)(bS,{src:R,onChange:D,onSubmit:j,onClose:U})),K=()=>w&&(0,a.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,a.createElement)(f.Button,{className:"block-editor-media-placeholder__button",onClick:w,variant:"tertiary"},(0,m.__)("Use featured image")));return v?(0,a.createElement)(uS,null,H()):(0,a.createElement)(uS,{fallback:G($())},(()=>{const e=null!=B?B:e=>{let{open:t}=e;return(0,a.createElement)(f.Button,{variant:"tertiary",onClick:()=>{t()}},(0,m.__)("Media Library"))},r=(0,a.createElement)(cS,{addToGallery:y,gallery:g&&!(!n||0===n.length)&&n.every((e=>"image"===e||e.startsWith("image/"))),multiple:g,onSelect:k,allowedTypes:n,mode:"browse",value:Array.isArray(t)?t.map((e=>{let{id:t}=e;return t})):t.id,render:e});if(O&&u)return(0,a.createElement)(a.Fragment,null,H(),(0,a.createElement)(f.FormFileUpload,{onChange:V,accept:p,multiple:g,render:e=>{let{openFileDialog:t}=e;const n=(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.Button,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:t},(0,m.__)("Upload")),r,$(),K(),W());return G(n)}}));if(O){const e=(0,a.createElement)(a.Fragment,null,H(),(0,a.createElement)(f.FormFileUpload,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:V,accept:p,multiple:g},(0,m.__)("Upload")),r,$(),K(),W());return G(e)}return G(r)})())}));var _S=e=>{let{colorSettings:t,...n}=e;const r=t.map((e=>{if(!e)return e;const{value:t,onChange:n,...r}=e;return{...r,colorValue:t,onColorChange:n}}));return(0,a.createElement)(N_,l({settings:r,gradients:[],disableCustomGradients:!0},n))};const kS={position:"bottom right",isAlternate:!0};var SS=()=>(0,a.createElement)(a.Fragment,null,["bold","italic","link"].map((e=>(0,a.createElement)(f.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,a.createElement)(f.Slot,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((e=>{let[{props:t}]=e;return t})).some((e=>{let{isActive:t}=e;return t}));return(0,a.createElement)(f.ToolbarItem,null,(n=>(0,a.createElement)(f.DropdownMenu,{icon:jf,label:(0,m.__)("More"),toggleProps:{...n,className:c()(n.className,{"is-pressed":t}),describedBy:(0,m.__)("Displays more block tools")},controls:(0,u.orderBy)(e.map((e=>{let[{props:t}]=e;return t})),"title"),popoverProps:kS})))})));function ES(e){let{value:t,editableContentElement:n,activeFormats:r}=e;const o=r[r.length-1],i=null==o?void 0:o.type,l=(0,d.useSelect)((e=>e(L.store).getFormatType(i)),[i]),s=(0,L.useAnchor)({editableContentElement:n,value:t,settings:l});return(0,a.createElement)(wS,{popoverAnchor:s})}function wS(e){let{popoverAnchor:t}=e;return(0,a.createElement)(f.Popover,{position:"top center",focusOnMount:!1,anchor:t,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,a.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(SS,null))))}var AS=e=>{let{inline:t,editableContentElement:n,value:r}=e;const o=(0,d.useSelect)((e=>e(sr).getSettings().hasInlineToolbar),[]);if(t)return(0,a.createElement)(wS,{popoverAnchor:n});if(o){const e=(0,L.getActiveFormats)(r);return(0,L.isCollapsed)(r)&&!e.length?null:(0,a.createElement)(ES,{editableContentElement:n,value:r,activeFormats:e})}return(0,a.createElement)(br,{group:"inline"},(0,a.createElement)(SS,null))};function CS(){const{didAutomaticChange:e,getSettings:t}=(0,d.useSelect)(sr);return(0,p.useRefEffect)((n=>{function r(n){const{keyCode:r}=n;n.defaultPrevented||r!==cu.DELETE&&r!==cu.BACKSPACE&&r!==cu.ESCAPE||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}}),[])}function IS(e){return e.filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)})).map((e=>``)).join("")}var xS=window.wp.shortcode;function BS(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function PS(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function TS(e){let{allowedFormats:t,formattingControls:n,disableFormats:r}=e;return r?TS.EMPTY_ARRAY:t||n?t||(j()("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats",version:"6.2"}),n.map((e=>`core/${e}`))):void 0}TS.EMPTY_ARRAY=[];function OS(e){let{value:t,pastedBlocks:n=[],onReplace:r,onSplit:o,onSplitMiddle:i,multilineTag:l}=e;if(!r||!o)return;const{start:a=0,end:s=0}=t,c={...t,start:a,end:s},u=[],[p,d]=(0,L.split)(c),f=n.length>0;let y=-1;const m=(0,L.isEmpty)(p)&&!(0,L.isEmpty)(d);f&&(0,L.isEmpty)(p)||(u.push(o((0,L.toHTMLString)({value:p,multilineTag:l}),!m)),y+=1),f?(u.push(...n),y+=n.length):i&&u.push(i()),(f||i)&&(0,L.isEmpty)(d)||u.push(o((0,L.toHTMLString)({value:d,multilineTag:l}),m));r(u,f?y:1,f?-1:0)}function RS(e,t){return t?(0,L.replace)(e,/\n+/g,L.__UNSTABLE_LINE_SEPARATOR):(0,L.replace)(e,new RegExp(L.__UNSTABLE_LINE_SEPARATOR,"g"),"\n")}function NS(e){const t=(0,a.useRef)(e);return t.current=e,(0,p.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:r,onChange:i,value:l,formatTypes:a,tagName:s,onReplace:c,onSplit:u,onSplitMiddle:p,__unstableEmbedURLOnPaste:d,multilineTag:f,preserveWhiteSpace:y,pastePlainText:m}=t.current;if(!n)return;const{clipboardData:g}=e;let h="",b="";try{h=g.getData("text/plain"),b=g.getData("text/html")}catch(e){try{b=g.getData("Text")}catch(e){return}}if(b=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;e=e.substring(n+t.length);const r="\x3c!--EndFragment--\x3e",o=e.indexOf(r);o>-1&&(e=e.substring(0,o));return e}(b),b=function(e){const t="";if(e.startsWith(t))return e.slice(t.length);return e}(b),e.preventDefault(),window.console.log("Received HTML:\n\n",b),window.console.log("Received plain text:\n\n",h),r)return void i((0,L.insert)(l,h));const v=a.reduce(((e,t)=>{let{__unstablePasteRule:n}=t;return n&&e===l&&(e=n(l,{html:b,plainText:h})),e}),l);if(v!==l)return void i(v);const _=[...(0,Hi.getFilesFromDataTransfer)(g)];if("true"===g.getData("rich-text")){const e=g.getData("rich-text-multi-line-tag")||void 0;let t=(0,L.create)({html:b,multilineTag:e,multilineWrapperTags:"li"===e?["ul","ol"]:void 0,preserveWhiteSpace:y});return t=RS(t,!!f),BS(t,l.activeFormats),void i((0,L.insert)(l,t))}if(m)return void i((0,L.insert)(l,(0,L.create)({text:h})));if(null!=_&&_.length&&!Ny(_,b)){const e=(0,o.pasteHandler)({HTML:IS(_),mode:"BLOCKS",tagName:s,preserveWhiteSpace:y});return window.console.log("Received items:\n\n",_),void(c&&(0,L.isEmpty)(l)?c(e):OS({value:l,pastedBlocks:e,onReplace:c,onSplit:u,onSplitMiddle:p,multilineTag:f}))}let k=c&&u?"AUTO":"INLINE";var S;"AUTO"===k&&(0,L.isEmpty)(l)&&(S=h,(0,xS.regexp)(".*").test(S))&&(k="BLOCKS"),d&&(0,L.isEmpty)(l)&&(0,nf.isURL)(h.trim())&&(k="BLOCKS");const E=(0,o.pasteHandler)({HTML:b,plainText:h,mode:k,tagName:s,preserveWhiteSpace:y});if("string"==typeof E){let e=(0,L.create)({html:E});e=RS(e,!!f),BS(e,l.activeFormats),i((0,L.insert)(l,e))}else E.length>0&&(c&&(0,L.isEmpty)(l)?c(E,E.length-1,-1):OS({value:l,pastedBlocks:E,onReplace:c,onSplit:u,onSplitMiddle:p,multilineTag:f}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}const FS=["`",'"',"'","“”","‘’"];function MS(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,d.useDispatch)(sr),r=(0,a.useRef)(e);return r.current=e,(0,p.useRefEffect)((e=>{function o(o){const{inputType:l,data:a}=o,{value:s,onChange:c}=r.current;if("insertText"!==l)return;if((0,L.isCollapsed)(s))return;const u=(0,i.applyFilters)("blockEditor.wrapSelectionSettings",FS).find((e=>{let[t,n]=e;return t===a||n===a}));if(!u)return;const[p,d=p]=u,f=s.start,y=s.end+p.length;let m=(0,L.insert)(s,p,f,f);m=(0,L.insert)(m,d,y,y),t(),c(m),n();const g={};for(const e in o)g[e]=o[e];g.data=d;const{ownerDocument:h}=e,{defaultView:b}=h,v=new b.InputEvent("input",g);o.target.dispatchEvent(v),o.preventDefault()}return e.addEventListener("beforeinput",o),()=>{e.removeEventListener("beforeinput",o)}}),[])}function DS(e){let t=e.length;for(;t--;){const n=Yt(e[t].attributes);if(n)return e[t].attributes[n]=e[t].attributes[n].replace(Jt,""),e[t].clientId;const r=DS(e[t].innerBlocks);if(r)return r}}function LS(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,d.useDispatch)(sr),r=(0,a.useRef)(e);return r.current=e,(0,p.useRefEffect)((e=>{function i(){const{value:e,onReplace:t,selectionChange:i}=r.current;if(!t)return;const{start:l,text:a}=e;if(" "!==a.slice(l-1,l))return;const s=a.slice(0,l).trim(),c=(0,o.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"prefix"===t})),u=(0,o.findTransform)(c,(e=>{let{prefix:t}=e;return s===t}));if(!u)return;const p=(0,L.toHTMLString)({value:(0,L.insert)(e,Jt,0,l)}),d=u.transform(p);i(DS([d])),t([d]),n()}function l(e){const{inputType:o,type:l}=e,{value:a,onChange:s,__unstableAllowPrefixTransformations:c,formatTypes:u}=r.current;if("insertText"!==o&&"compositionend"!==l)return;c&&i&&i();const p=u.reduce(((e,t)=>{let{__unstableInputRule:n}=t;return n&&(e=n(e)),e}),function(e){const t="tales of gutenberg",{start:n,text:r}=e;return n{e.removeEventListener("input",l),e.removeEventListener("compositionend",l)}}),[])}function US(e){const{__unstableMarkAutomaticChange:t}=(0,d.useDispatch)(sr),n=(0,a.useRef)(e);return n.current=e,(0,p.useRefEffect)((e=>{function r(e){if(e.defaultPrevented)return;const{removeEditorOnlyFormats:r,value:i,onReplace:l,onSplit:a,onSplitMiddle:s,multilineTag:c,onChange:u,disableLineBreaks:p,onSplitAtEnd:d}=n.current;if(e.keyCode!==cu.ENTER)return;e.preventDefault();const f={...i};f.formats=r(i);const y=l&&a;if(l){const e=(0,o.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"enter"===t})),n=(0,o.findTransform)(e,(e=>e.regExp.test(f.text)));n&&(l([n.transform({content:f.text})]),t())}if(c)e.shiftKey?p||u((0,L.insert)(f,"\n")):y&&(0,L.__unstableIsEmptyLine)(f)?OS({value:f,onReplace:l,onSplit:a,onSplitMiddle:s,multilineTag:c}):u((0,L.__unstableInsertLineSeparator)(f));else{const{text:t,start:n,end:r}=f,o=d&&n===r&&r===t.length;e.shiftKey||!y&&!o?p||u((0,L.insert)(f,"\n")):!y&&o?d():y&&OS({value:f,onReplace:l,onSplit:a,onSplitMiddle:s,multilineTag:c})}}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}function jS(e){return e(L.store).getFormatTypes()}const zS=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function VS(e,t){return"object"!=typeof e?{[t]:e}:Object.fromEntries(Object.entries(e).map((e=>{let[n,r]=e;return[`${t}.${n}`,r]})))}function GS(e,t){return e[t]?e[t]:Object.keys(e).filter((e=>e.startsWith(t+"."))).reduce(((n,r)=>(n[r.slice(t.length+1)]=e[r],n)),{})}function HS(e){return(0,p.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function WS(e){return(0,p.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function $S(){const{isMultiSelecting:e}=(0,d.useSelect)(sr);return(0,p.useRefEffect)((t=>{function n(){if(!e())return;const n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}),[])}function KS(e){let{formatTypes:t,onChange:n,onFocus:r,value:o,forwardedRef:i}=e;return t.map((e=>{const{name:t,edit:l}=e;if(!l)return null;const s=(0,L.getActiveFormat)(o,t);let c=void 0!==s;const p=(0,L.getActiveObject)(o),d=void 0!==p&&p.type===t;if("core/link"===t&&!(0,L.isCollapsed)(o)){const e=o.formats,t=(0,u.find)(e[o.start],{type:"core/link"}),n=(0,u.find)(e[o.end-1],{type:"core/link"});t&&n&&t===n||(c=!1)}return(0,a.createElement)(l,{key:t,isActive:c,activeAttributes:c&&s.attributes||{},isObjectActive:d,activeObjectAttributes:d&&p.attributes||{},value:o,onChange:n,onFocus:r,contentRef:i})}))}const qS=(0,a.createContext)(),JS=(0,a.createContext)();const YS=(0,a.forwardRef)((function e(t,n){let{children:r,tagName:i="div",value:s="",onChange:u,isSelected:y,multiline:m,inlineToolbar:g,wrapperClassName:h,autocompleters:b,onReplace:v,placeholder:_,allowedFormats:k,formattingControls:S,withoutInteractiveFormatting:E,onRemove:w,onMerge:A,onSplit:C,__unstableOnSplitAtEnd:I,__unstableOnSplitMiddle:x,identifier:B,preserveWhiteSpace:P,__unstablePastePlainText:T,__unstableEmbedURLOnPaste:O,__unstableDisableFormats:R,disableLineBreaks:N,unstableOnFocus:F,__unstableAllowPrefixTransformations:M,...D}=t;m&&j()("wp.blockEditor.RichText multiline prop",{since:"6.1",version:"6.3",alternative:"nested blocks (InnerBlocks)",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/"});const U=(0,p.useInstanceId)(e);B=B||U,D=function(e){const{__unstableMobileNoFocusOnMount:t,deleteEnter:n,placeholderTextColor:r,textAlign:o,selectionColor:i,tagsToEliminate:l,rootTagsToEliminate:a,disableEditingMenu:s,fontSize:c,fontFamily:u,fontWeight:p,fontStyle:d,minWidth:f,maxWidth:y,setRef:m,disableSuggestions:g,disableAutocorrection:h,...b}=e;return b}(D);const z=(0,a.useRef)(),{clientId:V}=dr(),{selectionStart:G,selectionEnd:H,isSelected:W}=(0,d.useSelect)((e=>{const{getSelectionStart:t,getSelectionEnd:n}=e(sr),r=t(),o=n();let i;return void 0===y?i=r.clientId===V&&o.clientId===V&&r.attributeKey===B:y&&(i=r.clientId===V),{selectionStart:i?r.offset:void 0,selectionEnd:i?o.offset:void 0,isSelected:i}})),{selectionChange:$}=(0,d.useDispatch)(sr),K=PS(m),q=TS({allowedFormats:k,formattingControls:S,disableFormats:R}),J=!q||q.length>0;let Y=s,Q=u;Array.isArray(s)&&(j()("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),Y=o.children.toHTML(s),Q=e=>u(o.children.fromDOM((0,L.__unstableCreateElement)(document,e).childNodes)));const Z=(0,a.useCallback)(((e,t)=>{const n={},r=void 0===e&&void 0===t;("number"==typeof e||r)&&(n.start={clientId:V,attributeKey:B,offset:e}),("number"==typeof t||r)&&(n.end={clientId:V,attributeKey:B,offset:t}),$(n)}),[V,B]),{formatTypes:X,prepareHandlers:ee,valueHandlers:te,changeHandlers:ne,dependencies:re}=function(e){let{clientId:t,identifier:n,withoutInteractiveFormatting:r,allowedFormats:o}=e;const i=(0,d.useSelect)(jS,[]),l=(0,a.useMemo)((()=>i.filter((e=>{let{name:t,tagName:n}=e;return!(o&&!o.includes(t)||r&&zS.has(n))}))),[i,o,zS]),s=(0,d.useSelect)((e=>l.reduce(((r,o)=>o.__experimentalGetPropsForEditableTreePreparation?{...r,...VS(o.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:n,blockClientId:t}),o.name)}:r),{})),[l,t,n]),c=(0,d.useDispatch)(),u=[],p=[],f=[],y=[];for(const e in s)y.push(s[e]);return l.forEach((e=>{if(e.__experimentalCreatePrepareEditableTree){const r=e.__experimentalCreatePrepareEditableTree(GS(s,e.name),{richTextIdentifier:n,blockClientId:t});e.__experimentalCreateOnChangeEditableValue?p.push(r):u.push(r)}if(e.__experimentalCreateOnChangeEditableValue){let r={};e.__experimentalGetPropsForEditableTreeChangeHandler&&(r=e.__experimentalGetPropsForEditableTreeChangeHandler(c,{richTextIdentifier:n,blockClientId:t}));const o=GS(s,e.name);f.push(e.__experimentalCreateOnChangeEditableValue({..."object"==typeof o?o:{},...r},{richTextIdentifier:n,blockClientId:t}))}})),{formatTypes:l,prepareHandlers:u,valueHandlers:p,changeHandlers:f,dependencies:y}}({clientId:V,identifier:B,withoutInteractiveFormatting:E,allowedFormats:q});function oe(e){return X.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,L.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:ie,onChange:le,ref:ae}=(0,L.__unstableUseRichText)({value:Y,onChange(e,t){let{__unstableFormats:n,__unstableText:r}=t;Q(e),Object.values(ne).forEach((e=>{e(n,r)}))},selectionStart:G,selectionEnd:H,onSelectionChange:Z,placeholder:_,__unstableIsSelected:W,__unstableMultilineTag:K,__unstableDisableFormats:R,preserveWhiteSpace:P,__unstableDependencies:[...re,i],__unstableAfterParse:function(e){return te.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:oe,__unstableAddInvisibleFormats:function(e){return ee.reduce(((t,n)=>n(t,e.text)),e.formats)}}),se=function(e){return(0,f.__unstableUseAutocompleteProps)({...e,completers:_v(e)})}({onReplace:v,completers:b,record:ie,onChange:le});!function(e){let{html:t,value:n}=e;const r=(0,a.useRef)(),o=n.activeFormats&&!!n.activeFormats.length,{__unstableMarkLastChangeAsPersistent:i}=(0,d.useDispatch)(sr);(0,a.useLayoutEffect)((()=>{if(r.current){if(r.current!==n.text){const e=window.setTimeout((()=>{i()}),1e3);return r.current=n.text,()=>{window.clearTimeout(e)}}i()}else r.current=n.text}),[t,o])}({html:Y,value:ie});const ce=(0,a.useRef)(new Set),ue=(0,a.useRef)(new Set);function pe(){var e;null===(e=z.current)||void 0===e||e.focus()}const de=i;return(0,a.createElement)(a.Fragment,null,W&&(0,a.createElement)(qS.Provider,{value:ce},(0,a.createElement)(JS.Provider,{value:ue},(0,a.createElement)(f.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},r&&r({value:ie,onChange:le,onFocus:pe}),(0,a.createElement)(KS,{value:ie,onChange:le,onFocus:pe,formatTypes:X,forwardedRef:z})))),W&&J&&(0,a.createElement)(AS,{inline:g,editableContentElement:z.current,value:ie}),(0,a.createElement)(de,l({role:"textbox","aria-multiline":!N,"aria-label":_},D,se,{ref:(0,p.useMergeRefs)([n,se.ref,D.ref,ae,MS({value:ie,onChange:le}),LS({value:ie,onChange:le,__unstableAllowPrefixTransformations:M,formatTypes:X,onReplace:v,selectionChange:$}),(0,p.useRefEffect)((e=>{function t(e){(cu.isKeyboardEvent.primary(e,"z")||cu.isKeyboardEvent.primary(e,"y")||cu.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),HS(ce),WS(ue),CS(),NS({isSelected:W,disableFormats:R,onChange:le,value:ie,formatTypes:X,tagName:i,onReplace:v,onSplit:C,onSplitMiddle:x,__unstableEmbedURLOnPaste:O,multilineTag:K,preserveWhiteSpace:P,pastePlainText:T}),US({removeEditorOnlyFormats:oe,value:ie,onReplace:v,onSplit:C,onSplitMiddle:x,multilineTag:K,onChange:le,disableLineBreaks:N,onSplitAtEnd:I}),$S(),z]),contentEditable:!0,suppressContentEditableWarning:!0,className:c()("block-editor-rich-text__editable",D.className,"rich-text"),onFocus:F,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===cu.DELETE||t===cu.BACKSPACE)){const{start:n,end:r,text:o}=ie,i=t===cu.BACKSPACE,l=ie.activeFormats&&!!ie.activeFormats.length;if(!(0,L.isCollapsed)(ie)||l||i&&0!==n||!i&&r!==o.length)return;A&&A(!i),w&&(0,L.isEmpty)(ie)&&i&&w(!i),e.preventDefault()}}})))}));YS.Content=e=>{let{value:t,tagName:n,multiline:r,...i}=e;Array.isArray(t)&&(j()("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),t=o.children.toHTML(t));const l=PS(r);!t&&l&&(t=`<${l}>`);const s=(0,a.createElement)(a.RawHTML,null,t);if(n){const{format:e,...t}=i;return(0,a.createElement)(n,t,s)}return s},YS.isEmpty=e=>!e||0===e.length;var QS=YS;const ZS=(0,a.forwardRef)(((e,t)=>(0,a.createElement)(QS,l({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));ZS.Content=e=>{let{value:t="",tagName:n="div",...r}=e;return(0,a.createElement)(n,r,t)};var XS=ZS;var eE=(0,a.forwardRef)(((e,t)=>{let{__experimentalVersion:n,...r}=e;if(2===n)return(0,a.createElement)(XS,l({ref:t},r));const{className:o,onChange:i,...s}=r;return(0,a.createElement)(sl.Z,l({ref:t,className:c()("block-editor-plain-text",o),onChange:e=>i(e.target.value)},s))}));function tE(e){let{property:t,viewport:n,desc:r}=e;const o=(0,p.useInstanceId)(tE),i=r||(0,m.sprintf)((0,m._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(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{"aria-describedby":`rbc-desc-${o}`},n.label),(0,a.createElement)(f.VisuallyHidden,{as:"span",id:`rbc-desc-${o}`},i))}var nE=function(e){const{title:t,property:n,toggleLabel:r,onIsResponsiveChange:o,renderDefaultControl:i,renderResponsiveControls:l,isResponsive:s=!1,defaultLabel:u={id:"all",label:(0,m.__)("All")},viewports:p=[{id:"small",label:(0,m.__)("Small screens")},{id:"medium",label:(0,m.__)("Medium screens")},{id:"large",label:(0,m.__)("Large screens")}]}=e;if(!t||!n||!i)return null;const d=r||(0,m.sprintf)((0,m.__)("Use the same %s on all screensizes."),n),y=(0,m.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),g=i((0,a.createElement)(tE,{property:n,viewport:u}),u);return(0,a.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,a.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,a.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,a.createElement)(f.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:d,checked:!s,onChange:o,help:y}),(0,a.createElement)("div",{className:c()("block-editor-responsive-block-control__group",{"is-responsive":s})},!s&&g,s&&(l?l(p):p.map((e=>(0,a.createElement)(a.Fragment,{key:e.id},i((0,a.createElement)(tE,{property:n,viewport:e}),e))))))))};function rE(e){let{character:t,type:n,onUse:r}=e;const o=(0,a.useContext)(qS),i=(0,a.useRef)();return i.current=r,(0,a.useEffect)((()=>{function e(e){cu.isKeyboardEvent[n](e,t)&&(i.current(),e.preventDefault())}return o.current.add(e),()=>{o.current.delete(e)}}),[t,n]),null}function oE(e){let t,{name:n,shortcutType:r,shortcutCharacter:o,...i}=e,s="RichText.ToolbarControls";return n&&(s+=`.${n}`),r&&o&&(t=cu.displayShortcut[r](o)),(0,a.createElement)(f.Fill,{name:s},(0,a.createElement)(f.ToolbarButton,l({},i,{shortcut:t})))}function iE(e){let{inputType:t,onInput:n}=e;const r=(0,a.useContext)(JS),o=(0,a.useRef)();return o.current=n,(0,a.useEffect)((()=>{function e(e){e.inputType===t&&(o.current(),e.preventDefault())}return r.current.add(e),()=>{r.current.delete(e)}}),[t]),null}const lE=(0,a.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,a.createElement)(f.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 aE=(0,a.forwardRef)((function(e,t){const n=(0,d.useSelect)((e=>e(sr).__unstableGetEditorMode()),[]),{__unstableSetEditorMode:r}=(0,d.useDispatch)(sr);return(0,a.createElement)(f.Dropdown,{renderToggle:r=>{let{isOpen:o,onToggle:i}=r;return(0,a.createElement)(f.Button,l({},e,{ref:t,icon:"navigation"===n?lE:Yk,"aria-expanded":o,"aria-haspopup":"true",onClick:i,label:(0,m.__)("Tools")}))},position:"bottom right",renderContent:()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.NavigableMenu,{role:"menu","aria-label":(0,m.__)("Tools")},(0,a.createElement)(f.MenuItemsChoice,{value:"navigation"===n?"navigation":"edit",onSelect:r,choices:[{value:"edit",label:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ui,{icon:Yk}),(0,m.__)("Edit"))},{value:"navigation",label:(0,a.createElement)(a.Fragment,null,lE,(0,m.__)("Select"))}]})),(0,a.createElement)("div",{className:"block-editor-tool-selector__help"},(0,m.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function sE(e){let{units:t,...n}=e;const r=(0,f.__experimentalUseCustomUnits)({availableUnits:Kr("spacing.units")||["%","px","em","rem","vw"],units:t});return(0,a.createElement)(f.__experimentalUnitControl,l({units:r},n))}var cE=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"}));class uE extends a.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,r=e?(0,m.__)("Edit link"):(0,m.__)("Insert link");return(0,a.createElement)("div",{className:"block-editor-url-input__button"},(0,a.createElement)(f.Button,{icon:Xr,label:r,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,a.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,a.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,a.createElement)(f.Button,{className:"block-editor-url-input__back",icon:cE,label:(0,m.__)("Close"),onClick:this.toggle}),(0,a.createElement)(Ak,{value:e||"",onChange:t}),(0,a.createElement)(f.Button,{icon:bk,label:(0,m.__)("Submit"),type:"submit"}))))}}var pE=uE;var dE=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));const fE="none",yE="custom",mE="media",gE="attachment",hE=["noreferrer","noopener"],bE=(0,a.createElement)(f.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(f.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,a.createElement)(f.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"}),(0,a.createElement)(f.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),vE=e=>{let{linkDestination:t,onChangeUrl:n,url:r,mediaType:o="image",mediaUrl:i,mediaLink:l,linkTarget:s,linkClass:c,rel:p}=e;const[d,y]=(0,a.useState)(!1),[g,h]=(0,a.useState)(null),b=(0,a.useCallback)((()=>{y(!0)})),[v,_]=(0,a.useState)(!1),[k,S]=(0,a.useState)(null),E=(0,a.useRef)(null),w=(0,a.useCallback)((()=>{t!==mE&&t!==gE||S(""),_(!0)})),A=(0,a.useCallback)((()=>{_(!1)})),C=(0,a.useCallback)((()=>{S(null),A(),y(!1)})),I=(0,a.useCallback)((()=>e=>{const t=E.current;t&&t.contains(e.target)||(y(!1),S(null),A())})),x=(0,a.useCallback)((()=>e=>{if(k){var t;const e=(null===(t=P().find((e=>e.url===k)))||void 0===t?void 0:t.linkDestination)||yE;n({href:k,linkDestination:e})}A(),S(null),e.preventDefault()})),B=(0,a.useCallback)((()=>{n({linkDestination:fE,href:""})})),P=()=>{const e=[{linkDestination:mE,title:(0,m.__)("Media File"),url:"image"===o?i:void 0,icon:bE}];return"image"===o&&l&&e.push({linkDestination:gE,title:(0,m.__)("Attachment Page"),url:"image"===o?l:void 0,icon:(0,a.createElement)(f.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(f.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,a.createElement)(f.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},T=(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.ToggleControl,{label:(0,m.__)("Open in new tab"),onChange:e=>{const t=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(null!=p?p:"").split(" ");hE.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=p?p:"").split(" ").filter((e=>!1===hE.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);n(t)},checked:"_blank"===s}),(0,a.createElement)(f.TextControl,{label:(0,m.__)("Link Rel"),value:null!=p?p:"",onChange:e=>{n({rel:e})}}),(0,a.createElement)(f.TextControl,{label:(0,m.__)("Link CSS Class"),value:c||"",onChange:e=>{n({linkClass:e})}})),O=null!==k?k:r,R=((0,u.find)(P(),["linkDestination",t])||{}).title;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.ToolbarButton,{icon:Xr,className:"components-toolbar__control",label:r?(0,m.__)("Edit link"):(0,m.__)("Insert link"),"aria-expanded":d,onClick:b,ref:h}),d&&(0,a.createElement)(gS,{anchor:g,onFocusOutside:I(),onClose:C,renderSettings:()=>T,additionalControls:!O&&(0,a.createElement)(f.NavigableMenu,null,(0,u.map)(P(),(e=>(0,a.createElement)(f.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{S(null),(e=>{const t=P();let r;r=e?((0,u.find)(t,(t=>t.url===e))||{linkDestination:yE}).linkDestination:fE,n({linkDestination:r,href:e})})(e.url),A()}},e.title))))},(!r||v)&&(0,a.createElement)(gS.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:O,onChangeInputValue:S,onSubmit:x(),autocompleteRef:E}),r&&!v&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(gS.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:r,onEditLinkClick:w,urlLabel:R}),(0,a.createElement)(f.Button,{icon:dE,label:(0,m.__)("Remove link"),onClick:B}))))};function _E(e){let{children:t,viewLabel:n,className:r,isEnabled:o=!0,deviceType:i,setDeviceType:l}=e;if((0,p.useViewportMatch)("small","<"))return null;const s={className:c()(r,"block-editor-post-preview__dropdown-content"),position:"bottom left"},u={variant:"tertiary",className:"block-editor-post-preview__button-toggle",disabled:!o,children:n},d={"aria-label":(0,m.__)("View options")};return(0,a.createElement)(f.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:s,toggleProps:u,menuProps:d,icon:null},(()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.MenuGroup,null,(0,a.createElement)(f.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Desktop"),icon:"Desktop"===i&&py},(0,m.__)("Desktop")),(0,a.createElement)(f.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Tablet"),icon:"Tablet"===i&&py},(0,m.__)("Tablet")),(0,a.createElement)(f.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Mobile"),icon:"Mobile"===i&&py},(0,m.__)("Mobile"))),t)))}function kE(e){const[t,n]=(0,a.useState)(window.innerWidth);(0,a.useEffect)((()=>{if("Desktop"===e)return;const t=()=>n(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]);const r=e=>{let n;switch(e){case"Tablet":n=780;break;case"Mobile":n=360;break;default:return null}return n{const t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:r(e),margin:(window.innerHeight<800?36:72)+"px auto",height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}})(e)}var SE=(0,d.withSelect)((e=>({selectedBlockClientId:e(sr).getBlockSelectionStart()})))((e=>{let{selectedBlockClientId:t}=e;const n=Tr(t);return t?(0,a.createElement)(f.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{n.current.focus()}},(0,m.__)("Skip to the selected block")):null})),EE=window.wp.wordcount;var wE=(0,d.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(sr);return{blocks:t()}}))((function(e){let{blocks:t}=e;const n=(0,EE.count)((0,o.serialize)(t),"words");return(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,a.createElement)(Au,{icon:ly,showColors:!0}),(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,m.sprintf)((0,m._n)("%d block","%d blocks",t.length),t.length)),(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,m.sprintf)((0,m._n)("%d word","%d words",n),n))))}));function AE(e){let{blockName:t}=e;const{preferredStyle:n,onUpdatePreferredStyleVariations:r,styles:i}=(0,d.useSelect)((e=>{var n,r;const i=e(sr).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==i||null===(n=i.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(r=null==i?void 0:i.onChange)&&void 0!==r?r:null,styles:e(o.store).getBlockStyles(t)}}),[t]),l=(0,a.useMemo)((()=>[{label:(0,m.__)("Not set"),value:""},...i.map((e=>{let{label:t,name:n}=e;return{label:t,value:n}}))]),[i]),s=(0,a.useMemo)((()=>{var e;return null===(e=my(i))||void 0===e?void 0:e.name}),[i]),c=(0,a.useCallback)((e=>{r(t,e)}),[t,r]);return n&&n!==s?r&&(0,a.createElement)("div",{className:"default-style-picker__default-switcher"},(0,a.createElement)(f.SelectControl,{options:l,value:n||"",label:(0,m.__)("Default Style"),onChange:c})):null}function CE(e,t){const n=(0,a.useMemo)((()=>e.reduce(((e,t)=>("core/list-item"!==t.name&&Object.entries(t.attributes).some((e=>{let[,{__experimentalRole:t}]=e;return"content"===t}))&&(e[t.name]=!0),e)),{})),[e]),r=(0,a.useCallback)((e=>!!n[e]),[e]);return(0,a.useMemo)((()=>IE([t],r)),[t,r])}function IE(e,t){const n=[];for(const r of e)t(r.name)&&n.push(r),n.push(...IE(r.innerBlocks,t));return n}function xE(e){let{blockTypes:t,block:n,selectedBlock:r}=e;const{selectBlock:o}=(0,d.useDispatch)(sr),i=t.find((e=>{let{name:t}=e;return t===n.name})),l=r&&r.clientId===n.clientId;return(0,a.createElement)(f.Button,{isPressed:l,onClick:()=>o(n.clientId)},(0,a.createElement)(f.__experimentalHStack,{justify:"flex-start"},(0,a.createElement)(Au,{icon:i.icon}),(0,a.createElement)(f.FlexItem,null,i.title)))}function BE(e){let{topLevelLockedBlock:t}=e;const{blockTypes:n,block:r,selectedBlock:i}=(0,d.useSelect)((e=>({blockTypes:e(o.store).getBlockTypes(),block:e(sr).getBlock(t),selectedBlock:e(sr).getSelectedBlock()})),[t]),l=Rf(t),s=CE(n,r);return(0,a.createElement)("div",{className:"block-editor-block-inspector"},(0,a.createElement)(Cu,l),(0,a.createElement)(S_,{blockClientId:t}),(0,a.createElement)(f.__experimentalVStack,{spacing:1,padding:4,className:"block-editor-block-inspector__block-buttons-container"},(0,a.createElement)("h2",{className:"block-editor-block-card__title"},(0,m.__)("Content")),s.map((e=>(0,a.createElement)(xE,{selectedBlock:i,key:e.clientId,block:e,blockTypes:n})))))}const PE=e=>{let{clientId:t,blockName:n}=e;const r=(0,d.useSelect)((e=>{const{getBlockStyles:t}=e(o.store),r=t(n);return r&&r.length>0}),[n]),i=Rf(t);return(0,a.createElement)("div",{className:"block-editor-block-inspector"},(0,a.createElement)(Cu,i),(0,a.createElement)(S_,{blockClientId:t}),r&&(0,a.createElement)("div",null,(0,a.createElement)(f.PanelBody,{title:(0,m.__)("Styles")},(0,a.createElement)(l_,{scope:"core/block-inspector",clientId:t}),(0,o.hasBlockSupport)(n,"defaultStylePicker",!0)&&(0,a.createElement)(AE,{blockName:n}))),(0,a.createElement)(go.Slot,null),(0,a.createElement)(go.Slot,{__experimentalGroup:"color",label:(0,m.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,a.createElement)(go.Slot,{__experimentalGroup:"typography",label:(0,m.__)("Typography")}),(0,a.createElement)(go.Slot,{__experimentalGroup:"dimensions",label:(0,m.__)("Dimensions")}),(0,a.createElement)(go.Slot,{__experimentalGroup:"border",label:(0,m.__)("Border")}),(0,a.createElement)("div",null,(0,a.createElement)(TE,null)),(0,a.createElement)(SE,{key:"back"}))},TE=()=>{const e=(0,f.__experimentalUseSlot)(mo.slotName);return Boolean(e.fills&&e.fills.length)?(0,a.createElement)(f.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,m.__)("Advanced"),initialOpen:!1},(0,a.createElement)(go.Slot,{__experimentalGroup:"advanced"})):null};var OE=e=>{let{showNoBlockSelectedMessage:t=!0}=e;const{count:n,selectedBlockName:r,selectedBlockClientId:i,blockType:l,topLevelLockedBlock:s}=(0,d.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:r,__unstableGetContentLockingParent:i,getTemplateLock:l}=e(sr),a=t(),s=a&&r(a),c=s&&(0,o.getBlockType)(s);return{count:n(),selectedBlockClientId:a,selectedBlockName:s,blockType:c,topLevelLockedBlock:i(a)||("contentOnly"===l(a)?a:void 0)}}),[]);if(n>1)return(0,a.createElement)("div",{className:"block-editor-block-inspector"},(0,a.createElement)(wE,null),(0,a.createElement)(go.Slot,null),(0,a.createElement)(go.Slot,{__experimentalGroup:"color",label:(0,m.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,a.createElement)(go.Slot,{__experimentalGroup:"typography",label:(0,m.__)("Typography")}),(0,a.createElement)(go.Slot,{__experimentalGroup:"dimensions",label:(0,m.__)("Dimensions")}),(0,a.createElement)(go.Slot,{__experimentalGroup:"border",label:(0,m.__)("Border")}));const c=r===(0,o.getUnregisteredTypeHandlerName)();return l&&i&&!c?s?(0,a.createElement)(BE,{topLevelLockedBlock:s}):(0,a.createElement)(PE,{clientId:i,blockName:l.name}):t?(0,a.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,m.__)("No block selected.")):null};var RE=function(e){let{__unstableContentRef:t}=e;const[n,r]=(0,a.useState)(!1),o=(0,d.useSelect)((e=>e(sr).getBlockOrder()),[]);return(0,a.useEffect)((()=>{const e=setTimeout((()=>{r(!0)}),500);return()=>{clearTimeout(e)}}),[]),n?o.map(((e,n)=>n===o.length-1?null:(0,a.createElement)(Cf,{key:e,previousClientId:e,nextClientId:o[n+1],__unstableContentRef:t},(0,a.createElement)("div",{className:"block-editor-block-list__insertion-point-inserter is-with-inserter"},(0,a.createElement)(vf,{position:"bottom center",clientId:o[n+1],__experimentalIsQuick:!0}))))):null};function NE(e){let{children:t,__unstableContentRef:n,...r}=e;const o=(0,p.useViewportMatch)("medium"),{hasFixedToolbar:i,isZoomOutMode:s}=(0,d.useSelect)((e=>{const{__unstableGetEditorMode:t,getSettings:n}=e(sr);return{isZoomOutMode:"zoom-out"===t(),hasFixedToolbar:n().hasFixedToolbar}}),[]),c=(0,Lu.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:u,getBlockRootClientId:y}=(0,d.useSelect)(sr),{duplicateBlocks:m,removeBlocks:g,insertAfterBlock:h,insertBeforeBlock:b,clearSelectedBlock:v,moveBlocksUp:_,moveBlocksDown:k}=(0,d.useDispatch)(sr);const S=vo(n),E=vo(n);return(0,a.createElement)("div",l({},r,{onKeyDown:function(e){if(!e.defaultPrevented)if(c("core/block-editor/move-up",e)){const t=u();if(t.length){e.preventDefault();const n=y(t[0]);_(t,n)}}else if(c("core/block-editor/move-down",e)){const t=u();if(t.length){e.preventDefault();const n=y(t[0]);k(t,n)}}else if(c("core/block-editor/duplicate",e)){const t=u();t.length&&(e.preventDefault(),m(t))}else if(c("core/block-editor/remove",e)){const t=u();t.length&&(e.preventDefault(),g(t))}else if(c("core/block-editor/insert-after",e)){const t=u();t.length&&(e.preventDefault(),h(t[t.length-1]))}else if(c("core/block-editor/insert-before",e)){const t=u();t.length&&(e.preventDefault(),b(t[0]))}else if(c("core/block-editor/unselect",e)){u().length&&(e.preventDefault(),v(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges(),null==n||n.current.focus())}}}),(0,a.createElement)(If.Provider,{value:(0,a.useRef)(!1)},!s&&(0,a.createElement)(Bf,{__unstableContentRef:n}),!s&&(i||!o)&&(0,a.createElement)(hm,{isFixed:!0}),(0,a.createElement)(wm,{__unstableContentRef:n}),(0,a.createElement)(f.Popover.Slot,{name:"block-toolbar",ref:S}),t,(0,a.createElement)(f.Popover.Slot,{name:"__unstable-block-tools-after",ref:E}),s&&(0,a.createElement)(RE,{__unstableContentRef:n})))}const FE=()=>{};var ME=(0,a.forwardRef)((function(e,t){let{rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,showMostUsedBlocks:l=!1,__experimentalInsertionIndex:s,__experimentalFilterValue:c,onSelect:u=FE,shouldFocusBlock:p=!1}=e;const{destinationRootClientId:f,prioritizePatterns:y}=(0,d.useSelect)((e=>{const{getBlockRootClientId:t,getSettings:o}=e(sr);return{destinationRootClientId:n||t(r)||void 0,prioritizePatterns:o().__experimentalPreferPatternsOnRoot}}),[r,n]);return(0,a.createElement)(mf,{onSelect:u,rootClientId:f,clientId:r,isAppender:o,showInserterHelpPanel:i,showMostUsedBlocks:l,__experimentalInsertionIndex:s,__experimentalFilterValue:c,shouldFocusBlock:p,prioritizePatterns:y,ref:t})}));function DE(){return null}DE.Register=function(){const{registerShortcut:e}=(0,d.useDispatch)(Lu.store);return(0,a.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,m.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,m.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,m.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,m.__)("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:(0,m.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,m.__)("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:(0,m.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,m.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,m.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,m.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var LE=DE;function UE(){return j()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const jE=new Set([cu.UP,cu.RIGHT,cu.DOWN,cu.LEFT,cu.ENTER,cu.BACKSPACE]);function zE(){const e=(0,d.useSelect)((e=>e(sr).isTyping()),[]),{stopTyping:t}=(0,d.useDispatch)(sr);return(0,p.useRefEffect)((n=>{if(!e)return;const{ownerDocument:r}=n;let o,i;function l(e){const{clientX:n,clientY:r}=e;o&&i&&(o!==n||i!==r)&&t(),o=n,i=r}return r.addEventListener("mousemove",l),()=>{r.removeEventListener("mousemove",l)}}),[e,t])}function VE(){const{isTyping:e,hasInlineToolbar:t}=(0,d.useSelect)((e=>{const{isTyping:t,getSettings:n}=e(sr);return{isTyping:t(),hasInlineToolbar:n().hasInlineToolbar}}),[]),{startTyping:n,stopTyping:r}=(0,d.useDispatch)(sr),o=zE(),i=(0,p.useRefEffect)((o=>{const{ownerDocument:i}=o,{defaultView:l}=i,a=l.getSelection();if(e){let c;function u(e){const{target:t}=e;c=l.setTimeout((()=>{(0,Hi.isTextField)(t)||r()}))}function p(e){const{keyCode:t}=e;t!==cu.ESCAPE&&t!==cu.TAB||r()}function d(){a.isCollapsed||r()}return o.addEventListener("focus",u),o.addEventListener("keydown",p),t||i.addEventListener("selectionchange",d),()=>{l.clearTimeout(c),o.removeEventListener("focus",u),o.removeEventListener("keydown",p),i.removeEventListener("selectionchange",d)}}function s(e){const{type:t,target:r}=e;(0,Hi.isTextField)(r)&&o.contains(r)&&("keydown"!==t||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&jE.has(t)}(e))&&n()}return o.addEventListener("keypress",s),o.addEventListener("keydown",s),()=>{o.removeEventListener("keypress",s),o.removeEventListener("keydown",s)}}),[e,t,n,r]);return(0,p.useMergeRefs)([o,i])}var GE=function(e){let{children:t}=e;return(0,a.createElement)("div",{ref:VE()},t)};const HE=-1!==window.navigator.userAgent.indexOf("Trident"),WE=new Set([cu.UP,cu.DOWN,cu.LEFT,cu.RIGHT]);function $E(){const e=(0,d.useSelect)((e=>e(sr).hasSelectedBlock()),[]);return(0,p.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:r}=n;let o,i,l;function a(){o||(o=r.requestAnimationFrame((()=>{d(),o=null})))}function s(e){i&&r.cancelAnimationFrame(i),i=r.requestAnimationFrame((()=>{c(e),i=null}))}function c(e){let{keyCode:o}=e;if(!f())return;const i=(0,Hi.computeCaretRect)(r);if(!i)return;if(!l)return void(l=i);if(WE.has(o))return void(l=i);const a=i.top-l.top;if(0===a)return;const s=(0,Hi.getScrollContainer)(t);if(!s)return;const c=s===n.body,u=c?r.scrollY:s.scrollTop,p=c?0:s.getBoundingClientRect().top,d=c?l.top/r.innerHeight:(l.top-p)/(r.innerHeight-p);if(0===u&&d<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(l=i);const y=c?r.innerHeight:s.clientHeight;l.top+l.height>p+y||l.top{r.removeEventListener("scroll",a,!0),r.removeEventListener("resize",a,!0),t.removeEventListener("keydown",s),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",p),r.cancelAnimationFrame(o),r.cancelAnimationFrame(i)}}),[e])}var KE=HE?e=>e.children:function(e){let{children:t}=e;return(0,a.createElement)("div",{ref:$E(),className:"block-editor__typewriter"},t)};const qE=(0,a.createContext)({});function JE(e){let{children:t,uniqueId:n,blockName:r=""}=e;const o=(0,a.useContext)(qE),{name:i}=dr();r=r||i;const l=(0,a.useMemo)((()=>function(e,t,n){const r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(n),r}(o,r,n)),[o,r,n]);return(0,a.createElement)(qE.Provider,{value:l},t)}function YE(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=(0,a.useContext)(qE),{name:o}=dr();return n=n||o,Boolean(null===(t=r[n])||void 0===t?void 0:t.has(e))}var QE=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));function ZE(e){let{title:t,help:n,actions:r=[],onClose:o}=e;return(0,a.createElement)(f.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4},(0,a.createElement)(f.__experimentalHStack,{alignment:"center"},(0,a.createElement)(f.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13},t),(0,a.createElement)(f.__experimentalSpacer,null),r.map((e=>{let{label:t,icon:n,onClick:r}=e;return(0,a.createElement)(f.Button,{key:t,className:"block-editor-inspector-popover-header__action",label:t,icon:n,variant:!n&&"tertiary",onClick:r},!n&&t)})),o&&(0,a.createElement)(f.Button,{className:"block-editor-inspector-popover-header__action",label:(0,m.__)("Close"),icon:QE,onClick:o})),n&&(0,a.createElement)(f.__experimentalText,null,n))}var XE=(0,a.forwardRef)((function(e,t){let{onClose:n,onChange:r,...o}=e;return(0,a.createElement)("div",{ref:t,className:"block-editor-publish-date-time-picker"},(0,a.createElement)(ZE,{title:(0,m.__)("Publish"),actions:[{label:(0,m.__)("Now"),onClick:()=>null==r?void 0:r(null)}],onClose:n}),(0,a.createElement)(f.DateTimePicker,l({startOfWeek:(0,C_.getSettings)().l10n.startOfWeek,__nextRemoveHelpButton:!0,__nextRemoveResetButton:!0,onChange:r},o)))}));const ew={button:"wp-element-button",caption:"wp-element-caption"},tw=e=>ew[e]?ew[e]:"";function nw(e,t){return Object.entries(t).every((t=>{let[n,r]=t;return"object"==typeof r&&"object"==typeof e[n]?nw(e[n],r):e[n]===r}))}const rw=(e,t)=>{if(!t||!e)return;const n=t.filter((t=>{let{attributes:n}=t;return!(!n||!Object.keys(n).length)&&nw(e,n)}));return 1===n.length?n[0]:void 0};function ow(e){const t=null==e?void 0:e.trim().match(/^(0?[-.]?\d*\.?\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/);return isNaN(e)||isNaN(parseFloat(e))?t?{value:parseFloat(t[1])||t[1],unit:t[2]}:{value:e,unit:void 0}:{value:parseFloat(e),unit:"px"}}function iw(e,t){const n=e.split(/[(),]/g).filter(Boolean),r=n.slice(1).map((e=>ow(uw(e,t)).value)).filter(Boolean);switch(n[0]){case"min":return Math.min(...r)+"px";case"max":return Math.max(...r)+"px";case"clamp":return 3!==r.length?null:r[1]r[2]?r[2]+"px":r[1]+"px";case"calc":return r[0]+"px"}}function lw(e){for(;;){const t=e,n=/(max|min|calc|clamp)\(([^()]*)\)/g.exec(e)||[];if(n[0]){const t=iw(n[0]);e=e.replace(n[0],t)}if(e===t||parseFloat(e))break}return ow(e)}function aw(e){for(let t=0;to.height?o.width:o.height)*r,"%":("font"===o.type?o.fontSize:o.width)*r,ch:8,ex:7.15625,lh:o.lineHeight},l={in:n,cm:37.79527559055118,mm:3.7795275590551185,pt:1.3333333333333333,pc:16,px:1,Q:.9448818897637794};return i[e.unit]?(i[e.unit]*e.value).toFixed(0)+"px":l[e.unit]?(l[e.unit]*e.value).toFixed(0)+"px":null}function uw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isFinite(e))return e.toFixed(0)+"px";if(void 0===e)return null;let n=ow(e);return n.unit||(n=lw(e)),aw(e)&&!n.unit?sw(e):cw(n,t)}const pw={};function dw(e){let t="";return e.hasOwnProperty("fontSize")&&(t=":"+e.width),e.hasOwnProperty("lineHeight")&&(t=":"+e.lineHeight),e.hasOwnProperty("width")&&(t=":"+e.width),e.hasOwnProperty("height")&&(t=":"+e.height),e.hasOwnProperty("type")&&(t=":"+e.type),t}var fw=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e+dw(t);return pw[n]||(pw[n]=uw(e,t)),pw[n]}}(),(window.wp=window.wp||{}).blockEditor=r}(); \ No newline at end of file diff --git a/wp-includes/js/dist/block-library.js b/wp-includes/js/dist/block-library.js index e1d7cc4c9e..75578d13ef 100644 --- a/wp-includes/js/dist/block-library.js +++ b/wp-includes/js/dist/block-library.js @@ -21,193 +21,6 @@ module.exports = function isBlockMetadataExperimental(metadata) { }; -/***/ }), - -/***/ 3827: -/***/ (function(module, exports) { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ -/* global define */ - -(function () { - 'use strict'; - - var classNames = (function () { - // don't inherit from Object so we can skip hasOwnProperty check later - // http://stackoverflow.com/questions/15518328/creating-js-object-with-object-createnull#answer-21079232 - function StorageObject() {} - StorageObject.prototype = Object.create(null); - - function _parseArray (resultSet, array) { - var length = array.length; - - for (var i = 0; i < length; ++i) { - _parse(resultSet, array[i]); - } - } - - var hasOwn = {}.hasOwnProperty; - - function _parseNumber (resultSet, num) { - resultSet[num] = true; - } - - function _parseObject (resultSet, object) { - if (object.toString !== Object.prototype.toString && !object.toString.toString().includes('[native code]')) { - resultSet[object.toString()] = true; - return; - } - - for (var k in object) { - if (hasOwn.call(object, k)) { - // set value to false instead of deleting it to avoid changing object structure - // https://www.smashingmagazine.com/2012/11/writing-fast-memory-efficient-javascript/#de-referencing-misconceptions - resultSet[k] = !!object[k]; - } - } - } - - var SPACE = /\s+/; - function _parseString (resultSet, str) { - var array = str.split(SPACE); - var length = array.length; - - for (var i = 0; i < length; ++i) { - resultSet[array[i]] = true; - } - } - - function _parse (resultSet, arg) { - if (!arg) return; - var argType = typeof arg; - - // 'foo bar' - if (argType === 'string') { - _parseString(resultSet, arg); - - // ['foo', 'bar', ...] - } else if (Array.isArray(arg)) { - _parseArray(resultSet, arg); - - // { 'foo': true, ... } - } else if (argType === 'object') { - _parseObject(resultSet, arg); - - // '130' - } else if (argType === 'number') { - _parseNumber(resultSet, arg); - } - } - - function _classNames () { - // don't leak arguments - // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments - var len = arguments.length; - var args = Array(len); - for (var i = 0; i < len; i++) { - args[i] = arguments[i]; - } - - var classSet = new StorageObject(); - _parseArray(classSet, args); - - var list = []; - - for (var k in classSet) { - if (classSet[k]) { - list.push(k) - } - } - - return list.join(' '); - } - - return _classNames; - })(); - - if ( true && module.exports) { - classNames.default = classNames; - module.exports = classNames; - } else if (true) { - // register as 'classnames', consistent with npm package name - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return classNames; - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} -}()); - - -/***/ }), - -/***/ 4403: -/***/ (function(module, exports) { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ -/* global define */ - -(function () { - 'use strict'; - - var hasOwn = {}.hasOwnProperty; - var nativeCodeString = '[native code]'; - - function classNames() { - var classes = []; - - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i]; - if (!arg) continue; - - var argType = typeof arg; - - if (argType === 'string' || argType === 'number') { - classes.push(arg); - } else if (Array.isArray(arg)) { - if (arg.length) { - var inner = classNames.apply(null, arg); - if (inner) { - classes.push(inner); - } - } - } else if (argType === 'object') { - if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { - classes.push(arg.toString()); - continue; - } - - for (var key in arg) { - if (hasOwn.call(arg, key) && arg[key]) { - classes.push(key); - } - } - } - } - - return classes.join(' '); - } - - if ( true && module.exports) { - classNames.default = classNames; - module.exports = classNames; - } else if (true) { - // register as 'classnames', consistent with npm package name - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return classNames; - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} -}()); - - /***/ }), /***/ 5027: @@ -1057,6 +870,7 @@ var characterMap = { "ş": "s", "Š": "S", "š": "s", + "ß": "ss", "Ţ": "T", "ţ": "t", "ț": "t", @@ -1236,6 +1050,10 @@ var characterMap = { "x̧": "x", "Z̧": "Z", "z̧": "z", + "й":"и", + "Й":"И", + "ё":"е", + "Ё":"Е", }; var chars = Object.keys(characterMap).join('|'); @@ -1259,6 +1077,210 @@ module.exports.has = hasAccents; module.exports.remove = removeAccents; +/***/ }), + +/***/ 4526: +/***/ (function(module, exports) { + +var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ +/* global define */ + +(function () { + 'use strict'; + + var classNames = (function () { + // don't inherit from Object so we can skip hasOwnProperty check later + // http://stackoverflow.com/questions/15518328/creating-js-object-with-object-createnull#answer-21079232 + function StorageObject() {} + StorageObject.prototype = Object.create(null); + + function _parseArray (resultSet, array) { + var length = array.length; + + for (var i = 0; i < length; ++i) { + _parse(resultSet, array[i]); + } + } + + var hasOwn = {}.hasOwnProperty; + + function _parseNumber (resultSet, num) { + resultSet[num] = true; + } + + function _parseObject (resultSet, object) { + if (object.toString !== Object.prototype.toString && !object.toString.toString().includes('[native code]')) { + resultSet[object.toString()] = true; + return; + } + + for (var k in object) { + if (hasOwn.call(object, k)) { + // set value to false instead of deleting it to avoid changing object structure + // https://www.smashingmagazine.com/2012/11/writing-fast-memory-efficient-javascript/#de-referencing-misconceptions + resultSet[k] = !!object[k]; + } + } + } + + var SPACE = /\s+/; + function _parseString (resultSet, str) { + var array = str.split(SPACE); + var length = array.length; + + for (var i = 0; i < length; ++i) { + resultSet[array[i]] = true; + } + } + + function _parse (resultSet, arg) { + if (!arg) return; + var argType = typeof arg; + + // 'foo bar' + if (argType === 'string') { + _parseString(resultSet, arg); + + // ['foo', 'bar', ...] + } else if (Array.isArray(arg)) { + _parseArray(resultSet, arg); + + // { 'foo': true, ... } + } else if (argType === 'object') { + _parseObject(resultSet, arg); + + // '130' + } else if (argType === 'number') { + _parseNumber(resultSet, arg); + } + } + + function _classNames () { + // don't leak arguments + // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments + var len = arguments.length; + var args = Array(len); + for (var i = 0; i < len; i++) { + args[i] = arguments[i]; + } + + var classSet = new StorageObject(); + _parseArray(classSet, args); + + var list = []; + + for (var k in classSet) { + if (classSet[k]) { + list.push(k) + } + } + + return list.join(' '); + } + + return _classNames; + })(); + + if ( true && module.exports) { + classNames.default = classNames; + module.exports = classNames; + } else if (true) { + // register as 'classnames', consistent with npm package name + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { + return classNames; + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +}()); + + +/***/ }), + +/***/ 7153: +/***/ (function(module, exports) { + +var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ +/* global define */ + +(function () { + 'use strict'; + + var hasOwn = {}.hasOwnProperty; + + function classNames () { + var classes = ''; + + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + if (arg) { + classes = appendClass(classes, parseValue(arg)); + } + } + + return classes; + } + + function parseValue (arg) { + if (typeof arg === 'string' || typeof arg === 'number') { + return arg; + } + + if (typeof arg !== 'object') { + return ''; + } + + if (Array.isArray(arg)) { + return classNames.apply(null, arg); + } + + if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { + return arg.toString(); + } + + var classes = ''; + + for (var key in arg) { + if (hasOwn.call(arg, key) && arg[key]) { + classes = appendClass(classes, key); + } + } + + return classes; + } + + function appendClass (value, newClass) { + if (!newClass) { + return value; + } + + if (value) { + return value + ' ' + newClass; + } + + return value + newClass; + } + + if ( true && module.exports) { + classNames.default = classNames; + module.exports = classNames; + } else if (true) { + // register as 'classnames', consistent with npm package name + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { + return classNames; + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +}()); + + /***/ }) /******/ }); @@ -2507,7 +2529,7 @@ function _extends() { return _extends.apply(this, arguments); } // EXTERNAL MODULE: ./node_modules/classnames/index.js -var classnames = __webpack_require__(4403); +var classnames = __webpack_require__(7153); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); ;// CONCATENATED MODULE: external ["wp","url"] var external_wp_url_namespaceObject = window["wp"]["url"]; @@ -3062,7 +3084,7 @@ const WP_EMBED_TYPE = 'wp-embed'; ;// CONCATENATED MODULE: external "lodash" var external_lodash_namespaceObject = window["lodash"]; // EXTERNAL MODULE: ./node_modules/classnames/dedupe.js -var dedupe = __webpack_require__(3827); +var dedupe = __webpack_require__(4526); var dedupe_default = /*#__PURE__*/__webpack_require__.n(dedupe); // EXTERNAL MODULE: ./node_modules/memize/index.js var memize = __webpack_require__(9756); diff --git a/wp-includes/js/dist/block-library.min.js b/wp-includes/js/dist/block-library.min.js index e09ffa4497..ae8e8d9419 100644 --- a/wp-includes/js/dist/block-library.min.js +++ b/wp-includes/js/dist/block-library.min.js @@ -1,14 +1,14 @@ /*! This file is auto-generated */ -!function(){var e={7078:function(e){e.exports=function(e){return e&&"__experimental"in e&&!1!==e.__experimental}},3827:function(e,t){var n; -/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/!function(){"use strict";var o=function(){function e(){}function t(e,t){for(var n=t.length,o=0;oa?(s=r/a,l=c,i=Math.round(l/s)):(s=a/r,i=c,l=Math.round(i/s)),(l>r||i>a||lo?-1:n===o?0:1})),p=o(d[0],5),g=p[0],h=p[1],v=p[2],b=p[3],_=p[4];return b?[Math.round(g/b),Math.round(h/b),Math.round(v/b),Math.round(b/_)]:[0,0,0,0]}},{key:"_bindImageEvents",value:function(e,t,n){var o=this,r=(n=n||{})&&n.data,a=this._getDefaultColor(n),l=function(){c(),t.call(e,o.getColor(e,n),r)},i=function(){c(),t.call(e,o._prepareResult(a,new Error("Image error")),r)},s=function(){c(),t.call(e,o._prepareResult(a,new Error("Image abort")),r)},c=function(){e.removeEventListener("load",l),e.removeEventListener("error",i),e.removeEventListener("abort",s)};e.addEventListener("load",l),e.addEventListener("error",i),e.addEventListener("abort",s)}},{key:"_prepareResult",value:function(e,t){var n=e.slice(0,3),o=[].concat(n,e[3]/255),r=this._isDark(e);return{error:t,value:e,rgb:"rgb("+n.join(",")+")",rgba:"rgba("+o.join(",")+")",hex:this._arrayToHex(n),hexa:this._arrayToHex(e),isDark:r,isLight:!r}}},{key:"_getOriginalSize",value:function(e){return e instanceof HTMLImageElement?{width:e.naturalWidth,height:e.naturalHeight}:e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.width,height:e.height}}},{key:"_toHex",value:function(e){var t=e.toString(16);return 1===t.length?"0"+t:t}},{key:"_arrayToHex",value:function(e){return"#"+e.map(this._toHex).join("")}},{key:"_isDark",value:function(e){return(299*e[0]+587*e[1]+114*e[2])/1e3<128}},{key:"_makeCanvas",value:function(){return"undefined"==typeof window?new OffscreenCanvas(1,1):document.createElement("canvas")}}]),t}()}()},9756:function(e){e.exports=function(e,t){var n,o,r=0;function a(){var a,l,i=n,s=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(l=0;ln({displayAsDropdown:!a})}),a&&(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show label"),checked:o,onChange:()=>n({showLabel:!o})}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show post counts"),checked:r,onChange:()=>n({showPostCounts:!r})}),(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("Group by:"),options:[{label:(0,je.__)("Year"),value:"yearly"},{label:(0,je.__)("Month"),value:"monthly"},{label:(0,je.__)("Week"),value:"weekly"},{label:(0,je.__)("Day"),value:"daily"}],value:l,onChange:e=>n({type:e})}))),(0,$e.createElement)("div",(0,Ze.useBlockProps)(),(0,$e.createElement)(We.Disabled,null,(0,$e.createElement)(Ke(),{block:"core/archives",attributes:t}))))}},et=()=>qe({name:Je,metadata:Ye,settings:Xe});var tt=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"}));function nt(){return nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{getSettings:t}=e(Ze.store),{__experimentalDiscussionSettings:n}=t();return n}));return e}const ut={who:"authors",per_page:-1,_fields:"id,name",context:"view"};var mt=function(e){let{value:t,onChange:n}=e;const[o,r]=(0,$e.useState)(),a=(0,it.useSelect)((e=>{const{getUsers:t}=e(lt.store);return t(ut)}),[]);if(!a)return null;const l=a.map((e=>({label:e.name,value:e.id})));return(0,$e.createElement)(We.ComboboxControl,{label:(0,je.__)("User"),help:(0,je.__)("Select the avatar user to display, if it is blank it will use the post/page author."),value:t,onChange:n,options:o||l,onFilterValueChange:e=>r(l.filter((t=>t.label.toLowerCase().startsWith(e.toLowerCase()))))})};const dt=e=>{let{setAttributes:t,avatar:n,attributes:o,selectUser:r}=e;return(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Image size"),onChange:e=>t({size:e}),min:n.minSize,max:n.maxSize,initialPosition:null==o?void 0:o.size,value:null==o?void 0:o.size}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Link to user profile"),onChange:()=>t({isLink:!o.isLink}),checked:o.isLink}),o.isLink&&(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Open in new tab"),onChange:e=>t({linkTarget:e?"_blank":"_self"}),checked:"_blank"===o.linkTarget}),r&&(0,$e.createElement)(mt,{value:null==o?void 0:o.userId,onChange:e=>{t({userId:e})}})))},pt=e=>{let{setAttributes:t,attributes:n,avatar:o,blockProps:r,isSelected:a}=e;const l=(0,Ze.__experimentalUseBorderProps)(n),i=(0,at.addQueryArgs)((0,at.removeQueryArgs)(null==o?void 0:o.src,["s"]),{s:2*(null==n?void 0:n.size)});return(0,$e.createElement)("div",r,(0,$e.createElement)(We.ResizableBox,{size:{width:n.size,height:n.size},showHandle:a,onResizeStop:(e,o,r,a)=>{t({size:parseInt(n.size+(a.height||a.width),10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,je.isRTL)(),bottom:!0,left:(0,je.isRTL)()},minWidth:o.minSize,maxWidth:o.maxSize},(0,$e.createElement)("img",nt({src:i,alt:o.alt},l,{className:rt()("avatar","avatar-"+n.size,"photo","wp-block-avatar__image",l.className),style:{...l.style}}))))},gt=e=>{let{attributes:t,context:n,setAttributes:o,isSelected:r}=e;const{commentId:a}=n,l=(0,Ze.useBlockProps)(),i=function(e){let{commentId:t}=e;const[n]=(0,lt.useEntityProp)("root","comment","author_avatar_urls",t),[o]=(0,lt.useEntityProp)("root","comment","author_name",t),r=n?Object.values(n):null,a=n?Object.keys(n):null,{minSize:l,maxSize:i}=st(a),s=ct();return{src:r?r[r.length-1]:s,minSize:l,maxSize:i,alt:o?(0,je.sprintf)((0,je.__)("%s Avatar"),o):(0,je.__)("Default Avatar")}}({commentId:a});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(dt,{avatar:i,setAttributes:o,attributes:t,selectUser:!1}),t.isLink?(0,$e.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,$e.createElement)(pt,{attributes:t,avatar:i,blockProps:l,isSelected:r,setAttributes:o})):(0,$e.createElement)(pt,{attributes:t,avatar:i,blockProps:l,isSelected:r,setAttributes:o}))},ht=e=>{let{attributes:t,context:n,setAttributes:o,isSelected:r}=e;const{postId:a,postType:l}=n,i=function(e){let{userId:t,postId:n,postType:o}=e;const{authorDetails:r}=(0,it.useSelect)((e=>{var r;const{getEditedEntityRecord:a,getUser:l}=e(lt.store);if(t)return{authorDetails:l(t)};const i=null===(r=a("postType",o,n))||void 0===r?void 0:r.author;return{authorDetails:i?l(i):null}}),[o,n,t]),a=null!=r&&r.avatar_urls?Object.values(r.avatar_urls):null,l=null!=r&&r.avatar_urls?Object.keys(r.avatar_urls):null,{minSize:i,maxSize:s}=st(l),c=ct();return{src:a?a[a.length-1]:c,minSize:i,maxSize:s,alt:r?(0,je.sprintf)((0,je.__)("%s Avatar"),null==r?void 0:r.name):(0,je.__)("Default Avatar")}}({userId:null==t?void 0:t.userId,postId:a,postType:l}),s=(0,Ze.useBlockProps)();return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(dt,{selectUser:!0,attributes:t,avatar:i,setAttributes:o}),(0,$e.createElement)("div",null,t.isLink?(0,$e.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,$e.createElement)(pt,{attributes:t,avatar:i,blockProps:s,isSelected:r,setAttributes:o})):(0,$e.createElement)(pt,{attributes:t,avatar:i,blockProps:s,isSelected:r,setAttributes:o})))};const vt={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/avatar",title:"Avatar",category:"theme",description:"Add a user's avatar.",textdomain:"default",attributes:{userId:{type:"number"},size:{type:"number",default:96},isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},usesContext:["postType","postId","commentId"],supports:{html:!1,align:!0,alignWide:!1,spacing:{margin:!0,padding:!0},__experimentalBorder:{__experimentalSkipSerialization:!0,radius:!0,width:!0,color:!0,style:!0,__experimentalDefaultControls:{radius:!0}},color:{text:!1,background:!1,__experimentalDuotone:"img"}},editorStyle:"wp-block-avatar",style:"wp-block-avatar"},{name:bt}=vt,_t={icon:tt,edit:function(e){var t,n;return null!=e&&null!==(t=e.context)&&void 0!==t&&t.commentId||null===(null==e||null===(n=e.context)||void 0===n?void 0:n.commentId)?(0,$e.createElement)(gt,e):(0,$e.createElement)(ht,e)}},yt=()=>qe({name:bt,metadata:vt,settings:_t});var ft=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"})),kt=[{attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{align:!0},save(e){let{attributes:t}=e;const{autoplay:n,caption:o,loop:r,preload:a,src:l}=t;return(0,$e.createElement)("figure",null,(0,$e.createElement)("audio",{controls:"controls",src:l,autoPlay:n,loop:r,preload:a}),!Ze.RichText.isEmpty(o)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",value:o}))}}],xt=window.wp.blob,wt=window.wp.notices;const Et=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.78",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],Ct="wp-embed";var St=window.lodash,Bt=n(3827),Tt=n.n(Bt),Nt=n(9756),Pt=n.n(Nt);const{name:It}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1},previewable:{type:"boolean",default:!0}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},zt=e=>{var t;return null===(t=(0,Ge.getBlockVariations)(It))||void 0===t?void 0:t.find((t=>{let{patterns:n}=t;return function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).some((t=>e.match(t)))}(e,n)}))},Mt=e=>e&&e.includes('class="wp-embedded-content"'),Lt=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{preview:o,attributes:r={}}=e,{url:a,providerNameSlug:l,type:i,...s}=r;if(!a||!(0,Ge.getBlockType)(It))return;const c=zt(a),u="wordpress"===l||i===Ct,m=!u&&c&&(c.attributes.providerNameSlug!==l||!l);if(m)return(0,Ge.createBlock)(It,{url:a,...s,...c.attributes});const d=null===(t=(0,Ge.getBlockVariations)(It))||void 0===t?void 0:t.find((e=>{let{name:t}=e;return"wordpress"===t}));return d&&o&&Mt(o.html)&&!u?(0,Ge.createBlock)(It,{url:a,...d.attributes,...n}):void 0},Rt=e=>{if(!e)return e;const t=Et.reduce(((e,t)=>{let{className:n}=t;return e[n]=!1,e}),{"wp-has-aspect-ratio":!1});return Tt()(e,t)};function At(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!n)return Rt(t);const o=document.implementation.createHTMLDocument("");o.body.innerHTML=e;const r=o.body.querySelector("iframe");if(r&&r.height&&r.width){const e=(r.width/r.height).toFixed(2);for(let n=0;n=o.ratio){return e-o.ratio>.1?Rt(t):Tt()(Rt(t),o.className,"wp-has-aspect-ratio")}}}return t}const Vt=Pt()((function(e,t,n,o){let r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(!e)return{};const a={};let{type:l="rich"}=e;const{html:i,provider_name:s}=e,c=(0,St.kebabCase)((s||t).toLowerCase());return Mt(i)&&(l=Ct),(i||"photo"===l)&&(a.type=l,a.providerNameSlug=c),a.className=At(i,n,o&&r),a})),Ht=function(e,t,n,o){let r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const{allowResponsive:a,className:l}=e;return{...e,...Vt(t,n,r?void 0:l,o,a)}},Ft=["audio"];var Dt=function(e){let{attributes:t,className:n,setAttributes:o,onReplace:r,isSelected:a,insertBlocksAfter:l}=e;const{id:i,autoplay:s,caption:c,loop:u,preload:m,src:d}=t,p=!i&&(0,xt.isBlobURL)(d),g=(0,it.useSelect)((e=>{const{getSettings:t}=e(Ze.store);return t().mediaUpload}),[]);function h(e){return t=>{o({[e]:t})}}function v(e){if(e!==d){const t=Lt({attributes:{url:e}});if(void 0!==t&&r)return void r(t);o({src:e,id:void 0})}}(0,$e.useEffect)((()=>{if(!i&&(0,xt.isBlobURL)(d)){const e=(0,xt.getBlobByURL)(d);e&&g({filesList:[e],onFileChange:e=>{let[t]=e;return y(t)},onError:e=>_(e),allowedTypes:Ft})}}),[]);const{createErrorNotice:b}=(0,it.useDispatch)(wt.store);function _(e){b(e,{type:"snackbar"})}function y(e){e&&e.url?o({src:e.url,id:e.id}):o({src:void 0,id:void 0})}const f=rt()(n,{"is-transient":p}),k=(0,Ze.useBlockProps)({className:f});return d?(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"other"},(0,$e.createElement)(Ze.MediaReplaceFlow,{mediaId:i,mediaURL:d,allowedTypes:Ft,accept:"audio/*",onSelect:y,onSelectURL:v,onError:_})),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Autoplay"),onChange:h("autoplay"),checked:s,help:function(e){return e?(0,je.__)("Autoplay may cause usability issues for some users."):null}}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Loop"),onChange:h("loop"),checked:u}),(0,$e.createElement)(We.SelectControl,{label:(0,je._x)("Preload","noun; Audio block parameter"),value:m||"",onChange:e=>o({preload:e||void 0}),options:[{value:"",label:(0,je.__)("Browser default")},{value:"auto",label:(0,je.__)("Auto")},{value:"metadata",label:(0,je.__)("Metadata")},{value:"none",label:(0,je._x)("None","Preload value")}]}))),(0,$e.createElement)("figure",k,(0,$e.createElement)(We.Disabled,{isDisabled:!a},(0,$e.createElement)("audio",{controls:"controls",src:d})),p&&(0,$e.createElement)(We.Spinner,null),(!Ze.RichText.isEmpty(c)||a)&&(0,$e.createElement)(Ze.RichText,{tagName:"figcaption",className:(0,Ze.__experimentalGetElementClassName)("caption"),"aria-label":(0,je.__)("Audio caption text"),placeholder:(0,je.__)("Add caption"),value:c,onChange:e=>o({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>l((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))}))):(0,$e.createElement)("div",k,(0,$e.createElement)(Ze.MediaPlaceholder,{icon:(0,$e.createElement)(Ze.BlockIcon,{icon:ft}),onSelect:y,onSelectURL:v,accept:"audio/*",allowedTypes:Ft,value:t,onError:_}))};const Gt={from:[{type:"files",isMatch(e){return 1===e.length&&0===e[0].type.indexOf("audio/")},transform(e){const t=e[0];return(0,Ge.createBlock)("core/audio",{src:(0,xt.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:e=>{let{named:{src:t,mp3:n,m4a:o,ogg:r,wav:a,wma:l}}=e;return t||n||o||r||a||l}},loop:{type:"string",shortcode:e=>{let{named:{loop:t}}=e;return t}},autoplay:{type:"string",shortcode:e=>{let{named:{autoplay:t}}=e;return t}},preload:{type:"string",shortcode:e=>{let{named:{preload:t}}=e;return t}}}}]};var $t=Gt;const Ut={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/audio",title:"Audio",category:"media",description:"Embed a simple audio player.",keywords:["music","sound","podcast","recording"],textdomain:"default",attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},id:{type:"number",__experimentalRole:"content"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{anchor:!0,align:!0,spacing:{margin:!0,padding:!0}},editorStyle:"wp-block-audio-editor",style:"wp-block-audio"},{name:Ot}=Ut,qt={icon:ft,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"}},transforms:$t,deprecated:kt,edit:Dt,save:function(e){let{attributes:t}=e;const{autoplay:n,caption:o,loop:r,preload:a,src:l}=t;return l&&(0,$e.createElement)("figure",Ze.useBlockProps.save(),(0,$e.createElement)("audio",{controls:"controls",src:l,autoPlay:n,loop:r,preload:a}),!Ze.RichText.isEmpty(o)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",value:o,className:(0,Ze.__experimentalGetElementClassName)("caption")}))}},Wt=()=>qe({name:Ot,metadata:Ut,settings:qt});var jt=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"})),Zt=window.wp.compose;const Qt=e=>e,Kt=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=(0,St.pickBy)((0,St.mapValues)(e,Kt),Qt);return(0,St.isEmpty)(t)?void 0:t};var Yt=Kt;function Jt(e){var t,n;if(null==e||null===(t=e.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.fontFamily)return e;const{fontFamily:o,...r}=e.style.typography;return{...e,style:Yt({...e.style,typography:r}),fontFamily:o.split("|").pop()}}const Xt=e=>{var t,n,o;const{borderRadius:r,...a}=e,l=[r,null===(t=a.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius].find((e=>"number"==typeof e&&0!==e));return l?{...a,style:{...a.style,border:{...null===(o=a.style)||void 0===o?void 0:o.border,radius:`${l}px`}}}:a},en=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customGradient)return e;const t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customGradient&&(t.color.gradient=e.customGradient);const{customTextColor:n,customBackgroundColor:o,customGradient:r,...a}=e;return{...a,style:t}},tn=e=>{const{color:t,textColor:n,...o}={...e,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0};return en(o)},nn={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"}},on={attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}},__experimentalSelector:".wp-block-button__link"},save(e){var t,n;let{attributes:o,className:r}=e;const{fontSize:a,linkTarget:l,rel:i,style:s,text:c,title:u,url:m,width:d}=o;if(!c)return null;const p=(0,Ze.__experimentalGetBorderClassesAndStyles)(o),g=(0,Ze.__experimentalGetColorClassesAndStyles)(o),h=(0,Ze.__experimentalGetSpacingClassesAndStyles)(o),v=rt()("wp-block-button__link",g.className,p.className,{"no-border-radius":0===(null==s||null===(t=s.border)||void 0===t?void 0:t.radius)}),b={...p.style,...g.style,...h.style},_=rt()(r,{[`has-custom-width wp-block-button__width-${d}`]:d,"has-custom-font-size":a||(null==s||null===(n=s.typography)||void 0===n?void 0:n.fontSize)});return(0,$e.createElement)("div",Ze.useBlockProps.save({className:_}),(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:v,href:m,title:u,style:b,value:c,target:l,rel:i}))}},rn={attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0},__experimentalSelector:".wp-block-button__link"},save(e){var t,n;let{attributes:o,className:r}=e;const{fontSize:a,linkTarget:l,rel:i,style:s,text:c,title:u,url:m,width:d}=o;if(!c)return null;const p=(0,Ze.__experimentalGetBorderClassesAndStyles)(o),g=(0,Ze.__experimentalGetColorClassesAndStyles)(o),h=(0,Ze.__experimentalGetSpacingClassesAndStyles)(o),v=rt()("wp-block-button__link",g.className,p.className,{"no-border-radius":0===(null==s||null===(t=s.border)||void 0===t?void 0:t.radius)}),b={...p.style,...g.style,...h.style},_=rt()(r,{[`has-custom-width wp-block-button__width-${d}`]:d,"has-custom-font-size":a||(null==s||null===(n=s.typography)||void 0===n?void 0:n.fontSize)});return(0,$e.createElement)("div",Ze.useBlockProps.save({className:_}),(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:v,href:m,title:u,style:b,value:c,target:l,rel:i}))},migrate:Jt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},an=[on,rn,{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...nn,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},isEligible(e){var t;let{style:n}=e;return"number"==typeof(null==n||null===(t=n.border)||void 0===t?void 0:t.radius)},save(e){var t,n,o;let{attributes:r,className:a}=e;const{fontSize:l,linkTarget:i,rel:s,style:c,text:u,title:m,url:d,width:p}=r;if(!u)return null;const g=null==c||null===(t=c.border)||void 0===t?void 0:t.radius,h=(0,Ze.__experimentalGetColorClassesAndStyles)(r),v=rt()("wp-block-button__link",h.className,{"no-border-radius":0===(null==c||null===(n=c.border)||void 0===n?void 0:n.radius)}),b={borderRadius:g||void 0,...h.style},_=rt()(a,{[`has-custom-width wp-block-button__width-${p}`]:p,"has-custom-font-size":l||(null==c||null===(o=c.typography)||void 0===o?void 0:o.fontSize)});return(0,$e.createElement)("div",Ze.useBlockProps.save({className:_}),(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:v,href:d,title:m,style:b,value:u,target:i,rel:s}))},migrate:(0,Zt.compose)(Jt,Xt)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...nn,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save(e){let{attributes:t,className:n}=e;const{borderRadius:o,linkTarget:r,rel:a,text:l,title:i,url:s,width:c}=t,u=(0,Ze.__experimentalGetColorClassesAndStyles)(t),m=rt()("wp-block-button__link",u.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...u.style},p=rt()(n,{[`has-custom-width wp-block-button__width-${c}`]:c});return(0,$e.createElement)("div",Ze.useBlockProps.save({className:p}),(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:m,href:s,title:i,style:d,value:l,target:r,rel:a}))},migrate:(0,Zt.compose)(Jt,Xt)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...nn,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save(e){let{attributes:t,className:n}=e;const{borderRadius:o,linkTarget:r,rel:a,text:l,title:i,url:s,width:c}=t,u=(0,Ze.__experimentalGetColorClassesAndStyles)(t),m=rt()("wp-block-button__link",u.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...u.style},p=rt()(n,{[`has-custom-width wp-block-button__width-${c}`]:c});return(0,$e.createElement)("div",Ze.useBlockProps.save({className:p}),(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:m,href:s,title:i,style:d,value:l,target:r,rel:a}))},migrate:(0,Zt.compose)(Jt,Xt)},{supports:{align:!0,alignWide:!1,color:{gradients:!0}},attributes:{...nn,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},save(e){let{attributes:t}=e;const{borderRadius:n,linkTarget:o,rel:r,text:a,title:l,url:i}=t,s=rt()("wp-block-button__link",{"no-border-radius":0===n}),c={borderRadius:n?n+"px":void 0};return(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:s,href:i,title:l,style:c,value:a,target:o,rel:r})},migrate:Xt},{supports:{align:!0,alignWide:!1},attributes:{...nn,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},customGradient:{type:"string"},gradient:{type:"string"}},isEligible:e=>!!e.customTextColor||!!e.customBackgroundColor||!!e.customGradient,migrate:(0,Zt.compose)(Xt,en),save(e){let{attributes:t}=e;const{backgroundColor:n,borderRadius:o,customBackgroundColor:r,customTextColor:a,customGradient:l,linkTarget:i,gradient:s,rel:c,text:u,textColor:m,title:d,url:p}=t,g=(0,Ze.getColorClassName)("color",m),h=!l&&(0,Ze.getColorClassName)("background-color",n),v=(0,Ze.__experimentalGetGradientClass)(s),b=rt()("wp-block-button__link",{"has-text-color":m||a,[g]:g,"has-background":n||r||l||s,[h]:h,"no-border-radius":0===o,[v]:v}),_={background:l||void 0,backgroundColor:h||l||s?void 0:r,color:g?void 0:a,borderRadius:o?o+"px":void 0};return(0,$e.createElement)("div",null,(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:b,href:p,title:d,style:_,value:u,target:i,rel:c}))}},{attributes:{...nn,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"}},isEligible(e){return e.className&&e.className.includes("is-style-squared")},migrate(e){let t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),Xt(en({...e,className:t||void 0,borderRadius:0}))},save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:o,customTextColor:r,linkTarget:a,rel:l,text:i,textColor:s,title:c,url:u}=t,m=(0,Ze.getColorClassName)("color",s),d=(0,Ze.getColorClassName)("background-color",n),p=rt()("wp-block-button__link",{"has-text-color":s||r,[m]:m,"has-background":n||o,[d]:d}),g={backgroundColor:d?void 0:o,color:m?void 0:r};return(0,$e.createElement)("div",null,(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:p,href:u,title:c,style:g,value:i,target:a,rel:l}))}},{attributes:{...nn,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},migrate:tn,save(e){let{attributes:t}=e;const{url:n,text:o,title:r,backgroundColor:a,textColor:l,customBackgroundColor:i,customTextColor:s}=t,c=(0,Ze.getColorClassName)("color",l),u=(0,Ze.getColorClassName)("background-color",a),m=rt()("wp-block-button__link",{"has-text-color":l||s,[c]:c,"has-background":a||i,[u]:u}),d={backgroundColor:u?void 0:i,color:c?void 0:s};return(0,$e.createElement)("div",null,(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:m,href:n,title:r,style:d,value:o}))}},{attributes:{...nn,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save(e){let{attributes:t}=e;const{url:n,text:o,title:r,align:a,color:l,textColor:i}=t,s={backgroundColor:l,color:i};return(0,$e.createElement)("div",{className:`align${a}`},(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:n,title:r,style:s,value:o}))},migrate:tn},{attributes:{...nn,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save(e){let{attributes:t}=e;const{url:n,text:o,title:r,align:a,color:l,textColor:i}=t;return(0,$e.createElement)("div",{className:`align${a}`,style:{backgroundColor:l}},(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",href:n,title:r,style:{color:i},value:o}))},migrate:tn}];var ln=an,sn=window.wp.keycodes;var cn=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.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"}));var un=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));const mn="noreferrer noopener";function dn(e){let{selectedWidth:t,setAttributes:n}=e;return(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Width settings")},(0,$e.createElement)(We.ButtonGroup,{"aria-label":(0,je.__)("Button width")},[25,50,75,100].map((e=>(0,$e.createElement)(We.Button,{key:e,isSmall:!0,variant:e===t?"primary":void 0,onClick:()=>{var o;n({width:t===(o=e)?void 0:o})}},e,"%")))))}var pn=function(e){var t;const{attributes:n,setAttributes:o,className:r,isSelected:a,onReplace:l,mergeBlocks:i}=e,{linkTarget:s,placeholder:c,rel:u,style:m,text:d,url:p,width:g}=n,h=(0,$e.useCallback)((e=>{o({rel:e})}),[o]),[v,b]=(0,$e.useState)(null),_=(0,Ze.__experimentalUseBorderProps)(n),y=(0,Ze.__experimentalUseColorProps)(n),f=(0,Ze.__experimentalGetSpacingClassesAndStyles)(n),k=(0,$e.useRef)(),x=(0,$e.useRef)(),w=(0,Ze.useBlockProps)({ref:(0,Zt.useMergeRefs)([b,k]),onKeyDown:function(e){if(sn.isKeyboardEvent.primary(e,"k"))T(e);else if(sn.isKeyboardEvent.primaryShift(e,"k")){var t;N(),null===(t=x.current)||void 0===t||t.focus()}}}),[E,C]=(0,$e.useState)(!1),S=!!p,B="_blank"===s;function T(e){e.preventDefault(),C(!0)}function N(){o({url:void 0,linkTarget:void 0,rel:void 0}),C(!1)}return(0,$e.useEffect)((()=>{a||C(!1)}),[a]),(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)("div",nt({},w,{className:rt()(w.className,{[`has-custom-width wp-block-button__width-${g}`]:g,"has-custom-font-size":w.style.fontSize})}),(0,$e.createElement)(Ze.RichText,{ref:x,"aria-label":(0,je.__)("Button text"),placeholder:c||(0,je.__)("Add text…"),value:d,onChange:e=>{o({text:e.replace(/<\/?a[^>]*>/g,"")})},withoutInteractiveFormatting:!0,className:rt()(r,"wp-block-button__link",y.className,_.className,{"no-border-radius":0===(null==m||null===(t=m.border)||void 0===t?void 0:t.radius)},(0,Ze.__experimentalGetElementClassName)("button")),style:{..._.style,...y.style,...f.style},onSplit:e=>(0,Ge.createBlock)("core/button",{...n,text:e}),onReplace:l,onMerge:i,identifier:"text"})),(0,$e.createElement)(Ze.BlockControls,{group:"block"},!S&&(0,$e.createElement)(We.ToolbarButton,{name:"link",icon:cn,title:(0,je.__)("Link"),shortcut:sn.displayShortcut.primary("k"),onClick:T}),S&&(0,$e.createElement)(We.ToolbarButton,{name:"link",icon:un,title:(0,je.__)("Unlink"),shortcut:sn.displayShortcut.primaryShift("k"),onClick:N,isActive:!0})),a&&(E||S)&&(0,$e.createElement)(We.Popover,{position:"bottom center",onClose:()=>{var e;C(!1),null===(e=x.current)||void 0===e||e.focus()},anchor:v,focusOnMount:!!E&&"firstElement",__unstableSlotName:"__unstable-block-tools-after",shift:!0},(0,$e.createElement)(Ze.__experimentalLinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:p,opensInNewTab:B},onChange:e=>{let{url:t="",opensInNewTab:n}=e;o({url:t}),B!==n&&function(e){const t=e?"_blank":void 0;let n=u;t&&!u?n=mn:t||u!==mn||(n=void 0),o({linkTarget:t,rel:n})}(n)},onRemove:()=>{var e;N(),null===(e=x.current)||void 0===e||e.focus()},forceIsEditingLink:E})),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(dn,{selectedWidth:g,setAttributes:o})),(0,$e.createElement)(Ze.InspectorControls,{__experimentalGroup:"advanced"},(0,$e.createElement)(We.TextControl,{label:(0,je.__)("Link rel"),value:u||"",onChange:h})))};const gn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/button",title:"Button",category:"design",parent:["core/buttons"],description:"Prompt visitors to take action with a button-style link.",keywords:["link"],textdomain:"default",attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}},__experimentalSelector:".wp-block-button .wp-block-button__link"},styles:[{name:"fill",label:"Fill",isDefault:!0},{name:"outline",label:"Outline"}],editorStyle:"wp-block-button-editor",style:"wp-block-button"},{name:hn}=gn,vn={icon:jt,example:{attributes:{className:"is-style-fill",text:(0,je.__)("Call to Action")}},edit:pn,save:function(e){var t,n;let{attributes:o,className:r}=e;const{fontSize:a,linkTarget:l,rel:i,style:s,text:c,title:u,url:m,width:d}=o;if(!c)return null;const p=(0,Ze.__experimentalGetBorderClassesAndStyles)(o),g=(0,Ze.__experimentalGetColorClassesAndStyles)(o),h=(0,Ze.__experimentalGetSpacingClassesAndStyles)(o),v=rt()("wp-block-button__link",g.className,p.className,{"no-border-radius":0===(null==s||null===(t=s.border)||void 0===t?void 0:t.radius)},(0,Ze.__experimentalGetElementClassName)("button")),b={...p.style,...g.style,...h.style},_=rt()(r,{[`has-custom-width wp-block-button__width-${d}`]:d,"has-custom-font-size":a||(null==s||null===(n=s.typography)||void 0===n?void 0:n.fontSize)});return(0,$e.createElement)("div",Ze.useBlockProps.save({className:_}),(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:v,href:m,title:u,style:b,value:c,target:l,rel:i}))},deprecated:ln,merge:(e,t)=>{let{text:n=""}=t;return{...e,text:(e.text||"")+n}}},bn=()=>qe({name:hn,metadata:gn,settings:vn});var _n=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M17 3H7c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v4zm-8-1.2h5V6.2h-5v1.6zM17 13H7c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v4zm-8-1.2h5v-1.5h-5v1.5z"}));const yn=e=>{if(e.layout)return e;const{contentJustification:t,orientation:n,...o}=e;return(t||n)&&Object.assign(o,{layout:{type:"flex",...t&&{justifyContent:t},...n&&{orientation:n}}}),o},fn=[{attributes:{contentJustification:{type:"string"},orientation:{type:"string",default:"horizontal"}},supports:{anchor:!0,align:["wide","full"],__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}}},isEligible:e=>{let{contentJustification:t,orientation:n}=e;return!!t||!!n},migrate:yn,save(e){let{attributes:{contentJustification:t,orientation:n}}=e;return(0,$e.createElement)("div",Ze.useBlockProps.save({className:rt()({[`is-content-justification-${t}`]:t,"is-vertical":"vertical"===n})}),(0,$e.createElement)(Ze.InnerBlocks.Content,null))}},{supports:{align:["center","left","right"],anchor:!0},save(){return(0,$e.createElement)("div",null,(0,$e.createElement)(Ze.InnerBlocks.Content,null))},isEligible(e){let{align:t}=e;return t&&["center","left","right"].includes(t)},migrate(e){return yn({...e,align:void 0,contentJustification:e.align})}}];var kn=fn,xn=window.wp.richText;const{name:wn}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/buttons",title:"Buttons",category:"design",description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",supports:{anchor:!0,align:["wide","full"],__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"},En={from:[{type:"block",isMultiBlock:!0,blocks:["core/button"],transform:e=>(0,Ge.createBlock)(wn,{},e.map((e=>(0,Ge.createBlock)("core/button",e))))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,Ge.createBlock)(wn,{},e.map((e=>{const t=(0,xn.__unstableCreateElement)(document,e.content),n=t.innerText||"",o=t.querySelector("a"),r=null==o?void 0:o.getAttribute("href");return(0,Ge.createBlock)("core/button",{text:n,url:r})}))),isMatch:e=>e.every((e=>{const t=(0,xn.__unstableCreateElement)(document,e.content),n=t.innerText||"",o=t.querySelectorAll("a");return n.length<=30&&o.length<=1}))}]};var Cn=En;const Sn=[hn],Bn={name:hn,attributesToCopy:["backgroundColor","border","className","fontFamily","fontSize","gradient","style","textColor","width"]};var Tn=function(e){var t;let{attributes:n,className:o}=e;const{fontSize:r,layout:a={},style:l}=n,i=(0,Ze.useBlockProps)({className:rt()(o,{"has-custom-font-size":r||(null==l||null===(t=l.typography)||void 0===t?void 0:t.fontSize)})}),s=(0,it.useSelect)((e=>{var t;const n=e(Ze.store).getSettings().__experimentalPreferredStyleVariations;return null==n||null===(t=n.value)||void 0===t?void 0:t[hn]}),[]),c=(0,Ze.useInnerBlocksProps)(i,{allowedBlocks:Sn,__experimentalDefaultBlock:Bn,__experimentalDirectInsert:!0,template:[[hn,{className:s&&`is-style-${s}`}]],__experimentalLayout:a,templateInsertUpdatesSelection:!0});return(0,$e.createElement)("div",c)};const Nn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/buttons",title:"Buttons",category:"design",description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",supports:{anchor:!0,align:["wide","full"],__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"},{name:Pn}=Nn,In={icon:_n,example:{innerBlocks:[{name:"core/button",attributes:{text:(0,je.__)("Find out more")}},{name:"core/button",attributes:{text:(0,je.__)("Contact us")}}]},deprecated:kn,transforms:Cn,edit:Tn,save:function(e){var t;let{attributes:n,className:o}=e;const{fontSize:r,style:a}=n,l=Ze.useBlockProps.save({className:rt()(o,{"has-custom-font-size":r||(null==a||null===(t=a.typography)||void 0===t?void 0:t.fontSize)})}),i=Ze.useInnerBlocksProps.save(l);return(0,$e.createElement)("div",i)}},zn=()=>qe({name:Pn,metadata:Nn,settings:In});var Mn=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"}));const Ln=Pt()((e=>{if(!e)return{};const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1}}));var Rn={from:[{type:"block",blocks:["core/archives"],transform:()=>(0,Ge.createBlock)("core/calendar")}],to:[{type:"block",blocks:["core/archives"],transform:()=>(0,Ge.createBlock)("core/archives")}]};const An={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/calendar",title:"Calendar",category:"widgets",description:"A calendar of your site’s posts.",keywords:["posts","archive"],textdomain:"default",attributes:{month:{type:"integer"},year:{type:"integer"}},supports:{align:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},style:"wp-block-calendar"},{name:Vn}=An,Hn={icon:Mn,example:{},edit:function(e){let{attributes:t}=e;const n=(0,Ze.useBlockProps)(),{date:o,hasPosts:r,hasPostsResolved:a}=(0,it.useSelect)((e=>{const{getEntityRecords:t,hasFinishedResolution:n}=e(lt.store),o={status:"publish",per_page:1},r=t("postType","post",o),a=n("getEntityRecords",["postType","post",o]);let l;const i=e("core/editor");if(i){"post"===i.getEditedPostAttribute("type")&&(l=i.getEditedPostAttribute("date"))}return{date:l,hasPostsResolved:a,hasPosts:a&&1===(null==r?void 0:r.length)}}),[]);return r?(0,$e.createElement)("div",n,(0,$e.createElement)(We.Disabled,null,(0,$e.createElement)(Ke(),{block:"core/calendar",attributes:{...t,...Ln(o)}}))):(0,$e.createElement)("div",n,(0,$e.createElement)(We.Placeholder,{icon:Mn,label:(0,je.__)("Calendar")},a?(0,je.__)("No published posts found."):(0,$e.createElement)(We.Spinner,null)))},transforms:Rn},Fn=()=>qe({name:Vn,metadata:An,settings:Hn});var Dn=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"}));var Gn=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z"}));const $n={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/categories",title:"Categories List",category:"widgets",description:"Display a list of all categories.",textdomain:"default",attributes:{displayAsDropdown:{type:"boolean",default:!1},showHierarchy:{type:"boolean",default:!1},showPostCounts:{type:"boolean",default:!1},showOnlyTopLevel:{type:"boolean",default:!1},showEmpty:{type:"boolean",default:!1}},supports:{align:!0,html:!1,spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-categories-editor",style:"wp-block-categories"},{name:Un}=$n,On={icon:Dn,example:{},edit:function e(t){let{attributes:{displayAsDropdown:n,showHierarchy:o,showPostCounts:r,showOnlyTopLevel:a,showEmpty:l},setAttributes:i,className:s}=t;const c=(0,Zt.useInstanceId)(e,"blocks-category-select"),u={per_page:-1,hide_empty:!l,context:"view"};a&&(u.parent=0);const{records:m,isResolving:d}=(0,lt.useEntityRecords)("taxonomy","category",u),p=e=>null!=m&&m.length?null===e?m:m.filter((t=>{let{parent:n}=t;return n===e})):[],g=e=>t=>i({[e]:t}),h=e=>e?(0,St.unescape)(e).trim():(0,je.__)("(Untitled)"),v=e=>{const t=p(e.id),{id:n,link:a,count:l,name:i}=e;return(0,$e.createElement)("li",{key:n,className:`cat-item cat-item-${n}`},(0,$e.createElement)("a",{href:a,target:"_blank",rel:"noreferrer noopener"},h(i)),r&&` (${l})`,o&&!!t.length&&(0,$e.createElement)("ul",{className:"children"},t.map((e=>v(e)))))},b=(e,t)=>{const{id:n,count:a,name:l}=e,i=p(n);return[(0,$e.createElement)("option",{key:n,className:`level-${t}`},Array.from({length:3*t}).map((()=>" ")),h(l),r&&` (${a})`),o&&!!i.length&&i.map((e=>b(e,t+1)))]},_=null==m||!m.length||n||d?"div":"ul",y=rt()(s,{"wp-block-categories-list":!(null==m||!m.length||n||d),"wp-block-categories-dropdown":!(null==m||!m.length)&&n&&!d}),f=(0,Ze.useBlockProps)({className:y});return(0,$e.createElement)(_,f,(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Display as dropdown"),checked:n,onChange:g("displayAsDropdown")}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show post counts"),checked:r,onChange:g("showPostCounts")}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show only top level categories"),checked:a,onChange:g("showOnlyTopLevel")}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show empty categories"),checked:l,onChange:g("showEmpty")}),!a&&(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show hierarchy"),checked:o,onChange:g("showHierarchy")}))),d&&(0,$e.createElement)(We.Placeholder,{icon:Gn,label:(0,je.__)("Categories")},(0,$e.createElement)(We.Spinner,null)),!d&&0===(null==m?void 0:m.length)&&(0,$e.createElement)("p",null,(0,je.__)("Your site does not have any posts, so there is nothing to display here at the moment.")),!d&&(null==m?void 0:m.length)>0&&(n?(()=>{const e=p(o?0:null);return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.VisuallyHidden,{as:"label",htmlFor:c},(0,je.__)("Categories")),(0,$e.createElement)("select",{id:c},(0,$e.createElement)("option",null,(0,je.__)("Select Category")),e.map((e=>b(e,0)))))})():p(o?0:null).map((e=>v(e,0)))))}},qn=()=>qe({name:Un,metadata:$n,settings:On});var Wn=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10 10H8v2h2v-2zm-5 2h2v-2H5v2zm8-2h-2v2h2v-2zm-5 6h8v-2H8v2zm6-4h2v-2h-2v2zm3 0h2v-2h-2v2zm0 4h2v-2h-2v2zM5 16h2v-2H5v2z"}));var jn=e=>{let{clientId:t}=e;const{replaceBlocks:n}=(0,it.useDispatch)(Ze.store),o=(0,it.useSelect)((e=>e(Ze.store).getBlock(t)),[t]);return(0,$e.createElement)(We.ToolbarButton,{onClick:()=>n(o.clientId,(0,Ge.rawHandler)({HTML:(0,Ge.serialize)(o)}))},(0,je.__)("Convert to blocks"))};const{wp:Zn}=window;const Qn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/freeform",title:"Classic",category:"text",description:"Use the classic WordPress editor.",textdomain:"default",attributes:{content:{type:"string",source:"html"}},supports:{className:!1,customClassName:!1,reusable:!1},editorStyle:"wp-block-freeform-editor"},{name:Kn}=Qn,Yn={icon:Wn,edit:function(e){let{clientId:t,attributes:{content:n},setAttributes:o,onReplace:r}=e;const{getMultiSelectedBlockClientIds:a}=(0,it.useSelect)(Ze.store),l=(0,$e.useRef)(!1);return(0,$e.useEffect)((()=>{if(!l.current)return;const e=window.tinymce.get(`editor-${t}`);(null==e?void 0:e.getContent())!==n&&e.setContent(n||"")}),[n]),(0,$e.useEffect)((()=>{const{baseURL:e,suffix:i}=window.wpEditorL10n.tinymce;function s(e){let t;n&&e.on("loadContent",(()=>e.setContent(n))),e.on("blur",(()=>{var n;t=e.selection.getBookmark(2,!0);const r=document.querySelector(".interface-interface-skeleton__content"),l=r.scrollTop;return null!==(n=a())&&void 0!==n&&n.length||o({content:e.getContent()}),e.once("focus",(()=>{t&&(e.selection.moveToBookmark(t),r.scrollTop!==l&&(r.scrollTop=l))})),!1})),e.on("mousedown touchstart",(()=>{t=null}));const l=(0,St.debounce)((()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,o({content:t}))}),250);e.on("Paste Change input Undo Redo",l),e.on("remove",l.cancel),e.on("keydown",(t=>{sn.isKeyboardEvent.primary(t,"z")&&t.stopPropagation(),t.keyCode!==sn.BACKSPACE&&t.keyCode!==sn.DELETE||!function(e){const t=e.getBody();return!(t.childNodes.length>1)&&(0===t.childNodes.length||!(t.childNodes[0].childNodes.length>1)&&/^\n?$/.test(t.innerText||t.textContent))}(e)||(r([]),t.preventDefault(),t.stopImmediatePropagation());const{altKey:n}=t;n&&t.keyCode===sn.F10&&t.stopPropagation()})),e.on("init",(()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function c(){const{settings:e}=window.wpEditorL10n.tinymce;Zn.oldEditor.initialize(`editor-${t}`,{tinymce:{...e,inline:!0,content_css:!1,fixed_toolbar_container:`#toolbar-${t}`,setup:s}})}function u(){"complete"===document.readyState&&c()}return l.current=!0,window.tinymce.EditorManager.overrideDefaults({base_url:e,suffix:i}),"complete"===document.readyState?c():document.addEventListener("readystatechange",u),()=>{document.removeEventListener("readystatechange",u),Zn.oldEditor.remove(`editor-${t}`)}}),[]),(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(We.ToolbarGroup,null,(0,$e.createElement)(jn,{clientId:t}))),(0,$e.createElement)("div",(0,Ze.useBlockProps)(),(0,$e.createElement)("div",{key:"toolbar",id:`toolbar-${t}`,className:"block-library-classic__toolbar",onClick:function(){const e=window.tinymce.get(`editor-${t}`);e&&e.focus()},"data-placeholder":(0,je.__)("Classic"),onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}}),(0,$e.createElement)("div",{key:"editor",id:`editor-${t}`,className:"wp-block-freeform block-library-rich-text__tinymce"})))},save:function(e){let{attributes:t}=e;const{content:n}=t;return(0,$e.createElement)($e.RawHTML,null,n)}},Jn=()=>qe({name:Kn,metadata:Qn,settings:Yn});var Xn=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));function eo(e){return e.replace(/\[/g,"[")}function to(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1//$2")}var no={from:[{type:"enter",regExp:/^```$/,transform:()=>(0,Ge.createBlock)("core/code")},{type:"block",blocks:["core/html","core/paragraph"],transform:e=>{let{content:t}=e;return(0,Ge.createBlock)("core/code",{content:t})}},{type:"raw",isMatch:e=>"PRE"===e.nodeName&&1===e.children.length&&"CODE"===e.firstChild.nodeName,schema:{pre:{children:{code:{children:{"#text":{}}}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>{let{content:t}=e;return(0,Ge.createBlock)("core/paragraph",{content:t})}}]};const oo={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/code",title:"Code",category:"text",description:"Display code snippets that respect your spacing and tabs.",textdomain:"default",attributes:{content:{type:"string",source:"html",selector:"code"}},supports:{anchor:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{margin:["top","bottom"],padding:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{width:!0,color:!0}},color:{text:!0,background:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}}},style:"wp-block-code"},{name:ro}=oo,ao={icon:Xn,example:{attributes:{content:(0,je.__)('// A "block" is the abstract term used\n// to describe units of markup that\n// when composed together, form the\n// content or layout of a page.\nregisterBlockType( name, settings );')}},transforms:no,edit:function(e){let{attributes:t,setAttributes:n,onRemove:o}=e;const r=(0,Ze.useBlockProps)();return(0,$e.createElement)("pre",r,(0,$e.createElement)(Ze.RichText,{tagName:"code",value:t.content,onChange:e=>n({content:e}),onRemove:o,placeholder:(0,je.__)("Write code…"),"aria-label":(0,je.__)("Code"),preserveWhiteSpace:!0,__unstablePastePlainText:!0}))},save:function(e){let{attributes:t}=e;return(0,$e.createElement)("pre",Ze.useBlockProps.save(),(0,$e.createElement)(Ze.RichText.Content,{tagName:"code",value:(n=t.content,(0,St.flow)(eo,to)(n||""))}));var n}},lo=()=>qe({name:ro,metadata:oo,settings:ao});var io=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z"}));const so=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible(e){let{width:t}=e;return isFinite(t)},migrate(e){return{...e,width:`${e.width}%`}},save(e){let{attributes:t}=e;const{verticalAlignment:n,width:o}=t,r=rt()({[`is-vertically-aligned-${n}`]:n}),a={flexBasis:o+"%"};return(0,$e.createElement)("div",{className:r,style:a},(0,$e.createElement)(Ze.InnerBlocks.Content,null))}}];var co=so;var uo=function(e){let{attributes:{verticalAlignment:t,width:n,templateLock:o,allowedBlocks:r},setAttributes:a,clientId:l}=e;const i=rt()("block-core-columns",{[`is-vertically-aligned-${t}`]:t}),s=(0,We.__experimentalUseCustomUnits)({availableUnits:(0,Ze.useSetting)("spacing.units")||["%","px","em","rem","vw"]}),{columnsIds:c,hasChildBlocks:u,rootClientId:m}=(0,it.useSelect)((e=>{const{getBlockOrder:t,getBlockRootClientId:n}=e(Ze.store),o=n(l);return{hasChildBlocks:t(l).length>0,rootClientId:o,columnsIds:t(o)}}),[l]),{updateBlockAttributes:d}=(0,it.useDispatch)(Ze.store),p=Number.isFinite(n)?n+"%":n,g=(0,Ze.useBlockProps)({className:i,style:p?{flexBasis:p}:void 0}),h=c.length,v=c.indexOf(l)+1,b=(0,je.sprintf)((0,je.__)("%1$s (%2$d of %3$d)"),g["aria-label"],v,h),_=(0,Ze.useInnerBlocksProps)({...g,"aria-label":b},{templateLock:o,allowedBlocks:r,renderAppender:u?void 0:Ze.InnerBlocks.ButtonBlockAppender});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(Ze.BlockVerticalAlignmentToolbar,{onChange:e=>{a({verticalAlignment:e}),d(m,{verticalAlignment:null})},value:t})),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Column settings")},(0,$e.createElement)(We.__experimentalUnitControl,{label:(0,je.__)("Width"),labelPosition:"edge",__unstableInputWidth:"80px",value:n||"",onChange:e=>{e=0>parseFloat(e)?"0":e,a({width:e})},units:s}))),(0,$e.createElement)("div",_))};const mo={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/column",title:"Column",category:"text",parent:["core/columns"],description:"A single column within a columns block.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},width:{type:"string"},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:!0,padding:!0,__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:!0}},{name:po}=mo,go={icon:io,edit:uo,save:function(e){let{attributes:t}=e;const{verticalAlignment:n,width:o}=t,r=rt()({[`is-vertically-aligned-${n}`]:n});let a;if(o&&/\d/.test(o)){let e=Number.isFinite(o)?o+"%":o;if(!Number.isFinite(o)&&null!=o&&o.endsWith("%")){const t=1e12;e=Math.round(Number.parseFloat(o)*t)/t+"%"}a={flexBasis:e}}const l=Ze.useBlockProps.save({className:r,style:a}),i=Ze.useInnerBlocksProps.save(l);return(0,$e.createElement)("div",i)},deprecated:co},ho=()=>qe({name:po,metadata:mo,settings:go});var vo=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-4.1 1.5v10H10v-10h4.9zM5.5 17V8c0-.3.2-.5.5-.5h2.5v10H6c-.3 0-.5-.2-.5-.5zm14 0c0 .3-.2.5-.5.5h-2.6v-10H19c.3 0 .5.2.5.5v9z"}));function bo(e){let t,{doc:n}=bo;n||(n=document.implementation.createHTMLDocument(""),bo.doc=n),n.body.innerHTML=e;for(const e of n.body.firstChild.classList)if(t=e.match(/^layout-column-(\d+)$/))return Number(t[1])-1}var _o=[{attributes:{verticalAlignment:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>{if(!e.customTextColor&&!e.customBackgroundColor)return e;const t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor);const{customTextColor:n,customBackgroundColor:o,...r}=e;return{...r,style:t,isStackedOnMobile:!0}},save(e){let{attributes:t}=e;const{verticalAlignment:n,backgroundColor:o,customBackgroundColor:r,textColor:a,customTextColor:l}=t,i=(0,Ze.getColorClassName)("background-color",o),s=(0,Ze.getColorClassName)("color",a),c=rt()({"has-background":o||r,"has-text-color":a||l,[i]:i,[s]:s,[`are-vertically-aligned-${n}`]:n}),u={backgroundColor:i?void 0:r,color:s?void 0:l};return(0,$e.createElement)("div",{className:c||void 0,style:u},(0,$e.createElement)(Ze.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},isEligible(e,t){return!!t.some((e=>/layout-column-\d+/.test(e.originalContent)))&&t.some((e=>void 0!==bo(e.originalContent)))},migrate(e,t){const n=t.reduce(((e,t)=>{const{originalContent:n}=t;let o=bo(n);return void 0===o&&(o=0),e[o]||(e[o]=[]),e[o].push(t),e}),[]).map((e=>(0,Ge.createBlock)("core/column",{},e))),{columns:o,...r}=e;return[{...r,isStackedOnMobile:!0},n]},save(e){let{attributes:t}=e;const{columns:n}=t;return(0,$e.createElement)("div",{className:`has-${n}-columns`},(0,$e.createElement)(Ze.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},migrate(e,t){const{columns:n,...o}=e;return[e={...o,isStackedOnMobile:!0},t]},save(e){let{attributes:t}=e;const{verticalAlignment:n,columns:o}=t,r=rt()(`has-${o}-columns`,{[`are-vertically-aligned-${n}`]:n});return(0,$e.createElement)("div",{className:r},(0,$e.createElement)(Ze.InnerBlocks.Content,null))}}];const yo=e=>{const t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function fo(e,t){const{width:n=100/t}=e.attributes;return yo(n)}function ko(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce(((e,n)=>e+fo(n,t)),0)}function xo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce(((e,n)=>{const o=fo(n,t);return Object.assign(e,{[n.clientId]:o})}),{})}function wo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;const o=ko(e,n);return(0,St.mapValues)(xo(e,n),(e=>yo(t*e/o)))}function Eo(e,t){return e.map((e=>(0,St.merge)({},e,{attributes:{width:`${t[e.clientId]}%`}})))}const Co=["core/column"];const So=(0,it.withDispatch)(((e,t,n)=>({updateAlignment(o){const{clientId:r,setAttributes:a}=t,{updateBlockAttributes:l}=e(Ze.store),{getBlockOrder:i}=n.select(Ze.store);a({verticalAlignment:o});i(r).forEach((e=>{l(e,{verticalAlignment:o})}))},updateColumns(o,r){const{clientId:a}=t,{replaceInnerBlocks:l}=e(Ze.store),{getBlocks:i}=n.select(Ze.store);let s=i(a);const c=s.every((e=>{var t;const n=e.attributes.width;return Number.isFinite(null!=n&&null!==(t=n.endsWith)&&void 0!==t&&t.call(n,"%")?parseFloat(n):n)}));const u=r>o;if(u&&c){const e=yo(100/r);s=[...Eo(s,wo(s,100-e)),...Array.from({length:r-o}).map((()=>(0,Ge.createBlock)("core/column",{width:`${e}%`})))]}else if(u)s=[...s,...Array.from({length:r-o}).map((()=>(0,Ge.createBlock)("core/column")))];else if(s=s.slice(0,-(o-r)),c){s=Eo(s,wo(s,100))}l(a,s)}})))((function(e){let{attributes:t,setAttributes:n,updateAlignment:o,updateColumns:r,clientId:a}=e;const{isStackedOnMobile:l,verticalAlignment:i}=t,{count:s}=(0,it.useSelect)((e=>({count:e(Ze.store).getBlockCount(a)})),[a]),c=rt()({[`are-vertically-aligned-${i}`]:i,"is-not-stacked-on-mobile":!l}),u=(0,Ze.useBlockProps)({className:c}),m=(0,Ze.useInnerBlocksProps)(u,{allowedBlocks:Co,orientation:"horizontal",renderAppender:!1});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(Ze.BlockVerticalAlignmentToolbar,{onChange:o,value:i})),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,null,(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Columns"),value:s,onChange:e=>r(s,e),min:1,max:Math.max(6,s)}),s>6&&(0,$e.createElement)(We.Notice,{status:"warning",isDismissible:!1},(0,je.__)("This column count exceeds the recommended amount and may cause visual breakage.")),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Stack on mobile"),checked:l,onChange:()=>n({isStackedOnMobile:!l})}))),(0,$e.createElement)("div",m))}));function Bo(e){let{clientId:t,name:n,setAttributes:o}=e;const{blockType:r,defaultVariation:a,variations:l}=(0,it.useSelect)((e=>{const{getBlockVariations:t,getBlockType:o,getDefaultBlockVariation:r}=e(Ge.store);return{blockType:o(n),defaultVariation:r(n,"block"),variations:t(n,"block")}}),[n]),{replaceInnerBlocks:i}=(0,it.useDispatch)(Ze.store),s=(0,Ze.useBlockProps)();return(0,$e.createElement)("div",s,(0,$e.createElement)(Ze.__experimentalBlockVariationPicker,{icon:(0,St.get)(r,["icon","src"]),label:(0,St.get)(r,["title"]),variations:l,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;e.attributes&&o(e.attributes),e.innerBlocks&&i(t,(0,Ge.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0)},allowSkip:!0}))}var To=e=>{const{clientId:t}=e,n=(0,it.useSelect)((e=>e(Ze.store).getBlocks(t).length>0),[t])?So:Bo;return(0,$e.createElement)(n,e)};var No=[{name:"one-column-full",title:(0,je.__)("100"),description:(0,je.__)("One column"),icon:(0,$e.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m39.0625 14h-30.0625v20.0938h30.0625zm-30.0625-2c-1.10457 0-2 .8954-2 2v20.0938c0 1.1045.89543 2 2 2h30.0625c1.1046 0 2-.8955 2-2v-20.0938c0-1.1046-.8954-2-2-2z"})),innerBlocks:[["core/column"]],scope:["block"]},{name:"two-columns-equal",title:(0,je.__)("50 / 50"),description:(0,je.__)("Two columns; equal split"),icon:(0,$e.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H25V34H39ZM23 34H9V14H23V34Z"})),isDefault:!0,innerBlocks:[["core/column"],["core/column"]],scope:["block"]},{name:"two-columns-one-third-two-thirds",title:(0,je.__)("33 / 66"),description:(0,je.__)("Two columns; one-third, two-thirds split"),icon:(0,$e.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H20V34H39ZM18 34H9V14H18V34Z"})),innerBlocks:[["core/column",{width:"33.33%"}],["core/column",{width:"66.66%"}]],scope:["block"]},{name:"two-columns-two-thirds-one-third",title:(0,je.__)("66 / 33"),description:(0,je.__)("Two columns; two-thirds, one-third split"),icon:(0,$e.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H30V34H39ZM28 34H9V14H28V34Z"})),innerBlocks:[["core/column",{width:"66.66%"}],["core/column",{width:"33.33%"}]],scope:["block"]},{name:"three-columns-equal",title:(0,je.__)("33 / 33 / 33"),description:(0,je.__)("Three columns; equal split"),icon:(0,$e.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(We.Path,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM28.5 34h-9V14h9v20zm2 0V14H39v20h-8.5zm-13 0H9V14h8.5v20z"})),innerBlocks:[["core/column"],["core/column"],["core/column"]],scope:["block"]},{name:"three-columns-wider-center",title:(0,je.__)("25 / 50 / 25"),description:(0,je.__)("Three columns; wide center column"),icon:(0,$e.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(We.Path,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM31 34H17V14h14v20zm2 0V14h6v20h-6zm-18 0H9V14h6v20z"})),innerBlocks:[["core/column",{width:"25%"}],["core/column",{width:"50%"}],["core/column",{width:"25%"}]],scope:["block"]}];const Po={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{const t=+(100/e.length).toFixed(2),n=e.map((e=>{let{name:n,attributes:o,innerBlocks:r}=e;return["core/column",{width:`${t}%`},[[n,{...o},r]]]}));return(0,Ge.createBlock)("core/columns",{},(0,Ge.createBlocksFromInnerBlocksTemplate)(n))},isMatch:(e,t)=>{let{length:n}=e;return(1!==t.length||"core/columns"!==t[0].name)&&(n&&n<=6)}},{type:"block",blocks:["core/media-text"],priority:1,transform:(e,t)=>{const{align:n,backgroundColor:o,textColor:r,style:a,mediaAlt:l,mediaId:i,mediaPosition:s,mediaSizeSlug:c,mediaType:u,mediaUrl:m,mediaWidth:d,verticalAlignment:p}=e;let g;if("image"!==u&&u)g=["core/video",{id:i,src:m}];else{g=["core/image",{...{id:i,alt:l,url:m,sizeSlug:c},...{href:e.href,linkClass:e.linkClass,linkDestination:e.linkDestination,linkTarget:e.linkTarget,rel:e.rel}}]}const h=[["core/column",{width:`${d}%`},[g]],["core/column",{width:100-d+"%"},t]];return"right"===s&&h.reverse(),(0,Ge.createBlock)("core/columns",{align:n,backgroundColor:o,textColor:r,style:a,verticalAlignment:p},(0,Ge.createBlocksFromInnerBlocksTemplate)(h))}}]};var Io=Po;const zo={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/columns",title:"Columns",category:"design",description:"Display content in multiple columns, with blocks added to each column.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:{__experimentalDefault:"2em",sides:["horizontal","vertical"]},margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{padding:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,allowEditing:!1,default:{type:"flex",flexWrap:"nowrap"}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-columns-editor",style:"wp-block-columns"},{name:Mo}=zo,Lo={icon:vo,variations:No,example:{viewportWidth:600,innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,je.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:(0,je.__)("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,je.__)("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:(0,je.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:_o,edit:To,save:function(e){let{attributes:t}=e;const{isStackedOnMobile:n,verticalAlignment:o}=t,r=rt()({[`are-vertically-aligned-${o}`]:o,"is-not-stacked-on-mobile":!n}),a=Ze.useBlockProps.save({className:r}),l=Ze.useInnerBlocksProps.save(a);return(0,$e.createElement)("div",l)},transforms:Io},Ro=()=>qe({name:Mo,metadata:zo,settings:Lo});var Ao=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M14 10.1V4c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1zm-1.5-.5H6.7l-1.2 1.2V4.5h7v5.1zM19 12h-8c-.6 0-1 .4-1 1v6.1c0 .6.4 1 1 1h5.7l1.8 1.8c.1.2.4.3.6.3.1 0 .2 0 .3-.1.4-.1.6-.5.6-.8V13c0-.6-.4-1-1-1zm-.5 7.8l-1.2-1.2h-5.8v-5.1h7v6.3z"}));var Vo=[{attributes:{tagName:{type:"string",default:"div"}},apiVersion:2,supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}}},save(e){let{attributes:{tagName:t}}=e;const n=Ze.useBlockProps.save(),{className:o}=n,r=(null==o?void 0:o.split(" "))||[],a=null==r?void 0:r.filter((e=>"wp-block-comments"!==e)),l={...n,className:a.join(" ")};return(0,$e.createElement)(t,l,(0,$e.createElement)(Ze.InnerBlocks.Content,null))}}];function Ho(e){let{attributes:{TagName:t},setAttributes:n}=e;return(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(Ze.InspectorControls,{__experimentalGroup:"advanced"},(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("HTML element"),options:[{label:(0,je.__)("Default (
)"),value:"div"},{label:"
",value:"section"},{label:"